Qt-based BB10 API Examples Documentation

Contents

QtSoapType Class Reference

The QtSoapType class is the base class for all SOAP types in QtSoap. More...

    #include <QtSoapType>

Inherited by: QtSoapArray, QtSoapSimpleType, and QtSoapStruct.

Public Types

enum Type { AnyURI, Array, Base64Binary, Boolean, ..., UnsignedShort }

Public Functions

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

Static Public Members

Type nameToType ( const QString & name )
QString typeToName ( QtSoapType::Type t )

Detailed Description

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.

Member Type Documentation

enum QtSoapType::Type

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.

ConstantValueDescription
QtSoapType::AnyURI14 
QtSoapType::Array41Represented by QtSoapArray
QtSoapType::Base64Binary10 
QtSoapType::Boolean9 
QtSoapType::Byte34 
QtSoapType::Date3 
QtSoapType::DateTime1 
QtSoapType::Decimal27 
QtSoapType::Double13 
QtSoapType::Duration0 
QtSoapType::ENTITY26 
QtSoapType::Float12 
QtSoapType::GDay7 
QtSoapType::GMonth8 
QtSoapType::GMonthDay6 
QtSoapType::GYear5 
QtSoapType::GYearMonth4 
QtSoapType::HexBinary11 
QtSoapType::ID24 
QtSoapType::IDREF25 
QtSoapType::Int32 
QtSoapType::Integer28 
QtSoapType::Language20 
QtSoapType::Long31 
QtSoapType::NCName23 
QtSoapType::NMTOKEN22 
QtSoapType::NOTATION16 
QtSoapType::Name21 
QtSoapType::NegativeInteger30 
QtSoapType::NonNegativeInteger35 
QtSoapType::NonPositiveInteger29 
QtSoapType::NormalizedString18 
QtSoapType::Other43 
QtSoapType::PositiveInteger37 
QtSoapType::QName15 
QtSoapType::Short33 
QtSoapType::String17 
QtSoapType::Struct42Represented by QtSoapStruct
QtSoapType::Time2 
QtSoapType::Token19 
QtSoapType::UnsignedByte40 
QtSoapType::UnsignedInt38 
QtSoapType::UnsignedLong36 
QtSoapType::UnsignedShort39 

Member Function Documentation

QtSoapType::QtSoapType ()

Constructs a QtSoapType.

QtSoapType::QtSoapType ( const QtSoapQName & name, Type type = Other )

Constructs a QtSoapType whose name is name and type is type. This contructor is usually only called by constructors in subclasses.

QtSoapType::QtSoapType ( const QtSoapType & copy )

Creates a QtSoapType copy of copy.

QtSoapType::~QtSoapType () [virtual]

Destructs a QtSoapType.

void QtSoapType::clear () [virtual]

Clears any contents. In this base implementation, clear() does nothing.

int QtSoapType::count () const [virtual]

Returns the number of child items in this QtSoapType. In the base implementation, this returns 0.

QString QtSoapType::errorString () const

Returns a human readable explanation of the most recent error.

QString QtSoapType::href () const [virtual]

Returns the href attribute of this QtSoapType.

See also setHref().

QString QtSoapType::id () const [virtual]

Returns the ID of this QtSoapType.

See also setId().

bool QtSoapType::isValid () const [virtual]

Returns true if this object is of type QtSoapStruct, QtSoapArray or QtSoapSimpletype; otherwise returns false.

QtSoapQName QtSoapType::name () const [virtual]

Returns the QName (qualified name) of this QtSoapType.

See also setName().

Type QtSoapType::nameToType ( const QString & name ) [static]

Returns the QtSoapType::Type called name.

bool QtSoapType::parse ( QDomNode node ) [virtual]

Attempts to interpret node as a QtSoapType, and returns true if successful. This base implementation always returns false.

void QtSoapType::setHref ( const QString & h )

Sets the href attribute of this QtSoapType to h.

See also href().

void QtSoapType::setId ( const QString & i )

Sets the ID of this QtSoapType to i.

See also id().

void QtSoapType::setName ( const QtSoapQName & name )

Sets the QName (qualified name) of this QtSoapType to name.

See also name().

bool QtSoapType::toBool () const [virtual]

Returns false.

QDomElement QtSoapType::toDomElement ( QDomDocument document ) const [virtual]

Returns the QDomElement representation of this QtSoapType as a child of document.

int QtSoapType::toInt () const [virtual]

Returns 0.

QString QtSoapType::toString () const [virtual]

Returns QString::null.

Type QtSoapType::type () const [virtual]

Returns the type as a QtSoapType::Type.

QString QtSoapType::typeName () const [virtual]

Returns the QString representation of this QtSoapType's type.

QString QtSoapType::typeToName ( QtSoapType::Type t ) [static]

Returns the QString equivalent of type t.

QVariant QtSoapType::value () const [virtual]

Returns the value of this QtSoapType. In the base implementation, an invalid QVariant() is returned.

QtSoapType & QtSoapType::operator= ( const QtSoapType & copy )

Makes this QtSoapType equal to copy.

QtSoapType & QtSoapType::operator[] ( int pos ) [virtual]

Returns a reference to the child item at ordinal position pos. If no item exists at this position, returns an empty QtSoapType.

QtSoapType & QtSoapType::operator[] ( const QtSoapQName & key ) [virtual]

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.

QtSoapType & QtSoapType::operator[] ( const QString & key ) [virtual]

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.

const QtSoapType & QtSoapType::operator[] ( int pos ) const [virtual]

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.

const QtSoapType & QtSoapType::operator[] ( const QtSoapQName & key ) const [virtual]

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.

const QtSoapType & QtSoapType::operator[] ( const QString & key ) const [virtual]

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.