BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
chainIterator.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: chainIterator.h,v 1.21 2005/10/23 12:02:18 oliver Exp $
5 //
6 
7 #ifndef BALL_KERNEL_CHAINITERATOR_H
8 #define BALL_KERNEL_CHAINITERATOR_H
9 
10 #ifndef BALL_KERNEL_CHAIN_H
11 # include <BALL/KERNEL/chain.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 {
35  {
36 
37  public:
38 
39  inline ChainIteratorTraits();
40 
41  ChainIteratorTraits(const Composite& composite);
42 
43  inline ChainIteratorTraits(const ChainIteratorTraits& traits);
44 
45  ChainIteratorTraits& operator = (const ChainIteratorTraits& traits);
46 
47  void resetPredicate();
48  };
49 
52  {
53  predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
54  }
55 
57  : CompositeIteratorTraits(composite)
58  {
59  predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
60  }
61 
63  : CompositeIteratorTraits(traits)
64  {
65  }
66 
68  {
70  return *this;
71  }
72 
74  {
75  predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
76  }
77 
82 
86 
90 
92  typedef std::reverse_iterator<ChainIterator> ChainReverseIterator;
93 
95  typedef std::reverse_iterator<ChainConstIterator> ChainConstReverseIterator;
97 
100 } // namespace BALL
101 
102 #endif // BALL_KERNEL_CHAINITERATOR_H
103 
std::reverse_iterator< ChainIterator > ChainReverseIterator
A mutable reverse bidirectional iterator for the Chain class.
Definition: chainIterator.h:92
std::reverse_iterator< ChainConstIterator > ChainConstReverseIterator
A constant reverse bidirectional iterator for the Chain class.
Definition: chainIterator.h:95
ConstBidirectionalIterator< Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits > ChainConstIterator
A constant bidirectional iterator for the Chain class.
Definition: chainIterator.h:89
#define IteratorWrapper(type)
#define ConstIteratorWrapper(type)
ChainIteratorTraits & operator=(const ChainIteratorTraits &traits)
Definition: chainIterator.h:67
const UnaryPredicate< Composite > * predicate_
The predicate.
Definition: iterator.h:235
CompositeIteratorTraits & operator=(const CompositeIteratorTraits &traits)
Assignment operator.
Definition: iterator.h:259
BidirectionalIterator< Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits > ChainIterator
A mutable bidirectional iterator for the Chain class.
Definition: chainIterator.h:85
Mutable bidirectional iterator.
#define BALL_EXPORT
Definition: COMMON/global.h:50