Arxx::Archive::const_iterator Class Reference

#include <Archive.h>

Collaboration diagram for Arxx::Archive::const_iterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

An iterator class defining basic operations to iterate the Arxx::Item objects in an Arxx::Archive.

This iterator class encapsules the internal form of Item object storage in an archive. 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 Item object pointers. Additionally it is the prefered way to make a visit to each Item in an archive.


Public Member Functions

 const_iterator (std::map< Arxx::u4byte, Arxx::Item * >::const_iterator iItem)
 The constructor of a const Item iterator.
 ~const_iterator (void)
 The destructor of a const Item iterator.
const_iteratoroperator++ (void)
 Advances the iterator.
const Arxx::Itemoperator * (void) const
 This will return the Arxx::Item that this iterator points to.
const Arxx::Itemoperator-> (void) const
 The Arxx::Item accessor.
bool operator== (const Arxx::Archive::const_iterator &iItem) const
 Tests two iterators for equality.
bool operator!= (const Arxx::Archive::const_iterator &iItem) const
 Tests two iterators for inequality.

Private Attributes

std::map< Arxx::u4byte, Arxx::Item
* >::const_iterator 
m_iItem
 The internal STL iterator.


Constructor & Destructor Documentation

Arxx::Archive::const_iterator::const_iterator ( std::map< Arxx::u4byte, Arxx::Item * >::const_iterator  iItem  ) 

The constructor of a const Item iterator.

Parameters:
iItem The STL iterator from Arxx::Archive's aggregated Item object container. The internal representation of the iterator.
This constructor creates a an Item iterator from an STL iterator.

Arxx::Archive::const_iterator::~const_iterator ( void   ) 

The destructor of a const Item iterator.


Member Function Documentation

const Arxx::Item & Arxx::Archive::const_iterator::operator * ( void   )  const

This will return the Arxx::Item that this iterator points to.

This is the const version of the operator*() thus the returned Item reference is const as well.

bool Arxx::Archive::const_iterator::operator!= ( const Arxx::Archive::const_iterator iItem  )  const

Tests two iterators for inequality.

Parameters:
iItem The iterator to check against.

Arxx::Archive::const_iterator & Arxx::Archive::const_iterator::operator++ ( void   ) 

Advances the iterator.

Advances the Item iterator. It is not defined which will be the next Arxx::Item the iterator points to. It is only assured that every Item will be passed once.

const Arxx::Item * Arxx::Archive::const_iterator::operator-> ( void   )  const

The Arxx::Item accessor.

bool Arxx::Archive::const_iterator::operator== ( const Arxx::Archive::const_iterator iItem  )  const

Tests two iterators for equality.

Parameters:
iItem The iterator to check against.


Member Data Documentation

std::map< Arxx::u4byte, Arxx::Item * >::const_iterator Arxx::Archive::const_iterator::m_iItem [private]

The internal STL iterator.

This is an iterator into Arxx::Archive's internal Item map Arxx::Archive::m_Items.


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