SGE::CL_MOD Class Reference

A CL_MOD is a base module or plugin that you can use into your application to create more complexe plugins. More...

#include <cl_mod.h>

Inheritance diagram for SGE::CL_MOD:

Inheritance graph
[legend]
Collaboration diagram for SGE::CL_MOD:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CL_MOD (std::string _Name, int _options=0)
 CL_MOD constructor, need a Name for the module.
 ~CL_MOD ()
 CL_MOD destructor, it delete all params and stop the thread if the module is started as a thread.
virtual bool Init (void)
 Initialise module as deactivated and thread not running.
virtual void Activate ()
 Activate the module, and start the thread if required. This function is actually called by the engine, do not call it by yourself unless you know what you are doing.
virtual void Desactivate ()
 Desactivate the module, and strop the thread if required. This function is actually called by the engine, do not call it by yourself unless you know what you are doing.
void PushStatus ()
 Push back the module activation status. This function allows to backup the module states, so you can change it on specific actions, and restore it via the function PopStatus().
void PopStatus ()
 Restore the module activation status. This function retores last backed-up module states.
MODE_TYPE GetType ()

Static Public Member Functions

static int GetModTypeID (const std::string &_ModType)
 Convert string into module type.
static std::string GetModTypeStr (const int _ModType)
 Convert Enum MODE_TYPE value into string value.

Public Attributes

CL_PARAM * Params
 Pointer to a CL_PARAM object that stored all the optionnal parameters and flags.
bool StartActive
 Flag to defined if the module will start has active.
bool StartAsThread
 Flag to defined if the module is a thread.
std::string DLLName
 DLL Filename to defined where to find the module.
HINSTANCE DLLInstance
 DLL hinstance of the module.
std::vector< ST_MOD_STATUS * > VecModStatus
 Vector to store all previous state of the module.
ST_MOD_STATUSModStatus
 Active Module state object.

Protected Attributes

MODE_TYPE Type
 Module type. See MODE_TYPE.

Detailed Description

A CL_MOD is a base module or plugin that you can use into your application to create more complexe plugins.

Todo:
Add support for DLL loading.

Improve thread support and thread safe.

Move the members has protected.


Member Function Documentation

void SGE::CL_MOD::Activate  )  [virtual]
 

Activate the module, and start the thread if required. This function is actually called by the engine, do not call it by yourself unless you know what you are doing.

Todo:
Set this function as private??? with friend function display?? or change the activate/desactivate mechanism

void SGE::CL_MOD::Desactivate  )  [virtual]
 

Desactivate the module, and strop the thread if required. This function is actually called by the engine, do not call it by yourself unless you know what you are doing.

Todo:
Set this function as private??? with friend function display?? or change the activate/desactivate mechanism

int SGE::CL_MOD::GetModTypeID const std::string &  _ModType  )  [static]
 

Convert string into module type.

Parameters:
_ModType => in {"CL_MOD", "CL_GLMOD", "CL_ARMOD",...}
Returns:
Type Enum MODE_TYPE value.
Todo:
Remove this function.

std::string SGE::CL_MOD::GetModTypeStr const int  _ModType  )  [static]
 

Convert Enum MODE_TYPE value into string value.

Parameters:
_ModType => in {MODTYPE_MOD, MODTYPE_GLMOD, MODTYPE_ARMOD, MODTYPE_EDITMOD, ...}
Returns:
Type string.
Todo:
Remove this function.

void SGE::CL_MOD::PopStatus  ) 
 

Restore the module activation status. This function retores last backed-up module states.

See also:
PushStatus()

void SGE::CL_MOD::PushStatus  ) 
 

Push back the module activation status. This function allows to backup the module states, so you can change it on specific actions, and restore it via the function PopStatus().

See also:
PopStatus()


The documentation for this class was generated from the following files:
Generated on Mon Mar 19 23:15:16 2007 for SugoiTools by  doxygen 1.4.6-NO