Helper class for loading modules.
More...
#include <modulebase.h>
List of all members.
Public Member Functions |
bool | open (const std::string &modulePath) |
| Opens a module.
|
bool | open (const std::string &baseDirectory, const std::string &moduleName) |
| Opens a module.
|
bool | close () |
| Close a previously opened module.
|
bool | isOpen () const |
| Returns true if a module has been successfully opened, false otherwise.
|
Protected Member Functions |
virtual void | onFoundFunctionName (const std::string &name, void *pFunction)=0 |
| This function is called for each function name which has been registered by a call to ModuleBase::registerFunctionName and which is present in the module.
|
void | registerFunctionName (const std::string &name) |
| Register a function name which should be present in a module when it is opened.
|
Detailed Description
Member Function Documentation
bool mogal::ModuleBase::close |
( |
| ) |
|
bool mogal::ModuleBase::isOpen |
( |
| ) |
const [inline] |
virtual void mogal::ModuleBase::onFoundFunctionName |
( |
const std::string & |
name, |
|
|
void * |
pFunction |
|
) |
| [protected, pure virtual] |
This function is called for each function name which has been registered by a call to ModuleBase::registerFunctionName and which is present in the module.
- Parameters:
-
name | Name of the function. |
pFunction | Entry point to the function. |
bool mogal::ModuleBase::open |
( |
const std::string & |
baseDirectory, |
|
|
const std::string & |
moduleName |
|
) |
| |
Opens a module. This function constructs the complete path from the arguments and calls the function below.
- Parameters:
-
baseDirectory | Directory in which the module is located. |
moduleName | File name of the module |
bool mogal::ModuleBase::open |
( |
const std::string & |
modulePath | ) |
|
void mogal::ModuleBase::registerFunctionName |
( |
const std::string & |
name | ) |
[inline, protected] |
The documentation for this class was generated from the following file: