|
Celeritas 0.7.0-dev.168+develop.6e17e5869
|
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>(E::size_) } |
| using | CArrayConstRef = T const(&)[N] |
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_CEF | EnumArray () |
| Default construction initializes to zero. | |
| CELER_CEF | EnumArray (CArrayConstRef values) |
| Construct from an array for aggregate initialization of daughters. | |
| EnumArray (T first) | |
| Construct with C-style aggregate initialization. | |
| template<class... Us> | |
| CELER_CEF | EnumArray (T first, Us... rest) |
| Construct with the array's data. | |
| CELER_CEF reference | operator[] (key_type const &k) |
| Get an element. | |
| CELER_CEF const_reference | operator[] (key_type const &k) const |
| Get an element (const) | |
| CELER_CEF const_reference | front () const |
| CELER_CEF reference | front () |
| CELER_CEF const_reference | back () const |
| CELER_CEF reference | back () |
| CELER_CEF const_pointer | data () const |
| CELER_CEF pointer | data () |
| CELER_CEF iterator | begin () |
| CELER_CEF iterator | end () |
| CELER_CEF const_iterator | begin () const |
| CELER_CEF const_iterator | end () const |
| CELER_CEF const_iterator | cbegin () const |
| CELER_CEF const_iterator | cend () const |
| CELER_CEF bool | empty () const |
| CELER_CEF size_type | size () const |
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.
Element access
|
inline |
Element access
Iterator access
|
inline |
Iterator access
|
inline |
Iterator access
|
inline |
Iterator access
Element access
|
inline |
Element access
Capacity
Iterator access
|
inline |
Iterator access
Element access
|
inline |
Element access
|
inline |
Capacity