LibN2L-4 Library Code Reference
Classes
Compounds
Files
Members
Method Index
Full Reference
n2l::cResourceManager Class Reference
A caching resource loader which allows the request of files from a vfs root without the development overhead of searching, checking and casting.
More...
#include <cResourceManager.h>
Collaboration diagram for n2l::cResourceManager:
[legend]List of all members.Static Public Member Functions
Classes
- class cResource
- Common handle for internally stored resource items.
- class cResourceSheath
- A customizable child of cResource to specalize the loading of individual resources.
Detailed Description
A caching resource loader which allows the request of files from a vfs root without the development overhead of searching, checking and casting.
Definition at line 46 of file cResourceManager.h.
Member Function Documentation
| static const tUint n2l::cResourceManager::aggLoadTime |
( |
|
) |
[inline, static] |
|
| static void n2l::cResourceManager::clearAggLoadTime |
( |
|
) |
[inline, static] |
|
| void n2l::cResourceManager::clearAllCache |
( |
|
) |
[static] |
|
|
|
Remove all auto pointers to cached elements.
Any outstanding Instances of these resources will still be held, but the copy in the resource manager will be removed. - Warning:
- If a resource is still held outside the resource manager, and it is cleared and re-requested the resource manager will have no knowledge of the outstanding copy and will load a new copy. Since this behaviour is generally not wanted it is usually better to call clearUnusedCache() instead, which will retain copies of resources still in use.
- See also:
- clearUnusedCache
- Note:
- It's usually a good idea to call this method right before you shut down your application and shut down n2l.
Definition at line 175 of file cResourceManager.cpp. |
| void n2l::cResourceManager::clearCachedResource |
( |
const tString & |
iName |
) |
[static] |
|
| void n2l::cResourceManager::clearUnusedCache |
( |
|
) |
[static] |
|
|
|
Remove any currently unused resources from the resource managers cache.
This is a good idea if you want to clean house, but don't want to end up with duplicate copies of resources in memory over time. - See also:
- clearAllCache
Definition at line 196 of file cResourceManager.cpp.
References n2l::n2lDebug(). |
|
template<class TRes> |
| static const cAutoPtr<const TRes>& n2l::cResourceManager::get |
( |
const tString & |
iName |
) |
[inline, static] |
|
| const tString n2l::cResourceManager::getReferenceReport |
( |
|
) |
[static] |
|
| const tUint n2l::cResourceManager::numReferences |
( |
const tString & |
iName |
) |
[static] |
|
| void n2l::cResourceManager::refreshTextures |
( |
|
) |
[static] |
|
The documentation for this class was generated from the following files: