neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::ecs::system< ComponentData > Class Template Reference

#include <system.hpp>

Inheritance diagram for neolib::ecs::system< ComponentData >:
neolib::ecs::i_system

Classes

struct  no_thread
 

Public Member Functions

 system (i_ecs &aEcs)
 
 system (const system &aOther)
 
 system (system &&aOther)
 
template<typename ComponentIdIter >
 system (i_ecs &aEcs, ComponentIdIter aFirstComponent, ComponentIdIter aLastComponent)
 
 ~system ()
 
i_ecsecs () const override
 
const i_set< component_id > & components () const override
 
i_set< component_id > & components () override
 
const i_componentcomponent (component_id aComponentId) const override
 
i_componentcomponent (component_id aComponentId) override
 
bool can_apply () const override
 
bool paused () const override
 
void pause () override
 
void resume () override
 
void terminate () override
 
bool waiting () const override
 
void wait () override
 
void wait_for (scalar aDuration) override
 
void signal () override
 
void start_thread_if () override
 
void start_thread () override
 
bool debug () const override
 
void set_debug (bool aDebug) override
 
std::chrono::microseconds update_time (std::size_t aMetricsIndex=0) const override
 
- Public Member Functions inherited from neolib::ecs::i_system
virtual ~i_system ()=default
 
virtual const system_idid () const =0
 
virtual const neolib::i_stringname () const =0
 
virtual bool apply ()=0
 

Protected Member Functions

bool have_thread () const
 
thread & get_thread () const
 
void yield (bool aSleep=false)
 
std::mutex & waiting_mutex ()
 
void start_update (std::size_t aMetricsIndex=0)
 
void end_update (std::size_t aMetricsIndex=0)
 

Detailed Description

template<typename... ComponentData>
class neolib::ecs::system< ComponentData >

Definition at line 57 of file system.hpp.

Constructor & Destructor Documentation

◆ system() [1/4]

template<typename... ComponentData>
neolib::ecs::system< ComponentData >::system ( i_ecs aEcs)
inline

Definition at line 98 of file system.hpp.

◆ system() [2/4]

template<typename... ComponentData>
neolib::ecs::system< ComponentData >::system ( const system< ComponentData > &  aOther)
inline

Definition at line 103 of file system.hpp.

◆ system() [3/4]

template<typename... ComponentData>
neolib::ecs::system< ComponentData >::system ( system< ComponentData > &&  aOther)
inline

Definition at line 108 of file system.hpp.

◆ system() [4/4]

template<typename... ComponentData>
neolib::ecs::system< ComponentData >::system ( i_ecs aEcs,
ComponentIdIter  aFirstComponent,
ComponentIdIter  aLastComponent 
)
inline

Definition at line 114 of file system.hpp.

◆ ~system()

template<typename... ComponentData>
neolib::ecs::system< ComponentData >::~system ( )
inline

Definition at line 121 of file system.hpp.

Member Function Documentation

◆ can_apply()

template<typename... ComponentData>
bool neolib::ecs::system< ComponentData >::can_apply ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 148 of file system.hpp.

◆ component() [1/2]

template<typename... ComponentData>
const i_component & neolib::ecs::system< ComponentData >::component ( component_id  aComponentId) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 139 of file system.hpp.

◆ component() [2/2]

template<typename... ComponentData>
i_component & neolib::ecs::system< ComponentData >::component ( component_id  aComponentId)
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 143 of file system.hpp.

◆ components() [1/2]

template<typename... ComponentData>
const i_set< component_id > & neolib::ecs::system< ComponentData >::components ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 130 of file system.hpp.

◆ components() [2/2]

template<typename... ComponentData>
i_set< component_id > & neolib::ecs::system< ComponentData >::components ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 134 of file system.hpp.

◆ debug()

template<typename... ComponentData>
bool neolib::ecs::system< ComponentData >::debug ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 224 of file system.hpp.

◆ ecs()

template<typename... ComponentData>
i_ecs & neolib::ecs::system< ComponentData >::ecs ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 125 of file system.hpp.

◆ end_update()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::end_update ( std::size_t  aMetricsIndex = 0)
inlineprotected

Definition at line 273 of file system.hpp.

◆ get_thread()

template<typename... ComponentData>
thread & neolib::ecs::system< ComponentData >::get_thread ( ) const
inlineprotected

Definition at line 247 of file system.hpp.

◆ have_thread()

template<typename... ComponentData>
bool neolib::ecs::system< ComponentData >::have_thread ( ) const
inlineprotected

Definition at line 243 of file system.hpp.

◆ pause()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::pause ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 156 of file system.hpp.

◆ paused()

template<typename... ComponentData>
bool neolib::ecs::system< ComponentData >::paused ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 152 of file system.hpp.

◆ resume()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::resume ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 160 of file system.hpp.

◆ set_debug()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::set_debug ( bool  aDebug)
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 228 of file system.hpp.

◆ signal()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::signal ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 197 of file system.hpp.

◆ start_thread()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::start_thread ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 219 of file system.hpp.

◆ start_thread_if()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::start_thread_if ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 214 of file system.hpp.

◆ start_update()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::start_update ( std::size_t  aMetricsIndex = 0)
inlineprotected

Definition at line 264 of file system.hpp.

◆ terminate()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::terminate ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 165 of file system.hpp.

◆ update_time()

template<typename... ComponentData>
std::chrono::microseconds neolib::ecs::system< ComponentData >::update_time ( std::size_t  aMetricsIndex = 0) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 236 of file system.hpp.

◆ wait()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::wait ( )
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 173 of file system.hpp.

◆ wait_for()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::wait_for ( scalar  aDuration)
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 185 of file system.hpp.

◆ waiting()

template<typename... ComponentData>
bool neolib::ecs::system< ComponentData >::waiting ( ) const
inlineoverridevirtual

Implements neolib::ecs::i_system.

Definition at line 169 of file system.hpp.

◆ waiting_mutex()

template<typename... ComponentData>
std::mutex & neolib::ecs::system< ComponentData >::waiting_mutex ( )
inlineprotected

Definition at line 260 of file system.hpp.

◆ yield()

template<typename... ComponentData>
void neolib::ecs::system< ComponentData >::yield ( bool  aSleep = false)
inlineprotected

Definition at line 253 of file system.hpp.


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