#include <stdair/service/FacSupervisor.hpp>
Public Types | |
typedef std::list< FacAbstract * > | PersistentBomFactoryPool_T |
typedef std::list< FacAbstract * > | CloneBomFactoryPool_T |
typedef std::list < FacServiceAbstract * > | ServiceFactoryPool_T |
Public Member Functions | |
void | registerPersistentBomFactory (FacAbstract *) |
void | registerCloneBomFactory (FacAbstract *) |
void | registerServiceFactory (FacServiceAbstract *) |
void | cleanPersistentBomLayer () |
void | cleanCloneBomLayer () |
void | cleanServiceLayer () |
~FacSupervisor () |
Static Public Member Functions | |
static FacSupervisor & | instance () |
static void | cleanLoggerService () |
static void | cleanDBSessionManager () |
static void | cleanAll () |
Protected Member Functions | |
FacSupervisor () | |
FacSupervisor (const FacSupervisor &) |
Singleton class to register and clean all Factories.
Definition at line 20 of file FacSupervisor.hpp.
typedef std::list<FacAbstract*> stdair::FacSupervisor::PersistentBomFactoryPool_T |
Define the pool (list) of factories.
Definition at line 25 of file FacSupervisor.hpp.
typedef std::list<FacAbstract*> stdair::FacSupervisor::CloneBomFactoryPool_T |
Definition at line 26 of file FacSupervisor.hpp.
typedef std::list<FacServiceAbstract*> stdair::FacSupervisor::ServiceFactoryPool_T |
Definition at line 27 of file FacSupervisor.hpp.
stdair::FacSupervisor::~FacSupervisor | ( | ) |
Destructor.
That destructors is applied on the static instance. It then deletes in turn all the other registered objects.
Definition at line 27 of file FacSupervisor.cpp.
References cleanCloneBomLayer(), cleanPersistentBomLayer(), and cleanServiceLayer().
|
inlineprotected |
Default Constructor.
This constructor is protected to ensure the singleton pattern.
Definition at line 120 of file FacSupervisor.hpp.
Referenced by instance().
|
inlineprotected |
Definition at line 121 of file FacSupervisor.hpp.
|
static |
Provide the unique (static) instance of the FacSupervisor object.
The singleton is instantiated when first used.
Definition at line 18 of file FacSupervisor.cpp.
References FacSupervisor().
Referenced by stdair::STDAIR_Service::clonePersistentBom(), stdair::FacBom< BOM >::instance(), and stdair::FacCloneBom< BOM >::instance().
void stdair::FacSupervisor::registerPersistentBomFactory | ( | FacAbstract * | ioFac_ptr | ) |
Register a newly instantiated persistent 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 34 of file FacSupervisor.cpp.
Referenced by stdair::FacBom< BOM >::instance().
void stdair::FacSupervisor::registerCloneBomFactory | ( | FacAbstract * | ioFac_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 39 of file FacSupervisor.cpp.
Referenced by stdair::FacCloneBom< BOM >::instance().
void stdair::FacSupervisor::registerServiceFactory | ( | FacServiceAbstract * | ioFac_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 44 of file FacSupervisor.cpp.
void stdair::FacSupervisor::cleanPersistentBomLayer | ( | ) |
Clean all the persistent registered object.
Call the clean method of all the instantiated persistent factories for the BomStructure layer.
Definition at line 49 of file FacSupervisor.cpp.
Referenced by ~FacSupervisor().
void stdair::FacSupervisor::cleanCloneBomLayer | ( | ) |
Clean all the clone registered object.
Call the clean method of all the instantiated factories for the BomStructure layer.
Definition at line 62 of file FacSupervisor.cpp.
Referenced by stdair::STDAIR_Service::clonePersistentBom(), and ~FacSupervisor().
void stdair::FacSupervisor::cleanServiceLayer | ( | ) |
Clean all Service created object.
Call the clean method of all the instantiated factories for the Service layer.
Definition at line 76 of file FacSupervisor.cpp.
Referenced by ~FacSupervisor().
|
static |
Delete the static instance of the Logger object.
Definition at line 90 of file FacSupervisor.cpp.
Referenced by cleanAll().
|
static |
Delete the static instance of the DBSessionManager object.
Definition at line 96 of file FacSupervisor.cpp.
Referenced by cleanAll().
|
static |
Clean the static instance. As the static instance (singleton) is deleted, all the other registered objects will be deleted in turn.
Definition at line 102 of file FacSupervisor.cpp.
References cleanDBSessionManager(), and cleanLoggerService().