EnumRangeT< EnumType > Class Template Reference

#include <EnumIterator.h>

Inheritance diagram for EnumRangeT< EnumType >:
Collaboration diagram for EnumRangeT< EnumType >:

Public Types

typedef EnumIterator< EnumType > iterator
 
typedef ReverseEnumIterator< EnumType > reverse_iterator
 

Public Member Functions

 EnumRangeT (EnumType first, EnumType one_past_last)
 
iterator begin () const
 
iterator end () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 

Private Attributes

EnumType begin_
 
EnumType end_
 

Detailed Description

template<typename EnumType>
class EnumRangeT< EnumType >

Class expressing a continuous range of an enum for range-for expressions

This class requires that the underlying enum values be represented by continuous values of an integral type. Users will usually not rely on this class directly but on the more convenient EnumRange function

Note
EnumIterator<enum>(EnumType::firstmember,EnumType::lastmember) will miss EnumType::lastmember while iterating. If you need to iterate over all of EnumType, use class WholeEnum.
See also
EnumRange, WholeEnum

Definition at line 157 of file EnumIterator.h.

Member Typedef Documentation

◆ iterator

template<typename EnumType >
typedef EnumIterator<EnumType> EnumRangeT< EnumType >::iterator

Definition at line 160 of file EnumIterator.h.

◆ reverse_iterator

template<typename EnumType >
typedef ReverseEnumIterator<EnumType> EnumRangeT< EnumType >::reverse_iterator

Definition at line 161 of file EnumIterator.h.

Constructor & Destructor Documentation

◆ EnumRangeT()

template<typename EnumType >
EnumRangeT< EnumType >::EnumRangeT ( EnumType  first,
EnumType  one_past_last 
)
inline

Definition at line 162 of file EnumIterator.h.

Member Function Documentation

◆ begin()

template<typename EnumType >
iterator EnumRangeT< EnumType >::begin ( ) const
inline

◆ end()

template<typename EnumType >
iterator EnumRangeT< EnumType >::end ( ) const
inline

Definition at line 164 of file EnumIterator.h.

References EnumRangeT< EnumType >::end_.

Referenced by TestEnumIterator::testBidirectionalIter().

◆ rbegin()

template<typename EnumType >
reverse_iterator EnumRangeT< EnumType >::rbegin ( ) const
inline

Definition at line 165 of file EnumIterator.h.

References EnumRangeT< EnumType >::end_.

Referenced by TestEnumIterator::testReverseIter().

◆ rend()

template<typename EnumType >
reverse_iterator EnumRangeT< EnumType >::rend ( ) const
inline

Definition at line 166 of file EnumIterator.h.

References EnumRangeT< EnumType >::begin_.

Referenced by TestEnumIterator::testUnsignedEnum().

Member Data Documentation

◆ begin_

template<typename EnumType >
EnumType EnumRangeT< EnumType >::begin_
private

Definition at line 168 of file EnumIterator.h.

Referenced by EnumRangeT< EnumType >::begin(), and EnumRangeT< EnumType >::rend().

◆ end_

template<typename EnumType >
EnumType EnumRangeT< EnumType >::end_
private

Definition at line 169 of file EnumIterator.h.

Referenced by EnumRangeT< EnumType >::end(), and EnumRangeT< EnumType >::rbegin().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors