Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deResourceManager Class Reference

`#include <deResourceManager.hpp>`

Inheritance diagram for deResourceManager:

[legend]
Collaboration diagram for deResourceManager:

[legend]
List of all members.

## Public Member Functions
| deResourceManager (void)
| ~deResourceManager (void)
long | GetUniqueInterfaceID ()
deBoolean | RegisterResourceType (const char *extension, deResourceMakerCB maker)
IdeResourceBase * | GetResource (const char *filename, IdeFileSystem *filesystem, deBoolean DoLoad)
IdeResourceBase * | GetResourceThreaded (const char *filename, IdeFileSystem *filesystem, deBoolean DoLoad)
IdeResourceBase * | GetResourceFromFile (IdeFile *file, const char *filename, deBoolean record)
IdeResourceBase * | GetResourceFromFileThreaded (IdeFile *file, const char *filename, deBoolean record)
deBoolean | RemoveResource (IdeResourceBase *rsc)
deBoolean | RemoveAllResources (void)
| Will remove all the objects from the internal database.
## Private Member Functions
deBoolean | AddResource (char *extension, IdeResourceBase *ClassPtr)
void | ParseExtension (char *filename, char buffer[])
IdeFile * | LoadFile (const char *filename, IdeFileSystem *BaseFS, deBoolean Read, deBoolean Write)
void | ChangeThreadedResourceStatus (LoadingResourceParams_t *params, LoadingResource_t *rsc)
## Static Private Member Functions
u32 | ThreadedLoadHandler (void *param)
## Private Attributes
deTHashString< deResourceMakerCB > | m_RegisteredTypes
deTHashString< deTHashString< deResource > * > | m_Resources
long | m_UniqueTypes
IdeThreadLock * | m_GlobalLockObj
IdeThreadLock * | m_LoadLockObj
deTHashString< LoadingResource_t > | m_LoadingResources

## Constructor & Destructor Documentation

deResourceManager::deResourceManager | ( | void |  | ) |

deResourceManager::~deResourceManager | ( | void |  | ) |

## Member Function Documentation

deBoolean deResourceManager::AddResource | ( | char * | extension,
|  | IdeResourceBase * | ClassPtr
| ) | `[private]`

void deResourceManager::ChangeThreadedResourceStatus | ( | LoadingResourceParams_t * | params,
|  | LoadingResource_t * | rsc
| ) | `[private]`

IdeResourceBase * deResourceManager::GetResource | ( | const char * | filename,
|  | IdeFileSystem * | filesystem,
|  | deBoolean | DoLoad
| ) | `[virtual]`

  | Retrieves a "clean" instance of the specified file Returns: Pointer to a "clean" object that has the filename specified. It may be created from a file specified, or it may retrieve a pointer to an instance already in the internal database. Parameters:
  filename | A standard filename of the format "path/file.ext"
  filesystem | Either NULL or a valid pointer to a filesystem to be searched for the filename. If NULL is used, the behavior of the maker function may be undefined
  DoLoad | If set to deFalse, the file will not be loaded if it does not already exist in memory
Implements IdeResourceManager.

IdeResourceBase * deResourceManager::GetResourceFromFile | ( | IdeFile * | file,
|  | const char * | filename,
|  | deBoolean | record
| ) | `[virtual]`

| Implements IdeResourceManager.

IdeResourceBase * deResourceManager::GetResourceFromFileThreaded | ( | IdeFile * | file,
|  | const char * | filename,
|  | deBoolean | record
| ) | `[virtual]`

| Implements IdeResourceManager.

IdeResourceBase * deResourceManager::GetResourceThreaded | ( | const char * | filename,
|  | IdeFileSystem * | filesystem,
|  | deBoolean | DoLoad
| ) | `[virtual]`

| Implements IdeResourceManager.

long deResourceManager::GetUniqueInterfaceID | ( |  | ) | `[inline, virtual]`

| Used by classes derived from IdeResourceBase to resolve interfaces Returns: a value that is unique relative to all other values returned by this method Implements IdeResourceManager.

IdeFile * deResourceManager::LoadFile | ( | const char * | filename,
|  | IdeFileSystem * | BaseFS,
|  | deBoolean | Read,
|  | deBoolean | Write
| ) | `[private]`

void deResourceManager::ParseExtension | ( | char * | filename,
|  | char | buffer[]
| ) | `[private]`

deBoolean deResourceManager::RegisterResourceType | ( | const char * | extension,
|  | deResourceMakerCB | maker
| ) | `[virtual]`

  | Register a file extension so that files can be created from it Returns: deFalse on failure, deTrue on success Parameters:
  extension | a file extension in the form "bmp". The extension cannot contain dots
  maker | a pointer to a function that will return an instance of the class associated with the extension
Implements IdeResourceManager.

deBoolean deResourceManager::RemoveAllResources | ( | void |  | ) | `[virtual]`

| Will remove all the objects from the internal database. Implements IdeResourceManager.

deBoolean deResourceManager::RemoveResource | ( | IdeResourceBase * | rsc | ) | `[virtual]`

  | Removes a resource from the internal database Parameters:
  resource | a valid pointer to an object to remove
Implements IdeResourceManager.

u32 deResourceManager::ThreadedLoadHandler | ( | void * | param | ) | `[static, private]`

## Member Data Documentation

IdeThreadLock* deResourceManager::m_GlobalLockObj`[private]`

deTHashString<LoadingResource_t> deResourceManager::m_LoadingResources`[private]`

IdeThreadLock* deResourceManager::m_LoadLockObj`[private]`

deTHashString<deResourceMakerCB> deResourceManager::m_RegisteredTypes`[private]`

deTHashString<deTHashString <deResource>*> deResourceManager::m_Resources`[private]`

long deResourceManager::m_UniqueTypes`[private]`

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

- deResourceManager.hpp
- deResourceManager.cpp