Using rwsf::Enumeration
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::OutOfBoundsException if the enumeration has no more elements.