template <typename Component >
class ecs::SparseArray;
Template Parameters:
Component The type of component used as with template
This can be quite useful to store components that are defined for most entities, because you don't have to store the entity ID alongside the component.
Public Types Documentation
using valueType
using ecs::SparseArray< Component >::valueType = std::optional<Component>;
using referenceType
using ecs::SparseArray< Component >::referenceType = valueType &;
using constReferenceType
using ecs::SparseArray< Component >::constReferenceType = valueType const &;
using container
using ecs::SparseArray< Component >::container = std::vector<valueType>;
using sizeType
using ecs::SparseArray< Component >::sizeType = typename container::size_type;
using iterator
using ecs::SparseArray< Component >::iterator = typename container::iterator;
using constIterator
using ecs::SparseArray< Component >::constIterator = typename container::const_iterator;
Public Functions Documentation
function SparseArray
inline SparseArray()
function SparseArray
inline SparseArray(
SparseArray const & other
)
function SparseArray
inline SparseArray(
SparseArray && other
)
function ~SparseArray
~SparseArray() =default
function operator=
inline SparseArray & operator=(
SparseArray const & other
)
Parameters:
Return: The Sparse array present in the class at the moment
function operator=
inline SparseArray & operator=(
SparseArray && other
)
Parameters:
Return: The Sparse array present in the class at the moment