OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
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:

Public Member Functions

 ResourcePool (const String &name)
 
 ~ResourcePool ()
 
virtual void addItem (const ResourcePtr &i)
 Add a new item to the pool.
 
void clear ()
 Clear the pool.
 
const StringgetName () const
 Get the name of the pool.
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
virtual std::pair< bool, ResourcePtrremoveItem ()
 Get the next item from the pool.
 

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

◆ addItem()

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

Add a new item to the pool.

◆ clear()

void Ogre::ResourceManager::ResourcePool::clear ( )
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)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

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

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

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

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

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

operator new, with debug line info

◆ operator new() [3/3]

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

placement operator new

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

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

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

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

array operator new, with debug line info

◆ removeItem()

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

Get the next item from the pool.

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

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