![]() |
Base class encapsulating the operating system mechanism to load dynamic libraries and their exported functions. More...
#include <Library.h>
Inheritance diagram for HSEP::Library:
Collaboration diagram for HSEP::Library:Public Member Functions | |
| Library (const char *pType, string &pPath) | |
| Constructs and loads the library pointed by pPath. | |
| ~Library () | |
| Unloads the library and clean the related data structures. | |
| void | invalidate () |
| Makes the library to be in invalid state, unloading any loaded material. | |
Public Member Functions inherited from HSEP::HSEPObject | |
| string & | lastErrorRef () |
| Returns a reference to the last stored error message. | |
| ErrorCode | lastCode () |
| Returns the last stored code. | |
| bool | valid () |
| Permits to know if the object has a valid internal state. | |
| string & | typeRef () |
| Permits to know the type of this particular object. | |
Protected Member Functions | |
| void * | getMethodPtr (string &pMethodNameRef) |
| Returns a pointer to the specified method is contained in the loaded dynamic library. | |
Protected Member Functions inherited from HSEP::HSEPObject | |
| HSEPObject (const char *pType) | |
| Constructor, providing the base for the state controlling instance. | |
| virtual | ~HSEPObject () |
| void | setLastError (string &pErrorMsgRef) |
| Assigns an error message text to the last executed operation. | |
| void | setLastError (const string &pErrorMsgRef) |
| Assigns an error message text to the last executed operation. | |
| void | setLastError (const char *pErrorMsg) |
| Assigns an error message text to the last executed operation. | |
| void | setValid () |
| Defines that the object has a valid state. | |
| void | setInvalid () |
| Defines that the object has an invalid state. | |
| void | setLastCode (const ErrorCode pErrorCode) |
| Defines the internal result code for the object. | |
Protected Attributes | |
| void * | aHandlerPtr |
| The library handler. | |
Base class encapsulating the operating system mechanism to load dynamic libraries and their exported functions.
| HSEP::Library::Library | ( | const char * | pType, |
| string & | pPath | ||
| ) |
Constructs and loads the library pointed by pPath.
| pType | String describing the type of library is being loaded. |
| pPath | The full path to load the library to be loaded. |
todo: A more extensive checking on the loaded library to prevent further problems.
Definition at line 28 of file Library.cpp.
References aHandlerPtr, HSEP::HSEPObject::setInvalid(), HSEP::HSEPObject::setLastError(), and HSEP::HSEPObject::setValid().
Here is the call graph for this function:| HSEP::Library::~Library | ( | ) |
Unloads the library and clean the related data structures.
Definition at line 46 of file Library.cpp.
References aHandlerPtr, and HSEP::HSEPObject::valid().
Here is the call graph for this function:
|
protected |
Returns a pointer to the specified method is contained in the loaded dynamic library.
| pMethodNameRef |
Definition at line 54 of file Library.cpp.
References aHandlerPtr, and HSEP::HSEPObject::valid().
Here is the call graph for this function:| void HSEP::Library::invalidate | ( | ) |
Makes the library to be in invalid state, unloading any loaded material.
Definition at line 65 of file Library.cpp.
References aHandlerPtr, HSEP::HSEPObject::setInvalid(), and HSEP::HSEPObject::valid().
Here is the call graph for this function:
|
protected |
The library handler.
In this level is managed as a generic pointer (void*) to deal with the particular characteristics for different operating systems.
Definition at line 45 of file Library.h.
Referenced by getMethodPtr(), invalidate(), Library(), and ~Library().