Leviathan  0.8.0.0
Leviathan game engine
Leviathan::System< UsedCachedComponentCollection > Class Template Reference

Base for all entity component related systems. More...

#include <System.h>

+ Inheritance diagram for Leviathan::System< UsedCachedComponentCollection >:

Additional Inherited Members

- Public Types inherited from Leviathan::SystemCachedComponentCollectionStorage< UsedCachedComponentCollection >
using HolderType = CachedComponentCollectionHolder< UsedCachedComponentCollection >
 
- Public Member Functions inherited from Leviathan::SystemCachedComponentCollectionStorage< UsedCachedComponentCollection >
void Clear ()
 
auto GetCachedComponentCollectionCount () const
 
- Static Public Member Functions inherited from Leviathan::SystemCachedComponentCollectionStorage< UsedCachedComponentCollection >
static void TupleCachedComponentCollectionHelper (ObjectPool< std::tuple< FirstType &, SecondType & >, ObjectID > &CachedComponentCollections, const std::vector< std::tuple< FirstType *, ObjectID >> &firstdata, const std::vector< std::tuple< SecondType *, ObjectID >> &seconddata, const ComponentHolder< FirstType > &firstholder, const ComponentHolder< SecondType > &secondholder)
 Helper function for creating nodes based on std::tuple. More...
 
static void TupleCachedComponentCollectionHelper (ObjectPool< std::tuple< FirstType &, SecondType &, ThirdType & >, ObjectID > &CachedComponentCollections, const std::vector< std::tuple< FirstType *, ObjectID >> &firstdata, const std::vector< std::tuple< SecondType *, ObjectID >> &seconddata, const std::vector< std::tuple< ThirdType *, ObjectID >> &thirddata, const ComponentHolder< FirstType > &firstholder, const ComponentHolder< SecondType > &secondholder, const ComponentHolder< ThirdType > &thirdholder)
 Tree part component TupleCachedComponentCollectionHelper. More...
 
- Public Attributes inherited from Leviathan::SystemCachedComponentCollectionStorage< UsedCachedComponentCollection >
HolderType CachedComponents
 
- Static Protected Member Functions inherited from Leviathan::SystemCachedComponentCollectionStorage< UsedCachedComponentCollection >
static T * _TupleHelperGetIfComponentExists (ObjectID id, const std::vector< std::tuple< T *, ObjectID >> &addedlist, const ComponentHolder< T > &holder)
 

Detailed Description

template<class UsedCachedComponentCollection>
class Leviathan::System< UsedCachedComponentCollection >

Base for all entity component related systems.

For ones that use nodes. Not for ones that directly use a single component type

Todo:
It would bemore efficient to directly create nodes as entities are created instead of running CreateCachedComponentCollections (implemented in subclasses of this)

Definition at line 167 of file System.h.


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