The QtSoapStruct class is an implementation of the SOAP struct type. More...
#include <QtSoapStruct>
Inherits: QtSoapType.
QtSoapStruct () | |
QtSoapStruct ( const QtSoapQName & name ) | |
QtSoapStruct ( const QtSoapStruct & copy ) | |
~QtSoapStruct () | |
QtSoapType & | at ( const QtSoapQName & key ) |
const QtSoapType & | at ( const QtSoapQName & key ) const |
void | insert ( QtSoapType * item ) |
QtSoapStruct & | operator= ( const QtSoapStruct & copy ) |
virtual void | clear () |
virtual int | count () const |
virtual bool | isValid () const |
virtual bool | parse ( QDomNode node ) |
virtual QDomElement | toDomElement ( QDomDocument doc ) const |
virtual QtSoapType & | operator[] ( const QtSoapQName & key ) |
virtual const QtSoapType & | operator[] ( const QtSoapQName & key ) const |
virtual QtSoapType & | operator[] ( const QString & key ) |
virtual const QtSoapType & | operator[] ( const QString & key ) const |
virtual QtSoapType & | operator[] ( int i ) |
virtual const QtSoapType & | operator[] ( int i ) const |
The QtSoapStruct class is an implementation of the SOAP struct type.
A SOAP struct is a dictionary of QtSoapTypes where entries are looked up by name. Entries in a struct can be of any QtSoapType type, such as QtSoapArray, QtSoapStruct or QtSoapSimpleType.
The struct can be created in several ways. parse() generates a struct by analyzing a QDomNode. insert() is used to add items manually.
QtSoapStruct myStruct(QtSoapQName("myStruct")); myStruct.insert(new QtSoapSimpleType(QtSoapQName("item1"), 5)); myStruct.insert(new QtSoapSimpleType(QtSoapQName("item2"), "hello")); myStruct.insert(new QtSoapSimpleType(QtSoapQName("item3"), true));
Use the operator[]() or at() when looking up entries in a struct by name. If the names are unknown, QtSoapStructIterator lets you iterate through all the items.
QtSoapType &helloItem = myStruct["Hello"];
toDomElement() converts the QtSoapStruct to a DomElement.
See also QtSoapStructIterator, QtSoapType, QtSoapArray, and QtSoapSimpleType.
Constructs an empty QtSoapStruct.
Constructs an empty QtSoapStruct and sets its QName (qualified name) to name.
Constructs a QtSoapStruct that is a copy of copy.
Destructs the QtSoapStruct.
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
This is an overloaded function.
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
Reimplemented from QtSoapType::clear().
Removes all items from the struct.
Reimplemented from QtSoapType::count().
Returns the number of items in this struct.
Inserts the QtSoapType item into this struct. Any existing item with the same QName (qualified name) will be erased.
Reimplemented from QtSoapType::isValid().
Reimplemented from QtSoapType::parse().
Inspects node and constructs the equivalent QtSoapStruct if node qualifies as a SOAP struct. Returns true if it does; otherwise returns false.
Reimplemented from QtSoapType::toDomElement().
Generates the QDomElement representation of this struct. The returned QDomElement is created using doc.
Makes this struct a copy of copy.
Reimplemented from QtSoapType::operator[]().
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the item in this struct whose QName (qualified name) is key. If no such item exists, an empty QtSoapType is returned.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to item number i in this struct. If no such item exists, an empty QtSoapType is returned.
The items are ordered in the sequence in which they were inserted, starting from 0.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to item number i in this struct. If no such item exists, an empty QtSoapType is returned.
The items are ordered in the sequence in which they were inserted, starting from 0.