libcommonc++  0.7
XMLElementIterator Class Reference

An XMLElement iterator. More...

#include <XMLElementIterator.h++>

Inheritance diagram for XMLElementIterator:
Collaboration diagram for XMLElementIterator:

Public Member Functions

 XMLElementIterator (XMLElement &elem, const String &name=String::null)
 Construct a new XMLElementIterator. More...
 
 ~XMLElementIterator ()
 Destructor. More...
 
void rewind ()
 Rewind the iterator to the first item in the sequence. More...
 
XMLElementnext ()
 
bool hasNext ()
 Test if there are more items in the sequence. More...
 
void remove ()
 Remove the current item from the sequence. More...
 

Detailed Description

An XMLElement iterator.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ XMLElementIterator()

XMLElementIterator ( XMLElement elem,
const String name = String::null 
)

Construct a new XMLElementIterator.

Parameters
elemThe XMLElement whose child elements will be iterated over.
nameIf not String::null, indicates that only elements with the given name should be iterated over.

◆ ~XMLElementIterator()

Destructor.

Member Function Documentation

◆ hasNext()

bool hasNext ( )
virtual

Test if there are more items in the sequence.

Implements Iterator< XMLElement &>.

◆ next()

XMLElement & next ( )
virtual
Exceptions
OutOfBoundsExceptionIf the iterator is already at the end.

Implements Iterator< XMLElement &>.

◆ remove()

void remove ( )
virtual

Remove the current item from the sequence.

Implements Iterator< XMLElement &>.

◆ rewind()

void rewind ( )
virtual

Rewind the iterator to the first item in the sequence.

Implements Iterator< XMLElement &>.


The documentation for this class was generated from the following files: