1.00.4
C++ Simulated Fare Quote System Library
FacSimfqtServiceContext.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
// StdAir
7
#include <stdair/service/FacSupervisor.hpp>
8
// SimFQT
9
#include <
simfqt/factory/FacSimfqtServiceContext.hpp
>
10
#include <
simfqt/service/SIMFQT_ServiceContext.hpp
>
11
12
namespace
SIMFQT
{
13
14
FacSimfqtServiceContext* FacSimfqtServiceContext::_instance = NULL;
15
16
// //////////////////////////////////////////////////////////////////////
17
FacSimfqtServiceContext::~FacSimfqtServiceContext
() {
18
_instance = NULL;
19
}
20
21
// //////////////////////////////////////////////////////////////////////
22
FacSimfqtServiceContext
&
FacSimfqtServiceContext::instance
() {
23
24
if
(_instance == NULL) {
25
_instance =
new
FacSimfqtServiceContext
();
26
assert (_instance != NULL);
27
28
stdair::FacSupervisor::instance().registerServiceFactory (_instance);
29
}
30
return
*_instance;
31
}
32
33
// //////////////////////////////////////////////////////////////////////
34
SIMFQT_ServiceContext
&
FacSimfqtServiceContext::create
() {
35
SIMFQT_ServiceContext
* aServiceContext_ptr = NULL;
36
37
aServiceContext_ptr =
new
SIMFQT_ServiceContext
();
38
assert (aServiceContext_ptr != NULL);
39
40
// The new object is added to the Bom pool
41
_pool.push_back (aServiceContext_ptr);
42
43
return
*aServiceContext_ptr;
44
}
45
46
}
SIMFQT::FacSimfqtServiceContext
Factory for the service context.
Definition:
FacSimfqtServiceContext.hpp:22
SIMFQT::FacSimfqtServiceContext::~FacSimfqtServiceContext
~FacSimfqtServiceContext()
Definition:
FacSimfqtServiceContext.cpp:17
SIMFQT::FacSimfqtServiceContext::instance
static FacSimfqtServiceContext & instance()
Definition:
FacSimfqtServiceContext.cpp:22
FacSimfqtServiceContext.hpp
SIMFQT_ServiceContext.hpp
SIMFQT::SIMFQT_ServiceContext
Class holding the context of the SimFQT services.
Definition:
SIMFQT_ServiceContext.hpp:25
SIMFQT::FacSimfqtServiceContext::create
SIMFQT_ServiceContext & create()
Definition:
FacSimfqtServiceContext.cpp:34
SIMFQT::FacSimfqtServiceContext::FacSimfqtServiceContext
FacSimfqtServiceContext()
Definition:
FacSimfqtServiceContext.hpp:57
SIMFQT
Definition:
BasConst.cpp:7
Generated on Sat Aug 1 2020 00:00:00 for SimFQT by
1.8.18