#include <Archive.h>
Collaboration diagram for Arxx::Archive::iterator:
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. | |
iterator & | operator++ (void) |
Advances the iterator. | |
Arxx::Item & | operator * (void) |
This will return the Arxx::Item that this iterator points to. | |
const Arxx::Item & | operator * (void) const |
This will return the Arxx::Item that this iterator points to. | |
Arxx::Item * | operator-> (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. |
Arxx::Archive::iterator::iterator | ( | std::map< Arxx::u4byte, Arxx::Item * >::iterator | iItem | ) |
The constructor of an Arxx::Item iterator.
iItem | The STL iterator from Arxx::Archive's aggregated Item object container. The internal representation of the iterator. |
Arxx::Archive::iterator::~iterator | ( | void | ) |
The destructor of an Item iterator.
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.
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.
iItem | The iterator to check against. |
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.