ulxr::Boolean Class Reference
[Value types in an XML-RPC call]

Implementation of a boolean value. More...

#include <ulxr_value.h>

Inheritance diagram for ulxr::Boolean:

Inheritance graph
[legend]
Collaboration diagram for ulxr::Boolean:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Boolean ()
 Default constructor for a Boolean.
 Boolean (bool b)
 Constructs a Boolean.
 Boolean (const CppString &s)
 Constructs a Boolean.
virtual ~Boolean ()
 Destroys the Value.
bool getBoolean () const
 Returns the current value.
void setBoolean (const bool newval)
 Sets the current value.
virtual ValueBasecloneValue () const
 Creates a copy of the actual object.
virtual CppString getSignature (bool deep=false) const
 Returns the signature of value.
virtual std::string getWbXml () const
 Returns the call as binary xml string.
virtual CppString getXml (int indent=0) const
 Returns the value as xml string.

Static Public Member Functions

static CppString getValueName ()
 Returns the xml name of the Value.

Private Attributes

bool val

Detailed Description

Implementation of a boolean value.

Boolean values can either be "true" or "false".

Definition at line 572 of file ulxr_value.h.


Constructor & Destructor Documentation

ulxr::Boolean::Boolean (  ) 

Default constructor for a Boolean.

Definition at line 601 of file ulxr_value.cpp.

ulxr::Boolean::Boolean ( bool  b  ) 

Constructs a Boolean.

Parameters:
b value for the construction

Definition at line 607 of file ulxr_value.cpp.

ulxr::Boolean::Boolean ( const CppString s  ) 

Constructs a Boolean.

Parameters:
s value as string (true, on and 1 count as TRUE)

Definition at line 618 of file ulxr_value.cpp.

References ULXR_PCHAR, and val.

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

Destroys the Value.

Definition at line 613 of file ulxr_value.cpp.


Member Function Documentation

bool ulxr::Boolean::getBoolean (  )  const

Returns the current value.

Returns:
current value

Definition at line 684 of file ulxr_value.cpp.

References ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.

void ulxr::Boolean::setBoolean ( const bool  newval  ) 

Sets the current value.

Parameters:
newval new value

Definition at line 691 of file ulxr_value.cpp.

References ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.

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

Creates a copy of the actual object.

Returns:
pointer to the copy

Implements ulxr::ValueBase.

Definition at line 629 of file ulxr_value.cpp.

References ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.

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

Returns the signature of value.

The signature consists of its type name.

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

Implements ulxr::ValueBase.

Definition at line 636 of file ulxr_value.cpp.

References ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.

CppString ulxr::Boolean::getValueName (  )  [static]

Returns the xml name of the Value.

Returns:
value name

Definition at line 643 of file ulxr_value.cpp.

References ULXR_PCHAR.

std::string ulxr::Boolean::getWbXml (  )  const [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

Implements ulxr::ValueBase.

Definition at line 649 of file ulxr_value.cpp.

References ulxr::getWbXmlString(), ulxr::RpcBoolean, ULXR_ASSERT_RPCTYPE, ULXR_PCHAR, ulxr::ValueParserWb::wbToken_Boolean, ulxr::ValueParserWb::wbToken_Value, and ulxr::WbXmlParser::wbxml_END.

CppString ulxr::Boolean::getXml ( int  indent = 0  )  const [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

Implements ulxr::ValueBase.

Definition at line 668 of file ulxr_value.cpp.

References ulxr::getXmlIndent(), ulxr::RpcBoolean, ULXR_ASSERT_RPCTYPE, and ULXR_PCHAR.


Member Data Documentation

bool ulxr::Boolean::val [private]

Definition at line 641 of file ulxr_value.h.

Referenced by Boolean().


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