Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Sendable Class Reference

Entity is sendable to clients. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Sendable:

Classes

class  ActiveConnection
 

Public Member Functions

 Sendable ()
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (Sendable)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

std::vector< ActiveConnectionUpdateReceivers
 Clients we have already sent a state to. More...
 
- Public Attributes inherited from Leviathan::Component
bool Marked
 
const COMPONENT_TYPE Type
 Type of this component, used for network serialization. More...
 

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::Sendable
 

Detailed Description

Entity is sendable to clients.

Note
This will only be in the entity on the server

It can get pretty expensive to remove closed connections from all Sendable objects

Todo:
The world needs to clean ActiveConnection objects from all Sendables related to a closed connection

Definition at line 115 of file Components.h.

Constructor & Destructor Documentation

◆ Sendable()

Leviathan::Sendable::Sendable ( )
inline

Definition at line 157 of file Components.h.

157 : Component(TYPE) {}
Component(COMPONENT_TYPE type)
Definition: Component.h:54
static constexpr auto TYPE
Definition: Components.h:164

Member Function Documentation

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::Sendable::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Sendable  )

Member Data Documentation

◆ TYPE

constexpr auto Leviathan::Sendable::TYPE = COMPONENT_TYPE::Sendable
static

Definition at line 164 of file Components.h.

◆ UpdateReceivers

std::vector<ActiveConnection> Leviathan::Sendable::UpdateReceivers

Clients we have already sent a state to.

Definition at line 162 of file Components.h.


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