Leviathan  0.8.0.0
Leviathan game engine
Leviathan::GameSpecificPacketData Class Reference

Class that contains all data associated with a game specific packet. More...

#include <GameSpecificPacketHandler.h>

Public Member Functions

DLLEXPORT GameSpecificPacketData (BaseGameSpecificResponsePacket *newddata)
 
DLLEXPORT GameSpecificPacketData (BaseGameSpecificRequestPacket *newddata)
 
DLLEXPORT ~GameSpecificPacketData ()
 

Public Attributes

bool IsRequest
 
BaseGameSpecificRequestPacketRequestBaseData
 Base object pointer if this is a request. More...
 
BaseGameSpecificResponsePacketResponseBaseData
 Base object pointer if this wasn't a request. More...
 
int TypeIDNumber
 

Detailed Description

Class that contains all data associated with a game specific packet.

Definition at line 36 of file GameSpecificPacketHandler.h.

Constructor & Destructor Documentation

◆ GameSpecificPacketData() [1/2]

DLLEXPORT Leviathan::GameSpecificPacketData::GameSpecificPacketData ( BaseGameSpecificResponsePacket newddata)

Definition at line 181 of file GameSpecificPacketHandler.cpp.

182  :
183  IsRequest(false), RequestBaseData(NULL), ResponseBaseData(newddata),
184  TypeIDNumber(newddata->TypeIDNumber)
185 {
186 
187 }
BaseGameSpecificResponsePacket * ResponseBaseData
Base object pointer if this wasn&#39;t a request.
BaseGameSpecificRequestPacket * RequestBaseData
Base object pointer if this is a request.

◆ GameSpecificPacketData() [2/2]

DLLEXPORT Leviathan::GameSpecificPacketData::GameSpecificPacketData ( BaseGameSpecificRequestPacket newddata)

Definition at line 189 of file GameSpecificPacketHandler.cpp.

189  :
190  IsRequest(true), RequestBaseData(newddata), ResponseBaseData(NULL),
191  TypeIDNumber(newddata->TypeIDNumber)
192 {
193 
194 }
BaseGameSpecificResponsePacket * ResponseBaseData
Base object pointer if this wasn&#39;t a request.
BaseGameSpecificRequestPacket * RequestBaseData
Base object pointer if this is a request.

◆ ~GameSpecificPacketData()

DLLEXPORT Leviathan::GameSpecificPacketData::~GameSpecificPacketData ( )

Definition at line 196 of file GameSpecificPacketHandler.cpp.

196  {
199  TypeIDNumber = -1;
200 }
BaseGameSpecificResponsePacket * ResponseBaseData
Base object pointer if this wasn&#39;t a request.
BaseGameSpecificRequestPacket * RequestBaseData
Base object pointer if this is a request.
#define SAFE_DELETE(x)
Definition: Define.h:141

Member Data Documentation

◆ IsRequest

bool Leviathan::GameSpecificPacketData::IsRequest

Marks whether this contains BaseGameSpecificRequestPacket or BaseGameSpecificResponsePacket

Definition at line 44 of file GameSpecificPacketHandler.h.

◆ RequestBaseData

BaseGameSpecificRequestPacket* Leviathan::GameSpecificPacketData::RequestBaseData

Base object pointer if this is a request.

Definition at line 47 of file GameSpecificPacketHandler.h.

◆ ResponseBaseData

BaseGameSpecificResponsePacket* Leviathan::GameSpecificPacketData::ResponseBaseData

Base object pointer if this wasn't a request.

Definition at line 50 of file GameSpecificPacketHandler.h.

◆ TypeIDNumber

int Leviathan::GameSpecificPacketData::TypeIDNumber

Contains the type of the packet

Note
This is a copy of BaseGameSpecificResponsePacket::TypeIDNumber or BaseGameSpecificRequestPacket::TypeIDNumber
See also
BaseGameSpecificFactory::TypeIDNumber

Definition at line 56 of file GameSpecificPacketHandler.h.


The documentation for this class was generated from the following files: