Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::LibraryObjectRegistry Class Reference

#include <LibraryObjectRegistry.hpp>

Inheritance diagram for corelinux::LibraryObjectRegistry:

corelinux::Synchronized List of all members.

Public Methods

 LibraryObjectRegistry ( void ) throw ( Assertion )
 Default constructor.

virtual ~LibraryObjectRegistry ( void )
 Virtual destructor.


Static Public Methods

LibraryObjectPtr getObject ( LibraryInstancePtr, CharCptr ) throw ( NullPointerException )
 Performs a lookup of the object description using the instance name as key. More...

void returnObject ( LibraryInstancePtr, LibraryObjectPtr ) throw ( NullPointerException )
 Returns a LibraryObject instance to the originating LibraryObjectDefinition. More...

void dropAllObjects ( LibraryInstancePtr ) throw ( NullPointerException )
 Removes all objects associated with this library instance. More...


Protected Methods

 LibraryObjectRegistry ( LibraryObjectRegistryCref ) throw ( Assertion )
 Copy constructor not allowed.

LibraryObjectPtr resolveObject ( LibraryInstancePtr, CharCptr )
 This is called from the static method to resolve either from the registry cache, or via MetaClass lookup and calling the 'create' dispatch on the MetaClass child of LibraryObject. More...

void disgardObject ( LibraryInstancePtr, LibraryObjectPtr )
 This is called from the static method to either keep the object in the cache, or get rid of it. More...

void dropObjects ( LibraryInstancePtr aPtr = NULLPTR )
 This is called from the static method or destructor to drop all associated objects of a LibraryInstance regardless of the reference count. More...


Static Protected Attributes

RegistryInstance theRegistry
 The singleton instance of LibraryObjectRegistry.


Constructor & Destructor Documentation

corelinux::LibraryObjectRegistry::LibraryObjectRegistry ( void ) throw ( Assertion )
 

Default constructor.

corelinux::LibraryObjectRegistry::~LibraryObjectRegistry ( void ) [virtual]
 

Virtual destructor.

corelinux::LibraryObjectRegistry::LibraryObjectRegistry ( LibraryObjectRegistryCref ) throw ( Assertion ) [protected]
 

Copy constructor not allowed.


Member Function Documentation

void corelinux::LibraryObjectRegistry::disgardObject ( LibraryInstancePtr aInstance,
LibraryObjectPtr aObject ) [protected]
 

This is called from the static method to either keep the object in the cache, or get rid of it.

Parameters:
LibraryInstancePtr   to LibraryInstance
LibraryObject   pointer.

void corelinux::LibraryObjectRegistry::dropAllObjects ( LibraryInstancePtr aLibraryInstance ) throw ( NullPointerException ) [static]
 

Removes all objects associated with this library instance.

Parameters:
LibraryInstance   pointer to library instance
Exceptions:
NullPointerException   if instance pointer null

void corelinux::LibraryObjectRegistry::dropObjects ( LibraryInstancePtr aInstance = NULLPTR ) [protected]
 

This is called from the static method or destructor to drop all associated objects of a LibraryInstance regardless of the reference count.

Parameters:
LibraryInstancePtr  

LibraryObjectPtr corelinux::LibraryObjectRegistry::getObject ( LibraryInstancePtr aLibraryInstance,
CharCptr aName ) throw ( NullPointerException ) [static]
 

Performs a lookup of the object description using the instance name as key.

When the description is resolved, a library objectinstance is returned. The management of the LibraryObject instances is a responsibility of the LibraryObject MetaClass

Parameters:
LibraryInstance   pointer to library instance. This is passed to the LibraryObjectDefinition if found.
CharCptr   to the name of the LibraryObject being resolved.
Exceptions:
NullPointerException   if instance pointer is null, or definition name is null
Returns:
LibraryObject pointer.

LibraryObjectPtr corelinux::LibraryObjectRegistry::resolveObject ( LibraryInstancePtr aInstance,
CharCptr aObjectName ) [protected]
 

This is called from the static method to resolve either from the registry cache, or via MetaClass lookup and calling the 'create' dispatch on the MetaClass child of LibraryObject.

Parameters:
LibraryInstancePtr   to LibraryInstance
CharCptr   to LibraryObject type class name
Returns:
LibraryObjectPtr to instance or null if not found

void corelinux::LibraryObjectRegistry::returnObject ( LibraryInstancePtr aLibraryInstance,
LibraryObjectPtr aLibraryObject ) throw ( NullPointerException ) [static]
 

Returns a LibraryObject instance to the originating LibraryObjectDefinition.

Parameters:
LibraryInstance   pointer to library instance. This is passed to the LibraryObjectDefinition if found.
LibraryObject   pointer to instance which is also passed to the LibraryObjectDefinition if found.
Exceptions:
NullPointerException   if instance pointer or object pointer is null


Member Data Documentation

RegistryInstance corelinux::LibraryObjectRegistry::theRegistry [static, protected]
 

The singleton instance of LibraryObjectRegistry.


The documentation for this class was generated from the following files:
This is the CoreLinux++ Framework reference manual
Provided by The CoreLinux Consortium