OGRE  1.9.0
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.
 
virtual void clear ()
 Clear the pool.
 
virtual std::pair< bool, T > removeItem ()
 Get the next item from the pool.
 

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.

References mItems, and OGRE_LOCK_AUTO_MUTEX.

◆ clear()

template<typename T>
virtual void Ogre::Pool< T >::clear ( )
virtual

Clear the pool.

Reimplemented in Ogre::ResourceManager::ResourcePool.

Definition at line 85 of file OgreResourceManager.h.

References mItems, and OGRE_LOCK_AUTO_MUTEX.

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

References mItems, and OGRE_LOCK_AUTO_MUTEX.

Member Data Documentation

◆ mItems

template<typename T>
ItemList Ogre::Pool< T >::mItems
protected

Definition at line 51 of file OgreResourceManager.h.

Referenced by addItem(), clear(), and removeItem().

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