RMOL Logo Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads

RMOL::FacSupervisor Class Reference

#include <rmol/factory/FacSupervisor.hpp>

List of all members.

Public Types

typedef std::vector
< FacBomAbstract * > 
BomFactoryPool_T
typedef std::vector
< FacServiceAbstract * > 
ServiceFactoryPool_T

Public Member Functions

void registerBomFactory (FacBomAbstract *)
void registerServiceFactory (FacServiceAbstract *)
void registerLoggerService (Logger *)
void cleanBomLayer ()
void cleanServiceLayer ()
void cleanLoggerService ()
 ~FacSupervisor ()

Static Public Member Functions

static FacSupervisorinstance ()
static void cleanFactory ()

Protected Member Functions

 FacSupervisor ()
 FacSupervisor (const FacSupervisor &)


Detailed Description

Singleton class to register and clean all Factories.

Definition at line 18 of file FacSupervisor.hpp.


Member Typedef Documentation

Define the pool (list) of factories.

Definition at line 22 of file FacSupervisor.hpp.

Definition at line 23 of file FacSupervisor.hpp.


Constructor & Destructor Documentation

RMOL::FacSupervisor::~FacSupervisor (  ) 

Destructor
The static instance is deleted (and reset to NULL) by the static cleanFactory() method.

Definition at line 42 of file FacSupervisor.cpp.

References cleanBomLayer(), cleanLoggerService(), and cleanServiceLayer().

RMOL::FacSupervisor::FacSupervisor (  )  [inline, protected]

Default Constructor.
This constructor is protected to ensure the singleton pattern.

Definition at line 79 of file FacSupervisor.hpp.

Referenced by instance().

RMOL::FacSupervisor::FacSupervisor ( const FacSupervisor  )  [inline, protected]

Definition at line 80 of file FacSupervisor.hpp.


Member Function Documentation

FacSupervisor & RMOL::FacSupervisor::instance (  )  [static]

Provides the unique instance.
The singleton is instantiated when first used.

Returns:
FacSupervisor&

Definition at line 17 of file FacSupervisor.cpp.

References FacSupervisor().

void RMOL::FacSupervisor::registerBomFactory ( FacBomAbstract ioFacAbstract_ptr  ) 

Register a newly instantiated concrete factory for the Bom layer.
When a concrete Factory is firstly instantiated this factory have to register itself to the FacSupervisor

Parameters:
FacAbstract& the concrete Factory to register.

Definition at line 26 of file FacSupervisor.cpp.

void RMOL::FacSupervisor::registerServiceFactory ( FacServiceAbstract ioFacServiceAbstract_ptr  ) 

Register a newly instantiated concrete factory for the Service layer.
When a concrete Factory is firstly instantiated this factory have to register itself to the FacSupervisor

Parameters:
FacServiceAbstract& the concrete Factory to register.

Definition at line 32 of file FacSupervisor.cpp.

void RMOL::FacSupervisor::registerLoggerService ( Logger ioLogger_ptr  ) 

Register a newly instantiated concrete factory for the Logger object. In fact, as the Logger object follows the singleton pattern, the concrete factory is the Logger object itself.
When a concrete Factory is firstly instantiated this factory have to register itself to the FacSupervisor.

Parameters:
FacServiceAbstract& the concrete Factory to register.

Definition at line 37 of file FacSupervisor.cpp.

void RMOL::FacSupervisor::cleanBomLayer (  ) 

Clean all created object.
Call the clean method of all the instantiated factories for the Bom layer.

Definition at line 49 of file FacSupervisor.cpp.

Referenced by cleanFactory(), and ~FacSupervisor().

void RMOL::FacSupervisor::cleanServiceLayer (  ) 

Clean all created object.
Call the clean method of all the instantiated factories for the Service layer.

Definition at line 63 of file FacSupervisor.cpp.

Referenced by cleanFactory(), and ~FacSupervisor().

void RMOL::FacSupervisor::cleanLoggerService (  ) 

Delete the Logger object.

Definition at line 77 of file FacSupervisor.cpp.

Referenced by cleanFactory(), and ~FacSupervisor().

void RMOL::FacSupervisor::cleanFactory (  )  [static]

Clean the static instance.
The singleton is deleted.

Definition at line 82 of file FacSupervisor.cpp.

References cleanBomLayer(), cleanLoggerService(), and cleanServiceLayer().


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

Generated on Fri Sep 11 06:32:18 2009 for RMOL by Doxygen 1.5.8