rwsf::Enumeration<T> rwsf::HandleBase
#include <rwsf/core/Enumeration.h>
rwsf::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 class is used internally by Hydra, 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 an rwsf::OutOfBoundsException ("Invalid usage") exception.
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a 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.