A rwsf::Enumeration object provides a simple, safe interface to a collection of objects. HydraExpress returns an instance of rwsf::Enumeration to represent a list of items. For simplicity, an enumeration provides only two functions: the hasMoreElements() function which returns true if the enumeration contains another element; and the nextElement() function which returns the next object in the enumeration. An enumeration is designed for code such as the loop below:
// names is an rwsf::Enumeration<std::string> while (names.hasMoreElements()) { std::string name = names.nextElement(); // use name }
The nextElement() function throws rwsf::OutOfBoundsError if the enumeration has no more elements.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.