OGRE  1.9.0
Public Types | Public Member Functions | Private Attributes | List of all members
Ogre::iterator_range< T > Class Template Reference

Base for an iterator_range. More...

#include <OgreIteratorRange.h>

Inheritance diagram for Ogre::iterator_range< T >:
Inheritance graph
[legend]

Public Types

typedef T const_iterator
 typedef to fulfill container interface
 
typedef T iterator
 typedef to fulfill container interface
 
typedef iterator_range< Ttype
 defines the real used type
 

Public Member Functions

 iterator_range (T b, T e)
 Constructor.
 
T begin () const
 access to the begin of the range
 
bool empty () const
 informs if there are any elements in the range
 
T end () const
 access to the end of the range
 
bool equal (const iterator_range &other) const
 comparison for equality
 
bool operator!= (const iterator_range &rhs) const
 comparison operator for inequality
 
bool operator== (const iterator_range &rhs) const
 comparison operator for equality
 

Private Attributes

T mBegin
 
T mEnd
 

Detailed Description

template<typename T>
class Ogre::iterator_range< T >

Base for an iterator_range.

Template Parameters
Titerator type

This class implements the minimal interface of the (boost::iterator_)range concept
Also it prepairs for direct usage of boost::iterator_range by providing the real used type via iterator_range::type so that client code does not have to change when boost::iterator_range will be implemented some day.
see VectorRange MapRange or corresponding Const variants for a sample of concrete usage of the iterator_range::type

Definition at line 69 of file OgreIteratorRange.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
typedef T Ogre::iterator_range< T >::const_iterator

typedef to fulfill container interface

Note
there is no distinction between const_iterator and iterator.

Definition at line 117 of file OgreIteratorRange.h.

◆ iterator

template<typename T >
typedef T Ogre::iterator_range< T >::iterator

typedef to fulfill container interface

Note
there is no distinction between const_iterator and iterator.

Definition at line 109 of file OgreIteratorRange.h.

◆ type

defines the real used type

type will be defined as Ogre::iterator_range if not used with boost
otherwise the type will be boost::iterator_range

Definition at line 124 of file OgreIteratorRange.h.

Constructor & Destructor Documentation

◆ iterator_range()

template<typename T >
Ogre::iterator_range< T >::iterator_range ( T  b,
T  e 
)

Constructor.

Remarks
Provide a start and end iterator to initialise.

Definition at line 81 of file OgreIteratorRange.h.

Member Function Documentation

◆ begin()

template<typename T >
T Ogre::iterator_range< T >::begin ( ) const

access to the begin of the range

Definition at line 84 of file OgreIteratorRange.h.

References Ogre::iterator_range< T >::mBegin.

◆ empty()

template<typename T >
bool Ogre::iterator_range< T >::empty ( ) const

informs if there are any elements in the range

Definition at line 90 of file OgreIteratorRange.h.

References Ogre::iterator_range< T >::mBegin, and Ogre::iterator_range< T >::mEnd.

◆ end()

template<typename T >
T Ogre::iterator_range< T >::end ( ) const

access to the end of the range

Definition at line 87 of file OgreIteratorRange.h.

References Ogre::iterator_range< T >::mEnd.

◆ equal()

template<typename T >
bool Ogre::iterator_range< T >::equal ( const iterator_range< T > &  other) const

◆ operator!=()

template<typename T >
bool Ogre::iterator_range< T >::operator!= ( const iterator_range< T > &  rhs) const

comparison operator for inequality

Definition at line 101 of file OgreIteratorRange.h.

References Ogre::iterator_range< T >::operator==().

◆ operator==()

template<typename T >
bool Ogre::iterator_range< T >::operator== ( const iterator_range< T > &  rhs) const

comparison operator for equality

Definition at line 97 of file OgreIteratorRange.h.

References Ogre::iterator_range< T >::equal().

Referenced by Ogre::iterator_range< T >::operator!=().

Member Data Documentation

◆ mBegin

template<typename T >
T Ogre::iterator_range< T >::mBegin
private

◆ mEnd

template<typename T >
T Ogre::iterator_range< T >::mEnd
private

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