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

Implementation of a integer value. More...

#include <ulxr_value.h>

Inheritance diagram for ulxr::Integer:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Integer ()
 Default constructor for an Integer.
 Integer (int i)
 Constructs an Integer.
 Integer (const CppString &s)
 Constructs an Integer.
virtual ~Integer ()
 Destroys the Value.
int getInteger () const
 Returns the current value.
void setInteger (const int newval)
 Sets a new content.
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

int val

Detailed Description

Implementation of a integer value.

Integer values have 32 or more bits and are signed.

Definition at line 652 of file ulxr_value.h.


Constructor & Destructor Documentation

ulxr::Integer::Integer (  ) 

Default constructor for an Integer.

Definition at line 701 of file ulxr_value.cpp.

ulxr::Integer::Integer ( int  i  ) 

Constructs an Integer.

Parameters:
i value for the construction

Definition at line 707 of file ulxr_value.cpp.

ulxr::Integer::Integer ( const CppString s  ) 

Constructs an Integer.

Parameters:
s value for the construction as number string

Definition at line 718 of file ulxr_value.cpp.

References ulxr::getLatin1(), and val.

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

Destroys the Value.

Definition at line 713 of file ulxr_value.cpp.


Member Function Documentation

int ulxr::Integer::getInteger (  )  const

Returns the current value.

Returns:
current value

Definition at line 786 of file ulxr_value.cpp.

References ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.

void ulxr::Integer::setInteger ( const int  newval  ) 

Sets a new content.

Parameters:
newval the new content

Definition at line 793 of file ulxr_value.cpp.

References ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.

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

Creates a copy of the actual object.

Returns:
pointer to the copy

Implements ulxr::ValueBase.

Definition at line 729 of file ulxr_value.cpp.

References ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.

CppString ulxr::Integer::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 737 of file ulxr_value.cpp.

References ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.

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

Returns the xml name of the Value.

Returns:
value name

Definition at line 744 of file ulxr_value.cpp.

References ULXR_PCHAR.

std::string ulxr::Integer::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 750 of file ulxr_value.cpp.

References ulxr::ApplicationError, ulxr::getWbXmlString(), ulxr::RpcInteger, ULXR_ASSERT_RPCTYPE, ULXR_GET_STRING, ulxr_i18n, ULXR_PCHAR, ulxr_snprintf, ulxr::ValueParserWb::wbToken_I4, ulxr::ValueParserWb::wbToken_Value, and ulxr::WbXmlParser::wbxml_END.

CppString ulxr::Integer::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 769 of file ulxr_value.cpp.

References ulxr::ApplicationError, ulxr::getXmlIndent(), ulxr::RpcInteger, ULXR_ASSERT_RPCTYPE, ULXR_GET_STRING, ulxr_i18n, ULXR_PCHAR, and ulxr_snprintf.


Member Data Documentation

int ulxr::Integer::val [private]

Definition at line 720 of file ulxr_value.h.

Referenced by Integer().


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