StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
stdair::FacSupervisor Class Reference

#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 FacSupervisorinstance ()
 
static void cleanLoggerService ()
 
static void cleanDBSessionManager ()
 
static void cleanAll ()
 

Protected Member Functions

 FacSupervisor ()
 
 FacSupervisor (const FacSupervisor &)
 

Detailed Description

Singleton class to register and clean all Factories.

Definition at line 20 of file FacSupervisor.hpp.

Member Typedef Documentation

Define the pool (list) of factories.

Definition at line 25 of file FacSupervisor.hpp.

Definition at line 26 of file FacSupervisor.hpp.

Constructor & Destructor Documentation

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().

stdair::FacSupervisor::FacSupervisor ( )
inlineprotected

Default Constructor.

This constructor is protected to ensure the singleton pattern.

Definition at line 120 of file FacSupervisor.hpp.

Referenced by instance().

stdair::FacSupervisor::FacSupervisor ( const FacSupervisor )
inlineprotected

Definition at line 121 of file FacSupervisor.hpp.

Member Function Documentation

FacSupervisor & stdair::FacSupervisor::instance ( )
static

Provide the unique (static) instance of the FacSupervisor object.

The singleton is instantiated when first used.

Returns
FacSupervisor&

Definition at line 18 of file FacSupervisor.cpp.

References FacSupervisor().

Referenced by stdair::STDAIR_Service::clonePersistentBom(), stdair::FacSTDAIRServiceContext::instance(), 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

Parameters
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

Parameters
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.

Parameters
FacServiceAbstract&the concrete Factory to register.

Definition at line 44 of file FacSupervisor.cpp.

Referenced by stdair::FacSTDAIRServiceContext::instance().

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().

void stdair::FacSupervisor::cleanLoggerService ( )
static

Delete the static instance of the Logger object.

Definition at line 90 of file FacSupervisor.cpp.

Referenced by cleanAll().

void stdair::FacSupervisor::cleanDBSessionManager ( )
static

Delete the static instance of the DBSessionManager object.

Definition at line 96 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 102 of file FacSupervisor.cpp.

References cleanDBSessionManager(), and cleanLoggerService().


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