pianod2
multisource multiuser scriptable networked music player
Classes | Public Member Functions | Static Public Member Functions | Private Types | Static Private Attributes | List of all members
Enum< Enumeration, end_element > Class Template Reference

Iteratate over the values of the enumeration. More...

#include <enum.h>

Classes

class  Iterator
 

Public Member Functions

bool isValid (Enumeration value)
 

Static Public Member Functions

static Iterator begin ()
 Get a new iterator for the first item of the enumeration. More...
 
static Iterator end ()
 Get a new iterator for the terminator item of the enumeration. More...
 

Private Types

using enumeration_type = Enumeration
 

Static Private Attributes

static const Enumeration begin_element = static_cast <Enumeration> (0)
 

Detailed Description

template<typename Enumeration, Enumeration end_element = Enumeration::Count>
class Enum< Enumeration, end_element >

Iteratate over the values of the enumeration.

Template Parameters
EnumerationThe enumeration type.
end_elementThe stop element. As with all iterators, this is an "extra" value at the end of the enumeration, one above the last meaningful value of the enumeration. May default if named "Count".

Member Typedef Documentation

◆ enumeration_type

template<typename Enumeration , Enumeration end_element = Enumeration::Count>
using Enum< Enumeration, end_element >::enumeration_type = Enumeration
private

Member Function Documentation

◆ begin()

template<typename Enumeration , Enumeration end_element = Enumeration::Count>
static Iterator Enum< Enumeration, end_element >::begin ( )
inlinestatic

Get a new iterator for the first item of the enumeration.

◆ end()

template<typename Enumeration , Enumeration end_element = Enumeration::Count>
static Iterator Enum< Enumeration, end_element >::end ( )
inlinestatic

Get a new iterator for the terminator item of the enumeration.

◆ isValid()

template<typename Enumeration , Enumeration end_element = Enumeration::Count>
bool Enum< Enumeration, end_element >::isValid ( Enumeration  value)
inline

Member Data Documentation

◆ begin_element

template<typename Enumeration , Enumeration end_element = Enumeration::Count>
const Enumeration Enum< Enumeration, end_element >::begin_element = static_cast <Enumeration> (0)
staticprivate

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