SimCRS Logo  1.01.11
C++ Simulated Travel-Oriented Distribution System Library
Loading...
Searching...
No Matches
SIMCRS::FacSupervisor Class Reference

#include <simcrs/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 cleanBomLayer ()
void cleanServiceLayer ()
 ~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 17 of file FacSupervisor.hpp.

Member Typedef Documentation

◆ BomFactoryPool_T

Define the pool (list) of factories.

Definition at line 21 of file FacSupervisor.hpp.

◆ ServiceFactoryPool_T

Definition at line 22 of file FacSupervisor.hpp.

Constructor & Destructor Documentation

◆ ~FacSupervisor()

SIMCRS::FacSupervisor::~FacSupervisor ( )

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

Definition at line 41 of file FacSupervisor.cpp.

References cleanBomLayer(), and cleanServiceLayer().

◆ FacSupervisor() [1/2]

SIMCRS::FacSupervisor::FacSupervisor ( )
protected

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

Definition at line 16 of file FacSupervisor.cpp.

Referenced by FacSupervisor(), and instance().

◆ FacSupervisor() [2/2]

SIMCRS::FacSupervisor::FacSupervisor ( const FacSupervisor & )
inlineprotected

Definition at line 66 of file FacSupervisor.hpp.

References FacSupervisor().

Member Function Documentation

◆ instance()

FacSupervisor & SIMCRS::FacSupervisor::instance ( )
static

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

Returns
FacSupervisor&

Definition at line 20 of file FacSupervisor.cpp.

References FacSupervisor().

Referenced by SIMCRS::FacSimcrsServiceContext::instance().

◆ registerBomFactory()

void SIMCRS::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

Parameters
FacAbstract&the concrete Factory to register.

Definition at line 29 of file FacSupervisor.cpp.

◆ registerServiceFactory()

void SIMCRS::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 35 of file FacSupervisor.cpp.

Referenced by SIMCRS::FacSimcrsServiceContext::instance().

◆ cleanBomLayer()

void SIMCRS::FacSupervisor::cleanBomLayer ( )

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

Definition at line 47 of file FacSupervisor.cpp.

Referenced by ~FacSupervisor().

◆ cleanServiceLayer()

void SIMCRS::FacSupervisor::cleanServiceLayer ( )

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

Definition at line 61 of file FacSupervisor.cpp.

Referenced by ~FacSupervisor().

◆ cleanFactory()

void SIMCRS::FacSupervisor::cleanFactory ( )
static

Clean the static instance.
The singleton is deleted.

Definition at line 75 of file FacSupervisor.cpp.


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