Class hierarchy   Compound list   File list   Compound Members   File Members  

Enumeration Class Reference

This class provides a serial list of elements. More...

List of all members.

Public Members


Detailed Description

This class provides a serial list of elements.

This is especially useful for non-vector containers An instance of this class is returned by many containers methods.

NotInitialized is thrown if the enumeration was created with no data. All enumerations created using the elements() method of containers contain data, regardless to the data in the container.


Member Function Documentation

Enumeration::Enumeration()

Construct an empty Enumeration.

operator= must be used before using any of the Enumeration's methods.

Enumeration::Enumeration(Vector* V)

Construct an Enumeration with the elements copied from a vector.

Enumeration::Enumeration(Enumeration& E)

Copy constructor.

virtual Enumeration::~Enumeration() [virtual]

Destructor.

Enumeration& Enumeration::operator=(Enumeration& E)

Copies an Enumeration.

DS_BOOL Enumeration::hasMoreElements() const

Returns a non-zero value if there are more elements to be read.

Data Enumeration::nextElement()

Returns the next element Throws IndexOutOfBounds if there are no more elements.

void Enumeration::reset()

Reset to read the elements again from the start.

void Enumeration::reverse()

Reverse the order of reading.

Reset must be applied afterwards to read from the start.


The documentation for this class was generated from the following file: