Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ComponentState Class Referenceabstract

Base class for storing component states. More...

#include <Component.h>

+ Inheritance diagram for Leviathan::ComponentState:

Classes

struct  PotentiallyUpdatedValue
 Used to hold data with an updated flag to support partial states. More...
 

Public Types

template<typename T >
using Member = PotentiallyUpdatedValue< T >
 

Public Member Functions

 ComponentState (int32_t tick, COMPONENT_TYPE componenttype)
 
virtual ~ComponentState ()
 
virtual DLLEXPORT void CreateUpdatePacket (ComponentState *olderstate, sf::Packet &packet)=0
 Adds update data to a packet. More...
 
virtual DLLEXPORT bool FillMissingData (ComponentState &otherstate)=0
 Copies data to missing values in this state from another state. More...
 
 ComponentState (const ComponentState &other)=delete
 
void operator= (const ComponentState &other)=delete
 

Public Attributes

const int32_t Tick
 The tick this delta state matches. More...
 
const COMPONENT_TYPE ComponentType
 

Detailed Description

Base class for storing component states.

Definition at line 78 of file Component.h.

Member Typedef Documentation

◆ Member

Definition at line 147 of file Component.h.

Constructor & Destructor Documentation

◆ ComponentState() [1/2]

Leviathan::ComponentState::ComponentState ( int32_t  tick,
COMPONENT_TYPE  componenttype 
)
inline

Definition at line 149 of file Component.h.

149  :
150  Tick(tick), ComponentType(componenttype){}
const int32_t Tick
The tick this delta state matches.
Definition: Component.h:164
const COMPONENT_TYPE ComponentType
Definition: Component.h:166

◆ ~ComponentState()

virtual Leviathan::ComponentState::~ComponentState ( )
inlinevirtual

Definition at line 151 of file Component.h.

151 {}

◆ ComponentState() [2/2]

Leviathan::ComponentState::ComponentState ( const ComponentState other)
delete

Member Function Documentation

◆ CreateUpdatePacket()

virtual DLLEXPORT void Leviathan::ComponentState::CreateUpdatePacket ( ComponentState olderstate,
sf::Packet &  packet 
)
pure virtual

Adds update data to a packet.

Parameters
olderstateThe state against which this is compared. Or NULL if a full update is wanted

◆ FillMissingData()

virtual DLLEXPORT bool Leviathan::ComponentState::FillMissingData ( ComponentState otherstate)
pure virtual

Copies data to missing values in this state from another state.

Returns
True if all missing values have been filled

◆ operator=()

void Leviathan::ComponentState::operator= ( const ComponentState other)
delete

Member Data Documentation

◆ ComponentType

const COMPONENT_TYPE Leviathan::ComponentState::ComponentType

Definition at line 166 of file Component.h.

◆ Tick

const int32_t Leviathan::ComponentState::Tick

The tick this delta state matches.

Definition at line 164 of file Component.h.


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