ecs::SparseArray
#include <SparseArray.hpp>
Public Types
Public Functions
SparseArray(SparseArray const & other)
SparseArray(SparseArray && other)
~SparseArray() =default
operator=(SparseArray const & other)
operator=(SparseArray && other)
operator[](size_t idx)
operator[](size_t idx) const
begin() const
cBegin() const
end() const
cEnd() const
template <class... Params> referenceType
Detailed Description
Template Parameters:
Component The type of component used as with template
SparseArray class is the component container of the ecs.
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 referenceType
using constReferenceType
using container
using sizeType
using iterator
using constIterator
Public Functions Documentation
function SparseArray
Default constructor & destructor of the SparseArray class
function SparseArray
function SparseArray
function ~SparseArray
function operator=
Parameters:
other The SparseArray you want to copy
Return: The Sparse array present in the class at the moment
Operator copy of the SparseArray class
function operator=
Parameters:
other The SparseArray you want to move
Return: The Sparse array present in the class at the moment
Operator move of the SparseArray class
function operator[]
function operator[]
function begin
function begin
function cBegin
function end
function end
function cEnd
function size
function insertAt
function insertAt
function emplaceAt
function erase
function getIndex
Parameters:
c The std::optional, type of the component you want the index
Return: The sizeType of the valueType's index you are looking for
This function is used to get the index of the std::optional of the std::vector<std::optional> _data according to the given valueType (std::optional)
Updated on 2022-11-13 at 17:21:37 +0100
Last updated