Resource managment


Data Structures

class  nrEngine::IResource
 General interface to hold any kind of resources. More...
class  nrEngine::ResourceFactory
 Factory class to built instances of resources. More...
class  nrEngine::ResourceHolder
 Interstage between manager and resources for more efficience and safety. More...
class  nrEngine::IResourceLoader
 Interface for loading/creating resources. More...
class  nrEngine::ResourceManager
 General pointer/handle based resource management system. More...
class  nrEngine::IResourcePtr
 Base untemplated class for resource pointers. More...
class  nrEngine::ResourcePtr< ResType >
 Resource pointer is a smart pointer pointing to the resource. More...

Variables

const int32 nrEngine::NR_RESOURCE_LOCK_STACK = 128

Detailed Description

nrEngine has support for resource managment. Each resource can be loaded or unloaded at the runtime. There is a class for generic support of resource managment system ResourceManager. This class provides generic functions used for resource reservation/allocation/release. We also provides a possibility to unload the resource at runtime but not to delete it from the memory completly. So the application can still access to it and will get only empty resource back.

Each resource class has to be derived from IResource and provide their own functions for returning an empty resource. ResourcePtr is a class representing smart pointer to any resource. This pointers can be used as normal pointers and will give you transparent access to empty item if this resource is not present in the memory.

So with the help of such subsystem you do not have to check each time you want to use the data if it still exists in the memory. This happens transparent to you and will stay efficient.

Resources.png

Variable Documentation

const int32 nrEngine::NR_RESOURCE_LOCK_STACK = 128

This constant defines the size of the lock stack. All locking states are stored in the stack, to allow nested lock/unlock calling.

Definition at line 30 of file ResourceHolder.h.


Generated on Wed Sep 12 23:19:43 2007 for nrEngine by  doxygen 1.5.1