LibreOffice LibreOffice 4.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
salhelper::ODynamicLoader< API > Class Template Reference

The ODynmaicLoader provides a special load on call mechanism for dynamic libraries which support a C-API. More...

`#include <dynload.hxx>`

## Public Member Functions
| ODynamicLoader () throw ()
| Default constructor. More...
| ODynamicLoader (const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction) throw ()
| Constructor, loads the library if necessary otherwise the refernece count will be increased. More...
| ODynamicLoader (const ODynamicLoader< API > &toCopy) throw ()
| Copy constructor. More...
| ~ODynamicLoader () throw ()
| Destructor, decrease the reference count and unload the library if it is tha last instance. More...
ODynamicLoader< API > & | operator= (const ODynamicLoader< API > &toAssign) throw ()
| Assign operator. More...
API * | getApi () const throw ()
| returns a poiner to the initialized API function structure. More...
API * | operator-> () const throw ()
| cast operator, which cast to a poiner with the initialized API function structure. More...
sal_Bool | isLoaded () const throw ()
| 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...

## Detailed Description

### template<class API>
class salhelper::ODynamicLoader< API >

The ODynmaicLoader 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 laoder will be destroyed the loader will unload the library.

Deprecated:
  Do not use.

## Constructor & Destructor Documentation

template<class API>

salhelper::ODynamicLoader< API >::ODynamicLoader | ( |  | ) |
throw | ( |
| ) |  |
| inline

Default constructor.

template<class API>

salhelper::ODynamicLoader< API >::ODynamicLoader | ( | const ::rtl::OUString & | strModuleName,
|  | const ::rtl::OUString & | strInitFunction
| ) |  |
throw | ( |
| ) |  |
| inline

Constructor, loads the library if necessary otherwise the refernece count will be increased.

Parameters

  strModuleName | specifies the library name.
  strInitFunction | specifies the name of the initialization function.

template<class API>

salhelper::ODynamicLoader< API >::ODynamicLoader | ( | const ODynamicLoader< API > & | toCopy | ) |
throw | ( |
| ) |  |
| inline

Copy constructor.

template<class API>

salhelper::ODynamicLoader< API >::~ODynamicLoader | ( |  | ) |
throw | ( |
| ) |  |
| inline

Destructor, decrease the reference count and unload the library if it is tha last instance.

## Member Function Documentation

template<class API>

API* salhelper::ODynamicLoader< API >::getApi | ( |  | ) | const
throw | ( |
| ) |  |
| inline

returns a poiner to the initialized API function structure.

template<class API>

sal_Bool salhelper::ODynamicLoader< API >::isLoaded | ( |  | ) | const
throw | ( |
| ) |  |
| inline

checks if the loader works on a loaded and initialized library.

template<class API>

API* salhelper::ODynamicLoader< API >::operator-> | ( |  | ) | const
throw | ( |
| ) |  |
| inline

cast operator, which cast to a poiner with the initialized API function structure.

template<class API>

ODynamicLoader<API>& salhelper::ODynamicLoader< API >::operator= | ( | const ODynamicLoader< API > & | toAssign | ) |
throw | ( |
| ) |  |
| inline

Assign operator.

## Member Data Documentation

template<class API>

ORealDynamicLoader* salhelper::ODynamicLoader< API >::m_pLoader
| protected

template<class API>

ORealDynamicLoader * salhelper::ODynamicLoader< API >::m_pStaticLoader = NULL
| static protected

stores the real loader helper instance

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

- salhelper/dynload.hxx