#include <ulxr_value.h>
Inheritance diagram for ulxr::Base64:
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 ValueBase * | cloneValue () 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 |
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.
ulxr::Base64::Base64 | ( | ) |
ulxr::Base64::Base64 | ( | const CppString & | s | ) |
Constructs a Base64.
s | value for the construction as string |
Definition at line 1063 of file ulxr_value.cpp.
References setString().
ulxr::Base64::~Base64 | ( | ) | [virtual] |
CppString ulxr::Base64::getString | ( | ) | const |
Returns the 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.
Definition at line 1075 of file ulxr_value.cpp.
void ulxr::Base64::setBase64 | ( | const CppString | s | ) |
Sets the current value encoded in base64.
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.
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.
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.
deep | if nested types exist, include them |
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.
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.
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.
indent | current indentation level |
Implements ulxr::ValueBase.
Definition at line 1107 of file ulxr_value.cpp.
References ulxr::getXmlIndent(), ulxr::RpcBase64, ULXR_ASSERT_RPCTYPE, and ULXR_PCHAR.
CppString ulxr::Base64::val [private] |
Definition at line 1392 of file ulxr_value.h.