Arxx::Structure::iterator Class Reference

#include <Structure.h>

Collaboration diagram for Arxx::Structure::iterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

An iterator class defining basic operations to iterate the Relation objects in a Structure.

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.
iteratoroperator++ (void)
 Advances the iterator.
Arxx::Structure::Relationoperator * (void)
 This will return the Relation that this iterator points to.
const Arxx::Structure::Relationoperator * (void) const
 This will return the Relation that this iterator points to.
Arxx::Structure::Relationoperator-> (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


Constructor & Destructor Documentation

Arxx::Structure::iterator::iterator ( std::map< std::string, Arxx::Structure::Relation >::iterator  iRelation  ) 

The constructor of a Relation iterator.

Parameters:
iRelation The STL iterator from the Structure's aggregated Relation container. The internal representation of the iterator.
This constructor creates a Relation iterator from an STL iterator.

Arxx::Structure::iterator::~iterator ( void   ) 

The destructor of a Relation iterator.


Member Function Documentation

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.

Parameters:
iRelation The iterator to check against.

bool Arxx::Structure::iterator::operator!= ( const Arxx::Structure::iterator iRelation  )  const

Tests two iterators for inequality.

Parameters:
iRelation The iterator to check against.

Arxx::Structure::iterator & Arxx::Structure::iterator::operator++ ( void   ) 

Advances the iterator.

Advances the Relation iterator. It is not defined which will be the next Relation the iterator points to. It is only assured that every Relation in the Structure will be passed once.

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.

Parameters:
iRelation The iterator to check against.

bool Arxx::Structure::iterator::operator== ( const Arxx::Structure::iterator iRelation  )  const

Tests two iterators for equality.

Parameters:
iRelation The iterator to check against.


Friends And Related Function Documentation

friend class Arxx::Structure::const_iterator [friend]


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Tue Oct 10 11:34:56 2006 for libarxx by  doxygen 1.4.7