BALL
1.4.2
|
#include <BALL/KERNEL/iterator.h>
Public Member Functions | |
Composite::CompositeIterator & | getPosition () |
Return the current iterator position. More... | |
const Composite::CompositeIterator & | getPosition () const |
Return the current iterator posittion (const method) More... | |
void | invalidate () |
void | toBegin () |
void | toEnd () |
Composite & | getData () |
Return a reference to the current element. More... | |
const Composite & | getData () const |
Return a const reference to the current element. More... | |
void | forward () |
Increment the iterator by one element. More... | |
void | backward () |
Decrement the iterator one element. More... | |
void | toRBegin () |
void | toREnd () |
void | setPredicate (const UnaryPredicate< Composite > &predicate) |
Assign the current predicate associated with the iterator. More... | |
const UnaryPredicate< Composite > * | getPredicate () const |
Return the current predicate associated with the iterator. More... | |
Constructors and Destructor | |
CompositeIteratorTraits () | |
Default constructor. More... | |
CompositeIteratorTraits (const Composite &composite) | |
Copy constructor. More... | |
CompositeIteratorTraits (const CompositeIteratorTraits &traits) | |
Detailed constructor. More... | |
~CompositeIteratorTraits () | |
Destructor. More... | |
Assignment | |
CompositeIteratorTraits & | operator= (const CompositeIteratorTraits &traits) |
Assignment operator. More... | |
Accessors | |
Composite * | getContainer () |
Return a pointer to the container the iterator is bound to. More... | |
const Composite * | getContainer () const |
Return a const pointer to the container the iterator is bound to. More... | |
Predicates | |
bool | operator== (const CompositeIteratorTraits &traits) const |
Equality operator. More... | |
bool | operator!= (const CompositeIteratorTraits &traits) const |
Inequality operator. More... | |
bool | isValid () const |
bool | isSingular () const |
Check whether the iterator is bound to a container. More... | |
bool | isBegin () const |
bool | isEnd () const |
bool | isRBegin () const |
bool | isREnd () const |
Protected Attributes | |
Composite * | bound_ |
The pointer to the container. More... | |
Composite::CompositeIterator | composite_iterator_ |
The internal iterator to iterate over the current node's children. More... | |
const UnaryPredicate< Composite > * | predicate_ |
The predicate. More... | |
Composite Iterator Traits This class is used in the implementation of the kernel iterators. It is intended for internal use only.
Definition at line 83 of file iterator.h.
|
inline |
Default constructor.
Definition at line 238 of file iterator.h.
|
inline |
Copy constructor.
Definition at line 245 of file iterator.h.
|
inline |
Detailed constructor.
Definition at line 252 of file iterator.h.
|
inline |
Destructor.
Definition at line 101 of file iterator.h.
|
inline |
Decrement the iterator one element.
Definition at line 379 of file iterator.h.
|
inline |
Increment the iterator by one element.
Definition at line 331 of file iterator.h.
|
inline |
Return a pointer to the container the iterator is bound to.
Definition at line 117 of file iterator.h.
|
inline |
Return a const pointer to the container the iterator is bound to.
Definition at line 120 of file iterator.h.
|
inline |
Return a reference to the current element.
Definition at line 321 of file iterator.h.
|
inline |
Return a const reference to the current element.
Definition at line 326 of file iterator.h.
|
inline |
Return the current iterator position.
Definition at line 174 of file iterator.h.
|
inline |
Return the current iterator posittion (const method)
Definition at line 177 of file iterator.h.
|
inline |
Return the current predicate associated with the iterator.
Definition at line 223 of file iterator.h.
|
inline |
Invalidate the iterator. The iterator is separated from its container ( isSingular is true afterwards) and its SubCompositeIterator is invalidated as well.
Definition at line 277 of file iterator.h.
|
inline |
Return true if the iterator is at the first element of the container.
Definition at line 293 of file iterator.h.
|
inline |
Return true if the iterator is beyond the last element of the container.
InvalidIterator | if the iterator is singular |
Definition at line 155 of file iterator.h.
|
inline |
Return true if the iterator is at the last element of the container.
InvalidIterator | if the iterator is singular |
Definition at line 350 of file iterator.h.
|
inline |
Return true if the iterator is beyond the first element of the container.
InvalidIterator | if the iterator is singular |
Definition at line 370 of file iterator.h.
|
inline |
Check whether the iterator is bound to a container.
Definition at line 144 of file iterator.h.
|
inline |
Return the current status of the iterator. If the iterator is bound and its subcomposite iterator is valid, this predicate returns true
.
Definition at line 141 of file iterator.h.
|
inline |
Inequality operator.
Definition at line 272 of file iterator.h.
|
inline |
Assignment operator.
Definition at line 259 of file iterator.h.
|
inline |
Equality operator.
Definition at line 267 of file iterator.h.
|
inline |
Assign the current predicate associated with the iterator.
Definition at line 220 of file iterator.h.
|
inline |
Reposition the iterator to the first element of the container.
Exception::Precondition | if the iterator is unbound |
Definition at line 283 of file iterator.h.
|
inline |
Reposition the iterator after the last element of the container.
Exception::Precondition | if the iterator is unbound |
Definition at line 316 of file iterator.h.
|
inline |
Reposition the (backward) iterator to the last element of the container
Exception::Precondition | if the iterator is unbound |
Definition at line 340 of file iterator.h.
|
inline |
Reposition the (backward) iterator beyond the first element of the container
Exception::Precondition | if the iterator is unbound |
Definition at line 365 of file iterator.h.
|
protected |
The pointer to the container.
Definition at line 229 of file iterator.h.
|
protected |
The internal iterator to iterate over the current node's children.
Definition at line 232 of file iterator.h.
|
protected |
The predicate.
Definition at line 235 of file iterator.h.