Photon C++ Client API: OperationResponse Class Reference

Photon C++ Client API

Photon C++ Client API  4.1.12.2
OperationResponse Class Reference

Public Member Functions

 ~OperationResponse (void)
 
 OperationResponse (const OperationResponse &toCopy)
 
OperationResponseoperator= (const OperationResponse &toCopy)
 
const Common::Objectoperator[] (unsigned int index) const
 
Common::JString toString (bool withDebugMessage=false, bool withParameters=false, bool withParameterTypes=false) const
 
Common::Object getParameterForCode (nByte parameterCode) const
 
nByte getOperationCode (void) const
 
short getReturnCode (void) const
 
const Common::JStringgetDebugMessage (void) const
 
const Common::Dictionary< nByte, Common::Object > & getParameters (void) const
 

Detailed Description

Contains the servers response for an OperationRequest sent by this client.

Constructor & Destructor Documentation

§ ~OperationResponse()

~OperationResponse ( void  )

Destructor.

§ OperationResponse()

OperationResponse ( const OperationResponse toCopy)

Copy-Constructor: Creates a new instance that is a deep copy of the argument instance.

Parameters
toCopyThe instance to copy.

Member Function Documentation

§ operator=()

OperationResponse & operator= ( const OperationResponse toCopy)

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

§ operator[]()

const Object & operator[] ( unsigned int  index) const

operator[]. Accesses the value at the given index like in an array. This does not check for valid indexes and shows undefined behavior for invalid indexes.

§ toString()

JString toString ( bool  withDebugMessage = false,
bool  withParameters = false,
bool  withParameterTypes = false 
) const
Parameters
withDebugMessagedetermines if the debug message that the server may send in case of an error should be included in the returned string
withParametersdetermines if the payload of the event should be included in the returned string
withParameterTypesdetermines if the type information should be included for the payload
Returns
a JString representation of the instance for debugging purposes.

§ getParameterForCode()

Object getParameterForCode ( nByte  parameterCode) const

Alternative access to the Parameters.

Parameters
parameterCodeThe key code of an response value
Returns
The parameters value, or an empty Object instance if the key does not exist in the parameters.

§ getOperationCode()

nByte getOperationCode ( void  ) const
Returns
the operation code that identifies the type of the operation.

§ getReturnCode()

short getReturnCode ( void  ) const
Returns
the result code of the operation, 0 in case of success, an operation specific error code otherwise.

§ getDebugMessage()

const JString & getDebugMessage ( void  ) const
Returns
extended debugging information in case that getReturnCode() returns !0, an empty string otherwise.

§ getParameters()

const Dictionary< nByte, Object > & getParameters ( void  ) const
Returns
all parameters of the operation response.