Home

QtSoapType Class Reference

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

#include <qtsoap.h>

Inherited by QtSoapArray, QtSoapStruct, and QtSoapSimpleType.

List of all member functions.

Public Members

Static Public Members


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().latin1());
    }
    

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

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.


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.

Reimplemented in QtSoapArray, QtSoapStruct, and QtSoapSimpleType.

int QtSoapType::count () const [virtual]

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

Example: google.cpp.

Reimplemented in QtSoapArray and QtSoapStruct.

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.

QString QtSoapType::id () const [virtual]

Returns the ID of this QtSoapType.

bool QtSoapType::isValid () const [virtual]

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

Example: google.cpp.

QtSoapQName QtSoapType::name () const [virtual]

Returns the QName (qualified name) of this QtSoapType.

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

Returns the QtSoapType::Type called name.

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.

Reimplemented in QtSoapArray and QtSoapStruct.

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

This is an overloaded member function, provided for convenience. It behaves essentially like the above 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.

Reimplemented in QtSoapArray and QtSoapStruct.

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

This is an overloaded member function, provided for convenience. It behaves essentially like the above 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.

Reimplemented in QtSoapArray and QtSoapStruct.

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

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

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

Reimplemented in QtSoapArray and QtSoapStruct.

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

This is an overloaded member function, provided for convenience. It behaves essentially like the above 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.

Reimplemented in QtSoapArray and QtSoapStruct.

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

This is an overloaded member function, provided for convenience. It behaves essentially like the above 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.

Reimplemented in QtSoapArray and QtSoapStruct.

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

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

Reimplemented in QtSoapArray, QtSoapStruct, and QtSoapSimpleType.

void QtSoapType::setHref ( const QString & h )

Sets the href attribute of this QtSoapType to h.

void QtSoapType::setId ( const QString & i )

Sets the ID of this QtSoapType to i.

void QtSoapType::setName ( const QtSoapQName & n )

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

bool QtSoapType::toBool () const [virtual]

Returns false.

Reimplemented in QtSoapSimpleType.

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

Returns the QDomElement representation of this QtSoapType.

Reimplemented in QtSoapArray, QtSoapStruct, and QtSoapSimpleType.

int QtSoapType::toInt () const [virtual]

Returns 0.

Reimplemented in QtSoapSimpleType.

QString QtSoapType::toString () const [virtual]

Returns QString::null.

Reimplemented in QtSoapSimpleType.

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.

Reimplemented in QtSoapSimpleType.


This file is part of the Qt Solutions. Copyright © 2003-2006 Trolltech. All Rights Reserved.

Copyright © 2003-2006 TrolltechTrademarks
Qt Solutions