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 95 of file Event.h.

Constructor & Destructor Documentation

◆ IntegerEventData() [1/2]

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

Loads from a packet.

Definition at line 205 of file Event.cpp.

206 {
207 
208  packet >> IntegerDataValue;
209 
210  if(!packet)
211  throw InvalidArgument("packet has invalid format");
212 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:105

◆ IntegerEventData() [2/2]

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

Definition at line 214 of file Event.cpp.

214  :
215  IntegerDataValue(ticknumber)
216 {}
int IntegerDataValue
Current engine tick count.
Definition: Event.h:105

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

219 {
220  packet << IntegerDataValue;
221 }
int IntegerDataValue
Current engine tick count.
Definition: Event.h:105

Member Data Documentation

◆ IntegerDataValue

int Leviathan::IntegerEventData::IntegerDataValue

Current engine tick count.

Definition at line 105 of file Event.h.


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