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...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
virtual std::pair< bool, ResourcePtr > | removeItem ()
| Get the next item from the pool. More...

## Protected Types

typedef list< ResourcePtr >::type | ItemList

## Protected Attributes

ItemList | mItems
String | mName
| OGRE_AUTO_MUTEX

## 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,

Definition at line 478 of file OgreResourceManager.h.

## Member Typedef Documentation

## ItemList

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

protected inherited

Definition at line 50 of file OgreResourceManager.h.

## Constructor & Destructor Documentation

## ResourcePool()

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

## ~ResourcePool()

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

## Member Function Documentation

## addItem()

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

virtual inherited

Add a new item to the pool.

Definition at line 79 of file OgreResourceManager.h.

References OGRE_LOCK_AUTO_MUTEX.

## clear()

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

virtual

Clear the pool.

Reimplemented from Ogre::Pool< ResourcePtr >.

## getName()

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

Get the name of the pool.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## removeItem()

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

virtual inherited

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

## Member Data Documentation

## mItems

ItemList Ogre::Pool< ResourcePtr >::mItems

protected inherited

Definition at line 51 of file OgreResourceManager.h.

## mName

String Ogre::ResourceManager::ResourcePool::mName

protected

Definition at line 481 of file OgreResourceManager.h.

## OGRE_AUTO_MUTEX

Ogre::Pool< ResourcePtr >::OGRE_AUTO_MUTEX

protected inherited

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.