#include <ulxr_value.h>
Collaboration diagram for ulxr::Value:
Public Member Functions | |
Value () | |
Creates an empty Value. | |
Value (const Value &val) | |
Creates a Value as duplicate of another Value. | |
Value (const Boolean &val) | |
Creates a value from a Boolean. | |
Value (const Integer &val) | |
Creates a value from an Integer. | |
Value (const Double &val) | |
Creates a value from a Double. | |
Value (const Array &val) | |
Creates a value from an Array. | |
Value (const Struct &val) | |
Creates a value from a Struct. | |
Value (const RpcString &val) | |
Creates a value from a RpcString. | |
Value (const Base64 &val) | |
Creates a value from a Base64. | |
Value (const DateTime &val) | |
Creates a value from a DateTime. | |
Value (const char *val) | |
Creates a value from a const char*. | |
Value (const wchar_t *val) | |
Creates a value from a const wchar_t*. | |
Value (const double &val) | |
Creates a value from a double. | |
Value (const int &val) | |
Creates a value from an int. | |
Value (const bool &val) | |
Creates a value from a bool. | |
virtual | ~Value () |
Destroys the Value. | |
Value & | operator= (const Value &val) |
Creates a Value as copy of another Value. | |
CppString | getSignature (bool deep=false) const |
Returns the signature of value. | |
virtual std::string | getWbXml () const |
Returns the call as binary xml string. | |
CppString | getXml (int indent=0) const |
Returns the value as xml string. | |
operator Void & () | |
Converts the Value into a Void. | |
operator const Void & () const | |
Converts the Value into a Void. | |
operator Boolean & () | |
Converts the Value into a Boolean. | |
operator const Boolean & () const | |
Converts the Value into a Boolean. | |
operator Integer & () | |
Converts the Value into an Integer. | |
operator const Integer & () const | |
Converts the Value into an Integer. | |
operator Double & () | |
Converts the Value into a Double. | |
operator const Double & () const | |
Converts the Value into a Double. | |
operator Array & () | |
Converts the Value into an Array. | |
operator const Array & () const | |
Converts the Value into an Array. | |
operator Struct & () | |
Converts the Value into a Struct. | |
operator const Struct & () const | |
Converts the Value into a Struct. | |
operator RpcString & () | |
Converts the Value into a RpcString. | |
operator const RpcString & () const | |
Converts the Value into a RpcString. | |
operator Base64 & () | |
Converts the Value into a Base64. | |
operator const Base64 & () const | |
Converts the Value into a Base64. | |
operator DateTime & () | |
Converts the Value into a DateTime. | |
operator const DateTime & () const | |
Converts the Value into a DateTime. | |
Struct * | getStruct () |
Converts the Value into a Struct. | |
const Struct * | getStruct () const |
Converts the Value into a Struct. | |
Array * | getArray () |
Converts the Value into an Array. | |
const Array * | getArray () const |
Converts the Value into an Array. | |
bool | isBoolean () const |
Determines if the Value is of type Boolean. | |
bool | isVoid () const |
Determines if the Value is of type Void. | |
bool | isInteger () const |
Determines if the Value is of type Integer. | |
bool | isDouble () const |
Determines if the Value is of type Double. | |
bool | isArray () const |
Determines if the Value is of type Array. | |
bool | isStruct () const |
Determines if the Value is of type Struct. | |
bool | isString () const |
Determines if the Value is of type RpcString. | |
bool | isBase64 () const |
Determines if the Value is of type Base64. | |
bool | isDateTime () const |
Determines if the Value is of type DateTime. | |
ValueType | getType () const |
Returns the type of the Value. | |
CppString | getTypeName () const |
Returns the C++-name of the ValueType. | |
Private Attributes | |
union { | |
ValueBase * baseVal | |
Void * voidVal | |
Boolean * boolVal | |
Integer * intVal | |
Double * doubleVal | |
Array * arrayVal | |
Struct * structVal | |
RpcString * stringVal | |
Base64 * base64Val | |
DateTime * dateVal | |
}; |
Parameters are passed to and returned by method calls.
Definition at line 70 of file ulxr_value.h.
ulxr::Value::Value | ( | ) |
ulxr::Value::Value | ( | const Value & | val | ) |
Creates a Value as duplicate of another Value.
val | the source value |
Definition at line 318 of file ulxr_value.cpp.
References baseVal, and ulxr::ValueBase::cloneValue().
ulxr::Value::Value | ( | const Boolean & | val | ) |
Creates a value from a Boolean.
val | the source value |
Definition at line 324 of file ulxr_value.cpp.
References boolVal.
ulxr::Value::Value | ( | const Integer & | val | ) |
Creates a value from an Integer.
val | the source value |
Definition at line 330 of file ulxr_value.cpp.
References intVal.
ulxr::Value::Value | ( | const Double & | val | ) |
Creates a value from a Double.
val | the source value |
Definition at line 336 of file ulxr_value.cpp.
References doubleVal.
ulxr::Value::Value | ( | const Array & | val | ) |
Creates a value from an Array.
val | the source value |
Definition at line 342 of file ulxr_value.cpp.
References arrayVal.
ulxr::Value::Value | ( | const Struct & | val | ) |
Creates a value from a Struct.
val | the source value |
Definition at line 348 of file ulxr_value.cpp.
References structVal.
ulxr::Value::Value | ( | const RpcString & | val | ) |
Creates a value from a RpcString.
val | the source value |
Definition at line 354 of file ulxr_value.cpp.
References stringVal.
ulxr::Value::Value | ( | const Base64 & | val | ) |
Creates a value from a Base64.
val | the source value |
Definition at line 360 of file ulxr_value.cpp.
References base64Val.
ulxr::Value::Value | ( | const DateTime & | val | ) |
Creates a value from a DateTime.
val | the source value |
Definition at line 367 of file ulxr_value.cpp.
References dateVal.
ulxr::Value::Value | ( | const char * | val | ) |
Creates a value from a const char*.
val | the source value |
Definition at line 376 of file ulxr_value.cpp.
References stringVal.
ulxr::Value::Value | ( | const wchar_t * | val | ) |
Creates a value from a const wchar_t*.
val | the source value |
Definition at line 384 of file ulxr_value.cpp.
References stringVal, and ulxr::unicodeToUtf8().
ulxr::Value::Value | ( | const double & | val | ) |
Creates a value from a double.
val | the source value |
Definition at line 393 of file ulxr_value.cpp.
References doubleVal.
ulxr::Value::Value | ( | const int & | val | ) |
Creates a value from an int.
val | the source value |
Definition at line 399 of file ulxr_value.cpp.
References intVal.
ulxr::Value::Value | ( | const bool & | val | ) |
Creates a value from a bool.
val | the source value |
Definition at line 405 of file ulxr_value.cpp.
References boolVal.
ulxr::Value::~Value | ( | ) | [virtual] |
Creates a Value as copy of another Value.
val | the source value |
Definition at line 414 of file ulxr_value.cpp.
CppString ulxr::Value::getSignature | ( | bool | deep = false |
) | const |
Returns the signature of value.
The signature consists of its type name.
deep | if nested types exist, include them |
Definition at line 145 of file ulxr_value.cpp.
Referenced by ulxr::Signature::addParam().
std::string ulxr::Value::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.
Definition at line 163 of file ulxr_value.cpp.
CppString ulxr::Value::getXml | ( | int | indent = 0 |
) | const |
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 |
Definition at line 154 of file ulxr_value.cpp.
ulxr::Value::operator Void & | ( | ) |
Converts the Value into a Void.
If the type does not match exactly a RuntimeException is thrown.
ulxr::Value::operator const Void & | ( | ) | const |
Converts the Value into a Void.
If the type does not match exactly a RuntimeException is thrown.
ulxr::Value::operator Boolean & | ( | ) |
Converts the Value into a Boolean.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 200 of file ulxr_value.cpp.
References boolVal, ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Boolean & | ( | ) | const |
Converts the Value into a Boolean.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 207 of file ulxr_value.cpp.
References boolVal, ulxr::RpcBoolean, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator Integer & | ( | ) |
Converts the Value into an Integer.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 214 of file ulxr_value.cpp.
References intVal, ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Integer & | ( | ) | const |
Converts the Value into an Integer.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 221 of file ulxr_value.cpp.
References intVal, ulxr::RpcInteger, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator Double & | ( | ) |
Converts the Value into a Double.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 228 of file ulxr_value.cpp.
References doubleVal, ulxr::RpcDouble, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Double & | ( | ) | const |
Converts the Value into a Double.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 235 of file ulxr_value.cpp.
References doubleVal, ulxr::RpcDouble, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator Array & | ( | ) |
Converts the Value into an Array.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 242 of file ulxr_value.cpp.
References arrayVal, ulxr::RpcArray, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Array & | ( | ) | const |
Converts the Value into an Array.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 249 of file ulxr_value.cpp.
References arrayVal, ulxr::RpcArray, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator Struct & | ( | ) |
Converts the Value into a Struct.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 256 of file ulxr_value.cpp.
References ulxr::RpcStruct, structVal, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Struct & | ( | ) | const |
Converts the Value into a Struct.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 263 of file ulxr_value.cpp.
References ulxr::RpcStruct, structVal, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator RpcString & | ( | ) |
Converts the Value into a RpcString.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 270 of file ulxr_value.cpp.
References ulxr::RpcStrType, stringVal, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const RpcString & | ( | ) | const |
Converts the Value into a RpcString.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 277 of file ulxr_value.cpp.
References ulxr::RpcStrType, stringVal, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator Base64 & | ( | ) |
Converts the Value into a Base64.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 284 of file ulxr_value.cpp.
References base64Val, ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const Base64 & | ( | ) | const |
Converts the Value into a Base64.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 291 of file ulxr_value.cpp.
References base64Val, ulxr::RpcBase64, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator DateTime & | ( | ) |
Converts the Value into a DateTime.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 298 of file ulxr_value.cpp.
References dateVal, ulxr::RpcDateTime, and ULXR_ASSERT_RPCTYPE.
ulxr::Value::operator const DateTime & | ( | ) | const |
Converts the Value into a DateTime.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 305 of file ulxr_value.cpp.
References dateVal, ulxr::RpcDateTime, and ULXR_ASSERT_RPCTYPE.
Struct * ulxr::Value::getStruct | ( | ) |
Converts the Value into a Struct.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 172 of file ulxr_value.cpp.
References ulxr::RpcStruct, and ULXR_ASSERT_RPCTYPE.
const Struct * ulxr::Value::getStruct | ( | ) | const |
Converts the Value into a Struct.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 179 of file ulxr_value.cpp.
References ulxr::RpcStruct, and ULXR_ASSERT_RPCTYPE.
Array * ulxr::Value::getArray | ( | ) |
Converts the Value into an Array.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 186 of file ulxr_value.cpp.
References ulxr::RpcArray, and ULXR_ASSERT_RPCTYPE.
const Array * ulxr::Value::getArray | ( | ) | const |
Converts the Value into an Array.
If the type does not match exactly a RuntimeException is thrown.
Definition at line 193 of file ulxr_value.cpp.
References ulxr::RpcArray, and ULXR_ASSERT_RPCTYPE.
bool ulxr::Value::isBoolean | ( | ) | const |
Determines if the Value is of type Boolean.
Definition at line 85 of file ulxr_value.cpp.
bool ulxr::Value::isVoid | ( | ) | const |
Determines if the Value is of type Void.
Definition at line 79 of file ulxr_value.cpp.
bool ulxr::Value::isInteger | ( | ) | const |
Determines if the Value is of type Integer.
Definition at line 91 of file ulxr_value.cpp.
bool ulxr::Value::isDouble | ( | ) | const |
Determines if the Value is of type Double.
Definition at line 97 of file ulxr_value.cpp.
bool ulxr::Value::isArray | ( | ) | const |
Determines if the Value is of type Array.
Definition at line 103 of file ulxr_value.cpp.
bool ulxr::Value::isStruct | ( | ) | const |
Determines if the Value is of type Struct.
Definition at line 109 of file ulxr_value.cpp.
bool ulxr::Value::isString | ( | ) | const |
Determines if the Value is of type RpcString.
Definition at line 115 of file ulxr_value.cpp.
bool ulxr::Value::isBase64 | ( | ) | const |
Determines if the Value is of type Base64.
Definition at line 121 of file ulxr_value.cpp.
bool ulxr::Value::isDateTime | ( | ) | const |
Determines if the Value is of type DateTime.
Definition at line 127 of file ulxr_value.cpp.
ValueType ulxr::Value::getType | ( | ) | const |
CppString ulxr::Value::getTypeName | ( | ) | const |
Returns the C++-name of the ValueType.
Definition at line 139 of file ulxr_value.cpp.
ValueBase* ulxr::Value::baseVal [private] |
Void* ulxr::Value::voidVal [private] |
Boolean* ulxr::Value::boolVal [private] |
Definition at line 378 of file ulxr_value.h.
Referenced by operator Boolean &(), operator const Boolean &(), and Value().
Integer* ulxr::Value::intVal [private] |
Definition at line 379 of file ulxr_value.h.
Referenced by operator const Integer &(), operator Integer &(), and Value().
Double* ulxr::Value::doubleVal [private] |
Definition at line 380 of file ulxr_value.h.
Referenced by operator const Double &(), operator Double &(), and Value().
Array* ulxr::Value::arrayVal [private] |
Definition at line 381 of file ulxr_value.h.
Referenced by operator Array &(), operator const Array &(), and Value().
Struct* ulxr::Value::structVal [private] |
Definition at line 382 of file ulxr_value.h.
Referenced by operator const Struct &(), operator Struct &(), and Value().
RpcString* ulxr::Value::stringVal [private] |
Definition at line 383 of file ulxr_value.h.
Referenced by operator const RpcString &(), operator RpcString &(), and Value().
Base64* ulxr::Value::base64Val [private] |
Definition at line 384 of file ulxr_value.h.
Referenced by operator Base64 &(), operator const Base64 &(), and Value().
DateTime* ulxr::Value::dateVal [private] |
Definition at line 385 of file ulxr_value.h.
Referenced by operator const DateTime &(), operator DateTime &(), and Value().
union { ... } [private] |