Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator Class Reference

A class that iterates over the valid objects in an object pool. More...

#include <omObjectPool.h>

Public Member Functions

 Iterator (ObjectPool &newPool)
 Create a new hash map iterator for the specified hash map. More...
 
void operator++ ()
 Increment the location of an object pool iterator by one element. More...
 
void operator++ (int)
 Increment the location of an object pool iterator by one element. More...
 
 operator Bool () const
 Test whether or not the current element is valid. More...
 
T & operator* () const
 Return a reference to the current object that the iterater points to. More...
 
T * operator-> () const
 Return a pointer to the current object that the iterater points to. More...
 
void remove ()
 Remove the current element from the object pool. More...
 
void reset ()
 Reset the iterator to the beginning of the object pool. More...
 
SizeType getIndex () const
 Return the index of the current object that the iterator points to. More...
 

Detailed Description

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
class om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator

A class that iterates over the valid objects in an object pool.

Constructor & Destructor Documentation

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::Iterator ( ObjectPool newPool)
inline

Create a new hash map iterator for the specified hash map.

Member Function Documentation

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
void om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::operator++ ( )
inline

Increment the location of an object pool iterator by one element.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
void om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::operator++ ( int  )
inline

Increment the location of an object pool iterator by one element.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::operator Bool ( ) const
inline

Test whether or not the current element is valid.

This will return FALSE when the last element of the object pool has been iterated over.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
T& om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::operator* ( ) const
inline

Return a reference to the current object that the iterater points to.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
T* om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::operator-> ( ) const
inline

Return a pointer to the current object that the iterater points to.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
void om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::remove ( )
inline

Remove the current element from the object pool.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
void om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::reset ( )
inline

Reset the iterator to the beginning of the object pool.

template<typename T, Size blockSizeLog2 = Size(3), typename SizeType = Size, typename AllocatorType = Allocator>
SizeType om::util::ObjectPool< T, blockSizeLog2, SizeType, AllocatorType >::Iterator::getIndex ( ) const
inline

Return the index of the current object that the iterator points to.


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