TypeMap.hpp

A class that will map types to values of a designated type.

Note

Status: BETA

template<typename T>
class TypeMap
#include <TypeMap.hpp>

A map of types to objects.

Public Types

using mapped_type = T
using iterator = typename val_map_t::iterator
using const_iterator = typename val_map_t::const_iterator
using local_iterator = typename val_map_t::local_iterator
using const_local_iterator = typename val_map_t::const_local_iterator
using size_type = typename val_map_t::size_type
using difference_type = typename val_map_t::difference_type

Public Functions

inline bool empty() const noexcept
inline size_t size() const noexcept
inline size_t max_size() const noexcept
inline iterator begin() noexcept
inline const_iterator begin() const noexcept
inline const_iterator cbegin() const noexcept
inline iterator end() noexcept
inline const_iterator end() const noexcept
inline const_iterator cend() const noexcept
template<typename INDEX_TYPE>
inline mapped_type &Get()
template<typename INDEX_TYPE>
inline mapped_type &at()
template<typename INDEX_TYPE>
inline const mapped_type &at() const
template<typename INDEX_TYPE>
inline iterator find()
template<typename INDEX_TYPE>
inline const_iterator find() const
template<typename INDEX_TYPE>
inline size_t count() const
inline iterator erase(const_iterator position)
template<typename INDEX_TYPE>
inline size_type erase()
inline void clear() noexcept

Private Types

using val_map_t = std::unordered_map<size_t, T>

Private Members

val_map_t val_map