Public Types | Public Member Functions | Static Public Member Functions

zeus::TLibraryManager Class Reference

#include <LibraryManager.h>

Inheritance diagram for zeus::TLibraryManager:
zeus::TZObject zeus::ILibraryManager zeus::IZUnknown zeus::IZUnknown

List of all members.

Public Types

enum  ESecurityLevel { etUseSecurity = 0, etNoSecurity = 1 }

Public Member Functions

void setDelegationInterface (ILibraryManager &rManager)
void releaseDelegationInterface ()
Retval addCodeModule (const IString &rName)
Retval addCodeModule (const IString &rName, const IString &rPath)
bool hasCodeModule (const IString &rName)
TString getCodeModulePath () const
Retval getCodeModule (const IString &rName, TLibLoader *&rpModule) const
void setCodeModulePath (const IString &rPath)
void setSecurity (ESecurityLevel eMode)
Retval remove (const IString &rName)
void removeAll ()
void setFilePrefix (const IString &rValue)
virtual Retval MQUALIFIER createObject (const IString &rCodeModule, const IString &rClassName, IZUnknown *&rpIface)
virtual Retval MQUALIFIER registerXClass (const IString &rCodeModule, const IString &rClassName, Uint &rHandle)
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Static Public Member Functions

static TLibraryManagergetInstance ()

Detailed Description

The library manager contains a list of loaded libraries and their module factories


Member Enumeration Documentation

Enumerator:
etUseSecurity 
etNoSecurity 

Member Function Documentation

Retval zeus::TLibraryManager::addCodeModule ( const IString rName ) [inline]

This adds a new code module to the library manager. The code module will be loaded if possible. If the loading fails, the module will be added anyway, so a conflict can been seen.

Parameters:
rName: Name of the code module.
Returns:
For return values see addCodeModule(name, path)
Retval zeus::TLibraryManager::addCodeModule ( const IString rName,
const IString rPath 
)

Adds a libaray to the manager

Parameters:
rName: Name of the code module
rPath: code module path
Return values:
RET_NOERROR: Code module loaded
RET_ACCESS_DENIED: Security policy denies to load this code module
RET_REQUEST_FAILED: Library already loaded
RET_INVALID_DATA: Could not load library. (Invalid name)

Security code must come here

defined(ENABLE_SECURITY_IMPL)

virtual void MQUALIFIER zeus::TLibraryManager::addRef (  ) const [virtual]
See also:
IZUnknown::addRef

Reimplemented from zeus::TZObject.

virtual Retval MQUALIFIER zeus::TLibraryManager::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [virtual]
See also:
IZUnknown::askForInterface

Reimplemented from zeus::TZObject.

Retval MQUALIFIER zeus::TLibraryManager::createObject ( const IString rCodeModule,
const IString rClassName,
IZUnknown *&  rpIface 
) [virtual]
Retval zeus::TLibraryManager::getCodeModule ( const IString rName,
TLibLoader *&  rpModule 
) const

returns the code module by name

Parameters:
rName: name of the code module
rpModule: return parameter
Return values:
RET_NOERROR: code module found and returned
RET_REQUEST_FAILED: no such code module found
TString zeus::TLibraryManager::getCodeModulePath (  ) const [inline]

Gets the code module path.

Returns:
basepath of the modules
TLibraryManager & zeus::TLibraryManager::getInstance (  ) [inline, static]

Returns the singleton object

bool zeus::TLibraryManager::hasCodeModule ( const IString rName )

Checks if a code module has been added already.

Parameters:
rName: Name of the code module
Return values:
true: Code module has been added
false: Code module has not been added
Retval MQUALIFIER zeus::TLibraryManager::registerXClass ( const IString rCodeModule,
const IString rClassName,
Uint &  rHandle 
) [virtual]
virtual void MQUALIFIER zeus::TLibraryManager::release (  ) const [virtual]
See also:
IZUnknown::release

Reimplemented from zeus::TZObject.

void zeus::TLibraryManager::releaseDelegationInterface (  ) [inline]

Release the delegation interface

Retval zeus::TLibraryManager::remove ( const IString rName )

Removes a code module from the list

Parameters:
rName: Name of the code module
Return values:
RET_NOERROR: Code module removed
RET_REQUEST_FAILED,:Code module was not registered
void zeus::TLibraryManager::removeAll (  )

Removes all libraries

void zeus::TLibraryManager::setCodeModulePath ( const IString rPath )

Sets the code module path.

Parameters:
rPath: basepath of the modules
void zeus::TLibraryManager::setDelegationInterface ( ILibraryManager rManager )

Sets a delegation interface. All method calls will be delegated.

Parameters:
rManager: Interface
void zeus::TLibraryManager::setFilePrefix ( const IString rValue ) [inline]

Sets the prefix of the librariy files

void zeus::TLibraryManager::setSecurity ( ESecurityLevel  eMode ) [inline]

Sets the security level

Parameters:
eMode: new security mode

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