Drag[en]gine Game Engine  1.21
deBaseSystem Class Reference

Base System Class. More...

#include <deBaseSystem.h>

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

Public Member Functions

Constructors and Destructors
 deBaseSystem (deEngine *engine, const char *systemName, int requiredModuleType)
 Create new base system linked to the given engine. More...
 
virtual ~deBaseSystem ()
 Clean up base system. More...
 
Management
deEngineGetEngine () const
 Linked game engine. More...
 
deLoadableModuleGetActiveLoadableModule () const
 Active loadable module. More...
 
bool GetIsRunning () const
 System is running. More...
 
bool GetHasFailed () const
 System has failed during runtime. More...
 
const decStringGetSystemName () const
 System name. More...
 
virtual bool CanStart ()
 
void SetHasFailed (bool hasFailed)
 Set if system has failed. More...
 
virtual void Start ()
 Start system and the active loadable module. More...
 
virtual void Stop ()
 Stop system and the active loadable module. More...
 
void CheckAndActivateFirst (deModuleSystem::eModuleTypes type)
 Check if at least one module is working and select the first one. More...
 
Overloadables
virtual void SetActiveModule (deLoadableModule *module)
 Set active loadable module. More...
 
virtual void ClearPermanents ()
 Clearcross references and links that could lead to memory leaks. More...
 
virtual void PostStart ()
 Carry out here actions right after the system started up. More...
 
virtual void PreStop ()
 Carry out here actions right before the system shuts down. More...
 
Debugging
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...
 

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.

Constructor & Destructor Documentation

◆ deBaseSystem()

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

Create new base system linked to the given engine.

◆ ~deBaseSystem()

virtual deBaseSystem::~deBaseSystem ( )
virtual

Clean up 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.

◆ CheckAndActivateFirst()

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

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

◆ ClearPermanents()

virtual void deBaseSystem::ClearPermanents ( )
virtual

Clearcross references and links that could lead to memory leaks.

Do not forget to call the super function.

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

◆ GetActiveLoadableModule()

deLoadableModule* deBaseSystem::GetActiveLoadableModule ( ) const
inline

Active loadable module.

◆ GetEngine()

deEngine* deBaseSystem::GetEngine ( ) const
inline

Linked game engine.

◆ GetHasFailed()

bool deBaseSystem::GetHasFailed ( ) const
inline

System has failed during runtime.

◆ GetIsRunning()

bool deBaseSystem::GetIsRunning ( ) const
inline

System is running.

◆ GetSystemName()

const decString& deBaseSystem::GetSystemName ( ) const
inline

System name.

◆ LogError()

void deBaseSystem::LogError ( const char *  message)

Output error message on the console.

◆ LogErrorFormat()

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

Output formated error message on the console.

◆ LogErrorFormatUsing()

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

Output formated error message on the console.

◆ LogException()

void deBaseSystem::LogException ( const deException exception)

Output exception as error message on the console.

◆ LogInfo()

void deBaseSystem::LogInfo ( const char *  message)

Output information message on the console.

◆ LogInfoFormat()

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

Output formated information message on the console.

◆ LogInfoFormatUsing()

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

Output formated information message on the console.

◆ LogWarn()

void deBaseSystem::LogWarn ( const char *  message)

Output warning message on the console.

◆ LogWarnFormat()

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

Output formated warning message on the console.

◆ LogWarnFormatUsing()

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

Output formated warning message on the console.

◆ PostStart()

virtual void deBaseSystem::PostStart ( )
virtual

◆ PreStop()

virtual void deBaseSystem::PreStop ( )
virtual

◆ SetActiveModule()

virtual void deBaseSystem::SetActiveModule ( deLoadableModule module)
virtual

Set active loadable module.

Do not forget to call the super function.

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

◆ SetHasFailed()

void deBaseSystem::SetHasFailed ( bool  hasFailed)

Set if system has failed.

◆ Start()

virtual void deBaseSystem::Start ( )
virtual

Start system and the active loadable module.

◆ Stop()

virtual void deBaseSystem::Stop ( )
virtual

Stop system and the active loadable module.


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