ecs::SparseArray

More...

#include <SparseArray.hpp>

Public Types

Name

using std::optional< Component >

using std::vector< valueType >

using typename container::size_type

using typename container::iterator

using typename container::const_iterator

Public Functions

Name

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:

Return: The Sparse array present in the class at the moment

Operator copy of the SparseArray class

function operator=

Parameters:

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