|
Nebula
|
#include <entitypool.h>
Generation pool.
Public Member Functions | |
| EntityPool () | |
| bool | Allocate (Entity &e) |
| allocate a new id, returns false if the entity id was reused | |
| void | Deallocate (Entity e) |
| remove an id | |
| bool | IsValid (Entity e) const |
| check if valid | |
Public Attributes | |
| Util::Array< uint16_t > | generations |
| array containing generation value for every index | |
| Util::Queue< uint32_t > | freeIds |
| stores freed indices | |
| Game::EntityPool::EntityPool | ( | ) |
| bool Game::EntityPool::Allocate | ( | Entity & | e | ) |
allocate a new id, returns false if the entity id was reused
| void Game::EntityPool::Deallocate | ( | Entity | e | ) |
remove an id
| bool Game::EntityPool::IsValid | ( | Entity | e | ) | const |
check if valid
| Util::Queue<uint32_t> Game::EntityPool::freeIds |
stores freed indices
| Util::Array<uint16_t> Game::EntityPool::generations |
array containing generation value for every index