#include <stdair/service/FacSupervisor.hpp>
Public Types | |
typedef std::list< FacAbstract * > | BomFactoryPool_T |
typedef std::list < FacServiceAbstract * > | ServiceFactoryPool_T |
Public Member Functions | |
void | registerBomFactory (FacAbstract *) |
void | registerServiceFactory (FacServiceAbstract *) |
void | cleanBomLayer () |
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::BomFactoryPool_T |
Define the pool (list) of factories.
Definition at line 25 of file FacSupervisor.hpp.
typedef std::list<FacServiceAbstract*> stdair::FacSupervisor::ServiceFactoryPool_T |
Definition at line 26 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 cleanBomLayer(), and cleanServiceLayer().
stdair::FacSupervisor::FacSupervisor | ( | ) | [inline, protected] |
Default Constructor.
This constructor is protected to ensure the singleton pattern.
Definition at line 102 of file FacSupervisor.hpp.
Referenced by instance().
stdair::FacSupervisor::FacSupervisor | ( | const FacSupervisor & | ) | [inline, protected] |
Definition at line 103 of file FacSupervisor.hpp.
FacSupervisor & stdair::FacSupervisor::instance | ( | ) | [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::FacBom< BOM >::instance().
void stdair::FacSupervisor::registerBomFactory | ( | 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
FacBom* | The concrete Factory to register. |
Definition at line 33 of file FacSupervisor.cpp.
Referenced by stdair::FacBom< 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 38 of file FacSupervisor.cpp.
void stdair::FacSupervisor::cleanBomLayer | ( | ) |
Clean all registered object.
Call the clean method of all the instantiated factories for the BomStructure layer.
Definition at line 43 of file FacSupervisor.cpp.
Referenced by ~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 57 of file FacSupervisor.cpp.
Referenced by ~FacSupervisor().
void stdair::FacSupervisor::cleanLoggerService | ( | ) | [static] |
Delete the static instance of the Logger object.
Definition at line 71 of file FacSupervisor.cpp.
Referenced by cleanAll().
void stdair::FacSupervisor::cleanDBSessionManager | ( | ) | [static] |
Delete the static instance of the DBSessionManager object.
Definition at line 77 of file FacSupervisor.cpp.
Referenced by cleanAll().
void stdair::FacSupervisor::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 83 of file FacSupervisor.cpp.
References cleanDBSessionManager(), and cleanLoggerService().