Public Types

deResourceManager Class Reference

Base Resource Manager Class. More...

#include <deResourceManager.h>

Inheritance diagram for deResourceManager:
deAIManager deAnimatorManager deBillboardManager deCameraManager deColliderManager deComponentManager deConnectionManager deDebugDrawerManager deDecalManager deDynamicSkinManager deEffectManager deFileResourceManager deForceFieldManager deGraphicContextManager deHeightTerrainManager deLightManager deLumimeterManager deMicrophoneManager deNetworkStateManager deOccluderManager deParticleEmitterManager dePortalSystemManager dePropFieldManager deRenderTargetManager deRenderWindowManager deServerManager deSkyManager deSmokeEmitterManager deSpeakerManager deTouchSensorManager deVideoPlayerManager deWorldManager

List of all members.

Public Types

enum  eResourceType {
  ertAI, ertAnimation, ertAnimator, ertBillboard,
  ertCamera, ertCollider, ertComponent, ertConnection,
  ertDecal, ertDebugDrawer, ertDynamicSkin, ertEffect,
  ertFont, ertForceField, ertGraphicContext, ertHeightTerrain,
  ertImage, ertLanguagePack, ertLight, ertLumimeter,
  ertMicrophone, ertModel, ertNetworkState, ertOccluder,
  ertParticleEmitter, ertPortalSystem, ertPropField, ertRenderTarget,
  ertRenderWindow, ertRig, ertScene, ertServer,
  ertSkin, ertSky, ertSmokeEmitter, ertSound,
  ertSpeaker, ertTouchSensor, ertVideo, ertVideoPlayer,
  ertWorld, ertCount
}
 

Possible type of a resource manager.

More...

Public Member Functions

Constructors and Destructors
 deResourceManager (deEngine *engine, int type)
 Creates a new resource manager linked to the given engine with the given type.
virtual ~deResourceManager ()
 Cleans up the resource manager.
Management
deEngineGetEngine () const
 Retrieves the linked engine.
int GetResourceType () const
 Retrieves the type of resources stored in this manager.
const decStringGetLoggingName () const
 Retrieves the name to use as the source for this module for logging.
void SetLoggingName (const char *name)
 Sets the name to use as the source for this module for logging.
Quick System Access

Shortcuts for retrieving various systems from the linked game engine.

deModuleSystemGetModuleSystem () const
deGraphicSystemGetGraphicSystem () const
dePhysicsSystemGetPhysicsSystem () const
deAnimatorSystemGetAnimatorSystem () const
deAISystemGetAISystem () const
deAudioSystemGetAudioSystem () const
deNetworkSystemGetNetworkSystem () const
deScriptingSystemGetScriptingSystem () const
deImageManagerGetImageManager () const
deSkinManagerGetSkinManager () const
System Peer Support
virtual void SystemGraphicLoad ()
 Graphic System Peers of all stored resources have to be created.
virtual void SystemGraphicUnload ()
 Graphic System Peers of all stored resources have to be freed.
virtual void SystemPhysicsLoad ()
 Physics System Peers of all stored resources have to be created.
virtual void SystemPhysicsUnload ()
 Physics System Peers of all stored resources have to be freed.
virtual void SystemScriptingLoad ()
 Scripting System Peers of all stored resources have to be created.
virtual void SystemScriptingUnload ()
 Scripting System Peers of all stored resources have to be freed.
virtual void SystemAnimatorLoad ()
 Animator System Peers of all stored resources have to be created.
virtual void SystemAnimatorUnload ()
 Animator System Peers of all stored resources have to be freed.
virtual void SystemAudioLoad ()
 Audio System Peers of all stored resources have to be created.
virtual void SystemAudioUnload ()
 Audio System Peers of all stored resources have to be freed.
virtual void SystemNetworkLoad ()
 Network System Peers of all stored resources have to be created.
virtual void SystemNetworkUnload ()
 Network System Peers of all stored resources have to be freed.
virtual void SystemAILoad ()
 AI System Peers of all stored resources have to be created.
virtual void SystemAIUnload ()
 AI System Peers of all stored resources have to be freed.
Debugging
void LogInfo (const char *message)
 Outputs an information message on the console.
void LogInfoFormat (const char *message,...)
 Outputs a formated information message on the console.
void LogInfoFormatUsing (const char *message, va_list args)
 Outputs a formated information message on the console.
void LogWarn (const char *message)
 Outputs a warning message on the console.
void LogWarnFormat (const char *message,...)
 Outputs a formated warning message on the console.
void LogWarnFormatUsing (const char *message, va_list args)
 Outputs a formated warning message on the console.
void LogError (const char *message)
 Outputs an error message on the console.
void LogErrorFormat (const char *message,...)
 Outputs a formated error message on the console.
void LogErrorFormatUsing (const char *message, va_list args)
 Outputs a formated error message on the console.
void LogException (const duException &exception)
 Outputs an exception as error message on the console.
Resource only Functions

Those functions are only for resource objects and should never be called directly from an application.

virtual void RemoveResource (deResource *resource)=0
 Removes the given resource from the manager without freeing it.

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.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Member Enumeration Documentation

Possible type of a resource manager.

Enumerator:
ertAI 

AI resource.

ertAnimation 

Animation resource.

ertAnimator 

Animator resource.

ertBillboard 

Billboard resource.

ertCamera 

Scene Camera 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.

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.

ertLumimeter 

Lumimeter resource.

ertMicrophone 

Microphone resource.

ertModel 

Model resource.

ertNetworkState 

Network state resource.

ertOccluder 

Occluder resource.

ertParticleEmitter 

Particle Emitter resource.

ertPortalSystem 

Portal system 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.

ertTouchSensor 

Touch Sensor resource.

ertVideo 

Video resource.

ertVideoPlayer 

Video player resource.

ertWorld 

World resource.

ertCount 

Dummy entry defining the number of types.


Constructor & Destructor Documentation

deResourceManager::deResourceManager ( deEngine engine,
int  type 
)

Creates a new resource manager linked to the given engine with the given type.

Parameters:
engineEngine to link to
typeValue from eResourceType indicating the type of resources stored in this manager
virtual deResourceManager::~deResourceManager (  ) [virtual]

Cleans up the resource manager.


Member Function Documentation

deAISystem* deResourceManager::GetAISystem (  ) const
deAnimatorSystem* deResourceManager::GetAnimatorSystem (  ) const
deAudioSystem* deResourceManager::GetAudioSystem (  ) const
deEngine* deResourceManager::GetEngine (  ) const [inline]

Retrieves the linked engine.

deGraphicSystem* deResourceManager::GetGraphicSystem (  ) const
deImageManager* deResourceManager::GetImageManager (  ) const
const decString& deResourceManager::GetLoggingName (  ) const [inline]

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

deModuleSystem* deResourceManager::GetModuleSystem (  ) const
deNetworkSystem* deResourceManager::GetNetworkSystem (  ) const
dePhysicsSystem* deResourceManager::GetPhysicsSystem (  ) const
int deResourceManager::GetResourceType (  ) const [inline]

Retrieves the type of resources stored in this manager.

deScriptingSystem* deResourceManager::GetScriptingSystem (  ) const
deSkinManager* deResourceManager::GetSkinManager (  ) const
void deResourceManager::LogError ( const char *  message )

Outputs an error message on the console.

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

Outputs a formated error message on the console.

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

Outputs a formated error message on the console.

void deResourceManager::LogException ( const duException exception )

Outputs an exception as error message on the console.

void deResourceManager::LogInfo ( const char *  message )

Outputs an information message on the console.

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

Outputs a formated information message on the console.

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

Outputs a formated information message on the console.

void deResourceManager::LogWarn ( const char *  message )

Outputs a warning message on the console.

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

Outputs a formated warning message on the console.

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

Outputs a formated warning message on the console.

virtual void deResourceManager::RemoveResource ( deResource resource ) [pure virtual]
void deResourceManager::SetLoggingName ( const char *  name )

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

virtual void deResourceManager::SystemAILoad (  ) [virtual]

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

Reimplemented in deAIManager.

virtual void deResourceManager::SystemAIUnload (  ) [virtual]

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

Reimplemented in deAIManager.

virtual void deResourceManager::SystemAnimatorLoad (  ) [virtual]

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

Reimplemented in deAnimatorManager.

virtual void deResourceManager::SystemAnimatorUnload (  ) [virtual]

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

Reimplemented in deAnimatorManager.

virtual void deResourceManager::SystemAudioLoad (  ) [virtual]

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

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

virtual void deResourceManager::SystemAudioUnload (  ) [virtual]

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

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

virtual void deResourceManager::SystemGraphicLoad (  ) [virtual]
virtual void deResourceManager::SystemGraphicUnload (  ) [virtual]
virtual void deResourceManager::SystemNetworkLoad (  ) [virtual]

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

Reimplemented in deConnectionManager, deNetworkStateManager, deServerManager, and deWorldManager.

virtual void deResourceManager::SystemNetworkUnload (  ) [virtual]

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

Reimplemented in deConnectionManager, deNetworkStateManager, deServerManager, and deWorldManager.

virtual void deResourceManager::SystemPhysicsLoad (  ) [virtual]
virtual void deResourceManager::SystemPhysicsUnload (  ) [virtual]
virtual void deResourceManager::SystemScriptingLoad (  ) [virtual]
virtual void deResourceManager::SystemScriptingUnload (  ) [virtual]

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