#include <Structure.h>
Collaboration diagram for Arxx::Structure::const_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 | |
const_iterator (std::map< std::string, Arxx::Structure::Relation >::const_iterator iRelation) | |
The constructor of a const Relation iterator. | |
const_iterator (Arxx::Structure::iterator iRelation) | |
The constructor of a const Relation iterator from a non-const Relation iterator. | |
~const_iterator (void) | |
The destructor of a const Relation iterator. | |
const_iterator & | operator++ (void) |
Advances the iterator. | |
const Arxx::Structure::Relation & | operator * (void) const |
This will return the Arxx::Relation that this iterator points to. | |
const Arxx::Structure::Relation * | operator-> (void) |
The Relation accessor. | |
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 >::const_iterator | m_iRelation |
The internal STL iterator. | |
Friends | |
class | Arxx::Structure::iterator |
Arxx::Structure::const_iterator::const_iterator | ( | std::map< std::string, Arxx::Structure::Relation >::const_iterator | iRelation | ) |
Arxx::Structure::const_iterator::const_iterator | ( | Arxx::Structure::iterator | iRelation | ) |
Arxx::Structure::const_iterator::~const_iterator | ( | void | ) |
The destructor of a const Relation iterator.
const Arxx::Structure::Relation & Arxx::Structure::const_iterator::operator * | ( | void | ) | const |
This will return the Arxx::Relation that this iterator points to.
This is the const version of the operator*() thus the returned Relation is const as well.
bool Arxx::Structure::const_iterator::operator!= | ( | const Arxx::Structure::const_iterator & | iRelation | ) | const |
Tests two iterators for inequality.
iRelation | The iterator to check against. |
Arxx::Structure::const_iterator & Arxx::Structure::const_iterator::operator++ | ( | void | ) |
const Arxx::Structure::Relation * Arxx::Structure::const_iterator::operator-> | ( | void | ) |
The Relation accessor.
bool Arxx::Structure::const_iterator::operator== | ( | const Arxx::Structure::const_iterator & | iRelation | ) | const |
Tests two iterators for equality.
iRelation | The iterator to check against. |
friend class Arxx::Structure::iterator [friend] |
std::map< std::string, Arxx::Structure::Relation >::const_iterator Arxx::Structure::const_iterator::m_iRelation [private] |
The internal STL iterator.
This is an iterator into a Structure's internal Relation map.