(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: salhelper ::

template< typename API >

class ODynamicLoader


Base Classes
None.
Known Derived Classes
None.

virtual abstract interface template
NO NO NO YES
D E P R E C A T E D
Summary
The ODynmaicLoader provides a special load on call mechanism for dynamic libraries which support a C-API.
Description
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. Do not use.
File
dynload.hxx

Public Members

Methods


ODynamicLoader( ) throw( );
Default constructor

ODynamicLoader( const ::rtl::OUString & strModuleName, const ::rtl::OUString & strInitFunction ) throw( );
Constructor, loads the library if necessary otherwise the refernece count will be increased.

ODynamicLoader( const ODynamicLoader< API > & toCopy ) throw( );
Copy constructor

~ODynamicLoader( ) throw( );
Destructor, decrease the reference count and unload the library if it is tha last instance.
ODynamicLoader< API > &
operator=( const ODynamicLoader< API > & toAssign ) throw( );
Assign operator
API *
getApi( ) const throw( );
returns a poiner to the initialized API function structure.
API *
operator->( ) const throw( );
cast operator, which cast to a poiner with the initialized API function structure.
sal_Bool
isLoaded( ) const throw( );
checks if the loader works on a loaded and initialized library.

Protected Members

Data

ORealDynamicLoader * m_pLoader;

Static Data

ORealDynamicLoader * m_pStaticLoader; stores the real loader helper instance

Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.