Symphony Of Empires
Eng3D::Freelist< T > Struct Template Reference

#include <freelist.hpp>

Public Member Functions

size_t add (T &e)
 
void remove (size_t index)
 
T & operator[] (size_t index)
 
const T & operator[] (size_t index) const
 
T & at (size_t index)
 
const T & at (size_t index) const
 
template<typename F >
void for_each (const F &lambda) const
 
template<typename F >
void for_each (const F &lambda)
 

Public Attributes

std::vector< std::optional< T > > data
 
std::vector< size_t > slots
 

Detailed Description

template<typename T>
struct Eng3D::Freelist< T >

Definition at line 34 of file freelist.hpp.

Member Function Documentation

◆ add()

template<typename T >
size_t Eng3D::Freelist< T >::add ( T &  e)
inline

Definition at line 35 of file freelist.hpp.

Here is the caller graph for this function:

◆ at() [1/2]

template<typename T >
T& Eng3D::Freelist< T >::at ( size_t  index)
inline

Definition at line 64 of file freelist.hpp.

Here is the caller graph for this function:

◆ at() [2/2]

template<typename T >
const T& Eng3D::Freelist< T >::at ( size_t  index) const
inline

Definition at line 69 of file freelist.hpp.

◆ for_each() [1/2]

template<typename T >
template<typename F >
void Eng3D::Freelist< T >::for_each ( const F &  lambda)
inline

Definition at line 82 of file freelist.hpp.

◆ for_each() [2/2]

template<typename T >
template<typename F >
void Eng3D::Freelist< T >::for_each ( const F &  lambda) const
inline

Definition at line 75 of file freelist.hpp.

Here is the caller graph for this function:

◆ operator[]() [1/2]

template<typename T >
T& Eng3D::Freelist< T >::operator[] ( size_t  index)
inline

Definition at line 54 of file freelist.hpp.

◆ operator[]() [2/2]

template<typename T >
const T& Eng3D::Freelist< T >::operator[] ( size_t  index) const
inline

Definition at line 59 of file freelist.hpp.

◆ remove()

template<typename T >
void Eng3D::Freelist< T >::remove ( size_t  index)
inline

Definition at line 48 of file freelist.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ data

template<typename T >
std::vector<std::optional<T> > Eng3D::Freelist< T >::data

Definition at line 88 of file freelist.hpp.

◆ slots

template<typename T >
std::vector<size_t> Eng3D::Freelist< T >::slots

Definition at line 89 of file freelist.hpp.


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