BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
atomContainerIterator.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: atomContainerIterator.h,v 1.21 2005/10/23 12:02:17 oliver Exp $
5 //
6 
7 #ifndef BALL_KERNEL_ATOMCONTAINERITERATOR_H
8 #define BALL_KERNEL_ATOMCONTAINERITERATOR_H
9 
10 #ifndef BALL_KERNEL_ITERATOR_H
11 # include <BALL/KERNEL/iterator.h>
12 #endif
13 
14 #ifndef BALL_KERNEL_PREDICATE_H
15 # include <BALL/KERNEL/predicate.h>
16 #endif
17 
18 #ifndef BALL_CONCEPT_STDITERATORWRAPPER_H
20 #endif
21 
22 namespace BALL
23 {
24  class AtomContainer;
25 
32  {
33  public:
34 
36 
37  AtomContainerIteratorTraits(const Composite& composite);
38 
40 
41  AtomContainerIteratorTraits& operator = (const AtomContainerIteratorTraits& traits);
42 
43  void resetPredicate();
44  };
45 
46 
49  {
50  predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
51  }
52 
54  : CompositeIteratorTraits(composite)
55  {
56  predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
57  }
58 
60  : CompositeIteratorTraits(traits)
61  {
62  }
63 
64  inline
65  AtomContainerIteratorTraits& AtomContainerIteratorTraits::operator =
67  {
69  return *this;
70  }
71 
72  inline
74  {
75  predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
76  }
77 
78 
83 
86  typedef BidirectionalIterator
89 
95 
97  typedef std::reverse_iterator<AtomContainerIterator> AtomContainerReverseIterator;
98 
100  typedef std::reverse_iterator<AtomContainerConstIterator> AtomContainerConstReverseIterator;
101 
103 
106 
107 } // namespace BALL
108 
109 #endif // BALL_KERNEL_ATOMCONTAINERITERATOR_H
BidirectionalIterator< Composite, AtomContainer, Composite::CompositeIterator, AtomContainerIteratorTraits > AtomContainerIterator
#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
std::reverse_iterator< AtomContainerIterator > AtomContainerReverseIterator
A mutable reverse bidirectional iterator for the AtomContainer class.
std::reverse_iterator< AtomContainerConstIterator > AtomContainerConstReverseIterator
A constant reverse bidirectional iterator for the AtomContainer class.
ConstBidirectionalIterator< Composite, AtomContainer, Composite::CompositeIterator, AtomContainerIteratorTraits > AtomContainerConstIterator
Mutable bidirectional iterator.
#define BALL_EXPORT
Definition: COMMON/global.h:50