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 (sf::Packet &packet)
 Loads from a packet. More...
 
DLLEXPORT IntegerEventData (int ticknumber)
 
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 114 of file Event.h.

Constructor & Destructor Documentation

◆ IntegerEventData() [1/2]

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

Loads from a packet.

Definition at line 240 of file Event.cpp.

241 {
242 
243  packet >> IntegerDataValue;
244 
245  if(!packet)
246  throw InvalidArgument("packet has invalid format");
247 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:124

◆ IntegerEventData() [2/2]

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

Definition at line 249 of file Event.cpp.

249  :
250  IntegerDataValue(ticknumber)
251 {
252 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:124

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 254 of file Event.cpp.

255 {
256  packet << IntegerDataValue;
257 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:124

Member Data Documentation

◆ IntegerDataValue

int Leviathan::IntegerEventData::IntegerDataValue

Current engine tick count.

Definition at line 124 of file Event.h.


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