LibreOffice Module salhelper (master) 1
|
The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader. More...
#include <dynload.hxx>
Public Member Functions | |
sal_uInt32 SAL_CALL | acquire () |
increase the reference count. More... | |
sal_uInt32 SAL_CALL | release () |
decrease the reference count and delete the last instance. More... | |
void *SAL_CALL | getApi () const |
returns a pointer to the initialized API function structure. More... | |
Static Public Member Functions | |
static ORealDynamicLoader *SAL_CALL | newInstance (ORealDynamicLoader **ppSetToZeroInDestructor, const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction) |
initializes the loader, loads the library and call the initialization function. More... | |
Protected Member Functions | |
ORealDynamicLoader (ORealDynamicLoader **ppSetToZeroInDestructor, const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction, void *pApi, oslModule pModule) | |
Constructor. More... | |
virtual | ~ORealDynamicLoader () |
Destructor, try to unload the library. More... | |
Protected Attributes | |
void * | m_pApi |
points to the structure with the initialized API function pointers. More... | |
sal_uInt32 | m_refCount |
stores the reference count. More... | |
oslModule | m_pModule |
stores the library handle. More... | |
::rtl::OUString | m_strModuleName |
stores the library name. More... | |
::rtl::OUString | m_strInitFunction |
stores the name of the initialization function. More... | |
ORealDynamicLoader ** | ppSetToZeroInDestructor |
stores a pointer to itself, which must be reset in the destructor to signal that the loader is invalid. More... | |
The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader.
Definition at line 37 of file dynload.hxx.
|
protected |
Constructor.
ppSetToZeroInDestructor | points to the loader instance which must be set to NULL if the loader will be destroyed. |
strModuleName | specifies the library name. |
strInitFunction | specifies the name of the initialization function. |
pApi | points to a structure with the initialized API function pointers. |
pModule | points to the loaded library handle. |
Definition at line 27 of file dynload.cxx.
References m_refCount.
Referenced by newInstance().
|
protectedvirtual |
Destructor, try to unload the library.
Definition at line 76 of file dynload.cxx.
References m_pModule, and ppSetToZeroInDestructor.
sal_uInt32 salhelper::ORealDynamicLoader::acquire | ( | ) |
increase the reference count.
Definition at line 91 of file dynload.cxx.
References m_refCount.
Referenced by salhelper::ODynamicLoader< API >::ODynamicLoader(), and salhelper::ODynamicLoader< API >::operator=().
void * salhelper::ORealDynamicLoader::getApi | ( | ) | const |
returns a pointer to the initialized API function structure.
Definition at line 105 of file dynload.cxx.
References m_pApi.
Referenced by salhelper::ODynamicLoader< API >::getApi(), and salhelper::ODynamicLoader< API >::operator->().
|
static |
initializes the loader, loads the library and call the initialization function.
ppSetToZeroInDestructor | points to the loader instance which must be set to NULL if the loader will be destroyed. |
strModuleName | specifies the library name. |
strInitFunction | specifies the name of the initialization function. |
Definition at line 41 of file dynload.cxx.
References NULL, ORealDynamicLoader(), and ppSetToZeroInDestructor.
Referenced by salhelper::ODynamicLoader< API >::ODynamicLoader().
sal_uInt32 salhelper::ORealDynamicLoader::release | ( | ) |
decrease the reference count and delete the last instance.
Definition at line 96 of file dynload.cxx.
References m_refCount.
Referenced by salhelper::ODynamicLoader< API >::operator=(), and salhelper::ODynamicLoader< API >::~ODynamicLoader().
|
protected |
points to the structure with the initialized API function pointers.
Definition at line 80 of file dynload.hxx.
Referenced by getApi().
|
protected |
stores the library handle.
Definition at line 84 of file dynload.hxx.
Referenced by ~ORealDynamicLoader().
|
protected |
stores the reference count.
Definition at line 82 of file dynload.hxx.
|
protected |
stores the name of the initialization function.
Definition at line 88 of file dynload.hxx.
|
protected |
stores the library name.
Definition at line 86 of file dynload.hxx.
|
protected |
stores a pointer to itself, which must be reset in the destructor to signal that the loader is invalid.
Definition at line 92 of file dynload.hxx.
Referenced by newInstance(), and ~ORealDynamicLoader().