20 #ifndef INCLUDED_SALHELPER_DYNLOAD_HXX 21 #define INCLUDED_SALHELPER_DYNLOAD_HXX 45 const ::rtl::OUString& strModuleName,
46 const ::rtl::OUString& strInitFunction );
49 sal_uInt32 SAL_CALL acquire();
51 sal_uInt32 SAL_CALL release();
54 void* SAL_CALL getApi()
const;
67 const ::rtl::OUString& strModuleName,
68 const ::rtl::OUString& strInitFunction,
121 const ::rtl::OUString& strInitFunction )
123 if (!m_pStaticLoader)
132 m_pStaticLoader->acquire();
135 m_pLoader = m_pStaticLoader;
143 m_pLoader->acquire();
150 m_pLoader->release();
164 m_pLoader->release();
175 return static_cast<API*
>(m_pLoader->getApi());
181 return static_cast<API*
>(m_pLoader->getApi());
187 return (m_pLoader != NULL);
::rtl::OUString m_strInitFunction
stores the name of the initialization function.
Definition: dynload.hxx:84
Definition: condition.hxx:29
The ODynmaicLoader provides a special load on call mechanism for dynamic libraries which support a C-...
Definition: dynload.hxx:105
static ORealDynamicLoader * newInstance(ORealDynamicLoader **ppSetToZeroInDestructor, const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction)
initializes the loader, loads the library and call the initialization function.
ODynamicLoader(const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction)
Constructor, loads the library if necessary otherwise the refernece count will be increased...
Definition: dynload.hxx:120
~ODynamicLoader()
Destructor, decrease the reference count and unload the library if it is tha last instance...
Definition: dynload.hxx:147
API * getApi() const
returns a poiner to the initialized API function structure.
Definition: dynload.hxx:173
oslModule m_pModule
stores the library handle.
Definition: dynload.hxx:80
void * m_pApi
points to the structure with the initialzed API function pointers.
Definition: dynload.hxx:76
#define SALHELPER_DLLPUBLIC
Definition: salhelperdllapi.h:28
ODynamicLoader(const ODynamicLoader< API > &toCopy)
Copy constructor.
Definition: dynload.hxx:139
sal_uInt32 m_refCount
stores the reference count.
Definition: dynload.hxx:78
::rtl::OUString m_strModuleName
stores the library name.
Definition: dynload.hxx:82
ODynamicLoader()
Default constructor.
Definition: dynload.hxx:109
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader.
Definition: dynload.hxx:33
ORealDynamicLoader ** ppSetToZeroInDestructor
stores a pointer to itself, which must be reset in the destructor to signal that the loader is invali...
Definition: dynload.hxx:88
static ORealDynamicLoader * m_pStaticLoader
stores the real loader helper instance
Definition: dynload.hxx:192
bool isLoaded() const
checks if the loader works on a loaded and initialized library.
Definition: dynload.hxx:185
API * operator->() const
cast operator, which cast to a poiner with the initialized API function structure.
Definition: dynload.hxx:179
void * oslModule
Definition: module.h:56
ORealDynamicLoader * m_pLoader
Definition: dynload.hxx:193