The QtSoapArray class is an implementation of the SOAP array type. More...
#include <QtSoapArray>
Inherits: QtSoapType.
QtSoapArray ( const QtSoapQName & name, QtSoapType::Type type = Other, int size0 = -1, int size1 = -1, int size2 = -1, int size3 = -1, int size4 = -1 ) | |
QtSoapArray ( const QtSoapArray & copy ) | |
QtSoapArray () | |
~QtSoapArray () | |
void | append ( QtSoapType * item ) |
QtSoapType & | at ( int pos ) |
QtSoapType & | at ( int pos0, int pos1 ) |
QtSoapType & | at ( int pos0, int pos1, int pos2 ) |
QtSoapType & | at ( int pos0, int pos1, int pos2, int pos3 ) |
QtSoapType & | at ( int pos0, int pos1, int pos2, int pos3, int pos4 ) |
const QtSoapType & | at ( int pos ) const |
const QtSoapType & | at ( int pos0, int pos1 ) const |
const QtSoapType & | at ( int pos0, int pos1, int pos2 ) const |
const QtSoapType & | at ( int pos0, int pos1, int pos2, int pos3 ) const |
const QtSoapType & | at ( int pos0, int pos1, int pos2, int pos3, int pos4 ) const |
void | insert ( int pos, QtSoapType * item ) |
void | insert ( int pos0, int pos1, QtSoapType * item ) |
void | insert ( int pos0, int pos1, int pos2, QtSoapType * item ) |
void | insert ( int pos0, int pos1, int pos2, int pos3, QtSoapType * item ) |
void | insert ( int pos0, int pos1, int pos2, int pos3, int pos4, QtSoapType * item ) |
QtSoapArray & | operator= ( const QtSoapArray & 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[] ( int pos ) |
virtual QtSoapType & | operator[] ( const QString & s ) |
virtual QtSoapType & | operator[] ( const QtSoapQName & s ) |
virtual const QtSoapType & | operator[] ( int pos ) const |
virtual const QtSoapType & | operator[] ( const QString & s ) const |
virtual const QtSoapType & | operator[] ( const QtSoapQName & s ) const |
The QtSoapArray class is an implementation of the SOAP array type.
A SOAP array is a sequence of QtSoapType objects such as QtSoapArrays, QtSoapStructs or QtSoapSimpleTypes, and they are accessible through their ordinal position. An array can be consecutive (0, 1, 2, 3, ...) or sparse (1, 5, 6, 10, ...) and they can be multidimensional ((0, 0), (0, 1), ...). QtSoapArray supports arrays of up to 5 dimensions. The size and dimensions of the array are set in the constructor. The default constructor produces a one dimensional array, with an unset size, meaning that the array can grow as required.
All elements in a SOAP array must be of the same type. Inserting different types will result in a run time error.
The parse() function builds the array by analyzing a QDomNode from a SOAP document. count() returns the number of items in the array.
Retrieve items in the array with at() or operator[](). Note that operator[]() only works with one dimensional arrays, but there are at() functions for arrays of up to 5 dimensions. QtSoapArrayIterator lets you iterate through all items in an array.
Use insert() or append() to insert items into an array manually. append() only works with one dimensional arrays.
toDomElement() returns a QDomElement representation of the SOAP array.
QtSoapArray array; array.insert(0, new QtSoapSimpleType(QtSoapQName("Peter"), "peter")); array.insert(1, new QtSoapSimpleType(QtSoapQName("Lisa"), "lisa")); array.insert(2, new QtSoapSimpleType(QtSoapQName("Paul"), "paul")); array.insert(3, new QtSoapSimpleType(QtSoapQName("Heather"), "heather"));
See also QtSoapType, QtSoapStruct, and QtSoapSimpleType.
Constructs an empty QtSoapArray whose QName (qualified name) is name, that contains elements of type type, and whose dimensions are given by size0, size1, size2, size3 and size4.
To construct a one dimensional array of size 5, set size0 = 5. To create a two dimensional array of size 5x10, set size0 = 5 and size1 = 10. The maximum dimension of a QtSoapArray is 5.
Create a QtSoapArray that is a copy of copy.
This is an overloaded function.
Constructs an empty one dimensional QtSoapArray whose element type is undefined. The first insert will decide what type of elements the array can contain.
Destructs the QtSoapArray.
Appends the QtSoapType item to the end of this array, which must be one dimensional.
See also insert().
Returns a reference to the item at ordinal position pos. If there is no item at position pos, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 in a two dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 in a three dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 x pos3 in a four dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 x pos3 x pos4 in a five dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos. If there is no item at position pos, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 in a two dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 in a three dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 x pos3 in a four dimensional array. If there is no such item, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the item at ordinal position pos0 x pos1 x pos2 x pos3 x pos4 in a five dimensional array. If there is no such item, returns an empty QtSoapType.
Reimplemented from QtSoapType::clear().
Clears the contents, and the dimensions of the QtSoapArray.
Reimplemented from QtSoapType::count().
Returns the number of items in the array. Note that this is not the same as the size of the array, because the array may be sparse.
Inserts the QtSoapType item at the absolute position pos in the array. Note that this function can be used to insert items into arrays with any number of dimensions.
If the array is one dimensional, then pos is simply the index position in the array. But if the array is multi-dimensional then pos is the absolute position. For example, if we have a two dimensional array [['a', 'b'], ['c', 'd'], ['e', 'f']], the element at position 0 is 'a', at position 1 is 'b', at position 2 is 'c', and so on. (There are other insert() overloads that allow for each dimension to be specified individually.)
This is an overloaded function.
Insert the QtoSoapType item at position pos0 x pos1 in a two dimensional array.
This is an overloaded function.
Insert the QtoSoapType item at position pos0 x pos1 x pos2 in a three dimensional array.
This is an overloaded function.
Insert the QtoSoapType item at position pos0 x pos1 x pos2 x pos3 in a four dimensional array.
This is an overloaded function.
Insert the QtoSoapType item at position pos0 x pos1 x pos2 x pos3 x pos4 in a five dimensional array.
Reimplemented from QtSoapType::isValid().
For this class, always returns true.
Reimplemented from QtSoapType::parse().
Inspects node and builds the content of the QtSoapArray if node qualifies as a SOAP array. Returns true if it does; otherwise returns false.
Reimplemented from QtSoapType::toDomElement().
Returns the QDomElement representation of this QtSoapArray. The returned QDomElement is created using doc.
Makes this QtSoapArray a copy of copy.
Reimplemented from QtSoapType::operator[]().
Returns a reference to the item at ordinal position pos. If there is no item at position pos, returns an empty QtSoapType.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the child item whose local name is s. If there is no item with this local name, returns an empty QtSoapType.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is s. If there is no item with this name, returns an empty QtSoapType.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the item at ordinal position pos. If there is no item at position pos, returns an empty QtSoapType.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the child item whose local name is s. If there is no item with this local name, returns an empty QtSoapType.
Reimplemented from QtSoapType::operator[]().
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is s. If there is no item with this name, returns an empty QtSoapType.