OW_NAMESPACE::SharedLibrary Class Reference

SharedLibrary is a base class for platform classes that implement the functionality of loading and querying shared libraries. More...

#include <OW_SharedLibrary.hpp>

Inheritance diagram for OW_NAMESPACE::SharedLibrary:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::SharedLibrary:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~SharedLibrary ()
template<class fptype>
bool getFunctionPointer (const String &functionName, fptype &retval)
 given a symbol name, getFunctionPointer will store a pointer to the function in retval.

Protected Member Functions

virtual bool doGetFunctionPointer (const String &functionName, void **fp) const =0
 Derived classes have to override this function to implement the symbol loading.

Detailed Description

SharedLibrary is a base class for platform classes that implement the functionality of loading and querying shared libraries.

Definition at line 49 of file OW_SharedLibrary.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::SharedLibrary::~SharedLibrary  )  [virtual]
 

Definition at line 42 of file OW_SharedLibrary.cpp.


Member Function Documentation

virtual bool OW_NAMESPACE::SharedLibrary::doGetFunctionPointer const String functionName,
void **  fp
const [protected, pure virtual]
 

Derived classes have to override this function to implement the symbol loading.

The symbol to be looked up is contained in functionName, and the pointer to the function should be written into *fp. Return true if the function succeeded, false otherwise.

Parameters:
functionName The name of the function to resolve.
fp Where to store the function pointer.
Returns:
true if function succeeded, false otherwise.

Implemented in OW_NAMESPACE::dlSharedLibrary.

template<class fptype>
bool OW_NAMESPACE::SharedLibrary::getFunctionPointer const String functionName,
fptype &  retval
[inline]
 

given a symbol name, getFunctionPointer will store a pointer to the function in retval.

If the symbol is found the function returns true, otherwise false. This function should be called like this: typedef ReturnType (*func_t)(param_t p1, ...); func_t theFunction; sharedLibrary->getFunctionPointer(sharedLibrary, "FunctionName", theFunction);

Parameters:
functionName The name of the function to resolve.
retval Will be set to the function pointer.
Returns:
true if function succeeded, false otherwise.

Definition at line 67 of file OW_SharedLibrary.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:14:26 2006 for openwbem by  doxygen 1.4.6