Orxonox
0.0.5 Codename: Arcturus
|
The ClassTreeMaskObjectIterator iterates through all objects of the classes that were included by a ClassTreeMask. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/ClassTreeMask.h>
Public Member Functions | |
ClassTreeMaskObjectIterator ()=default | |
Default-constructor: Does nothing. More... | |
ClassTreeMaskObjectIterator (const ClassTreeMask &mask) | |
Copy-Constructor: Initializes the iterator from another ClassTreeMask. More... | |
operator bool () const | |
Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end. More... | |
bool | operator!= (BaseObject *pointer) const |
Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object. More... | |
BaseObject * | operator* () const |
Returns the object the ClassTreeMaskObjectIterator currently points at. More... | |
const ClassTreeMaskObjectIterator & | operator++ () |
Iterate to the next object (if any). More... | |
BaseObject * | operator-> () const |
Returns the object the ClassTreeMaskObjectIterator currently points at. More... | |
ClassTreeMaskObjectIterator & | operator= (const ClassTreeMask &mask) |
Initializes the iterator from a given ClassTreeMask. More... | |
bool | operator== (BaseObject *pointer) const |
Returns true if the ClassTreeMaskObjectIterator points at the given object. More... | |
Private Member Functions | |
void | create (ClassTreeMaskNode *node) |
Recursive function to create the Iterators subclass-list by going through the node-tree of the mask. More... | |
Private Attributes | |
Iterator< BaseObject > | objectIterator_ |
The current object of the iterator. More... | |
std::list< std::pair< const Identifier *, bool > > | subclasses_ |
A list of all Identifiers through which objects the iterator should iterate. More... | |
std::list< std::pair< const Identifier *, bool > >::iterator | subclassIterator_ |
The current class of the iterator. More... | |
The ClassTreeMaskObjectIterator iterates through all objects of the classes that were included by a ClassTreeMask.
This is done the following way:
The performance of ClassTreeMaskObjectIterator is good as long as you don't exclude subclasses of included classes. Of course you can still exlucde subclasses, but if this is done more often, we need a new implementation using a second ObjectList in the Identifier, containing all objects of exactly one class.
|
inlinedefault |
Default-constructor: Does nothing.
|
inline |
Copy-Constructor: Initializes the iterator from another ClassTreeMask.
|
private |
Recursive function to create the Iterators subclass-list by going through the node-tree of the mask.
node | The current node |
|
inlineexplicit |
Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end.
|
inline |
Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object.
|
inline |
Returns the object the ClassTreeMaskObjectIterator currently points at.
const ClassTreeMaskObjectIterator & orxonox::ClassTreeMaskObjectIterator::operator++ | ( | ) |
Iterate to the next object (if any).
|
inline |
Returns the object the ClassTreeMaskObjectIterator currently points at.
ClassTreeMaskObjectIterator & orxonox::ClassTreeMaskObjectIterator::operator= | ( | const ClassTreeMask & | mask | ) |
Initializes the iterator from a given ClassTreeMask.
mask | The mask |
|
inline |
Returns true if the ClassTreeMaskObjectIterator points at the given object.
|
private |
The current object of the iterator.
|
private |
A list of all Identifiers through which objects the iterator should iterate.
|
private |
The current class of the iterator.