Drag[en]gine Game Engine  1.0
deInternalModule Class Referenceabstract

Internal Module. More...

#include <deInternalModule.h>

Inheritance diagram for deInternalModule:
deLoadableModule

Public Member Functions

Constructors and Destructors
 deInternalModule (deModuleSystem *system)
 
virtual ~deInternalModule ()
 
Module Management
virtual void CreateModule ()=0
 
virtual void LoadModule ()
 
virtual void UnloadModule ()
 
Type Testing and Safe Casting
virtual bool IsInternalModule () const
 
virtual deInternalModuleCastToInternalModule ()
 
Visiting
virtual void Visit (deLoadableModuleVisitor *visitor)
 
- Public Member Functions inherited from deLoadableModule
 deLoadableModule (deModuleSystem *system)
 Creates a new loadable module. More...
 
virtual ~deLoadableModule ()
 Cleans up the loadable module. More...
 
deModuleSystemGetSystem () const
 Retrieves the linked module system. More...
 
const decStringGetLoggingName () const
 Retrieves the name to use as the source for this module for logging. More...
 
void SetLoggingName (const char *name)
 Sets the name to use as the source for this module for logging. More...
 
void SetDefaultLoggingName ()
 Sets the default logging name which is "Module &lt;module-name&gt;". More...
 
const decStringGetName () const
 Retrieves the unique name of the module. More...
 
void SetName (const char *name)
 Sets the unique name of the module. More...
 
deModuleSystem::eModuleTypes GetType () const
 Retrieves the type of the module. More...
 
void SetType (deModuleSystem::eModuleTypes type)
 Sets the type of the module. More...
 
const decString GetDescription () const
 Retrieves the description of the module. More...
 
void SetDescription (const char *description)
 Sets the description of the module. More...
 
const decStringGetAuthor () const
 Retrieves the author of the module. More...
 
void SetAuthor (const char *author)
 Sets the author of the module. More...
 
const decStringGetVersion () const
 Retrieves the version of the module. More...
 
void SetVersion (const char *version)
 Sets the version of the module. More...
 
decStringListGetPatternList ()
 Retrieves the file pattern list recognized by this module if a multiple type module. More...
 
const decStringListGetPatternList () const
 
const decStringGetDefaultExtension () const
 Retrieves the default extension to be used for saving files if this is a multiple type module. More...
 
void SetDefaultExtension (const char *extension)
 Sets the default extension to be used for saving files if this is a multiple type module. More...
 
const decStringGetDirectoryName () const
 Retrieves the directory name for this module. More...
 
void SetDirectoryName (const char *dirName)
 Sets the directory name for this module. More...
 
bool GetIsFallback () const
 
void SetIsFallback (bool fallback)
 
bool GetEnabled () const
 Determines if the module is enabled. More...
 
void SetEnabled (bool enabled)
 Sets if the module is enabled. More...
 
deBaseModuleGetModule () const
 Retrieves the module if loaded or NULL. More...
 
void SetModule (deBaseModule *module)
 Sets the module if loaded of NULL. More...
 
bool IsLoaded () const
 Determines if the module is loaded and working. More...
 
int GetErrorCode () const
 Retrieves the error code from the last load attempt. More...
 
void SetErrorCode (int code)
 Sets the error code. More...
 
bool IsLocked () const
 Determines if the module is locked. More...
 
virtual void Lock ()
 Locks the module and increases the lock counter. More...
 
virtual void Unlock ()
 Decreases the lock counter and unlocks the module if the counter reaches 0. More...
 
int GetRefCount () const
 Retrieves the reference count. More...
 
void AddReference ()
 Adds a reference by increasing the reference counter by 1. More...
 
void FreeReference ()
 Decreases the reference counter by 1 and frees the module if the counter reaches 0. More...
 
virtual bool IsLibraryModule () const
 Determines if this is a library loaded module. More...
 
virtual deLibraryModuleCastToLibraryModule ()
 Cast to a library loaded rule. More...
 

Additional Inherited Members

- Public Types inherited from deLoadableModule
enum  eErrorCodes { eecSuccess, eecCreateModuleFailed }
 Error Codes. More...
 

Detailed Description

Internal Module.

Internal modules are part of the game engine or the program using the game engine. Such modules can be created off the point without any further loading actions. For this create a subclass which overwrites the LoadModule function to create the module in question. Store afterwards the module with SetModule and set the error code with SetErrorCode. This is required as modules are created upon loading and freed upon unloading. The subclass also is responsible to set the module informations upon creation time best done inside the constructor but at last before the module is added to the system.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deInternalModule()

deInternalModule::deInternalModule ( deModuleSystem system)

Creates a new internal module object.

◆ ~deInternalModule()

virtual deInternalModule::~deInternalModule ( )
virtual

Cleans up the loadable module.

Member Function Documentation

◆ CastToInternalModule()

virtual deInternalModule* deInternalModule::CastToInternalModule ( )
virtual

Cast to an internal module.

Reimplemented from deLoadableModule.

◆ CreateModule()

virtual void deInternalModule::CreateModule ( )
pure virtual

Create module. Overwrite this function to create the module. Store afterwards the module with SetModule and set the error code with SetErrorCode.

◆ IsInternalModule()

virtual bool deInternalModule::IsInternalModule ( ) const
virtual

Determines if this is an internal module.

Reimplemented from deLoadableModule.

◆ LoadModule()

virtual void deInternalModule::LoadModule ( )
virtual

Loads the module from the appropriate source. Sets the error code in both the case of success and failure and stored the module for later retrieval. This function takes care of setting up correctly the module. The subclass just has to overwrite CreateModule to produce the module and this function takes care of the rest.

Implements deLoadableModule.

◆ UnloadModule()

virtual void deInternalModule::UnloadModule ( )
virtual

Unloads the module. Simply frees the module and sets it to NULL.

Implements deLoadableModule.

◆ Visit()

virtual void deInternalModule::Visit ( deLoadableModuleVisitor visitor)
virtual

Visits the rule.

Reimplemented from deLoadableModule.


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