28 #ifndef __Ogre_Iterator_Wrapper_H__ 29 #define __Ogre_Iterator_Wrapper_H__ 46 template <
typename T,
typename IteratorType,
typename ValType>
91 : mBegin( start ), mCurrent ( start ), mEnd ( last )
99 return mCurrent !=
mEnd;
134 template <
typename T,
typename IteratorType>
152 :
IteratorWrapper<T, IteratorType, typename T::value_type>( start, last )
185 template <
typename T>
216 template <
typename T>
252 template <
typename T,
typename IteratorType>
272 :
IteratorWrapper<T, IteratorType, typename T::mapped_type>( start, last )
301 return ((this->
mCurrent++)->second) ;
318 template <
typename T>
326 MapIterator(
typename T::iterator start,
typename T::iterator last )
351 template <
typename T>
ConstMapIterator(const T &c)
Constructor.
Concrete IteratorWrapper for nonconst access to the underlying container.
void moveNext()
Moves the iterator on one element.
IteratorType & current()
Full access to the current iterator.
bool hasMoreElements() const
Returns true if there are more items in the collection.
ValueType getNext()
Returns the next(=current) value element in the collection, and advances to the next.
VectorIterator(typename T::iterator start, typename T::iterator last)
Constructor.
ConstMapIterator(typename T::const_iterator start, typename T::const_iterator last)
Constructor.
const PointerType peekNextValuePtr() const
Returns a pointer to the next/current value element in the collection, without advancing to the next ...
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
ValueType peekNext() const
Returns the next(=current) element in the collection, without advancing to the next.
Concrete IteratorWrapper for const access to the underlying key-value container.
IteratorType const_iterator
Typedef to fulfill container interface.
MapIterator(typename T::iterator start, typename T::iterator last)
Constructor.
KeyType peekNextKey(void) const
Returns the next(=current) key element in the collection, without advancing to the next...
IteratorWrapper< T, IteratorType, typename T::value_type >::PointerType PointerType
IteratorType iterator
Typedef to fulfill container interface.
ValueType peekNextValue() const
Returns the next(=current) value element in the collection, without advancing to the next...
VectorIterator(T &c)
Constructor.
MapIterator(T &c)
Constructor.
Basefunctionality for IteratorWrappers.
ConstVectorIterator(const T &c)
Constructor.
const IteratorType & end()
Bookmark to the end (one behind the last element) of the underlying collection.
IteratorWrapper(IteratorType start, IteratorType last)
Constructor.
T::key_type KeyType
Type you expect to get by funktions like peekNextKey.
Prepared IteratorWrapper for container like std::vector.
MapIteratorWrapper(IteratorType start, IteratorType last)
Constructor.
Prepared IteratorWrapper for key-value container.
IteratorWrapper< T, IteratorType, typename T::mapped_type >::ValueType ValueType
Redefined ValueType for a map/set.
IteratorWrapper()
Private constructor since only the parameterised constructor should be used.
IteratorWrapper< T, IteratorType, typename T::mapped_type >::PointerType PointerType
Redefined PointerType for a map/set.
const IteratorType & begin()
Bookmark to the begin of the underlying collection.
ValueType getNext()
Returns the next(=current) value element in the collection, and advances to the next.
T::value_type PairType
Unused, just to make it clear that map/set::value_type is not a ValueType.
Concrete IteratorWrapper for const access to the underlying container.
ValType * PointerType
Type you expect to get by funktions like peekNext(Value)Ptr.
PointerType peekNextPtr() const
Returns a pointer to the next(=current) element in the collection, without advancing to the next afte...
IteratorWrapper< T, IteratorType, typename T::value_type >::ValueType ValueType
ValType ValueType
Type you expect to get by funktions like peekNext(Value)
ConstVectorIterator(typename T::const_iterator start, typename T::const_iterator last)
Constructor.
VectorIteratorWrapper(IteratorType start, IteratorType last)
c'tor