Photon C++ Client API: EventData Class Reference

Photon C++ Client API

Photon C++ Client API  4.1.12.2
EventData Class Reference

Public Member Functions

 ~EventData (void)
 
 EventData (const EventData &toCopy)
 
EventDataoperator= (const EventData &toCopy)
 
const Common::Objectoperator[] (unsigned int index) const
 
Common::JString toString (bool withParameters=false, bool withParameterTypes=false) const
 
Common::Object getParameterForCode (nByte parameterCode) const
 
nByte getCode (void) const
 
const Common::Dictionary< nByte, Common::Object > & getParameters (void) const
 

Detailed Description

Contains all components of a Photon Event.

Constructor & Destructor Documentation

§ ~EventData()

~EventData ( void  )

Destructor.

§ EventData()

EventData ( const EventData 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=()

EventData & operator= ( const EventData 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  withParameters = false,
bool  withParameterTypes = false 
) const
Parameters
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 event value
Returns
The parameters value, or an empty Object instance if the key does not exist in the parameters.

§ getCode()

nByte getCode ( void  ) const
Returns
the event code that identifies the type of the event.

§ getParameters()

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