Easys
A minimalist, header-only C++ ECS library for efficient and fuss-free entity and component management.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Easys::SparseSet< Key, Value > Class Template Reference

#include <sparse_set.hpp>

Public Member Functions

void accommodate (const Key key)
 
void set (const Key key, const Value &value)
 
void set (const Key key, Value &&value)
 
const Valueget (const Key key) const
 
Valueget (const Key key)
 
const Valueoperator[] (const Key key) const
 
Valueoperator[] (const Key key)
 
void remove (const Key key)
 
template<typename Func >
void forEach (Func f)
 
constexpr bool contains (const Key key) const
 
constexpr size_t size () const
 
const std::vector< Key > & getKeys () const
 
std::vector< Value > & getValues ()
 
const std::vector< Value > & getValues () const
 
constexpr size_t maxSize () const noexcept
 
void clear ()
 

Member Function Documentation

◆ accommodate()

template<UnsignedIntegral Key, typename Value >
void Easys::SparseSet< Key, Value >::accommodate ( const Key  key)
inline

◆ clear()

template<UnsignedIntegral Key, typename Value >
void Easys::SparseSet< Key, Value >::clear ( )
inline

◆ contains()

template<UnsignedIntegral Key, typename Value >
constexpr bool Easys::SparseSet< Key, Value >::contains ( const Key  key) const
inlineconstexpr

◆ forEach()

template<UnsignedIntegral Key, typename Value >
template<typename Func >
void Easys::SparseSet< Key, Value >::forEach ( Func  f)
inline

◆ get() [1/2]

template<UnsignedIntegral Key, typename Value >
Value & Easys::SparseSet< Key, Value >::get ( const Key  key)
inline

◆ get() [2/2]

template<UnsignedIntegral Key, typename Value >
const Value & Easys::SparseSet< Key, Value >::get ( const Key  key) const
inline

◆ getKeys()

template<UnsignedIntegral Key, typename Value >
const std::vector< Key > & Easys::SparseSet< Key, Value >::getKeys ( ) const
inline

◆ getValues() [1/2]

template<UnsignedIntegral Key, typename Value >
std::vector< Value > & Easys::SparseSet< Key, Value >::getValues ( )
inline

◆ getValues() [2/2]

template<UnsignedIntegral Key, typename Value >
const std::vector< Value > & Easys::SparseSet< Key, Value >::getValues ( ) const
inline

◆ maxSize()

template<UnsignedIntegral Key, typename Value >
constexpr size_t Easys::SparseSet< Key, Value >::maxSize ( ) const
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<UnsignedIntegral Key, typename Value >
Value & Easys::SparseSet< Key, Value >::operator[] ( const Key  key)
inline

◆ operator[]() [2/2]

template<UnsignedIntegral Key, typename Value >
const Value & Easys::SparseSet< Key, Value >::operator[] ( const Key  key) const
inline

◆ remove()

template<UnsignedIntegral Key, typename Value >
void Easys::SparseSet< Key, Value >::remove ( const Key  key)
inline

◆ set() [1/2]

template<UnsignedIntegral Key, typename Value >
void Easys::SparseSet< Key, Value >::set ( const Key  key,
const Value &  value 
)
inline

◆ set() [2/2]

template<UnsignedIntegral Key, typename Value >
void Easys::SparseSet< Key, Value >::set ( const Key  key,
Value &&  value 
)
inline

◆ size()

template<UnsignedIntegral Key, typename Value >
constexpr size_t Easys::SparseSet< Key, Value >::size ( ) const
inlineconstexpr

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