QtSoapStructIterator Class Reference
The QtSoapStructIterator class provides an iterator for
traversing the items in a QtSoapStruct.
More...
#include <qtsoap.h>
List of all member functions.
Public Members
Detailed Description
The QtSoapStructIterator class provides an iterator for
traversing the items in a QtSoapStruct.
The iterator is created by passing a QtSoapStruct to the
constructor. It it not defined which item the iterator initially
will point to. Neither is the order in which the items are
processed.
key() returns the name of the current item. data() and current()
return a pointer to the current item, or 0 if there is none.
operator++() navigates to the next item in the struct.
QtSoapType &helloItem = myStruct["Hello"];
for (QtSoapStructIterator it(myStruct); it.current(); ++it) {
QtSoapType *item = it.data();
// process item
}
See also QtSoapArrayIterator.
Member Function Documentation
QtSoapStructIterator::QtSoapStructIterator ( const QtSoapStruct & s )
Constructs a QtSoapStructIterator and initializes it to point to
the first element in the struct s.
QtSoapStructIterator::~QtSoapStructIterator ()
Destructs the QtSoapStructIterator.
const QtSoapType * QtSoapStructIterator::current () const
Returns a pointer to the current item, or 0 if there is none.
QtSoapType * QtSoapStructIterator::data ()
Returns a pointer to the current item, or 0 if there is none.
QtSoapQName QtSoapStructIterator::key () const
Returns the QName (qualified name) of the current item.
bool QtSoapStructIterator::operator!= ( const QtSoapStructIterator & j ) const
Returns true if this iterator's position is not equal to that of
j; otherwise returns false.
void QtSoapStructIterator::operator++ ()
Moves the iterator to the next item in the struct.
bool QtSoapStructIterator::operator== ( const QtSoapStructIterator & j ) const
Returns true if this iterator's position is equal to that of j; otherwise returns false.
This file is part of the Qt Solutions.
Copyright © 2003-2006
Trolltech. All Rights Reserved.