#include <Structure.h>
Collaboration diagram for Arxx::Structure::iterator:
This iterator class encapsules the internal form of Relation storage in a Structure. By using this iterator class, which is what you have to do, you are safe from changes in implementation detail as the container used to store Relation objects. Additionally it is the prefered way to make a visit to each Relation in a Structure.
Public Member Functions | |
iterator (std::map< std::string, Arxx::Structure::Relation >::iterator iRelation) | |
The constructor of a Relation iterator. | |
~iterator (void) | |
The destructor of a Relation iterator. | |
iterator & | operator++ (void) |
Advances the iterator. | |
Arxx::Structure::Relation & | operator * (void) |
This will return the Relation that this iterator points to. | |
const Arxx::Structure::Relation & | operator * (void) const |
This will return the Relation that this iterator points to. | |
Arxx::Structure::Relation * | operator-> (void) |
The Relation accessor. | |
bool | operator== (const Arxx::Structure::iterator &iRelation) const |
Tests two iterators for equality. | |
bool | operator!= (const Arxx::Structure::iterator &iRelation) const |
Tests two iterators for inequality. | |
bool | operator== (const Arxx::Structure::const_iterator &iRelation) const |
Tests two iterators for equality. | |
bool | operator!= (const Arxx::Structure::const_iterator &iRelation) const |
Tests two iterators for inequality. | |
Private Attributes | |
std::map< std::string, Arxx::Structure::Relation >::iterator | m_iRelation |
The internal STL iterator. | |
Friends | |
class | Arxx::Structure::const_iterator |
Arxx::Structure::iterator::iterator | ( | std::map< std::string, Arxx::Structure::Relation >::iterator | iRelation | ) |
Arxx::Structure::iterator::~iterator | ( | void | ) |
The destructor of a Relation iterator.
const Arxx::Structure::Relation & Arxx::Structure::iterator::operator * | ( | void | ) | const |
This will return the Relation that this iterator points to.
This is the const version of the operator*() thus the returned Relation is const as well.
Arxx::Structure::Relation & Arxx::Structure::iterator::operator * | ( | void | ) |
This will return the Relation that this iterator points to.
This is the non-const version of the operator*() so it returns a non-const Relation.
bool Arxx::Structure::iterator::operator!= | ( | const Arxx::Structure::const_iterator & | iRelation | ) | const |
Tests two iterators for inequality.
iRelation | The iterator to check against. |
bool Arxx::Structure::iterator::operator!= | ( | const Arxx::Structure::iterator & | iRelation | ) | const |
Tests two iterators for inequality.
iRelation | The iterator to check against. |
Arxx::Structure::iterator & Arxx::Structure::iterator::operator++ | ( | void | ) |
Arxx::Structure::Relation * Arxx::Structure::iterator::operator-> | ( | void | ) |
The Relation accessor.
bool Arxx::Structure::iterator::operator== | ( | const Arxx::Structure::const_iterator & | iRelation | ) | const |
Tests two iterators for equality.
iRelation | The iterator to check against. |
bool Arxx::Structure::iterator::operator== | ( | const Arxx::Structure::iterator & | iRelation | ) | const |
Tests two iterators for equality.
iRelation | The iterator to check against. |
friend class Arxx::Structure::const_iterator [friend] |
std::map< std::string, Arxx::Structure::Relation >::iterator Arxx::Structure::iterator::m_iRelation [private] |
The internal STL iterator.
This is an iterator into the Structure's internal Relation map.