| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Member Functions | List of all members
Ogre::ResourceManager::ResourcePool Class Reference

Definition of a pool of resources, which users can use to reuse similar resources many times without destroying and recreating them. More...

`#include <OgreResourceManager.h>`

Inheritance diagram for Ogre::ResourceManager::ResourcePool:
[legend]

## Public Member Functions
| ResourcePool (const String &name)
| ~ResourcePool ()
virtual void | addItem (const ResourcePtr &i)
| Add a new item to the pool. More...
void | clear ()
| Clear the pool. More...
const String & | getName () const
| Get the name of the pool. More...
virtual std::pair< bool, ResourcePtr > | removeItem ()
| Get the next item from the pool. More...

## Detailed Description

Definition of a pool of resources, which users can use to reuse similar resources many times without destroying and recreating them.

Remarks
  This is a simple utility class which allows the reuse of resources between code which has a changing need for them. For example,

## Constructor & Destructor Documentation

## ◆ ResourcePool()

Ogre::ResourceManager::ResourcePool::ResourcePool | ( | const String & | name | ) |

## ◆ ~ResourcePool()

Ogre::ResourceManager::ResourcePool::~ResourcePool | ( |  | ) |

## Member Function Documentation

## ◆ getName()

const String& Ogre::ResourceManager::ResourcePool::getName | ( |  | ) | const

Get the name of the pool.

## ◆ clear()

void Ogre::ResourceManager::ResourcePool::clear | ( | void |  | ) |
| virtual

Clear the pool.

Reimplemented from Ogre::Pool< ResourcePtr >.

## ◆ removeItem()

virtual std::pair<bool, ResourcePtr > Ogre::Pool< ResourcePtr >::removeItem | ( |  | ) |
| inline virtual inherited

Get the next item from the pool.

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

References OGRE_LOCK_AUTO_MUTEX.

## ◆ addItem()

virtual void Ogre::Pool< ResourcePtr >::addItem | ( | const ResourcePtr & | i | ) |
| inline virtual inherited

Add a new item to the pool.

References OGRE_LOCK_AUTO_MUTEX.

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

- OgreResourceManager.h