ParCompMark::DynLoad Class Reference
#include <PCMDynLoad.h>
Inheritance diagram for ParCompMark::DynLoad:
![Inheritance graph](classParCompMark_1_1DynLoad__inherit__graph.png)
Detailed Description
Dynamic load library.
Definition at line 50 of file PCMDynLoad.h.
Methods | |
virtual bool | hasFunction (const std::string &funcName) const |
Return true when the dynamic library has a callable function with the specified name. | |
virtual void * | getFunction (const std::string &funcName) const |
Get a function pointer from dynamic library by name (symbol). | |
virtual void | load () |
Load a library. | |
virtual void | unload () |
Load a library. | |
Public Types | |
typedef Pointer< DynLoad, Mutex > | Pointer |
Type for pointer on this class. | |
Public Member Functions | |
Constructors & destructor | |
DynLoad (const std::string &libName) | |
Create a Dynamic load class, and load the libName named library. | |
virtual | ~DynLoad () |
The destructor. | |
Getters & setters | |
void * | getHandle () const |
Getter of mHandle. | |
const std::string & | getLibraryName () const |
Getter of mLibraryName. | |
Protected Attributes | |
Variables | |
void * | mHandle |
The dynamic library handler. | |
std::string | mLibraryName |
The dynamic library name. |
Member Typedef Documentation
typedef Pointer< DynLoad, Mutex > ParCompMark::DynLoad::Pointer |
Type for pointer on this class.
Reimplemented in ParCompMark::Plugin, and ParCompMark::RendererPlugin.
Definition at line 68 of file PCMDynLoad.h.
Constructor & Destructor Documentation
ParCompMark::DynLoad::DynLoad | ( | const std::string & | libName | ) |
Create a Dynamic load class, and load the libName named library.
- Parameters:
-
[in] libName Name of the loaded library
Definition at line 44 of file PCMDynLoad.cpp.
References load(), and mLibraryName.
Here is the call graph for this function:
![](classParCompMark_1_1DynLoad_33646fd764f94d8791b3c29a68104823_cgraph.png)
ParCompMark::DynLoad::~DynLoad | ( | ) | [virtual] |
The destructor.
This class has virtual destructor.
Definition at line 55 of file PCMDynLoad.cpp.
References mHandle, and unload().
Here is the call graph for this function:
![](classParCompMark_1_1DynLoad_c205566ab49963db2add73f6589a14d3_cgraph.png)
Member Function Documentation
void * ParCompMark::DynLoad::getFunction | ( | const std::string & | funcName | ) | const [virtual] |
Get a function pointer from dynamic library by name (symbol).
- Parameters:
-
[in] funcName Name of function
- Returns:
- Pointer to the function
Definition at line 80 of file PCMDynLoad.cpp.
References Assert, Except, and mHandle.
Referenced by ParCompMark::Plugin::_getErrorMsg(), ParCompMark::Plugin::_getNeededLibs(), ParCompMark::RendererPlugin::_getNeededOpenGLExts(), ParCompMark::RendererPlugin::_initFastFunctions(), ParCompMark::Plugin::_onLoad(), ParCompMark::Plugin::_onUnload(), ParCompMark::RendererPlugin::_setBufferGetter(), ParCompMark::Plugin::_setLoggerFunction(), ParCompMark::Plugin::_setPluginHandle(), ParCompMark::RendererPlugin::createRenderer(), ParCompMark::RendererPlugin::destroyRenderer(), and ParCompMarkTest::TestDynLoad::test_getFunction_cstd__string().
void * ParCompMark::DynLoad::getHandle | ( | ) | const [inline] |
Getter of mHandle.
Returns value of mHandle.
- Returns:
- The value of mHandle
Definition at line 216 of file PCMDynLoad.h.
const std::string & ParCompMark::DynLoad::getLibraryName | ( | ) | const [inline] |
Getter of mLibraryName.
Returns value of mLibraryName.
- Returns:
- The value of mLibraryName
Definition at line 223 of file PCMDynLoad.h.
bool ParCompMark::DynLoad::hasFunction | ( | const std::string & | funcName | ) | const [virtual] |
Return true when the dynamic library has a callable function with the specified name.
- Parameters:
-
[in] funcName Name of function
- Returns:
- True when the dynamic library has a callable function with the specified name
Definition at line 70 of file PCMDynLoad.cpp.
References Assert, and mHandle.
Referenced by ParCompMark::Plugin::_getErrorMsg(), ParCompMark::Plugin::_getNeededLibs(), ParCompMark::RendererPlugin::_getNeededOpenGLExts(), ParCompMark::RendererPlugin::_initFastFunctions(), ParCompMark::Plugin::_onLoad(), ParCompMark::Plugin::_onUnload(), ParCompMark::RendererPlugin::_setBufferGetter(), ParCompMark::Plugin::_setLoggerFunction(), ParCompMark::Plugin::_setPluginHandle(), ParCompMark::RendererPlugin::createRenderer(), and ParCompMark::RendererPlugin::destroyRenderer().
void ParCompMark::DynLoad::load | ( | ) | [protected, virtual] |
Load a library.
Called by constructor.
Definition at line 101 of file PCMDynLoad.cpp.
References Except, ParCompMark::Singleton< T >::getInstance(), mHandle, mLibraryName, and ParCompMark::Logger::NOTICE.
Referenced by DynLoad().
Here is the call graph for this function:
![](classParCompMark_1_1DynLoad_4bfbfaeb1ef48122bf1400167d03abae_cgraph.png)
void ParCompMark::DynLoad::unload | ( | ) | [protected, virtual] |
Load a library.
Called by constructor.
Definition at line 113 of file PCMDynLoad.cpp.
References Except, ParCompMark::Singleton< T >::getInstance(), mHandle, mLibraryName, and ParCompMark::Logger::NOTICE.
Referenced by ~DynLoad().
Here is the call graph for this function:
![](classParCompMark_1_1DynLoad_e6a12089722711157ee6f13a1656f899_cgraph.png)
Member Data Documentation
void* ParCompMark::DynLoad::mHandle [protected] |
The dynamic library handler.
- Remarks:
- This is own attribute of this class.
Definition at line 84 of file PCMDynLoad.h.
Referenced by getFunction(), hasFunction(), load(), unload(), and ~DynLoad().
std::string ParCompMark::DynLoad::mLibraryName [protected] |
The dynamic library name.
- Remarks:
- This is own attribute of this class.
Definition at line 91 of file PCMDynLoad.h.
Referenced by DynLoad(), load(), ParCompMark::Plugin::Plugin(), unload(), and ParCompMark::Plugin::~Plugin().
The documentation for this class was generated from the following files: