OSSIA
Open Scenario System for Interactive Application
ossia::enum_map< K, V, N > Class Template Reference

A container useful for mapping contiguous enums to strings without using too much memory. More...

Detailed Description

template<typename K, typename V, std::size_t N>
class ossia::enum_map< K, V, N >

A container useful for mapping contiguous enums to strings without using too much memory.

Public Member Functions

constexpr enum_map (const enum_map &)=default
 
constexpr enum_map (enum_map &&) noexcept=default
 
constexpr enum_mapoperator= (const enum_map &)=default
 
constexpr enum_mapoperator= (enum_map &&) noexcept=default
 
constexpr enum_map (std::initializer_list< pair< K, V >> i)
 
constexpr const V & operator[] (K k) const noexcept
 
constexpr const V & operator[] (int64_t idx) const noexcept
 
constexpr K key (const V &v) const noexcept
 
constexpr std::optional< K > find_key (const V &v) const noexcept
 
pair< K, const V & > get (int64_t i) const noexcept
 
constexpr std::size_t size () const noexcept