OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::IteratorWrapper< T, IteratorType, ValType > Class Template Reference

Basefunctionality for IteratorWrappers. More...

#include <OgreIteratorWrapper.h>

+ Inheritance diagram for Ogre::IteratorWrapper< T, IteratorType, ValType >:

Public Types

typedef IteratorType const_iterator
 Typedef to fulfill container interface. More...
 
typedef IteratorType iterator
 Typedef to fulfill container interface. More...
 
typedef ValType * PointerType
 Type you expect to get by funktions like peekNext(Value)Ptr. More...
 
typedef ValType ValueType
 Type you expect to get by funktions like peekNext(Value) More...
 

Public Member Functions

 IteratorWrapper (IteratorType start, IteratorType last)
 Constructor. More...
 
const IteratorType & begin ()
 Bookmark to the begin of the underlying collection. More...
 
IteratorType & current ()
 Full access to the current iterator. More...
 
const IteratorType & end ()
 Bookmark to the end (one behind the last element) of the underlying collection. More...
 
bool hasMoreElements () const
 Returns true if there are more items in the collection. More...
 
void moveNext ()
 Moves the iterator on one element. More...
 

Detailed Description

template<typename T, typename IteratorType, typename ValType>
class Ogre::IteratorWrapper< T, IteratorType, ValType >

Basefunctionality for IteratorWrappers.

Template Parameters
Ta Container like vector list map ...
IteratorTypeT::iterator or T::const_iterator
ValTypeT::mapped_type in case of a map, T::value_type for vector, list,...

Have a look at VectorIteratorWrapper and MapIteratorWrapper for a concrete usage

Member Typedef Documentation

◆ const_iterator

template<typename T , typename IteratorType , typename ValType >
typedef IteratorType Ogre::IteratorWrapper< T, IteratorType, ValType >::const_iterator

Typedef to fulfill container interface.

Useful if you want to use BOOST_FOREACH

Note
there is no distinction between const_iterator and iterator.
keep this in mind if you want to derivate from this class.

◆ iterator

template<typename T , typename IteratorType , typename ValType >
typedef IteratorType Ogre::IteratorWrapper< T, IteratorType, ValType >::iterator

Typedef to fulfill container interface.

Useful if you want to use BOOST_FOREACH

Note
there is no distinction between const_iterator and iterator.
keep this in mind if you want to derivate from this class.

◆ PointerType

template<typename T , typename IteratorType , typename ValType >
typedef ValType* Ogre::IteratorWrapper< T, IteratorType, ValType >::PointerType

Type you expect to get by funktions like peekNext(Value)Ptr.

◆ ValueType

template<typename T , typename IteratorType , typename ValType >
typedef ValType Ogre::IteratorWrapper< T, IteratorType, ValType >::ValueType

Type you expect to get by funktions like peekNext(Value)

Constructor & Destructor Documentation

◆ IteratorWrapper()

template<typename T , typename IteratorType , typename ValType >
Ogre::IteratorWrapper< T, IteratorType, ValType >::IteratorWrapper ( IteratorType  start,
IteratorType  last 
)
inline

Constructor.

Remarks
Provide a start and end iterator to initialise.

Member Function Documentation

◆ begin()

template<typename T , typename IteratorType , typename ValType >
const IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::begin ( )
inline

Bookmark to the begin of the underlying collection.

◆ current()

template<typename T , typename IteratorType , typename ValType >
IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::current ( )
inline

Full access to the current iterator.

◆ end()

template<typename T , typename IteratorType , typename ValType >
const IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::end ( )
inline

Bookmark to the end (one behind the last element) of the underlying collection.

◆ hasMoreElements()

template<typename T , typename IteratorType , typename ValType >
bool Ogre::IteratorWrapper< T, IteratorType, ValType >::hasMoreElements ( ) const
inline

Returns true if there are more items in the collection.

Referenced by Ogre::Lod0Stripifier::StripLod0Vertices().

◆ moveNext()

template<typename T , typename IteratorType , typename ValType >
void Ogre::IteratorWrapper< T, IteratorType, ValType >::moveNext ( )
inline

Moves the iterator on one element.


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