Drag[en]gine Game Engine  1.21
deFileResourceManager Class Reference

Base File Resource Manager Class. More...

#include <deFileResourceManager.h>

Inheritance diagram for deFileResourceManager:
deResourceManager deAnimationManager deArchiveManager deFontManager deImageManager deLanguagePackManager deModelManager deOcclusionMeshManager deRigManager deSkinManager deSoundManager deVideoManager

Public Member Functions

Constructors and Destructors
 deFileResourceManager (deEngine *engine, eResourceType type)
 Create file resource manager. More...
 
virtual ~deFileResourceManager ()
 Clean up resource manager. More...
 
Management
bool FindFileForReading (decPath &path, const deVirtualFileSystem &vfs, const char *filename, const char *basePath) const
 Path to file relative to base path. More...
 
decBaseFileReaderOpenFileForReading (const deVirtualFileSystem &vfs, const char *filename) const
 Open file for reading using. More...
 
decBaseFileWriterOpenFileForWriting (const deVirtualFileSystem &vfs, const char *filename) const
 Open file for writing using. More...
 
- Public Member Functions inherited from deResourceManager
 deResourceManager (deEngine *engine, eResourceType type)
 Create resource manager. More...
 
virtual ~deResourceManager ()
 Clean up resource manager. More...
 
deEngineGetEngine () const
 Game engine. More...
 
int GetResourceType () const
 Resources type stored in this manager. More...
 
const decStringGetLoggingName () const
 Name to use as the source for this module for logging. More...
 
void SetLoggingName (const char *name)
 Set name to use as the source for this module for logging. More...
 
virtual void ReleaseLeakingResources ()
 Release leaking resource and report them. More...
 
deModuleSystemGetModuleSystem () const
 
deGraphicSystemGetGraphicSystem () const
 
dePhysicsSystemGetPhysicsSystem () const
 
deAnimatorSystemGetAnimatorSystem () const
 
deSynthesizerSystemGetSynthesizerSystem () const
 
deAISystemGetAISystem () const
 
deAudioSystemGetAudioSystem () const
 
deNetworkSystemGetNetworkSystem () const
 
deScriptingSystemGetScriptingSystem () const
 
deImageManagerGetImageManager () const
 
deVideoManagerGetVideoManager () const
 
deSkinManagerGetSkinManager () const
 
virtual void SystemGraphicLoad ()
 Graphic System Peers of all stored resources have to be created. More...
 
virtual void SystemGraphicUnload ()
 Graphic System Peers of all stored resources have to be freed. More...
 
virtual void SystemPhysicsLoad ()
 Physics System Peers of all stored resources have to be created. More...
 
virtual void SystemPhysicsUnload ()
 Physics System Peers of all stored resources have to be freed. More...
 
virtual void SystemScriptingLoad ()
 Scripting System Peers of all stored resources have to be created. More...
 
virtual void SystemScriptingUnload ()
 Scripting System Peers of all stored resources have to be freed. More...
 
virtual void SystemAnimatorLoad ()
 Animator System Peers of all stored resources have to be created. More...
 
virtual void SystemAnimatorUnload ()
 Animator System Peers of all stored resources have to be freed. More...
 
virtual void SystemAudioLoad ()
 Audio System Peers of all stored resources have to be created. More...
 
virtual void SystemAudioUnload ()
 Audio System Peers of all stored resources have to be freed. More...
 
virtual void SystemNetworkLoad ()
 Network System Peers of all stored resources have to be created. More...
 
virtual void SystemNetworkUnload ()
 Network System Peers of all stored resources have to be freed. More...
 
virtual void SystemAILoad ()
 AI System Peers of all stored resources have to be created. More...
 
virtual void SystemAIUnload ()
 AI System Peers of all stored resources have to be freed. More...
 
virtual void SystemSynthesizerLoad ()
 Synthesizer system peers of all stored resources have to be created. More...
 
virtual void SystemSynthesizerUnload ()
 Synthesizer system peers of all stored resources have to be freed. More...
 
void LogInfo (const char *message)
 Output information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Output formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Output formated information message on the console. More...
 
void LogWarn (const char *message)
 Output warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Output formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Output formated warning message on the console. More...
 
void LogError (const char *message)
 Output error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Output formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Output formated error message on the console. More...
 
void LogException (const deException &exception)
 Output exception as error message on the console. More...
 
virtual void RemoveResource (deResource *resource)=0
 Removes the given resource from the manager without freeing it. More...
 

Additional Inherited Members

- Public Types inherited from deResourceManager
enum  eResourceType {
  ertAnimation , ertAnimator , ertAnimatorInstance , ertArchive ,
  ertBillboard , ertCanvas , ertCamera , ertCaptureCanvas ,
  ertCollider , ertComponent , ertConnection , ertDecal ,
  ertDebugDrawer , ertDynamicSkin , ertEffect , ertEnvMapProbe ,
  ertFont , ertForceField , ertGraphicContext , ertHeightTerrain ,
  ertImage , ertLanguagePack , ertLight , ertLocomotion ,
  ertLumimeter , ertMicrophone , ertModel , ertNavigationBlocker ,
  ertNavigationSpace , ertNavigator , ertNetworkState , ertOccluder ,
  ertOcclusionMesh , ertParticleEmitter , ertParticleEmitterInstance , ertPropField ,
  ertRenderTarget , ertRenderWindow , ertRig , ertScene ,
  ertServer , ertSkin , ertSky , ertSkyInstance ,
  ertSmokeEmitter , ertSound , ertSoundLevelMeter , ertSpeaker ,
  ertSynthesizer , ertSynthesizerInstance , ertTouchSensor , ertVideo ,
  ertVideoPlayer , ertWorld
}
 Possible type of a resource manager. More...
 

Detailed Description

Base File Resource Manager Class.

Provides basic support for resource managers. The actual management of resource the subclass should implement using the resource list class provided (although you are free to do differently if you really know what you are doing). The RemoveResource function is protected and has to be used only by a deResource derived object to notify the resource manager that this object has to be freed from memory. Do not do any reference counting inside the subclass. If a resource is ready to be freed it will tell you by calling RemoveResource.

Constructor & Destructor Documentation

◆ deFileResourceManager()

deFileResourceManager::deFileResourceManager ( deEngine engine,
eResourceType  type 
)

Create file resource manager.

◆ ~deFileResourceManager()

virtual deFileResourceManager::~deFileResourceManager ( )
virtual

Clean up resource manager.

Member Function Documentation

◆ FindFileForReading()

bool deFileResourceManager::FindFileForReading ( decPath path,
const deVirtualFileSystem vfs,
const char *  filename,
const char *  basePath 
) const

Path to file relative to base path.

Returns
true if found and path has been set otherwise false.

◆ OpenFileForReading()

decBaseFileReader* deFileResourceManager::OpenFileForReading ( const deVirtualFileSystem vfs,
const char *  filename 
) const

Open file for reading using.

◆ OpenFileForWriting()

decBaseFileWriter* deFileResourceManager::OpenFileForWriting ( const deVirtualFileSystem vfs,
const char *  filename 
) const

Open file for writing using.


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