
LEIF::Enumeration<T>LEIF:HandleBase
#include <rw/leif/core/Enumeration.h>
LEIF::Enumeration<T> holds a sequence of values of type T. The class provides a convenient interface for iterating over the sequence. This class implements the handle/body idiom in which this class is the handle, and EnumerationImp is the body.
This is class is used internally by LEIF, which populates the enumeration using one of several possible collection types. This class lets you easily iterate through the enumeration elements without having to know anything about the underlying data structure.
Enumeration();
Creates an empty enumeration. Use the copy constructor to create a valid enumeration.
Enumeration(const Enumeration<T>& rhs);
Copy constructor. Attaches to and increments the reference count on rhs's body.
~Enumeration();
Detaches from the current body (if any), decrements its reference count, deletes it if there are no other references.
Enumeration<T>& operator=(const Enumeration<T>& rhs);
Assignment operator.
bool hasMoreElements() const;
Returns true if there are more elements in this enumeration, otherwise returns false.
T nextElement();
Returns the next element if there are more elements, otherwise throws a LEIF::OutOfBoundsException ("Invalid usage") exception.
©2003-2005 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.