Ogre::Pool< T > Class Template Reference

Template class describing a simple pool of items. More...

`#include <OgreResourceManager.h>`

## Public Member Functions

| Pool ()
virtual | ~Pool ()
virtual void | addItem (const T &i)
| Add a new item to the pool. More...
virtual void | clear ()
| Clear the pool. More...
virtual std::pair< bool, T > | removeItem ()
| Get the next item from the pool. More...

## Protected Types

typedef list< T >::type | ItemList

## Protected Attributes

ItemList | mItems
| OGRE_AUTO_MUTEX

## Detailed Description

### template<typename T>
class Ogre::Pool< T >

Template class describing a simple pool of items.

Definition at line 47 of file OgreResourceManager.h.

## Member Typedef Documentation

## ItemList

template<typename T>

typedef list<T>::type Ogre::Pool< T >::ItemList

protected

Definition at line 50 of file OgreResourceManager.h.

## Constructor & Destructor Documentation

## Pool()

template<typename T>

Ogre::Pool< T >::Pool | ( |  | ) |

Definition at line 54 of file OgreResourceManager.h.

## ~Pool()

template<typename T>

virtual Ogre::Pool< T >::~Pool | ( |  | ) |

virtual

Definition at line 55 of file OgreResourceManager.h.

## Member Function Documentation

## addItem()

template<typename T>

virtual void Ogre::Pool< T >::addItem | ( | const T & | i | ) |

virtual

Add a new item to the pool.

Definition at line 79 of file OgreResourceManager.h.

## clear()

template<typename T>

virtual void Ogre::Pool< T >::clear | ( | void |  | ) |

virtual

Clear the pool.

Reimplemented in Ogre::ResourceManager::ResourcePool.

Definition at line 85 of file OgreResourceManager.h.

## removeItem()

template<typename T>

virtual std::pair<bool, T> Ogre::Pool< T >::removeItem | ( |  | ) |

virtual

Get the next item from the pool.

Returns
  pair indicating whether there was a free item, and the item if so

Definition at line 60 of file OgreResourceManager.h.

## Member Data Documentation

## mItems

template<typename T>

ItemList Ogre::Pool< T >::mItems

protected

Definition at line 51 of file OgreResourceManager.h.

## OGRE_AUTO_MUTEX

template<typename T>

Ogre::Pool< T >::OGRE_AUTO_MUTEX

protected

Definition at line 52 of file OgreResourceManager.h.

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

- OgreResourceManager.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.