Drag[en]gine Game Engine  1.0
deResourceManager Class Referenceabstract

Base resource manager class. More...

#include <deResourceManager.h>

Inheritance diagram for deResourceManager:
deAIManager deAnimatorInstanceManager deAnimatorManager deBillboardManager deCameraManager deCanvasManager deCaptureCanvasManager deColliderManager deComponentManager deConnectionManager deDebugDrawerManager deDecalManager deDynamicSkinManager deEffectManager deEnvMapProbeManager deFileResourceManager deForceFieldManager deHeightTerrainManager deLightManager deLocomotionManager deLumimeterManager deMicrophoneManager deNavigationBlockerManager deNavigationSpaceManager deNavigatorManager deNetworkStateManager deParticleEmitterInstanceManager deParticleEmitterManager dePropFieldManager deRenderWindowManager deServerManager deSkyManager deSmokeEmitterManager deSpeakerManager deSynthesizerInstanceManager deSynthesizerManager deTouchSensorManager deVideoPlayerManager deWorldManager

Public Types

enum  eResourceType {
  ertAI, ertAnimation, ertAnimator, ertAnimatorInstance,
  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, ertSmokeEmitter,
  ertSound, ertSpeaker, ertSynthesizer, ertSynthesizerInstance,
  ertTouchSensor, ertVideo, ertVideoPlayer, ertWorld
}
 Possible type of a resource manager. More...
 

Public Member Functions

Constructors and Destructors
 deResourceManager (deEngine *engine, eResourceType type)
 Create resource manager. More...
 
virtual ~deResourceManager ()
 Clean up resource manager. More...
 
Management
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...
 
Quick System Access

Shortcuts for retrieving various systems from the linked game engine.

deModuleSystemGetModuleSystem () const
 
deGraphicSystemGetGraphicSystem () const
 
dePhysicsSystemGetPhysicsSystem () const
 
deAnimatorSystemGetAnimatorSystem () const
 
deSynthesizerSystemGetSynthesizerSystem () const
 
deAISystemGetAISystem () const
 
deAudioSystemGetAudioSystem () const
 
deNetworkSystemGetNetworkSystem () const
 
deScriptingSystemGetScriptingSystem () const
 
deImageManagerGetImageManager () const
 
deVideoManagerGetVideoManager () const
 
deSkinManagerGetSkinManager () const
 
System Peer Support
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...
 
Debugging
void LogInfo (const char *message)
 Outputs an information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Outputs a formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Outputs a formated information message on the console. More...
 
void LogWarn (const char *message)
 Outputs a warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Outputs a formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Outputs a formated warning message on the console. More...
 
void LogError (const char *message)
 Outputs an error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Outputs a formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Outputs a formated error message on the console. More...
 
void LogException (const deException &exception)
 Outputs an exception as error message on the console. More...
 
Resource only Functions
Warning
For use by deResource only.
virtual void RemoveResource (deResource *resource)=0
 Removes the given resource from the manager without freeing it. More...
 

Detailed Description

Base 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.

Member Enumeration Documentation

◆ eResourceType

Possible type of a resource manager.

Enumerator
ertAI 

AI resource.

ertAnimation 

Animation resource.

ertAnimator 

Animator resource.

ertAnimatorInstance 

Animator instance resource.

ertBillboard 

Billboard resource.

ertCanvas 

Canvas resource.

ertCamera 

Scene Camera resource.

ertCaptureCanvas 

Capture canvas resource.

ertCollider 

World Collider resource.

ertComponent 

Component resource.

ertConnection 

Connection resource.

ertDecal 

Decal resource.

ertDebugDrawer 

Debug Drawer resource.

ertDynamicSkin 

Dynamic Skin resource.

ertEffect 

Effect resource.

ertEnvMapProbe 

Environment map probe resource.

ertFont 

Font resource.

ertForceField 

Force Field resource.

ertGraphicContext 

Graphic Context resource.

ertHeightTerrain 

Height Terrain resource.

ertImage 

Image resource.

ertLanguagePack 

Language Pack resource.

ertLight 

Scene Light resource.

ertLocomotion 

Locomotion resource.

ertLumimeter 

Lumimeter resource.

ertMicrophone 

Microphone resource.

ertModel 

Model resource.

ertNavigationBlocker 

Navigation blocker.

ertNavigationSpace 

Navigation space resource.

ertNavigator 

Navigator resource.

ertNetworkState 

Network state resource.

ertOccluder 

Occluder resource.

ertOcclusionMesh 

Occlusion mesh resource.

ertParticleEmitter 

Particle Emitter resource.

ertParticleEmitterInstance 

Particle emitter instance resource.

ertPropField 

Prop Field resource.

