Public Member Functions | Protected Types | Protected Member Functions

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)
 defined(ENABLE_XML_BINDING)

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::FCreateClass)(IZUnknown *&rpIface) [protected]
typedef Retval MODULE_IMPORT(MQUALIFIER * zeus::TLibLoader::FRegisterLibrary)(ISingletonManager &rManager) [protected]
typedef Retval MODULE_IMPORT(MQUALIFIER * zeus::TLibLoader::FUnregisterLibrary)(ISingletonManager &rManager) [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

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
TString zeus::TLibLoader::getFileName (  ) const [inline]

Returns the file name of the library

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
void * zeus::TLibLoader::getLibraryHandle (  ) const [inline]

Returns the handle of the loaded library

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

Checks if the libray is loaded

Return values:
true: Lib is loaded
false,:Lib is not loaded
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::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::registerXClass ( const IString rClassName,
Uint &  rHandle 
)

defined(ENABLE_XML_BINDING)

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
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.
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

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:39