Nebula
Loading...
Searching...
No Matches
Game::EntityPool Class Reference

#include <entitypool.h>

Detailed Description

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
 

Constructor & Destructor Documentation

◆ EntityPool()

Game::EntityPool::EntityPool ( )

Member Function Documentation

◆ Allocate()

bool Game::EntityPool::Allocate ( Entity & e)

allocate a new id, returns false if the entity id was reused

◆ Deallocate()

void Game::EntityPool::Deallocate ( Entity e)

remove an id

◆ IsValid()

bool Game::EntityPool::IsValid ( Entity e) const

check if valid

Member Data Documentation

◆ freeIds

Util::Queue<uint32_t> Game::EntityPool::freeIds

stores freed indices

◆ generations

Util::Array<uint16_t> Game::EntityPool::generations

array containing generation value for every index


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