|
CbmRoot
|
A class to define a statical mapper over some type. More...
#include <CbmEnumMap.h>
Public Types | |
| using | Base_t = Base |
| using | KeySet_t = KeySet |
| using | Value_t = T |
| using | Key_t = typename KeySet::Key_t |
Public Member Functions | |
| constexpr | EnumMap () |
| Default constructor. | |
| constexpr | EnumMap (std::initializer_list< std::pair< Key_t, Value_t > > init) |
| Constructor from initializer list. | |
| constexpr T & | operator[] (Key_t key) |
| Mutable access operator. | |
| constexpr const T & | operator[] (Key_t key) const |
| Constant access operator. | |
| constexpr const T & | operator[] (size_t index) const |
| Constant access operator. | |
| constexpr T & | at (Key_t key) |
| Mutable access with bounds checking. | |
| constexpr const T & | at (Key_t key) const |
| Constant access with bounds checking. | |
| constexpr bool | CheckKey (Key_t key) const |
| Checks, if the key is provided in the key set. | |
| template<Key_t key> | |
| constexpr bool | CheckKey () const |
| Checks, if the key is provided in the key set. | |
Private Member Functions | |
| template<typename Archive> | |
| void | serialize (Archive &ar, const unsigned int) |
Friends | |
| class | boost::serialization::access |
A class to define a statical mapper over some type.
| T | Type of values, stored in the map |
| KeySet | The enumeration key set type |
| Base | The base container (should define the same methods as std::array) A particular mapper class has to define the following methods and types: Key_t A type of the key constexpr Index(Key_t) A function to map a Key_t on the contigious index fi constexpr NofKeys() Number of keys |
Definition at line 31 of file CbmEnumMap.h.
| using cbm::util::EnumMap< T, KeySet, Base >::Base_t = Base |
Definition at line 33 of file CbmEnumMap.h.
| using cbm::util::EnumMap< T, KeySet, Base >::Key_t = typename KeySet::Key_t |
Definition at line 36 of file CbmEnumMap.h.
| using cbm::util::EnumMap< T, KeySet, Base >::KeySet_t = KeySet |
Definition at line 34 of file CbmEnumMap.h.
| using cbm::util::EnumMap< T, KeySet, Base >::Value_t = T |
Definition at line 35 of file CbmEnumMap.h.
|
inlineconstexpr |
Default constructor.
Definition at line 41 of file CbmEnumMap.h.
|
inlineconstexpr |
Constructor from initializer list.
| init | The initializer list |
Definition at line 45 of file CbmEnumMap.h.
|
inlineconstexpr |
Mutable access with bounds checking.
| key | A key |
Definition at line 72 of file CbmEnumMap.h.
|
inlineconstexpr |
Constant access with bounds checking.
| key | A key |
Definition at line 82 of file CbmEnumMap.h.
|
inlineconstexpr |
Checks, if the key is provided in the key set.
| key | A key |
Definition at line 98 of file CbmEnumMap.h.
|
inlineconstexpr |
Checks, if the key is provided in the key set.
| key | A key |
Definition at line 92 of file CbmEnumMap.h.
|
inlineconstexpr |
Mutable access operator.
| key | A key |
Definition at line 59 of file CbmEnumMap.h.
Referenced by cbm::util::EnumMap< T, SomeKeySet_t >::at(), and cbm::util::EnumMap< T, SomeKeySet_t >::at().
|
inlineconstexpr |
|
inlineconstexpr |
Constant access operator.
| index | An integral index |
Definition at line 68 of file CbmEnumMap.h.
|
inlineprivate |
Definition at line 120 of file CbmEnumMap.h.
|
friend |
Definition at line 118 of file CbmEnumMap.h.