1.00.10
C++ library of Revenue Management and Optimisation classes and functions
Loading...
Searching...
No Matches
FacRmolServiceContext.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
// RMOL
9
#include <
rmol/factory/FacRmolServiceContext.hpp
>
10
#include <
rmol/service/RMOL_ServiceContext.hpp
>
11
12
namespace
RMOL
{
13
14
FacRmolServiceContext* FacRmolServiceContext::_instance = NULL;
15
16
// //////////////////////////////////////////////////////////////////////
17
FacRmolServiceContext::~FacRmolServiceContext
() {
18
_instance = NULL;
19
}
20
21
// //////////////////////////////////////////////////////////////////////
22
FacRmolServiceContext
&
FacRmolServiceContext::instance
() {
23
24
if
(_instance == NULL) {
25
_instance =
new
FacRmolServiceContext
();
26
assert (_instance != NULL);
27
28
stdair::FacSupervisor::instance().registerServiceFactory (_instance);
29
}
30
return
*_instance;
31
}
32
33
// //////////////////////////////////////////////////////////////////////
34
RMOL_ServiceContext
&
FacRmolServiceContext::create
() {
35
RMOL_ServiceContext
* aServiceContext_ptr = NULL;
36
37
aServiceContext_ptr =
new
RMOL_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
}
RMOL_ServiceContext.hpp
FacRmolServiceContext.hpp
RMOL
Definition
BasConst.cpp:7
RMOL::FacRmolServiceContext
Factory for the service context.
Definition
FacRmolServiceContext.hpp:22
RMOL::FacRmolServiceContext::instance
static FacRmolServiceContext & instance()
Definition
FacRmolServiceContext.cpp:22
RMOL::FacRmolServiceContext::create
RMOL_ServiceContext & create()
Definition
FacRmolServiceContext.cpp:34
RMOL::FacRmolServiceContext::~FacRmolServiceContext
~FacRmolServiceContext()
Definition
FacRmolServiceContext.cpp:17
RMOL::FacRmolServiceContext::FacRmolServiceContext
FacRmolServiceContext()
Definition
FacRmolServiceContext.hpp:57
RMOL::RMOL_ServiceContext
Inner class holding the context for the RMOL Service object.
Definition
RMOL_ServiceContext.hpp:29
Generated for RMOL by
1.12.0