Photon C++ Client API
Public Member Functions | List of all members
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  )


§ OperationResponse()

OperationResponse ( const OperationResponse toCopy)

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

toCopyThe instance to copy.

Member Function Documentation

§ operator=()

OperationResponse & operator= ( const OperationResponse toCopy)


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
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
a JString representation of the instance for debugging purposes.

§ getParameterForCode()

Object getParameterForCode ( nByte  parameterCode) const

Alternative access to the Parameters.

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

§ getOperationCode()

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

§ getReturnCode()

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

§ getDebugMessage()

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

§ getParameters()

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