00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: proteinIterator.h,v 1.15 2005/10/23 12:02:20 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_KERNEL_PROTEINITERATOR_H 00008 #define BALL_KERNEL_PROTEINITERATOR_H 00009 00010 #ifndef BALL_KERNEL_ITERATOR_H 00011 # include <BALL/KERNEL/iterator.h> 00012 #endif 00013 00014 #ifndef BALL_KERNEL_PROTEIN_H 00015 # include <BALL/KERNEL/protein.h> 00016 #endif 00017 00018 #ifndef BALL_KERNEL_PREDICATE_H 00019 # include <BALL/KERNEL/predicate.h> 00020 #endif 00021 00022 namespace BALL 00023 { 00028 class BALL_EXPORT ProteinIteratorTraits 00029 : public CompositeIteratorTraits 00030 { 00031 public: 00032 00033 ProteinIteratorTraits() 00034 : CompositeIteratorTraits() 00035 { 00036 predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >(); 00037 } 00038 00039 ProteinIteratorTraits(const Composite& composite) 00040 : CompositeIteratorTraits(composite) 00041 { 00042 predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >(); 00043 } 00044 00045 ProteinIteratorTraits(const ProteinIteratorTraits& traits, bool /* deep */ = true) 00046 : CompositeIteratorTraits(traits) 00047 { 00048 } 00049 00050 ProteinIteratorTraits& operator = (const ProteinIteratorTraits& traits) 00051 { 00052 CompositeIteratorTraits::operator=(traits); 00053 return *this; 00054 } 00055 00056 void resetPredicate() 00057 { 00058 predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >(); 00059 } 00060 }; 00061 00062 00064 typedef BidirectionalIterator 00065 <Composite, Protein, Composite::CompositeIterator,ProteinIteratorTraits> 00066 ProteinIterator; 00067 00069 typedef ConstBidirectionalIterator 00070 <Composite, Protein, Composite::CompositeIterator, ProteinIteratorTraits> 00071 ProteinConstIterator; 00072 00074 typedef std::reverse_iterator<ProteinIterator> ProteinReverseIterator; 00075 00077 typedef std::reverse_iterator<ProteinConstIterator> ProteinConstReverseIterator; 00078 } // namespace BALL 00079 00080 #endif // BALL_KERNEL_PROTEINITERATOR_H