LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
The ODynamicLoader provides a special load on call mechanism for dynamic libraries which support a C-API. More...
#include <dynload.hxx>
Public Member Functions | |
ODynamicLoader () | |
Default constructor. More... | |
ODynamicLoader (const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction) | |
Constructor, loads the library if necessary otherwise the reference count will be increased. More... | |
ODynamicLoader (const ODynamicLoader< API > &toCopy) | |
Copy constructor. More... | |
~ODynamicLoader () | |
Destructor, decrease the reference count and unload the library if it is the last instance. More... | |
ODynamicLoader< API > & | operator= (const ODynamicLoader< API > &toAssign) |
Assign operator. More... | |
API * | getApi () const |
returns a pointer to the initialized API function structure. More... | |
API * | operator-> () const |
cast operator, which cast to a pointer with the initialized API function structure. More... | |
bool | isLoaded () const |
checks if the loader works on a loaded and initialized library. More... | |
Protected Attributes | |
ORealDynamicLoader * | m_pLoader |
Static Protected Attributes | |
static ORealDynamicLoader * | m_pStaticLoader = NULL |
stores the real loader helper instance More... | |
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.
|
inline |
Default constructor.
|
inline |
Constructor, loads the library if necessary otherwise the reference count will be increased.
strModuleName | specifies the library name. |
strInitFunction | specifies the name of the initialization function. |
|
inline |
Copy constructor.
|
inline |
Destructor, decrease the reference count and unload the library if it is the last instance.
|
inline |
returns a pointer to the initialized API function structure.
|
inline |
checks if the loader works on a loaded and initialized library.
|
inline |
cast operator, which cast to a pointer with the initialized API function structure.
|
inline |
Assign operator.
|
protected |
|
staticprotected |
stores the real loader helper instance