Leviathan  0.8.0.0
Leviathan game engine
Leviathan::IntegerEventData Class Reference

Data for EVENT_TYPE_ENGINE_TICK and all others that have only int data. More...

#include <Event.h>

+ Inheritance diagram for Leviathan::IntegerEventData:

Public Member Functions

DLLEXPORT IntegerEventData (int ticknumber)
 Loads from a packet. More...
 
DLLEXPORT IntegerEventData (sf::Packet &packet)
 
virtual void AddDataToPacket (sf::Packet &packet)
 Adds this to a packet for retrieving it later. More...
 
- Public Member Functions inherited from Leviathan::BaseEventData
virtual ~BaseEventData ()
 

Public Attributes

int IntegerDataValue
 Current engine tick count. More...
 

Detailed Description

Data for EVENT_TYPE_ENGINE_TICK and all others that have only int data.

Definition at line 122 of file Event.h.

Constructor & Destructor Documentation

◆ IntegerEventData() [1/2]

DLLEXPORT Leviathan::IntegerEventData::IntegerEventData ( int  ticknumber)

Loads from a packet.

Definition at line 227 of file Event.cpp.

227  :
228  IntegerDataValue(ticknumber)
229 {}
int IntegerDataValue
Current engine tick count.
Definition: Event.h:134

◆ IntegerEventData() [2/2]

DLLEXPORT Leviathan::IntegerEventData::IntegerEventData ( sf::Packet &  packet)

Definition at line 212 of file Event.cpp.

213 {
214 
215  packet >> IntegerDataValue;
216 
217  if(!packet)
218  throw InvalidArgument("packet has invalid format");
219 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:134

Member Function Documentation

◆ AddDataToPacket()

void Leviathan::IntegerEventData::AddDataToPacket ( sf::Packet &  packet)
virtual

Adds this to a packet for retrieving it later.

Implements Leviathan::BaseEventData.

Definition at line 221 of file Event.cpp.

222 {
223  packet << IntegerDataValue;
224 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:134

Member Data Documentation

◆ IntegerDataValue

int Leviathan::IntegerEventData::IntegerDataValue

Current engine tick count.

Definition at line 134 of file Event.h.


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