Internal Module. More...
#include <deInternalModule.h>
Public Member Functions | |
Constructors and Destructors | |
| deInternalModule (deModuleSystem *system) | |
| Creates a new internal module object. | |
| virtual | ~deInternalModule () |
| Cleans up the loadable module. | |
Module Management | |
| virtual void | CreateModule ()=0 |
| Create module. | |
| virtual void | LoadModule () |
| Loads the module from the appropriate source. | |
| virtual void | UnloadModule () |
| Unloads the module. | |
Type Testing and Safe Casting | |
| virtual bool | IsInternalModule () const |
| Determines if this is an internal module. | |
| virtual deInternalModule * | CastToInternalModule () |
| Cast to an internal module. | |
Visiting | |
| virtual void | Visit (deLoadableModuleVisitor *visitor) |
| Visits the rule. | |
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.
| deInternalModule::deInternalModule | ( | deModuleSystem * | system ) |
Creates a new internal module object.
| virtual deInternalModule::~deInternalModule | ( | ) | [virtual] |
Cleans up the loadable module.
| virtual deInternalModule* deInternalModule::CastToInternalModule | ( | ) | [virtual] |
Cast to an internal module.
Reimplemented from deLoadableModule.
| 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.
| virtual bool deInternalModule::IsInternalModule | ( | ) | const [virtual] |
Determines if this is an internal module.
Reimplemented from deLoadableModule.
| 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.
| virtual void deInternalModule::UnloadModule | ( | ) | [virtual] |
| virtual void deInternalModule::Visit | ( | deLoadableModuleVisitor * | visitor ) | [virtual] |
Visits the rule.
Reimplemented from deLoadableModule.
1.7.2