|
| | ODynamicLoader () |
| | Default constructor.
|
| | ODynamicLoader (const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction) |
| | Constructor, loads the library if necessary otherwise the reference count will be increased.
|
| | ODynamicLoader (const ODynamicLoader< API > &toCopy) |
| | Copy constructor.
|
| | ~ODynamicLoader () |
| | Destructor, decrease the reference count and unload the library if it is the last instance.
|
| ODynamicLoader< API > & | operator= (const ODynamicLoader< API > &toAssign) |
| | Assign operator.
|
| API * | getApi () const |
| | returns a pointer to the initialized API function structure.
|
| API * | operator-> () const |
| | cast operator, which cast to a pointer with the initialized API function structure.
|
| bool | isLoaded () const |
| | checks if the loader works on a loaded and initialized library.
|
template<class API>
class salhelper::ODynamicLoader< API >
The ODynamicLoader provides a special load on call mechanism for dynamic libraries which support a C-API.
The libraries must provide a struct with function pointers for all supported C functions. The loader loads the specified library and call the specified initialization function to initialize the function pointers with the real functions. Furthermore provides the loader a reference counter for the library. When the last instance of the loader will be destroyed the loader will unload the library.
- Deprecated
- Do not use.