LibreOffice
LibreOffice 7.4 SDK C/C++ API Reference
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
salhelper::ORealDynamicLoader Class Reference

The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader. More...

#include <dynload.hxx>

Public Member Functions

sal_uInt32 acquire ()
 increase the reference count. More...
 
sal_uInt32 release ()
 decrease the reference count and delete the last instance. More...
 
void * getApi () const
 returns a pointer to the initialized API function structure. More...
 

Static Public Member Functions

static ORealDynamicLoadernewInstance (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...
 

Detailed Description

The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader.

Constructor & Destructor Documentation

◆ ORealDynamicLoader()

salhelper::ORealDynamicLoader::ORealDynamicLoader ( ORealDynamicLoader **  ppSetToZeroInDestructor,
const ::rtl::OUString strModuleName,
const ::rtl::OUString strInitFunction,
void *  pApi,
oslModule  pModule 
)
protected

Constructor.

Parameters
ppSetToZeroInDestructorpoints to the loader instance which must be set to NULL if the loader will be destroyed.
strModuleNamespecifies the library name.
strInitFunctionspecifies the name of the initialization function.
pApipoints to a structure with the initialized API function pointers.
pModulepoints to the loaded library handle.

◆ ~ORealDynamicLoader()

virtual salhelper::ORealDynamicLoader::~ORealDynamicLoader ( )
protectedvirtual

Destructor, try to unload the library.

Member Function Documentation

◆ acquire()

sal_uInt32 salhelper::ORealDynamicLoader::acquire ( )

increase the reference count.

◆ getApi()

void* salhelper::ORealDynamicLoader::getApi ( ) const

returns a pointer to the initialized API function structure.

◆ newInstance()

static ORealDynamicLoader* salhelper::ORealDynamicLoader::newInstance ( ORealDynamicLoader **  ppSetToZeroInDestructor,
const ::rtl::OUString strModuleName,
const ::rtl::OUString strInitFunction 
)
static

initializes the loader, loads the library and call the initialization function.

Parameters
ppSetToZeroInDestructorpoints to the loader instance which must be set to NULL if the loader will be destroyed.
strModuleNamespecifies the library name.
strInitFunctionspecifies the name of the initialization function.

◆ release()

sal_uInt32 salhelper::ORealDynamicLoader::release ( )

decrease the reference count and delete the last instance.

Member Data Documentation

◆ m_pApi

void* salhelper::ORealDynamicLoader::m_pApi
protected

points to the structure with the initialized API function pointers.

◆ m_pModule

oslModule salhelper::ORealDynamicLoader::m_pModule
protected

stores the library handle.

◆ m_refCount

sal_uInt32 salhelper::ORealDynamicLoader::m_refCount
protected

stores the reference count.

◆ m_strInitFunction

::rtl::OUString salhelper::ORealDynamicLoader::m_strInitFunction
protected

stores the name of the initialization function.

◆ m_strModuleName

::rtl::OUString salhelper::ORealDynamicLoader::m_strModuleName
protected

stores the library name.

◆ ppSetToZeroInDestructor

ORealDynamicLoader** salhelper::ORealDynamicLoader::ppSetToZeroInDestructor
protected

stores a pointer to itself, which must be reset in the destructor to signal that the loader is invalid.


The documentation for this class was generated from the following file: