3.0.0
Freundlich's C++ toolkit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
fcppt::enum_::array< Enum, Value > Class Template Reference

Detailed Description

template<typename Enum, typename Value>
class fcppt::enum_::array< Enum, Value >

An array indexed with an enum.

This class is like std::array, except that operator[] takes a parameter of type Enum. This class is meant to be used with contiguous enums.

Template Parameters
EnumThe enum type to use as an index which also determines the array's size.

Public Types

typedef Enum enum_type
 
typedef fcppt::enum_::size< Enum > static_size
 
typedef std::array< Value, static_size::value > internal
 
typedef internal::value_type value_type
 
typedef internal::difference_type difference_type
 
typedef internal::size_type size_type
 
typedef internal::reference reference
 
typedef internal::const_reference const_reference
 
typedef internal::pointer pointer
 
typedef internal::const_pointer const_pointer
 
typedef internal::iterator iterator
 
typedef internal::const_iterator const_iterator
 
typedef internal::reverse_iterator reverse_iterator
 
typedef internal::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

reference operator[] (Enum)
 
const_reference operator[] (Enum) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
pointer data ()
 
const_pointer data () const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
constexpr size_type size () const
 
void fill (Value const &)
 
void swap (array &)
 
internal const & impl () const
 

Static Public Member Functions

static internal::size_type to_index (Enum)
 

Public Attributes

internal impl_
 

Member Typedef Documentation

◆ const_iterator

template<typename Enum , typename Value >
typedef internal::const_iterator fcppt::enum_::array< Enum, Value >::const_iterator

◆ const_pointer

template<typename Enum , typename Value >
typedef internal::const_pointer fcppt::enum_::array< Enum, Value >::const_pointer

◆ const_reference

template<typename Enum , typename Value >
typedef internal::const_reference fcppt::enum_::array< Enum, Value >::const_reference

◆ const_reverse_iterator

template<typename Enum , typename Value >
typedef internal::const_reverse_iterator fcppt::enum_::array< Enum, Value >::const_reverse_iterator

◆ difference_type

template<typename Enum , typename Value >
typedef internal::difference_type fcppt::enum_::array< Enum, Value >::difference_type

◆ enum_type

template<typename Enum , typename Value >
typedef Enum fcppt::enum_::array< Enum, Value >::enum_type

◆ internal

template<typename Enum , typename Value >
typedef std::array< Value, static_size::value > fcppt::enum_::array< Enum, Value >::internal

◆ iterator

template<typename Enum , typename Value >
typedef internal::iterator fcppt::enum_::array< Enum, Value >::iterator

◆ pointer

template<typename Enum , typename Value >
typedef internal::pointer fcppt::enum_::array< Enum, Value >::pointer

◆ reference

template<typename Enum , typename Value >
typedef internal::reference fcppt::enum_::array< Enum, Value >::reference

◆ reverse_iterator

template<typename Enum , typename Value >
typedef internal::reverse_iterator fcppt::enum_::array< Enum, Value >::reverse_iterator

◆ size_type

template<typename Enum , typename Value >
typedef internal::size_type fcppt::enum_::array< Enum, Value >::size_type

◆ static_size

template<typename Enum , typename Value >
typedef fcppt::enum_::size< Enum > fcppt::enum_::array< Enum, Value >::static_size

◆ value_type

template<typename Enum , typename Value >
typedef internal::value_type fcppt::enum_::array< Enum, Value >::value_type

Member Function Documentation

◆ back() [1/2]

template<typename Enum , typename Value >
reference fcppt::enum_::array< Enum, Value >::back ( )

◆ back() [2/2]

template<typename Enum , typename Value >
const_reference fcppt::enum_::array< Enum, Value >::back ( ) const

◆ begin() [1/2]

template<typename Enum , typename Value >
iterator fcppt::enum_::array< Enum, Value >::begin ( )

◆ begin() [2/2]

template<typename Enum , typename Value >
const_iterator fcppt::enum_::array< Enum, Value >::begin ( ) const

◆ cbegin()

template<typename Enum , typename Value >
const_iterator fcppt::enum_::array< Enum, Value >::cbegin ( ) const

◆ cend()

template<typename Enum , typename Value >
const_iterator fcppt::enum_::array< Enum, Value >::cend ( ) const

◆ crbegin()

template<typename Enum , typename Value >
const_reverse_iterator fcppt::enum_::array< Enum, Value >::crbegin ( ) const

◆ crend()

template<typename Enum , typename Value >
const_reverse_iterator fcppt::enum_::array< Enum, Value >::crend ( ) const

◆ data() [1/2]

template<typename Enum , typename Value >
pointer fcppt::enum_::array< Enum, Value >::data ( )

◆ data() [2/2]

template<typename Enum , typename Value >
const_pointer fcppt::enum_::array< Enum, Value >::data ( ) const

◆ end() [1/2]

template<typename Enum , typename Value >
iterator fcppt::enum_::array< Enum, Value >::end ( )

◆ end() [2/2]

template<typename Enum , typename Value >
const_iterator fcppt::enum_::array< Enum, Value >::end ( ) const

◆ fill()

template<typename Enum , typename Value >
void fcppt::enum_::array< Enum, Value >::fill ( Value const &  )

◆ front() [1/2]

template<typename Enum , typename Value >
reference fcppt::enum_::array< Enum, Value >::front ( )

◆ front() [2/2]

template<typename Enum , typename Value >
const_reference fcppt::enum_::array< Enum, Value >::front ( ) const

◆ impl()

template<typename Enum , typename Value >
internal const& fcppt::enum_::array< Enum, Value >::impl ( ) const

◆ operator[]() [1/2]

template<typename Enum , typename Value >
reference fcppt::enum_::array< Enum, Value >::operator[] ( Enum  )

◆ operator[]() [2/2]

template<typename Enum , typename Value >
const_reference fcppt::enum_::array< Enum, Value >::operator[] ( Enum  ) const

◆ rbegin() [1/2]

template<typename Enum , typename Value >
reverse_iterator fcppt::enum_::array< Enum, Value >::rbegin ( )

◆ rbegin() [2/2]

template<typename Enum , typename Value >
const_reverse_iterator fcppt::enum_::array< Enum, Value >::rbegin ( ) const

◆ rend() [1/2]

template<typename Enum , typename Value >
reverse_iterator fcppt::enum_::array< Enum, Value >::rend ( )

◆ rend() [2/2]

template<typename Enum , typename Value >
const_reverse_iterator fcppt::enum_::array< Enum, Value >::rend ( ) const

◆ size()

template<typename Enum , typename Value >
constexpr size_type fcppt::enum_::array< Enum, Value >::size ( ) const

◆ swap()

template<typename Enum , typename Value >
void fcppt::enum_::array< Enum, Value >::swap ( array< Enum, Value > &  )

◆ to_index()

template<typename Enum , typename Value >
static internal::size_type fcppt::enum_::array< Enum, Value >::to_index ( Enum  )
static

Member Data Documentation

◆ impl_

template<typename Enum , typename Value >
internal fcppt::enum_::array< Enum, Value >::impl_