The Iterator allows to iterate through object lists.
More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/object/IteratorBase.h>
|
| IteratorBase (ObjectListElement< T > *element=nullptr) |
| Constructor: Sets the element, whereon the iterator points, to the given element. More...
|
|
template<class OT , class OI > |
| IteratorBase (const IteratorBase< OT, OI > &other) |
| Constructor: Sets the element, whereon the iterator points, to the given element of another type. More...
|
|
| ~IteratorBase () |
| Unregisters the Iterator from the ObjectList. More...
|
|
ObjectListBaseElement * | getElement () const |
|
| operator bool () const |
| Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object. More...
|
|
bool | operator!= (const IteratorBase< T, I > &compare) const |
| Overloading of the != operator to compare with another Iterator. More...
|
|
const IteratorBase< T, I > & | operator++ () |
| Overloading of the ++it operator: Iterator points to the next object in the list. More...
|
|
I | operator++ (int) |
| Overloading of the it++ operator: Iterator points to the next object in the list. More...
|
|
const IteratorBase< T, I > & | operator-- () |
| Overloading of the –it operator: Iterator points to the previous object in the list. More...
|
|
I | operator-- (int i) |
| Overloading of the it– operator: Iterator points to the previous object in the list. More...
|
|
IteratorBase< T, I > & | operator= (ObjectListElement< T > *element) |
| Assigns a given element. More...
|
|
IteratorBase< T, I > & | operator= (const IteratorBase< T, I > &other) |
| Assigns the element of another Iterator. More...
|
|
bool | operator== (const IteratorBase< T, I > &compare) const |
| Overloading of the == operator to compare with another Iterator. More...
|
|
virtual void | removedElement (ObjectListBaseElement *element) override |
| Increments the Iterator if it points at the given element. More...
|
|
| ObjectListElementRemovalListener ()=default |
|
virtual | ~ObjectListElementRemovalListener ()=default |
|
template<class T, class I>
class orxonox::IteratorBase< T, I >
The Iterator allows to iterate through object lists.
It serves as base class for ObjectListIterator and Iterator
template<class T, class I>
Constructor: Sets the element, whereon the iterator points, to the given element.
template<class T, class I>
template<class OT , class OI >
Constructor: Sets the element, whereon the iterator points, to the given element of another type.
The element's type O must be a derivative of the Iterator's type T.
template<class T, class I>
template<class T, class I>
template<class T, class I>
Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
- Returns
- True if the Iterator points to an existing object.
template<class T, class I>
Overloading of the != operator to compare with another Iterator.
- Parameters
-
- Returns
- True if the iterators point to different elements
template<class T, class I>
Overloading of the ++it operator: Iterator points to the next object in the list.
- Returns
- The Iterator itself
template<class T, class I>
Overloading of the it++ operator: Iterator points to the next object in the list.
- Returns
- The Iterator itself
template<class T, class I>
Overloading of the –it operator: Iterator points to the previous object in the list.
- Returns
- The Iterator itself
template<class T, class I>
Overloading of the it– operator: Iterator points to the previous object in the list.
- Returns
- The Iterator itself
template<class T, class I>
Assigns a given element.
- Parameters
-
template<class T, class I>
Assigns the element of another Iterator.
- Parameters
-
template<class T, class I>
Overloading of the == operator to compare with another Iterator.
- Parameters
-
- Returns
- True if the iterators point to the same element
template<class T, class I>
Registers the Iterator at the list to which it belongs.
template<class T, class I>
template<class T, class I>
template<class T, class I>
Unregisters the Iterator from the list (if any)
template<class T, class I>
template<class T, class I>
The list in which the Iterator registered itself.
The documentation for this class was generated from the following file: