Leviathan game engine
Leviathan::CachedComponentCollectionHolder< T > Class Template Reference

#include <System.h>

+ Inheritance diagram for Leviathan::CachedComponentCollectionHolder< T >:

Additional Inherited Members

- Public Member Functions inherited from Leviathan::ObjectPool< T, ObjectID >
 ObjectPool ()
 ~ObjectPool ()
T * ConstructNew (ObjectID forentity, Args &&... args)
 Constructs a new component of the held type for entity. More...
void Release (ObjectID entity, Args &&... args)
 Calls Release on an object and then removes it from the pool. More...
T * Find (ObjectID id) const
void Destroy (ObjectID id)
 Destroys a component based on id. More...
void RemoveBasedOnKeyTupleList (const std::vector< std::tuple< Any, ObjectID >> &values)
 Destroys without releasing elements based on ids in vector. More...
void Call (std::function< bool(T &, ObjectID)> function)
 Calls an function on all the objects in the pool. More...
void Clear ()
 Clears the index and replaces the pool with a new one. More...
auto GetObjectCount () const
std::unordered_map< ObjectID, T * > & GetIndex ()
 Returns a direct access to Index. More...
- Protected Member Functions inherited from Leviathan::ObjectPool< T, ObjectID >
bool RemoveFromIndex (ObjectID id)
 Removes an component from the index but doesn't destruct it. More...
- Protected Attributes inherited from Leviathan::ObjectPool< T, ObjectID >
std::unordered_map< ObjectID, T * > Index
 Used for looking up element belonging to id. More...
boost::pool Elements
 Pool for objects. More...

Detailed Description

template<class T>
class Leviathan::CachedComponentCollectionHolder< T >

This holds many CachedComponentCollections which are a list of components that are important for a system, and this avoids looking them up on each tick

Definition at line 20 of file System.h.

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