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

Implementation of a base64 value. More...

#include <ulxr_value.h>

Inheritance diagram for ulxr::Base64:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Base64 ()
 Default constructor for a Base64.
 Base64 (const CppString &s)
 Constructs a Base64.
virtual ~Base64 ()
 Destroys the Value.
CppString getString () const
 Returns the current value.
CppString getBase64 () const
 Returns the current value encoded in base64.
void setBase64 (const CppString s)
 Sets the current value encoded in base64.
void setString (const CppString &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

CppString val

Detailed Description

Implementation of a base64 value.

This class is intended to be used for content in raw binary data. To transport such data you must convert to something conforming to XML rules. This is achived with base64 that uses only letters, digits and some punctuation characters.

Definition at line 1319 of file ulxr_value.h.


Constructor & Destructor Documentation

ulxr::Base64::Base64 (  ) 

Default constructor for a Base64.

Definition at line 1057 of file ulxr_value.cpp.

ulxr::Base64::Base64 ( const CppString s  ) 

Constructs a Base64.

Parameters:
s value for the construction as string

Definition at line 1063 of file ulxr_value.cpp.

References setString().

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

Destroys the Value.

Definition at line 1070 of file ulxr_value.cpp.


Member Function Documentation

CppString ulxr::Base64::getString (  )  const

Returns the current value.

Returns:
current value

Definition at line 1131 of file ulxr_value.cpp.

References ulxr::decodeBase64(), ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.

CppString ulxr::Base64::getBase64 (  )  const

Returns the current value encoded in base64.

Returns:
internal value

Definition at line 1075 of file ulxr_value.cpp.

void ulxr::Base64::setBase64 ( const CppString  s  ) 

Sets the current value encoded in base64.

Parameters:
s already encode value.

Definition at line 1081 of file ulxr_value.cpp.

Referenced by ulxr::ValueParserWb::testEndElement(), and ulxr::ValueParser::testEndElement().

void ulxr::Base64::setString ( const CppString newval  ) 

Sets a new content.

Parameters:
newval the new content (UTF8 in non-unicode mode)

Definition at line 1138 of file ulxr_value.cpp.

References ulxr::encodeBase64(), ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.

Referenced by Base64().

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

Creates a copy of the actual object.

Returns:
pointer to the copy

Implements ulxr::ValueBase.

Definition at line 1087 of file ulxr_value.cpp.

References ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.

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

References ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.

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

Returns the xml name of the Value.

Returns:
value name

Definition at line 1101 of file ulxr_value.cpp.

References ULXR_PCHAR.

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

References ulxr::getWbXmlString(), ulxr::RpcBase64, ULXR_ASSERT_RPCTYPE, ulxr::ValueParserWb::wbToken_Base64, ulxr::ValueParserWb::wbToken_Value, and ulxr::WbXmlParser::wbxml_END.

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

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


Member Data Documentation

CppString ulxr::Base64::val [private]

Definition at line 1392 of file ulxr_value.h.


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