#include <ulxr_value.h>
Inheritance diagram for ulxr::RpcString:
Public Member Functions | |
RpcString () | |
Default constructor for an RpcString. | |
RpcString (const Cpp16BitString &s) | |
Constructs an RpcString. | |
RpcString (const Cpp8BitString &s) | |
Constructs an RpcString. | |
virtual | ~RpcString () |
Destroys the Value. | |
void | setString (const Cpp16BitString &newval) |
Sets a new content. | |
void | setString (const Cpp8BitString &newval) |
Sets a new content. | |
CppString | getString () const |
Returns the current value encoded in UTF8. | |
Cpp16BitString | getUnicodeString () const |
Returns the current value as Unicode string. | |
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 |
The content is usually what you might call "text" and always encoded in Unicode to avoid misinterpretation due to unknown and variing charsets. The internal storage format is either directly unicode (std::wstring) or UTF8 when compiled with 8bit characters in non-unicode mode.
Definition at line 1089 of file ulxr_value.h.
ulxr::RpcString::RpcString | ( | ) |
ulxr::RpcString::RpcString | ( | const Cpp16BitString & | s | ) |
Constructs an RpcString.
s | value for the construction as Unicode string |
Definition at line 944 of file ulxr_value.cpp.
References setString().
ulxr::RpcString::RpcString | ( | const Cpp8BitString & | s | ) |
Constructs an RpcString.
s | value for the construction as UTF8 string |
Definition at line 930 of file ulxr_value.cpp.
References setString().
ulxr::RpcString::~RpcString | ( | ) | [virtual] |
void ulxr::RpcString::setString | ( | const Cpp16BitString & | newval | ) |
Sets a new content.
newval | the new content in Unicode |
Definition at line 1046 of file ulxr_value.cpp.
References ulxr::RpcStrType, and ULXR_ASSERT_RPCTYPE.
Referenced by RpcString().
void ulxr::RpcString::setString | ( | const Cpp8BitString & | newval | ) |
Sets a new content.
newval | the new content in UTF8 |
Definition at line 1033 of file ulxr_value.cpp.
References ulxr::getUnicode(), ulxr::RpcStrType, and ULXR_ASSERT_RPCTYPE.
CppString ulxr::RpcString::getString | ( | ) | const |
Returns the current value encoded in UTF8.
Definition at line 996 of file ulxr_value.cpp.
References ulxr::RpcStrType, and ULXR_ASSERT_RPCTYPE.
Referenced by ulxr::MethodResponseParserBase::getMethodResponse(), ulxr::Dispatcher::system_methodHelp(), and ulxr::Dispatcher::system_methodSignature().
Cpp16BitString ulxr::RpcString::getUnicodeString | ( | ) | const |
Returns the current value as Unicode string.
Definition at line 1005 of file ulxr_value.cpp.
References ulxr::RpcStrType, ULXR_ASSERT_RPCTYPE, and ulxr::utf8ToUnicode().
ValueBase * ulxr::RpcString::cloneValue | ( | ) | const [virtual] |
Creates a copy of the actual object.
Implements ulxr::ValueBase.
Definition at line 952 of file ulxr_value.cpp.
References ulxr::RpcStrType, and ULXR_ASSERT_RPCTYPE.
CppString ulxr::RpcString::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 959 of file ulxr_value.cpp.
References ulxr::RpcStrType, and ULXR_ASSERT_RPCTYPE.
CppString ulxr::RpcString::getValueName | ( | ) | [static] |
Returns the xml name of the Value.
Definition at line 966 of file ulxr_value.cpp.
References ULXR_PCHAR.
std::string ulxr::RpcString::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 972 of file ulxr_value.cpp.
References ulxr::getWbXmlString(), ulxr::RpcStrType, ULXR_ASSERT_RPCTYPE, ulxr::ValueParserWb::wbToken_String, ulxr::ValueParserWb::wbToken_Value, and ulxr::WbXmlParser::wbxml_END.
CppString ulxr::RpcString::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 985 of file ulxr_value.cpp.
References ulxr::getXmlIndent(), ulxr::RpcStrType, ULXR_ASSERT_RPCTYPE, ULXR_PCHAR, and ulxr::xmlEscape().
CppString ulxr::RpcString::val [private] |
Definition at line 1205 of file ulxr_value.h.