Public Member Functions | |
rdaDataIterator (const rdaData &d) | |
Constructs an iterator attached to the specified data object. | |
~rdaDataIterator () | |
Destructor. | |
bool | hasNext () |
Returns true if the iteration has more elements. | |
rdaDataEntry * | next () |
Returns a pointer to the next data entry in the data object, or NULL if the iteration has no more elements. |
Provides sequential access to the rdaDataEntry objects contained in an rdaData. For example, you can use the following code to print tags of all entries in a data object:
// // Create a data object and insert few entries into it // rdaData data; data.insert("Entry1", 1.0); data.insert("Entry2", 1.0); data.insert("Entry3", 1.0); // // Print out all entry tags // rdaDataIterator iter(data); while (iter.hasNext()) { printf("%s\n", iter.next()->tag()); }
|
Returns true if the iteration has more elements. In other words, returns true if next() would return a valid data entry pointer rather than NULL. |