zeus::TLibLoader Class Reference

#include <LibLoader.h>

Inheritance diagram for zeus::TLibLoader:

zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TLibLoader (const TString &rstrName, const TString &rstrFileName)
TString getFileName () const
void * getLibraryHandle () const
Retval registerLibrary ()
Retval unregisterLibrary (bool bLog=true)
Retval createObject (const IString &rClassName, IZUnknown *&rpIface)
Retval load ()
Retval unload (bool bLog=true)
bool isLoaded () const
void * getFunction (const TString &rFunctName)
Retval registerXClass (const IString &rClassName, Uint &rHandle)

Protected Types

typedef Retval MODULE_IMPORT(MQUALIFIER * FRegisterLibrary )(ISingletonManager &rManager)
typedef Retval MODULE_IMPORT(MQUALIFIER * FUnregisterLibrary )(ISingletonManager &rManager)
typedef Retval MODULE_IMPORT(MQUALIFIER * FCreateClass )(IZUnknown *&rpIface)

Protected Member Functions

virtual ~TLibLoader ()


Detailed Description

Der Library Loader ist der API Wrapper des Betriebssystem-spezifischen Laden einer Library

Member Typedef Documentation

typedef Retval MODULE_IMPORT(MQUALIFIER * zeus::TLibLoader::FRegisterLibrary)(ISingletonManager &rManager) [protected]

typedef Retval MODULE_IMPORT(MQUALIFIER * zeus::TLibLoader::FUnregisterLibrary)(ISingletonManager &rManager) [protected]

typedef Retval MODULE_IMPORT(MQUALIFIER * zeus::TLibLoader::FCreateClass)(IZUnknown *&rpIface) [protected]


Constructor & Destructor Documentation

zeus::TLibLoader::TLibLoader ( const TString rstrName,
const TString rstrFileName 
)

Creates a libloader object

Parameters:
rstrName : Name of the library
rstrFileName : File name

zeus::TLibLoader::~TLibLoader (  )  [protected, virtual]

Destroys the lib loader


Member Function Documentation

TString zeus::TLibLoader::getFileName (  )  const [inline]

Returns the file name of the library

void * zeus::TLibLoader::getLibraryHandle (  )  const [inline]

Returns the handle of the loaded library

Retval zeus::TLibLoader::registerLibrary (  ) 

Register a code module library. If this method succeeded the method unregisterLibrary().

Return values:
RET_NOERROR : module registered
RET_REQUEST_FAILED : registration failed

Retval zeus::TLibLoader::unregisterLibrary ( bool  bLog = true  ) 

Unregister a code module library.

Parameters:
bLog : using the logging
Return values:
RET_NOERROR : module unregistered
RET_REQUEST_FAILED : unregistration failed

Retval zeus::TLibLoader::createObject ( const IString rClassName,
IZUnknown *&  rpIface 
)

This method creates an object out of the codemodule

Parameters:
rClassName : Name of the class
rpIface : Reference to return
Return values:
RET_NOERROR : Object created
RET_REQUEST_FAILED : library not valid or factory function returned error
RET_METHOD_NOT_IMPL : method for classname not implemented

Retval zeus::TLibLoader::load (  ) 

loads the Library

Return values:
RET_NOERROR : Library loaded
RET_INVALID_DATA : not able to load the library

Retval zeus::TLibLoader::unload ( bool  bLog = true  ) 

Unloads the library

Parameters:
bLog : using the logging
Return values:
RET_NOERROR : Library unloaded
RET_REQUEST_FAILED : Failed. Library was not loaded.

bool zeus::TLibLoader::isLoaded (  )  const [inline]

Checks if the libray is loaded

Return values:
true : Lib is loaded
false,: Lib is not loaded

void * zeus::TLibLoader::getFunction ( const TString rFunctName  ) 

Returns the pointer of a library function.

Return values:
NULL : Function not found
> NULL: Pointer of the function

Retval zeus::TLibLoader::registerXClass ( const IString rClassName,
Uint &  rHandle 
)

Register a exported function for creating an x-object. If there is a method found it will be used to create X-Objects with a configuration ClassName="rClassName" and CodeModule="Name of Library"

Parameters:
rClassName : class name of the X-Object
rHandle : Returns the handle of the method registration
Return values:
RET_REQUEST_FAILED : registration failed because the library is not valid or the method is already registered
RET_NOERROR : registration succeeded
RET_METHOD_NOT_IMPL : method for classname not implemented


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:35 2009