OGRE  1.9.0
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Ogre::IteratorWrapper< T, IteratorType, ValType > Class Template Reference

Basefunctionality for IteratorWrappers. More...

#include <OgreIteratorWrapper.h>

Inheritance diagram for Ogre::IteratorWrapper< T, IteratorType, ValType >:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

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

Protected Attributes

IteratorType mBegin
 
IteratorType mCurrent
 
IteratorType mEnd
 

Private Member Functions

 IteratorWrapper ()
 Private constructor since only the parameterised constructor should be used.
 

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

Definition at line 47 of file OgreIteratorWrapper.h.

Member Typedef Documentation

◆ 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.

Definition at line 83 of file OgreIteratorWrapper.h.

◆ 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.

Definition at line 74 of file OgreIteratorWrapper.h.

◆ PointerType

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

Definition at line 65 of file OgreIteratorWrapper.h.

◆ ValueType

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

Definition at line 63 of file OgreIteratorWrapper.h.

Constructor & Destructor Documentation

◆ IteratorWrapper() [1/2]

Ogre::IteratorWrapper< T, IteratorType, ValType >::IteratorWrapper ( )
private

Private constructor since only the parameterised constructor should be used.

◆ IteratorWrapper() [2/2]

Constructor.

Remarks
Provide a start and end iterator to initialise.

Definition at line 90 of file OgreIteratorWrapper.h.

Member Function Documentation

◆ begin()

Bookmark to the begin of the underlying collection.

Definition at line 110 of file OgreIteratorWrapper.h.

References Ogre::IteratorWrapper< T, IteratorType, ValType >::mBegin.

◆ current()

Full access to the current iterator.

Definition at line 114 of file OgreIteratorWrapper.h.

References Ogre::IteratorWrapper< T, IteratorType, ValType >::mCurrent.

◆ end()

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

Definition at line 117 of file OgreIteratorWrapper.h.

References Ogre::IteratorWrapper< T, IteratorType, ValType >::mEnd.

◆ hasMoreElements()

Returns true if there are more items in the collection.

Definition at line 97 of file OgreIteratorWrapper.h.

References Ogre::IteratorWrapper< T, IteratorType, ValType >::mCurrent, and Ogre::IteratorWrapper< T, IteratorType, ValType >::mEnd.

◆ moveNext()

Moves the iterator on one element.

Definition at line 104 of file OgreIteratorWrapper.h.

References Ogre::IteratorWrapper< T, IteratorType, ValType >::mCurrent.

Member Data Documentation

◆ mBegin

◆ mCurrent

◆ mEnd


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