ulxr::ValueBase Class Reference

Base class of XML RPC parameters. More...

#include <ulxr_value.h>

Inheritance diagram for ulxr::ValueBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ValueBase (ValueType t)
 Creates an empty ValueBase.
virtual ~ValueBase ()
 Destroys the ValueBase.
bool isVoid () const
 Determines if the Value is of type Void.
bool isBoolean () const
 Determines if the Value is of type Boolean.
bool isInteger () const
 Determines if the Value is of type Integer.
bool isDouble () const
 Determines if the Value is of type Double.
bool isArray () const
 Determines if the Value is of type Array.
bool isStruct () const
 Determines if the Value is of type Struct.
bool isString () const
 Determines if the Value is of type RpcString.
bool isBase64 () const
 Determines if the Value is of type Base64.
bool isDateTime () const
 Determines if the Value is of type DateTime.
ValueType getType () const
 Returns the type of the Value.
virtual ValueBasecloneValue () const=0
 Creates a copy of the actual Value.
virtual CppString getSignature (bool deep=false) const=0
 Returns the signature of value.
virtual std::string getWbXml () const=0
 Returns the call as binary xml string.
virtual CppString getXml (int indent=0) const =0
 Returns the value as xml string.
CppString getTypeName () const
 Returns the C++-name of the ValueType.

Private Member Functions

 ValueBase ()
 Constructor for an empty ValueBase.

Private Attributes

ValueType type

Detailed Description

Base class of XML RPC parameters.

There exists several specialized parameter classes for number and string types and collections of parameters.

Definition at line 397 of file ulxr_value.h.


Constructor & Destructor Documentation

ulxr::ValueBase::ValueBase ( ValueType  t  ) 

Creates an empty ValueBase.

Parameters:
t type of the Value.

Definition at line 434 of file ulxr_value.cpp.

ulxr::ValueBase::~ValueBase (  )  [virtual]

Destroys the ValueBase.

Definition at line 446 of file ulxr_value.cpp.

ulxr::ValueBase::ValueBase (  )  [private]

Constructor for an empty ValueBase.

Exists as private method to prevent its use.


Member Function Documentation

bool ulxr::ValueBase::isVoid (  )  const

Determines if the Value is of type Void.

Returns:
true if the type is correct.

Definition at line 451 of file ulxr_value.cpp.

References ulxr::RpcVoid.

bool ulxr::ValueBase::isBoolean (  )  const

Determines if the Value is of type Boolean.

Returns:
true if the type is correct.

Definition at line 457 of file ulxr_value.cpp.

References ulxr::RpcBoolean.

bool ulxr::ValueBase::isInteger (  )  const

Determines if the Value is of type Integer.

Returns:
true if the type is correct.

Definition at line 463 of file ulxr_value.cpp.

References ulxr::RpcInteger.

bool ulxr::ValueBase::isDouble (  )  const

Determines if the Value is of type Double.

Returns:
true if the type is correct.

Definition at line 469 of file ulxr_value.cpp.

References ulxr::RpcDouble.

bool ulxr::ValueBase::isArray (  )  const

Determines if the Value is of type Array.

Returns:
true if the type is correct.

Definition at line 475 of file ulxr_value.cpp.

References ulxr::RpcArray.

bool ulxr::ValueBase::isStruct (  )  const

Determines if the Value is of type Struct.

Returns:
true if the type is correct.

Definition at line 481 of file ulxr_value.cpp.

References ulxr::RpcStruct.

bool ulxr::ValueBase::isString (  )  const

Determines if the Value is of type RpcString.

Returns:
true if the type is correct.

Definition at line 487 of file ulxr_value.cpp.

References ulxr::RpcStrType.

bool ulxr::ValueBase::isBase64 (  )  const

Determines if the Value is of type Base64.

Returns:
true if the type is correct.

Definition at line 493 of file ulxr_value.cpp.

References ulxr::RpcBase64.

bool ulxr::ValueBase::isDateTime (  )  const

Determines if the Value is of type DateTime.

Returns:
true if the type is correct.

Definition at line 499 of file ulxr_value.cpp.

References ulxr::RpcDateTime.

ValueType ulxr::ValueBase::getType (  )  const

Returns the type of the Value.

Returns:
value type

Definition at line 440 of file ulxr_value.cpp.

virtual ValueBase* ulxr::ValueBase::cloneValue (  )  const [pure virtual]

Creates a copy of the actual Value.

Returns:
pointer to the copy

Implemented in ulxr::Void, ulxr::Boolean, ulxr::Integer, ulxr::Double, ulxr::Array, ulxr::Struct, ulxr::RpcString, ulxr::DateTime, and ulxr::Base64.

Referenced by ulxr::Value::Value().

virtual CppString ulxr::ValueBase::getSignature ( bool  deep = false  )  const [pure virtual]

Returns the signature of value.

The signature consists of its type name.

Parameters:
deep if nested types exist, include them
Returns:
The signature

Implemented in ulxr::Void, ulxr::Boolean, ulxr::Integer, ulxr::Double, ulxr::Array, ulxr::Struct, ulxr::RpcString, ulxr::DateTime, and ulxr::Base64.

Referenced by ulxr::Signature::Signature().

virtual std::string ulxr::ValueBase::getWbXml (  )  const [pure virtual]

Returns the call as binary xml string.

The method call is converted to a wbxml sequence. It is prepended with the necessary xml procession instruction with version and encoding set to UTF-8.

Returns:
The wbxml content

Implemented in ulxr::Void, ulxr::Boolean, ulxr::Integer, ulxr::Double, ulxr::Array, ulxr::Struct, ulxr::RpcString, ulxr::DateTime, and ulxr::Base64.

virtual CppString ulxr::ValueBase::getXml ( int  indent = 0  )  const [pure virtual]

Returns the value as xml string.

The content and its type name is converted to an xml text. The structure of the text is indented to facilitate easy reading of larger blocks.

Parameters:
indent current indentation level
Returns:
The xml content

Implemented in ulxr::Void, ulxr::Boolean, ulxr::Integer, ulxr::Double, ulxr::Array, ulxr::Struct, ulxr::RpcString, ulxr::DateTime, and ulxr::Base64.

CppString ulxr::ValueBase::getTypeName (  )  const

Returns the C++-name of the ValueType.

Returns:
type name

Definition at line 505 of file ulxr_value.cpp.

References ulxr::RpcArray, ulxr::RpcBase64, ulxr::RpcBoolean, ulxr::RpcDateTime, ulxr::RpcDouble, ulxr::RpcInteger, ulxr::RpcStrType, ulxr::RpcStruct, ulxr::RpcVoid, and ULXR_PCHAR.


Member Data Documentation

ValueType ulxr::ValueBase::type [private]

Definition at line 496 of file ulxr_value.h.


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 20:09:10 2007 for ulxmlrpcpp by  doxygen 1.5.1