Arxx::Structure::const_iterator Class Reference

#include <Structure.h>

Collaboration diagram for Arxx::Structure::const_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

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


Constructor & Destructor Documentation

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

The constructor of a const Relation iterator.

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

Arxx::Structure::const_iterator::const_iterator ( Arxx::Structure::iterator  iRelation  ) 

The constructor of a const Relation iterator from a non-const Relation iterator.

Parameters:
iRelation The Relation iterator from the Structure's aggregated Relation container.
This constructor creates a const Relation iterator from a non-const Relation iterator.

Arxx::Structure::const_iterator::~const_iterator ( void   ) 

The destructor of a const Relation iterator.


Member Function Documentation

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.

Parameters:
iRelation The iterator to check against.

Arxx::Structure::const_iterator & Arxx::Structure::const_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.

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.

Parameters:
iRelation The iterator to check against.


Friends And Related Function Documentation

friend class Arxx::Structure::iterator [friend]


Member Data Documentation

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.


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