Arxx::Archive::iterator Class Reference

#include <Archive.h>

Collaboration diagram for Arxx::Archive::iterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

An iterator class defining basic operations to iterate the Arxx::Item objects in an 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 Arxx::Item object pointers. Additionally it is the prefered way to make a visit to each item in an archive.


Public Member Functions

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

Private Attributes

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


Constructor & Destructor Documentation

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

The constructor of an Arxx::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::iterator::~iterator ( void   ) 

The destructor of an Item iterator.


Member Function Documentation

const Arxx::Item & Arxx::Archive::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 reference is const as well.

Arxx::Item & Arxx::Archive::iterator::operator * ( void   ) 

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

This is the non-const version of the operator*() so it returns a non const Item reference.

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

Tests two iterators for inequality.

Parameters:
iItem The iterator to check against.

Arxx::Archive::iterator & Arxx::Archive::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.

Arxx::Item * Arxx::Archive::iterator::operator-> ( void   ) 

The Arxx::Item accessor.

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

Tests two iterators for equality.

Parameters:
iItem The iterator to check against.


Member Data Documentation

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

The internal STL iterator.

This is an iterator into the 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