#include <opentrep/factory/FacSupervisor.hpp>
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 FacSupervisor & | instance () |
static void | cleanFactory () |
Protected Member Functions | |
FacSupervisor () | |
FacSupervisor (const FacSupervisor &) | |
Singleton class to register and clean all Factories.
Definition at line 18 of file FacSupervisor.hpp.
typedef std::vector<FacBomAbstract*> OPENTREP::FacSupervisor::BomFactoryPool_T |
Define the pool (list) of factories.
Definition at line 22 of file FacSupervisor.hpp.
typedef std::vector<FacServiceAbstract*> OPENTREP::FacSupervisor::ServiceFactoryPool_T |
Definition at line 23 of file FacSupervisor.hpp.
OPENTREP::FacSupervisor::~FacSupervisor | ( | ) |
Destructor
The static instance is deleted (and reset to NULL) by the static cleanFactory() method.
Definition at line 48 of file FacSupervisor.cpp.
References cleanBomLayer(), cleanLoggerService(), and cleanServiceLayer().
|
protected |
Default Constructor.
This constructor is protected to ensure the singleton pattern.
Definition at line 17 of file FacSupervisor.cpp.
Referenced by instance().
|
inlineprotected |
Definition at line 80 of file FacSupervisor.hpp.
|
static |
Provides the unique instance.
The singleton is instantiated when first used.
Definition at line 22 of file FacSupervisor.cpp.
References FacSupervisor().
Referenced by OPENTREP::FacPlaceHolder::instance(), OPENTREP::FacWorld::instance(), OPENTREP::FacResult::instance(), OPENTREP::FacResultHolder::instance(), OPENTREP::FacOpenTrepServiceContext::instance(), OPENTREP::FacPlace::instance(), and OPENTREP::FacResultCombination::instance().
void OPENTREP::FacSupervisor::registerBomFactory | ( | FacBomAbstract * | ioFacBomAbstract_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
FacAbstract& | the concrete Factory to register. |
Definition at line 32 of file FacSupervisor.cpp.
Referenced by OPENTREP::FacPlaceHolder::instance(), OPENTREP::FacWorld::instance(), OPENTREP::FacResult::instance(), OPENTREP::FacResultHolder::instance(), OPENTREP::FacPlace::instance(), and OPENTREP::FacResultCombination::instance().
void OPENTREP::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.
FacServiceAbstract& | the concrete Factory to register. |
Definition at line 38 of file FacSupervisor.cpp.
Referenced by OPENTREP::FacOpenTrepServiceContext::instance().
void OPENTREP::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.
FacServiceAbstract& | the concrete Factory to register. |
Definition at line 43 of file FacSupervisor.cpp.
void OPENTREP::FacSupervisor::cleanBomLayer | ( | ) |
Clean all created object.
Call the clean method of all the instantiated factories for the Bom layer.
Definition at line 55 of file FacSupervisor.cpp.
Referenced by cleanFactory(), and ~FacSupervisor().
void OPENTREP::FacSupervisor::cleanServiceLayer | ( | ) |
Clean all Service created object.
Call the clean method of all the instantiated factories for the Service layer.
Definition at line 69 of file FacSupervisor.cpp.
Referenced by cleanFactory(), and ~FacSupervisor().
void OPENTREP::FacSupervisor::cleanLoggerService | ( | ) |
Delete the Logger object.
Definition at line 83 of file FacSupervisor.cpp.
Referenced by cleanFactory(), and ~FacSupervisor().
|
static |
Clean the static instance.
The singleton is deleted.
Definition at line 88 of file FacSupervisor.cpp.
References cleanBomLayer(), cleanLoggerService(), and cleanServiceLayer().