The QtSoapType class is the base class for all SOAP types in QtSoap. More...
#include <QtSoapType>
Inherited by: QtSoapArray, QtSoapSimpleType, and QtSoapStruct.
enum | Type { AnyURI, Array, Base64Binary, Boolean, ..., UnsignedShort } |
QtSoapType () | |
QtSoapType ( const QtSoapQName & name, Type type = Other ) | |
QtSoapType ( const QtSoapType & copy ) | |
virtual | ~QtSoapType () |
virtual void | clear () |
virtual int | count () const |
QString | errorString () const |
virtual QString | href () const |
virtual QString | id () const |
virtual bool | isValid () const |
virtual QtSoapQName | name () const |
virtual bool | parse ( QDomNode node ) |
void | setHref ( const QString & h ) |
void | setId ( const QString & i ) |
void | setName ( const QtSoapQName & name ) |
virtual bool | toBool () const |
virtual QDomElement | toDomElement ( QDomDocument document ) const |
virtual int | toInt () const |
virtual QString | toString () const |
virtual Type | type () const |
virtual QString | typeName () const |
virtual QVariant | value () const |
QtSoapType & | operator= ( const QtSoapType & copy ) |
virtual QtSoapType & | operator[] ( int pos ) |
virtual QtSoapType & | operator[] ( const QtSoapQName & key ) |
virtual QtSoapType & | operator[] ( const QString & key ) |
virtual const QtSoapType & | operator[] ( int pos ) const |
virtual const QtSoapType & | operator[] ( const QtSoapQName & key ) const |
virtual const QtSoapType & | operator[] ( const QString & key ) const |
Type | nameToType ( const QString & name ) |
QString | typeToName ( QtSoapType::Type t ) |
The QtSoapType class is the base class for all SOAP types in QtSoap.
Although it is not used to create data types, a QtSoapType reference can be conveniently used to inspect a tree of QtSoapType subclasses. Accessors from this base class, such as operator[](), allow safe navigation.
const QtSoapType &root = message.returnValue(); if (root["fault"].isValid()) { qWarning("Warning: %s", root["fault"]["faultstring"].toString().toLatin1().constData()); }
This class holds the name(), type(), id() and href() of all its derived types.
If a QtSoapType reference or pointer points to a QtSoapStruct, a QtSoapArray or a QtSoapSimpleType, isValid() returns true.
See also QtSoapStruct, QtSoapArray, and QtSoapSimpleType.
SOAP supports the types described in XML Schema Part 2: Datatypes listed at http://www.w3.org/TR/xmlschema-2/. The following values are represented using QtSoapSimpleType, except where noted.
Constant | Value | Description |
---|---|---|
QtSoapType::AnyURI | 14 | |
QtSoapType::Array | 41 | Represented by QtSoapArray |
QtSoapType::Base64Binary | 10 | |
QtSoapType::Boolean | 9 | |
QtSoapType::Byte | 34 | |
QtSoapType::Date | 3 | |
QtSoapType::DateTime | 1 | |
QtSoapType::Decimal | 27 | |
QtSoapType::Double | 13 | |
QtSoapType::Duration | 0 | |
QtSoapType::ENTITY | 26 | |
QtSoapType::Float | 12 | |
QtSoapType::GDay | 7 | |
QtSoapType::GMonth | 8 | |
QtSoapType::GMonthDay | 6 | |
QtSoapType::GYear | 5 | |
QtSoapType::GYearMonth | 4 | |
QtSoapType::HexBinary | 11 | |
QtSoapType::ID | 24 | |
QtSoapType::IDREF | 25 | |
QtSoapType::Int | 32 | |
QtSoapType::Integer | 28 | |
QtSoapType::Language | 20 | |
QtSoapType::Long | 31 | |
QtSoapType::NCName | 23 | |
QtSoapType::NMTOKEN | 22 | |
QtSoapType::NOTATION | 16 | |
QtSoapType::Name | 21 | |
QtSoapType::NegativeInteger | 30 | |
QtSoapType::NonNegativeInteger | 35 | |
QtSoapType::NonPositiveInteger | 29 | |
QtSoapType::NormalizedString | 18 | |
QtSoapType::Other | 43 | |
QtSoapType::PositiveInteger | 37 | |
QtSoapType::QName | 15 | |
QtSoapType::Short | 33 | |
QtSoapType::String | 17 | |
QtSoapType::Struct | 42 | Represented by QtSoapStruct |
QtSoapType::Time | 2 | |
QtSoapType::Token | 19 | |
QtSoapType::UnsignedByte | 40 | |
QtSoapType::UnsignedInt | 38 | |
QtSoapType::UnsignedLong | 36 | |
QtSoapType::UnsignedShort | 39 |
Constructs a QtSoapType.
Constructs a QtSoapType whose name is name and type is type. This contructor is usually only called by constructors in subclasses.
Creates a QtSoapType copy of copy.
Destructs a QtSoapType.
Clears any contents. In this base implementation, clear() does nothing.
Returns the number of child items in this QtSoapType. In the base implementation, this returns 0.
Returns a human readable explanation of the most recent error.
Returns the href attribute of this QtSoapType.
See also setHref().
Returns the ID of this QtSoapType.
See also setId().
Returns true if this object is of type QtSoapStruct, QtSoapArray or QtSoapSimpletype; otherwise returns false.
Returns the QName (qualified name) of this QtSoapType.
See also setName().
Returns the QtSoapType::Type called name.
Attempts to interpret node as a QtSoapType, and returns true if successful. This base implementation always returns false.
Sets the href attribute of this QtSoapType to h.
See also href().
Sets the ID of this QtSoapType to i.
See also id().
Sets the QName (qualified name) of this QtSoapType to name.
See also name().
Returns false.
Returns the QDomElement representation of this QtSoapType as a child of document.
Returns 0.
Returns QString::null.
Returns the type as a QtSoapType::Type.
Returns the QString representation of this QtSoapType's type.
Returns the QString equivalent of type t.
Returns the value of this QtSoapType. In the base implementation, an invalid QVariant() is returned.
Makes this QtSoapType equal to copy.
Returns a reference to the child item at ordinal position pos. If no item exists at this position, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is key. If no item exists with this key an empty QtSoapType is returned.
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is key, regardless of the qualified name's URI. If no item exists with this key, an empty QtSoapType is returned.
This is an overloaded function.
Returns a reference to the child item at ordinal position pos. If no item exists at this position, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is key. If no item exists with this key, returns an empty QtSoapType.
This is an overloaded function.
Returns a reference to the child item whose QName (qualified name) is key, regardless of the qualified name's URI. If no item exists with this key, returns an empty QtSoapType.