ertRenderTarget 

Render Target resource.

ertRenderWindow 

Render Window resource.

ertRig 

Rig resource.

ertScene 

Scene resource.

ertServer 

Server resource.

ertSkin 

Skin resource.

ertSky 

Scene Sky resource.

ertSmokeEmitter 

Smoke Emitter resource.

ertSound 

Sound resource.

ertSpeaker 

Speaker resource.

ertSynthesizer 

Synthesizer resource.

ertSynthesizerInstance 

Synthesizer instance resource.

ertTouchSensor 

Touch Sensor resource.

ertVideo 

Video resource.

ertVideoPlayer 

Video player resource.

ertWorld 

World resource.

Constructor & Destructor Documentation

◆ deResourceManager()

deResourceManager::deResourceManager ( deEngine engine,
eResourceType  type 
)

Create resource manager.

◆ ~deResourceManager()

virtual deResourceManager::~deResourceManager ( )
virtual

Clean up resource manager.

Member Function Documentation

◆ GetAISystem()

deAISystem* deResourceManager::GetAISystem ( ) const

Referenced by GetLoggingName().

◆ GetAnimatorSystem()

deAnimatorSystem* deResourceManager::GetAnimatorSystem ( ) const

Referenced by GetLoggingName().

◆ GetAudioSystem()

deAudioSystem* deResourceManager::GetAudioSystem ( ) const

Referenced by GetLoggingName().

◆ GetEngine()

deEngine* deResourceManager::GetEngine ( ) const
inline

Game engine.

◆ GetGraphicSystem()

deGraphicSystem* deResourceManager::GetGraphicSystem ( ) const

Referenced by GetLoggingName().

◆ GetImageManager()

deImageManager* deResourceManager::GetImageManager ( ) const

Referenced by GetLoggingName().

◆ GetLoggingName()

◆ GetModuleSystem()

deModuleSystem* deResourceManager::GetModuleSystem ( ) const

Referenced by GetLoggingName().

◆ GetNetworkSystem()

deNetworkSystem* deResourceManager::GetNetworkSystem ( ) const

Referenced by GetLoggingName().

◆ GetPhysicsSystem()

dePhysicsSystem* deResourceManager::GetPhysicsSystem ( ) const

Referenced by GetLoggingName().

◆ GetResourceType()

int deResourceManager::GetResourceType ( ) const
inline

Resources type stored in this manager.

◆ GetScriptingSystem()

deScriptingSystem* deResourceManager::GetScriptingSystem ( ) const

Referenced by GetLoggingName().

◆ GetSkinManager()

deSkinManager* deResourceManager::GetSkinManager ( ) const

Referenced by GetLoggingName().

◆ GetSynthesizerSystem()

deSynthesizerSystem* deResourceManager::GetSynthesizerSystem ( ) const

Referenced by GetLoggingName().

◆ GetVideoManager()

deVideoManager* deResourceManager::GetVideoManager ( ) const

Referenced by GetLoggingName().

◆ LogError()

void deResourceManager::LogError ( const char *  message)

Outputs an error message on the console.

Referenced by GetLoggingName().

◆ LogErrorFormat()

void deResourceManager::LogErrorFormat ( const char *  message,
  ... 
)

Outputs a formated error message on the console.

Referenced by GetLoggingName().

◆ LogErrorFormatUsing()

void deResourceManager::LogErrorFormatUsing ( const char *  message,
va_list  args 
)

Outputs a formated error message on the console.

Referenced by GetLoggingName().

◆ LogException()

void deResourceManager::LogException ( const deException exception)

Outputs an exception as error message on the console.

Referenced by GetLoggingName().

◆ LogInfo()

void deResourceManager::LogInfo ( const char *  message)

Outputs an information message on the console.

Referenced by GetLoggingName().

◆ LogInfoFormat()

void deResourceManager::LogInfoFormat ( const char *  message,
  ... 
)

Outputs a formated information message on the console.

Referenced by GetLoggingName().

◆ LogInfoFormatUsing()

void deResourceManager::LogInfoFormatUsing ( const char *  message,
va_list  args 
)

Outputs a formated information message on the console.

Referenced by GetLoggingName().

◆ LogWarn()

void deResourceManager::LogWarn ( const char *  message)

Outputs a warning message on the console.

Referenced by GetLoggingName().

◆ LogWarnFormat()

void deResourceManager::LogWarnFormat ( const char *  message,
  ... 
)

Outputs a formated warning message on the console.

Referenced by GetLoggingName().

◆ LogWarnFormatUsing()

void deResourceManager::LogWarnFormatUsing ( const char *  message,
va_list  args 
)

Outputs a formated warning message on the console.

