LibreOffice Module o3tl (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
o3tl::enumarray< E, V > Class Template Referencefinal

This is a container convenience class for arrays indexed by enum values. More...

#include <enumarray.hxx>

Inheritance diagram for o3tl::enumarray< E, V >:
[legend]
Collaboration diagram for o3tl::enumarray< E, V >:
[legend]

Public Types

typedef enumarray< E, V > self_type
 
typedef enumarray_iterator< self_typeiterator
 
typedef enumarray_const_iterator< self_typeconst_iterator
 
typedef V value_type
 
typedef E key_type
 
typedef size_t size_type
 

Public Member Functions

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 ()
 

Public Attributes

detail_values [max_index+1]
 

Static Public Attributes

static const size_type max_index = static_cast<size_type>(E::LAST)
 

Detailed Description

template<typename E, typename V>
class o3tl::enumarray< E, V >

This is a container convenience class for arrays indexed by enum values.

This assumes that the 'enum class' definition

Parameters
Ethe 'enum class' type.
Vthe value type to be stored in the array

Definition at line 45 of file enumarray.hxx.

Member Typedef Documentation

template<typename E, typename V>
typedef enumarray_const_iterator<self_type> o3tl::enumarray< E, V >::const_iterator

Definition at line 50 of file enumarray.hxx.

template<typename E, typename V>
typedef enumarray_iterator<self_type> o3tl::enumarray< E, V >::iterator

Definition at line 49 of file enumarray.hxx.

template<typename E, typename V>
typedef E o3tl::enumarray< E, V >::key_type

Definition at line 53 of file enumarray.hxx.

template<typename E, typename V>
typedef enumarray<E, V> o3tl::enumarray< E, V >::self_type

Definition at line 48 of file enumarray.hxx.

template<typename E, typename V>
typedef size_t o3tl::enumarray< E, V >::size_type

Definition at line 54 of file enumarray.hxx.

template<typename E, typename V>
typedef V o3tl::enumarray< E, V >::value_type

Definition at line 52 of file enumarray.hxx.

Member Function Documentation

template<typename E, typename V>
iterator o3tl::enumarray< E, V >::begin ( )
inline

Definition at line 74 of file enumarray.hxx.

template<typename E, typename V>
const_iterator o3tl::enumarray< E, V >::begin ( ) const
inline

Definition at line 76 of file enumarray.hxx.

template<typename E, typename V>
V* o3tl::enumarray< E, V >::data ( )
inline

Definition at line 79 of file enumarray.hxx.

template<typename E, typename V>
iterator o3tl::enumarray< E, V >::end ( )
inline

Definition at line 75 of file enumarray.hxx.

template<typename E, typename V>
const_iterator o3tl::enumarray< E, V >::end ( ) const
inline

Definition at line 77 of file enumarray.hxx.

template<typename E, typename V>
void o3tl::enumarray< E, V >::fill ( val)
inline

Definition at line 70 of file enumarray.hxx.

template<typename E, typename V>
const V& o3tl::enumarray< E, V >::operator[] ( index) const
inline

Definition at line 58 of file enumarray.hxx.

template<typename E, typename V>
V& o3tl::enumarray< E, V >::operator[] ( index)
inline

Definition at line 64 of file enumarray.hxx.

template<typename E, typename V>
static size_type o3tl::enumarray< E, V >::size ( )
inlinestatic

Member Data Documentation

template<typename E, typename V>
V o3tl::enumarray< E, V >::detail_values[max_index+1]
template<typename E, typename V>
const size_type o3tl::enumarray< E, V >::max_index = static_cast<size_type>(E::LAST)
static

The documentation for this class was generated from the following file: