|  | Home

# QtSoapStructIterator Class Reference

The QtSoapStructIterator class provides an iterator for traversing the items in a QtSoapStruct. More...

     #include <QtSoapStructIterator>

- List of all members, including inherited members

## Public Functions

| QtSoapStructIterator ( QtSoapStruct & s )
| ~QtSoapStructIterator ()
const QtSoapType * | current () const
QtSoapType * | data ()
QtSoapQName | key () const
bool | operator!= ( const QtSoapStructIterator & j ) const
void | operator++ ()
bool | operator== ( const QtSoapStructIterator & j ) const

## 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.

     for (QtSoapStructIterator it(myStruct); it.current(); ++it) {
         QtSoapType *item = it.data();
         // process item
     }

See also QtSoapArrayIterator.

## Member Function Documentation

### QtSoapStructIterator::QtSoapStructIterator ( 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.