Pyrogenesis
13997
|
Special message type for simulation commands. More...
#include <NetMessage.h>
Public Member Functions | |
CSimulationMessage (ScriptInterface &scriptInterface) | |
CSimulationMessage (ScriptInterface &scriptInterface, u32 client, i32 player, u32 turn, jsval data) | |
virtual u8 * | Serialize (u8 *pBuffer) const |
Serialize the message into the specified buffer parameter. More... | |
virtual const u8 * | Deserialize (const u8 *pStart, const u8 *pEnd) |
Deserializes the message from the specified buffer. More... | |
virtual size_t | GetSerializedLength () const |
Retrieves the size in bytes of the serialized message. More... | |
virtual CStr | ToString () const |
Returns a string representation for the message. More... | |
![]() | |
CNetMessage () | |
CNetMessage (NetMessageType type) | |
virtual | ~CNetMessage () |
NetMessageType | GetType () const |
Retrieves the message type. More... | |
![]() | |
virtual | ~ISerializable () |
Public Attributes | |
u32 | m_Client |
i32 | m_Player |
u32 | m_Turn |
CScriptValRooted | m_Data |
Private Attributes | |
ScriptInterface * | m_ScriptInterface |
Special message type for simulation commands.
These commands are exposed as arbitrary JS objects, associated with a specific player.
Definition at line 113 of file NetMessage.h.
CSimulationMessage::CSimulationMessage | ( | ScriptInterface & | scriptInterface | ) |
Definition at line 96 of file NetMessageSim.cpp.
CSimulationMessage::CSimulationMessage | ( | ScriptInterface & | scriptInterface, |
u32 | client, | ||
i32 | player, | ||
u32 | turn, | ||
jsval | data | ||
) |
Definition at line 101 of file NetMessageSim.cpp.
Deserializes the message from the specified buffer.
pStart | Message start within the serialized buffer |
pEnd | Message end within the serialized buffer |
Reimplemented from CNetMessage.
Definition at line 121 of file NetMessageSim.cpp.
|
virtual |
Retrieves the size in bytes of the serialized message.
Before calling Serialize, the memory size for the buffer where to serialize the message object can be found by calling this method.
Reimplemented from CNetMessage.
Definition at line 136 of file NetMessageSim.cpp.
Serialize the message into the specified buffer parameter.
The size required by the buffer parameter can be found by a call to GetSerializedLength method. The information contained within the message must be serialized before the message is sent. By default only the message type and its size are serialized in the buffer parameter.
pBuffer | Buffer where to serialize the message |
Reimplemented from CNetMessage.
Definition at line 107 of file NetMessageSim.cpp.
|
virtual |
Returns a string representation for the message.
Reimplemented from CNetMessage.
Definition at line 149 of file NetMessageSim.cpp.
u32 CSimulationMessage::m_Client |
Definition at line 123 of file NetMessage.h.
CScriptValRooted CSimulationMessage::m_Data |
Definition at line 126 of file NetMessage.h.
i32 CSimulationMessage::m_Player |
Definition at line 124 of file NetMessage.h.
|
private |
Definition at line 128 of file NetMessage.h.
u32 CSimulationMessage::m_Turn |
Definition at line 125 of file NetMessage.h.