Keos::CDynLib Class Reference

Resource holding data about a dynamic library. More...

#include <KeosDynLib.h>

List of all members.

Public Member Functions

 CDynLib (const String &strName)
 Default constructor - used by DynLibManager.
 ~CDynLib ()
 Default destructor.
void Load ()
 Load the library.
void Unload ()
 Unload the library.
const StringGetName (void) const
 Get the name of the library.
void * GetSymbol (const String &strName) const throw ()
 Returns the address of the given symbol from the loaded library.

Protected Member Functions

String DynlibError (void)
 Return error information in library loading.

Protected Attributes

String m_strName
 Name of the library.
DYNLIB_HANDLE m_hInst
 Handle to the loaded library.


Detailed Description

Resource holding data about a dynamic library.

This class holds the data required to get symbols from libraries loaded at run-time (i.e. from DLL's for so's).

Definition at line 44 of file KeosDynLib.h.


Constructor & Destructor Documentation

Keos::CDynLib::CDynLib ( const String strName  ) 

Default constructor - used by DynLibManager.

Warning:
Do not call directly.
Parameters:
strName Name of the library.

Definition at line 38 of file KeosDynLib.cpp.

References m_hInst, and m_strName.

Keos::CDynLib::~CDynLib (  ) 

Default destructor.

Definition at line 45 of file KeosDynLib.cpp.


Member Function Documentation

String Keos::CDynLib::DynlibError ( void   )  [protected]

Return error information in library loading.

Returns:
Error information.

Definition at line 91 of file KeosDynLib.cpp.

Referenced by Load(), and Unload().

void Keos::CDynLib::Load (  ) 

Load the library.

Definition at line 49 of file KeosDynLib.cpp.

References DYNLIB_EXCEPT, DynlibError(), Keos::ILogger::Log(), m_hInst, and m_strName.

Referenced by Keos::CDynLibManager::Load().

void Keos::CDynLib::Unload (  ) 

Unload the library.

Definition at line 71 of file KeosDynLib.cpp.

References DYNLIB_EXCEPT, DynlibError(), Keos::ILogger::Log(), m_hInst, and m_strName.

Referenced by Keos::CDynLibManager::Unload().

const String& Keos::CDynLib::GetName ( void   )  const [inline]

Get the name of the library.

Returns:
The name of the library.

Definition at line 77 of file KeosDynLib.h.

Referenced by Keos::CDynLibManager::Unload().

void * Keos::CDynLib::GetSymbol ( const String strName  )  const throw ()

Returns the address of the given symbol from the loaded library.

Parameters:
strName The name of the symbol to search for.
Returns:
If the function succeeds, the returned value is a handle to the symbol, if the function fails, the returned value is NULL.

Definition at line 85 of file KeosDynLib.cpp.

Referenced by Keos::CPlatformManager::CPlatformManager(), and Keos::CRoot::LoadPlugin().


Member Data Documentation

String Keos::CDynLib::m_strName [protected]

Name of the library.

Definition at line 48 of file KeosDynLib.h.

Referenced by CDynLib(), Load(), and Unload().

DYNLIB_HANDLE Keos::CDynLib::m_hInst [protected]

Handle to the loaded library.

Definition at line 93 of file KeosDynLib.h.

Referenced by CDynLib(), Load(), and Unload().


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:22 2007 for Keos by  doxygen 1.5.1-p1