Referenced by GetLoggingName().

◆ ReleaseLeakingResources()

◆ RemoveResource()

◆ SetLoggingName()

void deResourceManager::SetLoggingName ( const char *  name)

Set name to use as the source for this module for logging.

Referenced by GetLoggingName().

◆ SystemAILoad()

virtual void deResourceManager::SystemAILoad ( )
virtual

AI System Peers of all stored resources have to be created.

Reimplemented in deWorldManager, deHeightTerrainManager, deLocomotionManager, deAIManager, deNavigationBlockerManager, deNavigatorManager, and deNavigationSpaceManager.

Referenced by GetLoggingName().

◆ SystemAIUnload()

virtual void deResourceManager::SystemAIUnload ( )
virtual

AI System Peers of all stored resources have to be freed.

Reimplemented in deWorldManager, deHeightTerrainManager, deLocomotionManager, deAIManager, deNavigationBlockerManager, deNavigatorManager, and deNavigationSpaceManager.

Referenced by GetLoggingName().

◆ SystemAnimatorLoad()

virtual void deResourceManager::SystemAnimatorLoad ( )
virtual

Animator System Peers of all stored resources have to be created.

Reimplemented in deAnimationManager, deComponentManager, deAnimatorManager, and deAnimatorInstanceManager.

Referenced by GetLoggingName().

◆ SystemAnimatorUnload()

virtual void deResourceManager::SystemAnimatorUnload ( )
virtual

Animator System Peers of all stored resources have to be freed.

Reimplemented in deAnimationManager, deComponentManager, deAnimatorManager, and deAnimatorInstanceManager.

Referenced by GetLoggingName().

◆ SystemAudioLoad()

virtual void deResourceManager::SystemAudioLoad ( )
virtual

Audio System Peers of all stored resources have to be created.

Reimplemented in deSkinManager, deModelManager, deSoundManager, deWorldManager, deDecalManager, deComponentManager, deMicrophoneManager, and deSpeakerManager.

Referenced by GetLoggingName().

◆ SystemAudioUnload()

virtual void deResourceManager::SystemAudioUnload ( )
virtual

Audio System Peers of all stored resources have to be freed.

Reimplemented in deSkinManager, deModelManager, deSoundManager, deWorldManager, deDecalManager, deComponentManager, deMicrophoneManager, and deSpeakerManager.

Referenced by GetLoggingName().

◆ SystemGraphicLoad()

◆ SystemGraphicUnload()

◆ SystemNetworkLoad()

virtual void deResourceManager::SystemNetworkLoad ( )
virtual

Network System Peers of all stored resources have to be created.

Reimplemented in deWorldManager, deConnectionManager, deNetworkStateManager, and deServerManager.

Referenced by GetLoggingName().

◆ SystemNetworkUnload()

virtual void deResourceManager::SystemNetworkUnload ( )
virtual

Network System Peers of all stored resources have to be freed.

Reimplemented in deWorldManager, deConnectionManager, deNetworkStateManager, and deServerManager.

Referenced by GetLoggingName().

◆ SystemPhysicsLoad()

virtual void deResourceManager::SystemPhysicsLoad ( )
virtual

◆ SystemPhysicsUnload()

virtual void deResourceManager::SystemPhysicsUnload ( )
virtual

◆ SystemScriptingLoad()

virtual void deResourceManager::SystemScriptingLoad ( )
virtual

Scripting System Peers of all stored resources have to be created.

Reimplemented in dePropFieldManager, deColliderManager, deParticleEmitterInstanceManager, deTouchSensorManager, deConnectionManager, deNetworkStateManager, deServerManager, and deAIManager.

Referenced by GetLoggingName().

◆ SystemScriptingUnload()

virtual void deResourceManager::SystemScriptingUnload ( )
virtual

Scripting System Peers of all stored resources have to be freed.

Reimplemented in dePropFieldManager, deColliderManager, deParticleEmitterInstanceManager, deTouchSensorManager, deConnectionManager, deNetworkStateManager, deServerManager, and deAIManager.

Referenced by GetLoggingName().

◆ SystemSynthesizerLoad()

virtual void deResourceManager::SystemSynthesizerLoad ( )
virtual

Synthesizer system peers of all stored resources have to be created.

Reimplemented in deSoundManager, deSynthesizerInstanceManager, and deSynthesizerManager.

Referenced by GetLoggingName().

◆ SystemSynthesizerUnload()

virtual void deResourceManager::SystemSynthesizerUnload ( )
virtual

Synthesizer system peers of all stored resources have to be freed.

Reimplemented in deSoundManager, deSynthesizerInstanceManager, and deSynthesizerManager.

Referenced by GetLoggingName().


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