Library: XSD/Types
Package: Iterator
Header: Poco/XSD/Types/OrderIterator.h
An iterator type for iterating over the content of XML schema types.
Member Functions: canClose, close, closed, end, next, reset, validNext, validNexts
Creates the uninitialized OrderIterator.
Note that end() will return true for uninitialized iterators.
OrderIterator(
OrderIteratorImpl::Ptr pImpl
);
Creates the OrderIterator using the given OrderIteratorImpl.
~OrderIterator();
Destroys the OrderIterator.
bool canClose() const;
Checks if it is safe to close the iterator, i.e. minoccurs restriction are satisfied.
void close();
Closes an iterator. Use this method to indicate that you are finished with iteration and we want to detect that you are at the end of iteration (i.e. minoccurs restriction are satisfied).
Will throw an IllegalOrderException when not safe to close.
bool closed() const;
Returns true if closed was called for this iterator.
bool end() const;
Returns true if at end of iteration. This is the only method which is safe to call on uninitialized OrderIterators.
OrderContent::Ptr next(
const std::string & name
);
Returns the next OrderContent with the given name.
Will fail with an IllegalOrderException if name is not part of the set returned by validNexts().
void reset();
Resets an iterator to its initial state.
bool validNext(
const std::string & name
) const;
Returns true if the element with the given name is a valid next element.
const std::set < std::string > & validNexts() const;
Returns the valid names for the next call. If the set contains the string "*", it will accept any string.