Celeritas 0.6.0-dev.115+3b60a5fd
|
Thin wrapper for an array of enums for accessing by enum instead of int. More...
#include <EnumArray.hh>
Public Types | |
enum | { N = static_cast<size_type>(key_type::size_) } |
Type aliases | |
using | key_type = E |
using | value_type = T |
using | size_type = std::underlying_type_t< E > |
using | pointer = value_type * |
using | const_pointer = value_type const * |
using | reference = value_type & |
using | const_reference = value_type const & |
using | iterator = pointer |
using | const_iterator = const_pointer |
Public Member Functions | |
CELER_FORCEINLINE_FUNCTION reference | operator[] (key_type const &k) |
Get an element. | |
CELER_FORCEINLINE_FUNCTION const_reference | operator[] (key_type const &k) const |
Get an element (const) | |
CELER_FORCEINLINE_FUNCTION const_reference | front () const |
CELER_FORCEINLINE_FUNCTION reference | front () |
CELER_FORCEINLINE_FUNCTION const_reference | back () const |
CELER_FORCEINLINE_FUNCTION reference | back () |
CELER_FORCEINLINE_FUNCTION const_pointer | data () const |
CELER_FORCEINLINE_FUNCTION pointer | data () |
CELER_FORCEINLINE_FUNCTION iterator | begin () |
CELER_FORCEINLINE_FUNCTION iterator | end () |
CELER_FORCEINLINE_FUNCTION const_iterator | begin () const |
CELER_FORCEINLINE_FUNCTION const_iterator | end () const |
CELER_FORCEINLINE_FUNCTION const_iterator | cbegin () const |
CELER_FORCEINLINE_FUNCTION const_iterator | cend () const |
CELER_CONSTEXPR_FUNCTION bool | empty () const |
CELER_CONSTEXPR_FUNCTION size_type | size () const |
Public Attributes | |
T | data_ [N] |
Storage. | |
Thin wrapper for an array of enums for accessing by enum instead of int.
The enum must be a zero-indexed contiguous enumeration with a size_
enumeration as its last value.
|
inline |
Element access
|
inline |
Element access
|
inline |
Iterator access
|
inline |
Iterator access
|
inline |
Iterator access
|
inline |
Iterator access
|
inline |
Element access
|
inline |
Element access
|
inline |
Capacity
|
inline |
Iterator access
|
inline |
Iterator access
|
inline |
Element access
|
inline |
Element access
|
inline |
Capacity