# Ogre::IteratorWrapper< T, IteratorType, ValType > Class Template Reference

Basefunctionality for IteratorWrappers. More...

`#include <OgreIteratorWrapper.h>`

List of all members.

## Public Types

typedef ValType | ValueType
| type you expect to get by funktions like peekNext(Value)
typedef ValType * | PointerType
| type you expect to get by funktions like peekNext(Value)Ptr
typedef IteratorType | iterator
| typedef to fulfill container interface
typedef IteratorType | const_iterator
| typedef to fulfill container interface

## Public Member Functions

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

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

Parameters:

  | T | a Container like vector list map ...
  | IteratorType | T::iterator or T::const_iterator
  | ValType | T::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 46 of file OgreIteratorWrapper.h.

## Member Typedef Documentation

template<typename T, typename IteratorType, typename ValType>

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

typedef to fulfill container interface

Userfull 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 82 of file OgreIteratorWrapper.h.

template<typename T, typename IteratorType, typename ValType>

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

typedef to fulfill container interface

Userfull 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 73 of file OgreIteratorWrapper.h.

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

Reimplemented in Ogre::VectorIteratorWrapper< T, IteratorType >, Ogre::MapIteratorWrapper< T, IteratorType >, Ogre::VectorIteratorWrapper< T, T::iterator >, Ogre::VectorIteratorWrapper< T, T::const_iterator >, Ogre::MapIteratorWrapper< T, T::iterator >, and Ogre::MapIteratorWrapper< T, T::const_iterator >.

Definition at line 64 of file OgreIteratorWrapper.h.

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)

Reimplemented in Ogre::VectorIteratorWrapper< T, IteratorType >, Ogre::MapIteratorWrapper< T, IteratorType >, Ogre::VectorIteratorWrapper< T, T::iterator >, Ogre::VectorIteratorWrapper< T, T::const_iterator >, Ogre::MapIteratorWrapper< T, T::iterator >, and Ogre::MapIteratorWrapper< T, T::const_iterator >.

Definition at line 62 of file OgreIteratorWrapper.h.

## Constructor & Destructor Documentation

template<typename T, typename IteratorType, typename ValType>

Ogre::IteratorWrapper< T, IteratorType, ValType >::IteratorWrapper | ( |  | ) | `[private]`

Private constructor since only the parameterised constructor should be used.

template<typename T, typename IteratorType, typename ValType>

Ogre::IteratorWrapper< T, IteratorType, ValType >::IteratorWrapper | ( | IteratorType | start,
|  | IteratorType | last |
| ) |  |  |

Constructor.

Remarks:
  Provide a start and end iterator to initialise.

Definition at line 92 of file OgreIteratorWrapper.h.

## Member Function Documentation

template<typename T, typename IteratorType, typename ValType>

const IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::begin | ( |  | ) |

bookmark to the begin of the underlying collection

Definition at line 112 of file OgreIteratorWrapper.h.

template<typename T, typename IteratorType, typename ValType>

IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::current | ( |  | ) |

full access to the current iterator

Definition at line 116 of file OgreIteratorWrapper.h.

template<typename T, typename IteratorType, typename ValType>

const IteratorType& Ogre::IteratorWrapper< T, IteratorType, ValType >::end | ( |  | ) |

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

Definition at line 119 of file OgreIteratorWrapper.h.

template<typename T, typename IteratorType, typename ValType>

bool Ogre::IteratorWrapper< T, IteratorType, ValType >::hasMoreElements | ( |  | ) | const

Returns true if there are more items in the collection.

Definition at line 99 of file OgreIteratorWrapper.h.

Referenced by Ogre::RenderQueueGroup::merge().

template<typename T, typename IteratorType, typename ValType>

void Ogre::IteratorWrapper< T, IteratorType, ValType >::moveNext | ( |  | ) |

Moves the iterator on one element.

Definition at line 106 of file OgreIteratorWrapper.h.

## Member Data Documentation

template<typename T, typename IteratorType, typename ValType>

IteratorType Ogre::IteratorWrapper< T, IteratorType, ValType >::mBegin `[protected]`

Definition at line 54 of file OgreIteratorWrapper.h.

Referenced by Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::begin().

template<typename T, typename IteratorType, typename ValType>

IteratorType Ogre::IteratorWrapper< T, IteratorType, ValType >::mCurrent `[protected]`

Definition at line 55 of file OgreIteratorWrapper.h.

Referenced by Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::current(), Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::hasMoreElements(), and Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::moveNext().

template<typename T, typename IteratorType, typename ValType>

IteratorType Ogre::IteratorWrapper< T, IteratorType, ValType >::mEnd `[protected]`

Definition at line 56 of file OgreIteratorWrapper.h.

Referenced by Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::end(), and Ogre::IteratorWrapper< T, IteratorType, T::mapped_type >::hasMoreElements().

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

- OgreIteratorWrapper.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:24:56