Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
Object (void) | |
virtual | ~Object (void) |
Object (const Object &toCopy) | |
virtual Object & | operator= (const Object &toCopy) |
bool | operator== (const Object &toCompare) const |
bool | operator!= (const Object &toCompare) const |
nByte | getType (void) const |
nByte | getCustomType (void) const |
const int * | getSizes (void) const |
unsigned int | getDimensions (void) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const=0 |
JString | toString (bool withTypes=false) const |
Public Member Functions inherited from Base | |
virtual | ~Base (void)=0 |
Public Member Functions inherited from LoggingBase< Base > | |
virtual | ~LoggingBase (void)=0 |
Public Member Functions inherited from ToString | |
virtual | ~ToString (void) |
virtual JString | typeToString (void) const |
JString | toString (bool withTypes=false) const |
Additional Inherited Members | |
Static Public Member Functions inherited from LoggingBase< Base > | |
static void | setListener (const BaseListener *pBaseListener) |
static int | getDebugOutputLevel (void) |
static bool | setDebugOutputLevel (int debugLevel) |
static const LogFormatOptions & | getLogFormatOptions (void) |
static void | setLogFormatOptions (const LogFormatOptions &options) |
Container class designed to hold all types of objects that are supported by the library.
Object is the common base for the template classes KeyObject and ValueObject, that provide a more convenient interface for handling Objects.
Object | ( | void | ) |
Constructor: Creates an empty Object. You have to set the content with operator= before you can use the object.
|
virtual |
Destructor.
Copy-Constructor: Creates an Object containing a deep copy of the argument passed.
toCopy | The object to copy. |
operator= : Makes a deep copy of its right operand into its left operand. This overwrites old data in the left operand.
Reimplemented in ValueObject< Etype >, and KeyObject< Etype >.
bool operator== | ( | const Object & | toCompare | ) | const |
operator==.
Two instances are considered equal, if all of the following is true:
bool operator!= | ( | const Object & | toCompare | ) | const |
operator!=.
nByte getType | ( | void | ) | const |
Returns the type of the object.
The return value should be one of the constants representing the serialize-able data types supported by Neutron/Photon. Please refer to namespace TypeCode for a complete list.
nByte getCustomType | ( | void | ) | const |
Returns the type of the object.
This will return the custom type, if getType() returns TypeCode::CUSTOM. If getType() returns something else than TypeCode::CUSTOM, then the custom type is not in use for that object instance and this will return 0.
const int * getSizes | ( | void | ) | const |
Returns an array holding the amounts of elements of the instance's payload for each dimension of the payload. The amount of elements in the returned array of sizes will equal the return value of getDimensions(), but it will always be at least 1, even when getDimensions() returns 0. So, if the payload of the instance is not an array, then this function will return an array with 1 element, if the payload is a 1D array, then it will return an array with 1 element, for a 2D array payload it will return an array with 2 elements, for a 3D array payload an array with 3 elements and so on.
unsigned int getDimensions | ( | void | ) | const |
Returns the amount of dimensions for objects holding multi-dimensional array data, 1 for single-dimensional arrays and 0 for non-array data.
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
Implements ToString.
toString |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
JString toString |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |