Drag[en]gine Game Engine  1.0
deBaseSystem Class Reference

Base System Class. More...

#include <deBaseSystem.h>

Inheritance diagram for deBaseSystem:
deAISystem deAnimatorSystem deAudioSystem deCrashRecoverySystem deGraphicSystem deInputSystem deNetworkSystem dePhysicsSystem deScriptingSystem deSynthesizerSystem

Public Member Functions

Constructors and Destructors
 deBaseSystem (deEngine *engine, const char *systemName, int requiredModuleType)
 
virtual ~deBaseSystem ()
 
Management
deEngineGetEngine () const
 
deLoadableModuleGetActiveLoadableModule () const
 
bool GetIsRunning () const
 
bool GetHasFailed () const
 
const char * GetSystemName () const
 
virtual bool CanStart ()
 
void SetHasFailed (bool hasFailed)
 
virtual void Start ()
 
virtual void Stop ()
 
void CheckAndActivateFirst (deModuleSystem::eModuleTypes type)
 
Overloadables
virtual void SetActiveModule (deLoadableModule *module)
 
virtual void ClearPermanents ()
 
virtual void PostStart ()
 
virtual void PreStop ()
 
Debugging
void LogInfo (const char *message)
 
void LogInfoFormat (const char *message,...)
 
void LogInfoFormatUsing (const char *message, va_list args)
 
void LogWarn (const char *message)
 
void LogWarnFormat (const char *message,...)
 
void LogWarnFormatUsing (const char *message, va_list args)
 
void LogError (const char *message)
 
void LogErrorFormat (const char *message,...)
 
void LogErrorFormatUsing (const char *message, va_list args)
 
void LogException (const deException &exception)
 

Detailed Description

Base System Class.

A system describes the behaviour and capabilities of a well defined group of operations belonging to a specific set of tasks. There exist two kinds of systems. The modules itself are handled by an external class but each system also contains a list of modules usable with that system. Except the scripting system all can be shut down and restarted during engine-break time.

Single Type Systems
This kind of systems can have only one module of their kind running at the same time. This class provides the base for those kind of systems. Those systems are also the only ones who can provide peer objects for certain engine objects. Single type systems can also be shut down and restarted during engine-break scenarios. The module used by each system is defined at the beginning of execution and can be changed during engine-break time.
Multiple Type Systems
This kind of systems can have multiple modules running at the same time. The deResourceManager class provides the base for systems of that kind. Those system can not provide peer objects to engine objects. This kind of systems is used for loading and saving file formats. The modules used by those systems can be shut down and restarted individually during engine-break time. What modules are used depends on the file type to handle.
Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deBaseSystem()

deBaseSystem::deBaseSystem ( deEngine engine,
const char *  systemName,
int  requiredModuleType 
)

Creates a new base system linked to the given engine.

◆ ~deBaseSystem()

virtual deBaseSystem::~deBaseSystem ( )
virtual

Cleans up the base system.

Member Function Documentation

◆ CanStart()

virtual bool deBaseSystem::CanStart ( )
virtual

Determines if the system can be started up or not. A system is considered to be startable if an active module has been selected and it is loaded.

Referenced by GetSystemName().

◆ CheckAndActivateFirst()

void deBaseSystem::CheckAndActivateFirst ( deModuleSystem::eModuleTypes  type)

Checks if there is at least one working module and select the first one.

Referenced by GetSystemName().

◆ ClearPermanents()

virtual void deBaseSystem::ClearPermanents ( )
virtual

Clears cross references and links that could lead to memory leaks. Do not forget to call the super function.

Reimplemented in deGraphicSystem, deScriptingSystem, dePhysicsSystem, deAudioSystem, deAISystem, deInputSystem, deNetworkSystem, deAnimatorSystem, deSynthesizerSystem, and deCrashRecoverySystem.

Referenced by GetSystemName().

◆ GetActiveLoadableModule()

deLoadableModule* deBaseSystem::GetActiveLoadableModule ( ) const
inline

Retrieves the active loadable module.

◆ GetEngine()

deEngine* deBaseSystem::GetEngine ( ) const
inline

Retrieves the linked game engine.

◆ GetHasFailed()

bool deBaseSystem::GetHasFailed ( ) const
inline

Determines if the system has failed during runtime.

◆ GetIsRunning()

bool deBaseSystem::GetIsRunning ( ) const
inline

Determines if the system is running.

◆ GetSystemName()

◆ LogError()

void deBaseSystem::LogError ( const char *  message)

Outputs an error message on the console.

Referenced by GetSystemName().

◆ LogErrorFormat()

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

Outputs a formated error message on the console.

Referenced by GetSystemName().

◆ LogErrorFormatUsing()

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

Outputs a formated error message on the console.

Referenced by GetSystemName().

◆ LogException()

void deBaseSystem::LogException ( const deException exception)

Outputs an exception as error message on the console.

Referenced by GetSystemName().

◆ LogInfo()

void deBaseSystem::LogInfo ( const char *  message)

Outputs an information message on the console.

Referenced by GetSystemName().

◆ LogInfoFormat()

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

Outputs a formated information message on the console.

Referenced by GetSystemName().

◆ LogInfoFormatUsing()

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

Outputs a formated information message on the console.

Referenced by GetSystemName().

◆ LogWarn()

void deBaseSystem::LogWarn ( const char *  message)

Outputs a warning message on the console.

Referenced by GetSystemName().

◆ LogWarnFormat()

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

Outputs a formated warning message on the console.

Referenced by GetSystemName().

◆ LogWarnFormatUsing()

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

Outputs a formated warning message on the console.

Referenced by GetSystemName().

◆ PostStart()

virtual void deBaseSystem::PostStart ( )
virtual

Carry out here actions right after the system started up.

Reimplemented in deGraphicSystem, deScriptingSystem, dePhysicsSystem, deAudioSystem, deAISystem, deInputSystem, deNetworkSystem, deAnimatorSystem, deSynthesizerSystem, and deCrashRecoverySystem.

Referenced by GetSystemName().

◆ PreStop()

virtual void deBaseSystem::PreStop ( )
virtual

Carry out here actions right before the system shuts down.

Reimplemented in deGraphicSystem, deScriptingSystem, dePhysicsSystem, deAudioSystem, deAISystem, deInputSystem, deNetworkSystem, deAnimatorSystem, deSynthesizerSystem, and deCrashRecoverySystem.

Referenced by GetSystemName().

◆ SetActiveModule()

virtual void deBaseSystem::SetActiveModule ( deLoadableModule module)
virtual

Sets the active loadable module. Do not forget to call the super function.

Reimplemented in deGraphicSystem, deScriptingSystem, dePhysicsSystem, deAudioSystem, deAISystem, deInputSystem, deNetworkSystem, deAnimatorSystem, deSynthesizerSystem, and deCrashRecoverySystem.

Referenced by GetSystemName().

◆ SetHasFailed()

void deBaseSystem::SetHasFailed ( bool  hasFailed)

Sets if the system has failed.

Referenced by GetSystemName().

◆ Start()

virtual void deBaseSystem::Start ( )
virtual

Starts the system and the active loadable module.

Referenced by GetSystemName().

◆ Stop()

virtual void deBaseSystem::Stop ( )
virtual

Stops the system and the active loadable module.

Referenced by GetSystemName().


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