BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
atomIterator.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: atomIterator.h,v 1.21 2005/10/23 12:02:17 oliver Exp $
5 //
6 
7 #ifndef BALL_KERNEL_ATOMITERATOR_H
8 #define BALL_KERNEL_ATOMITERATOR_H
9 
10 #ifndef BALL_KERNEL_ATOM_H
11 # include <BALL/KERNEL/atom.h>
12 #endif
13 
14 #ifndef BALL_KERNEL_ITERATOR_H
15 # include <BALL/KERNEL/iterator.h>
16 #endif
17 
18 #ifndef BALL_KERNEL_PREDICATE_H
19 # include <BALL/KERNEL/predicate.h>
20 #endif
21 
22 #ifndef BALL_CONCEPT_STDITERATORWRAPPER_H
24 #endif
25 
26 namespace BALL
27 {
34  {
35  public:
36 
39  {
40  predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
41  }
42 
43  inline AtomIteratorTraits(const AtomIteratorTraits& traits)
44 
45  : CompositeIteratorTraits(traits)
46  {
47  }
48 
49  AtomIteratorTraits(const Composite& composite);
50 
51  AtomIteratorTraits& operator = (const AtomIteratorTraits& traits);
52 
53  void resetPredicate();
54  };
55 
56 
58  : CompositeIteratorTraits(composite)
59  {
60  predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
61  }
62 
64  {
66  return *this;
67  }
68 
70  {
71  predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
72  }
73 
74 
79 
82  typedef BidirectionalIterator
85 
91 
93  typedef std::reverse_iterator<AtomIterator> AtomReverseIterator;
94 
96  typedef std::reverse_iterator<AtomConstIterator> AtomConstReverseIterator;
97 
99 
102 } // namespace BALL
103 
104 #endif // BALL_KERNEL_ATOMITERATOR_H
105 
std::reverse_iterator< AtomIterator > AtomReverseIterator
A mutable reverse bidirectional iterator for the Atom class.
Definition: atomIterator.h:93
std::reverse_iterator< AtomConstIterator > AtomConstReverseIterator
A constant reverse bidirectional iterator for the Atom class.
Definition: atomIterator.h:96
ConstBidirectionalIterator< Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits > AtomConstIterator
Definition: atomIterator.h:90
#define IteratorWrapper(type)
#define ConstIteratorWrapper(type)
const UnaryPredicate< Composite > * predicate_
The predicate.
Definition: iterator.h:235
CompositeIteratorTraits & operator=(const CompositeIteratorTraits &traits)
Assignment operator.
Definition: iterator.h:259
BidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > CompositeIterator
Definition: composite.h:1468
BidirectionalIterator< Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits > AtomIterator
Definition: atomIterator.h:84
Mutable bidirectional iterator.
char Atom[5]
Definition: PDBdefs.h:257
AtomIteratorTraits & operator=(const AtomIteratorTraits &traits)
Definition: atomIterator.h:63
AtomIteratorTraits(const AtomIteratorTraits &traits)
Definition: atomIterator.h:43
#define BALL_EXPORT
Definition: COMMON/global.h:50