#include <src/core/Iterator.h>
Public Member Functions | |
void | incrementIfEqual (OrxonoxClass *object) |
Increments the Iterator if it points at the given object. | |
template<class O> | |
Iterator (const ObjectListIterator< O > &other) | |
Constructor: Sets this element to the element an ObjectListIterator. | |
template<class O> | |
Iterator (ObjectListElement< O > *element) | |
Constructor: Sets this element to a given element. | |
Iterator (const Iterator< T > &other) | |
Constructor: Sets this element to the element of another Iterator. | |
Iterator (const ObjectListBase::Export &exp) | |
Constructor: Sets this element to the exported element. | |
Iterator () | |
Constructor: Sets the element, whereon the iterator points, to zero. | |
operator bool () const | |
Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object. | |
bool | operator!= (const Iterator< T > &compare) const |
Overloading of the != operator to compare with another Iterator. | |
T * | operator* () const |
Overloading of the *it operator: returns the pointer to the object. | |
Iterator< T > | operator++ (int i) |
Overloading of the it++ operator: Iterator points to the next object in the list. | |
const Iterator< T > & | operator++ () |
Overloading of the ++it operator: Iterator points to the next object in the list. | |
Iterator< T > | operator-- (int i) |
Overloading of the it-- operator: Iterator points to the previous object in the list. | |
const Iterator< T > & | operator-- () |
Overloading of the --it operator: Iterator points to the previous object in the list. | |
T * | operator-> () const |
Overloading of the it-> operator: returns the pointer to the object. | |
template<class O> | |
const Iterator< T > & | operator= (const ObjectListIterator< O > &other) |
Assigns the element of an ObjectListIterator. | |
template<class O> | |
const Iterator< T > & | operator= (ObjectListElement< O > *element) |
Assigns a given element. | |
const Iterator< T > & | operator= (const Iterator< T > &other) |
Assigns the element of another Iterator. | |
const Iterator< T > & | operator= (const ObjectListBase::Export &exp) |
Assigns an exported element. | |
bool | operator== (const Iterator< T > &compare) const |
Overloading of the == operator to compare with another Iterator. | |
~Iterator () | |
Unregisters the Iterator from the ObjectList. | |
Protected Attributes | |
ObjectListBaseElement * | element_ |
The element the Iterator points at. | |
ObjectListBase * | list_ |
The list wherein the element is. |
orxonox::Iterator< T >::Iterator | ( | ) | [inline] |
Constructor: Sets the element, whereon the iterator points, to zero.
orxonox::Iterator< T >::Iterator | ( | const ObjectListBase::Export & | exp | ) | [inline] |
Constructor: Sets this element to the exported element.
exp | The exported element |
orxonox::Iterator< T >::Iterator | ( | const Iterator< T > & | other | ) | [inline] |
orxonox::Iterator< T >::Iterator | ( | ObjectListElement< O > * | element | ) | [inline] |
Constructor: Sets this element to a given element.
element | The element |
orxonox::Iterator< T >::Iterator | ( | const ObjectListIterator< O > & | other | ) | [inline] |
Constructor: Sets this element to the element an ObjectListIterator.
other | The ObjectListIterator |
orxonox::Iterator< T >::~Iterator | ( | ) | [inline] |
Unregisters the Iterator from the ObjectList.
void orxonox::Iterator< T >::incrementIfEqual | ( | OrxonoxClass * | object | ) | [inline] |
Increments the Iterator if it points at the given object.
object | The object to compare with |
orxonox::Iterator< T >::operator bool | ( | ) | const [inline] |
Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
bool orxonox::Iterator< T >::operator!= | ( | const Iterator< T > & | compare | ) | const [inline] |
T* orxonox::Iterator< T >::operator* | ( | ) | const [inline] |
Overloading of the *it operator: returns the pointer to the object.
Iterator<T> orxonox::Iterator< T >::operator++ | ( | int | i | ) | [inline] |
const Iterator<T>& orxonox::Iterator< T >::operator++ | ( | ) | [inline] |
Overloading of the ++it operator: Iterator points to the next object in the list.
Referenced by orxonox::Iterator< orxonox::BaseObject >::incrementIfEqual().
Iterator<T> orxonox::Iterator< T >::operator-- | ( | int | i | ) | [inline] |
const Iterator<T>& orxonox::Iterator< T >::operator-- | ( | ) | [inline] |
T* orxonox::Iterator< T >::operator-> | ( | ) | const [inline] |
Overloading of the it-> operator: returns the pointer to the object.
const Iterator<T>& orxonox::Iterator< T >::operator= | ( | const ObjectListIterator< O > & | other | ) | [inline] |
const Iterator<T>& orxonox::Iterator< T >::operator= | ( | ObjectListElement< O > * | element | ) | [inline] |
Assigns a given element.
element | The element |
const Iterator<T>& orxonox::Iterator< T >::operator= | ( | const Iterator< T > & | other | ) | [inline] |
const Iterator<T>& orxonox::Iterator< T >::operator= | ( | const ObjectListBase::Export & | exp | ) | [inline] |
Assigns an exported element.
exp | The exported element |
bool orxonox::Iterator< T >::operator== | ( | const Iterator< T > & | compare | ) | const [inline] |
ObjectListBaseElement* orxonox::Iterator< T >::element_ [protected] |
The element the Iterator points at.
Referenced by orxonox::Iterator< orxonox::BaseObject >::incrementIfEqual(), orxonox::Iterator< orxonox::BaseObject >::Iterator(), orxonox::Iterator< orxonox::BaseObject >::operator bool(), orxonox::Iterator< orxonox::BaseObject >::operator!=(), orxonox::Iterator< orxonox::BaseObject >::operator*(), orxonox::Iterator< orxonox::BaseObject >::operator++(), orxonox::Iterator< orxonox::BaseObject >::operator--(), orxonox::Iterator< orxonox::BaseObject >::operator->(), orxonox::Iterator< orxonox::BaseObject >::operator=(), and orxonox::Iterator< orxonox::BaseObject >::operator==().
ObjectListBase* orxonox::Iterator< T >::list_ [protected] |
The list wherein the element is.
Referenced by orxonox::Iterator< orxonox::BaseObject >::Iterator(), orxonox::Iterator< orxonox::BaseObject >::operator=(), and orxonox::Iterator< orxonox::BaseObject >::~Iterator().