ResourceManager Class Reference

#include <resourceManager.h>

List of all members.

Public Types

typedef Signal< void(ResourceBase::Signature
sig, ResourceBase &, const
Torque::Path &)> 
FileChangedSignal

Public Member Functions

ResourceBase load (const Path &path)
ResourceBase find (const Path &path)
ResourceBase startResourceList (ResourceBase::Signature inSignature=U32_MAX)
ResourceBase nextResource ()
FileChangedSignalgetFileChangedSignal ()
 Registering with this signal will give an opportunity to handle a change to the resource on disk.
void dumpToConsole ()

Static Public Member Functions

static ResourceManagerget ()

Private Types

typedef HashTable< String,
ResourceBase::Header * > 
ResourceHeaderMap

Private Member Functions

 ResourceManager ()
bool remove (const Path &path)
void notifiedFileChanged (const Path &path)

Private Attributes

ResourceHeaderMap mResourceHeaderMap
ResourceHeaderMap::Iterator mIter
U32 mIterSigFilter
FileChangedSignal mFileChanged

Static Private Attributes

static ResourceManagersmInstance

Friends

class ResourceBase::Header


Member Typedef Documentation


Constructor & Destructor Documentation

ResourceManager::ResourceManager (  )  [private]


Member Function Documentation

static ResourceManager& ResourceManager::get (  )  [static]

ResourceBase ResourceManager::load ( const Path path  ) 

ResourceBase ResourceManager::find ( const Path path  ) 

ResourceBase ResourceManager::startResourceList ( ResourceBase::Signature  inSignature = U32_MAX  ) 

ResourceBase ResourceManager::nextResource (  ) 

FileChangedSignal& ResourceManager::getFileChangedSignal (  )  [inline]

Registering with this signal will give an opportunity to handle a change to the resource on disk.

For example, if a PNG file is edited by the artist and saved the ResourceManager will signal that the file has changed so the TextureManager may act appropriately - which probably means to re-init the materials using that PNG. The signal passes the Resource's signature so the callee may filter these.

void ResourceManager::dumpToConsole (  ) 

bool ResourceManager::remove ( const Path path  )  [private]

void ResourceManager::notifiedFileChanged ( const Path path  )  [private]


Friends And Related Function Documentation

friend class ResourceBase::Header [friend]


Member Data Documentation