LibreOffice Module o3tl (master) 1
|
This is a container convenience class for arrays indexed by enum values. More...
#include <enumarray.hxx>
Public Types | |
typedef enumarray< E, V > | self_type |
typedef enumarray_iterator< self_type > | iterator |
typedef enumarray_const_iterator< self_type > | const_iterator |
typedef V | value_type |
typedef E | key_type |
typedef size_t | size_type |
Public Member Functions | |
template<typename... T> | |
constexpr | enumarray (V const &arg, T &&...args) |
enumarray () | |
const V & | operator[] (E index) const |
V & | operator[] (E index) |
void | fill (V val) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
V * | data () |
Static Public Member Functions | |
static size_type | size () |
Static Public Attributes | |
static const size_type | max_index = static_cast<size_type>(E::LAST) |
Private Attributes | |
std::array< V, max_index+1 > | detail_values |
This is a container convenience class for arrays indexed by enum values.
This assumes that the 'enum class' definition
E | the 'enum class' type. |
V | the value type to be stored in the array |
Definition at line 47 of file enumarray.hxx.
typedef enumarray_const_iterator<self_type> o3tl::enumarray< E, V >::const_iterator |
Definition at line 52 of file enumarray.hxx.
typedef enumarray_iterator<self_type> o3tl::enumarray< E, V >::iterator |
Definition at line 51 of file enumarray.hxx.
typedef E o3tl::enumarray< E, V >::key_type |
Definition at line 55 of file enumarray.hxx.
typedef enumarray<E, V> o3tl::enumarray< E, V >::self_type |
Definition at line 50 of file enumarray.hxx.
typedef size_t o3tl::enumarray< E, V >::size_type |
Definition at line 56 of file enumarray.hxx.
typedef V o3tl::enumarray< E, V >::value_type |
Definition at line 54 of file enumarray.hxx.
|
inlineconstexpr |
Definition at line 66 of file enumarray.hxx.
References args, forward(), and o3tl::enumarray< E, V >::max_index.
|
inline |
Definition at line 73 of file enumarray.hxx.
|
inline |
Definition at line 91 of file enumarray.hxx.
|
inline |
Definition at line 93 of file enumarray.hxx.
|
inline |
Definition at line 96 of file enumarray.hxx.
References o3tl::enumarray< E, V >::detail_values, and V.
|
inline |
Definition at line 92 of file enumarray.hxx.
References o3tl::enumarray< E, V >::size().
|
inline |
Definition at line 94 of file enumarray.hxx.
References o3tl::enumarray< E, V >::size().
|
inline |
Definition at line 87 of file enumarray.hxx.
References o3tl::enumarray< E, V >::detail_values, i, and o3tl::enumarray< E, V >::max_index.
|
inline |
Definition at line 81 of file enumarray.hxx.
References o3tl::enumarray< E, V >::detail_values, E, index, and V.
|
inline |
Definition at line 75 of file enumarray.hxx.
References o3tl::enumarray< E, V >::detail_values, E, index, and V.
|
inlinestatic |
Definition at line 90 of file enumarray.hxx.
References o3tl::enumarray< E, V >::max_index.
Referenced by o3tl::enumarray< E, V >::end().
|
private |
Definition at line 99 of file enumarray.hxx.
Referenced by o3tl::enumarray< E, V >::data(), o3tl::enumarray< E, V >::fill(), and o3tl::enumarray< E, V >::operator[]().
|
static |
Definition at line 58 of file enumarray.hxx.
Referenced by o3tl::enumarray< E, V >::enumarray(), o3tl::enumarray< E, V >::fill(), and o3tl::enumarray< E, V >::size().