Photon C++ Client API  5.0.7.3
Classes | Public Member Functions | List of all members
JObject Class Reference
Inheritance diagram for JObject:
Inheritance graph
[legend]
Collaboration diagram for JObject:
Collaboration graph
[legend]

Public Member Functions

template<typename FT >
 JObject (const FT &payload)
 
template<typename FT >
 JObject (FT *payloadArray, unsigned int elementCount)
 
 JObject (const JObject &toCopy)
 
JObjectoperator= (const JObject &toCopy)
 
bool operator== (const JObject &toCompare) const
 
bool operator!= (const JObject &toCompare) const
 
template<typename FT >
const FT & getPayload (void) const
 
template<typename FT >
FT & getPayload (void)
 
unsigned int getElementCount (void) const
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const
 
virtual JStringtoString (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 LogFormatOptionsgetLogFormatOptions (void)
 
static void setLogFormatOptions (const LogFormatOptions &options)
 

Member Function Documentation

◆ operator==()

bool operator== ( const JObject toCompare) const

operator==.

Returns
true, if both operands are equal, false otherwise.

Two instances are considered equal, if the results of calling typeid() on their payloads as well as their payloads themselves are equal.

◆ operator!=()

bool operator!= ( const JObject toCompare) const

operator!=.

Returns
false, if operator==() would return true, true otherwise.

◆ toString() [1/3]

JString & toString ( JString retStr,
bool  withTypes = false 
) const
virtual
Remarks
The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
Parameters
retStrreference 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
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.

Implements ToString.

◆ toString() [2/3]

toString
Remarks
The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
Parameters
retStrreference 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
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.

◆ toString() [3/3]

JString toString

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.
See also
JString