BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
proteinIterator.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: proteinIterator.h,v 1.15 2005/10/23 12:02:20 oliver Exp $
5 //
6 
7 #ifndef BALL_KERNEL_PROTEINITERATOR_H
8 #define BALL_KERNEL_PROTEINITERATOR_H
9 
10 #ifndef BALL_KERNEL_ITERATOR_H
11 # include <BALL/KERNEL/iterator.h>
12 #endif
13 
14 #ifndef BALL_KERNEL_PROTEIN_H
15 # include <BALL/KERNEL/protein.h>
16 #endif
17 
18 #ifndef BALL_KERNEL_PREDICATE_H
19 # include <BALL/KERNEL/predicate.h>
20 #endif
21 
22 namespace BALL
23 {
30  {
31  public:
32 
35  {
36  predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >();
37  }
38 
39  ProteinIteratorTraits(const Composite& composite)
40  : CompositeIteratorTraits(composite)
41  {
42  predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >();
43  }
44 
45  ProteinIteratorTraits(const ProteinIteratorTraits& traits, bool /* deep */ = true)
46  : CompositeIteratorTraits(traits)
47  {
48  }
49 
50  ProteinIteratorTraits& operator = (const ProteinIteratorTraits& traits)
51  {
53  return *this;
54  }
55 
56  void resetPredicate()
57  {
58  predicate_ = &RTTI::getDefault<KernelPredicate<Protein> >();
59  }
60  };
61 
62 
64  typedef BidirectionalIterator
65  <Composite, Protein, Composite::CompositeIterator,ProteinIteratorTraits>
67 
72 
74  typedef std::reverse_iterator<ProteinIterator> ProteinReverseIterator;
75 
77  typedef std::reverse_iterator<ProteinConstIterator> ProteinConstReverseIterator;
78 } // namespace BALL
79 
80 #endif // BALL_KERNEL_PROTEINITERATOR_H