1.00.13
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
FacSTDAIRServiceContext.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
#include <
stdair/service/FacSTDAIRServiceContext.hpp
>
9
#include <
stdair/service/STDAIR_ServiceContext.hpp
>
10
11
namespace
stdair
{
12
13
FacSTDAIRServiceContext* FacSTDAIRServiceContext::_instance = NULL;
14
15
// //////////////////////////////////////////////////////////////////////
16
FacSTDAIRServiceContext::~FacSTDAIRServiceContext
() {
17
_instance = NULL;
18
}
19
20
// //////////////////////////////////////////////////////////////////////
21
FacSTDAIRServiceContext
&
FacSTDAIRServiceContext::instance
() {
22
23
if
(_instance == NULL) {
24
_instance =
new
FacSTDAIRServiceContext
();
25
assert (_instance != NULL);
26
27
FacSupervisor::instance
().
registerServiceFactory
(_instance);
28
}
29
return
*_instance;
30
}
31
32
// //////////////////////////////////////////////////////////////////////
33
STDAIR_ServiceContext
&
FacSTDAIRServiceContext::create
() {
34
STDAIR_ServiceContext
* aServiceContext_ptr = NULL;
35
36
aServiceContext_ptr =
new
STDAIR_ServiceContext
();
37
assert (aServiceContext_ptr != NULL);
38
39
// The new object is added to the Bom pool
40
_pool
.push_back (aServiceContext_ptr);
41
42
return
*aServiceContext_ptr;
43
}
44
45
}
FacSupervisor.hpp
FacSTDAIRServiceContext.hpp
STDAIR_ServiceContext.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::FacServiceAbstract::_pool
ServicePool_T _pool
Definition
FacServiceAbstract.hpp:34
stdair::FacSTDAIRServiceContext
Factory for Bucket.
Definition
FacSTDAIRServiceContext.hpp:18
stdair::FacSTDAIRServiceContext::FacSTDAIRServiceContext
FacSTDAIRServiceContext()
Definition
FacSTDAIRServiceContext.hpp:54
stdair::FacSTDAIRServiceContext::create
STDAIR_ServiceContext & create()
Definition
FacSTDAIRServiceContext.cpp:33
stdair::FacSTDAIRServiceContext::instance
static FacSTDAIRServiceContext & instance()
Definition
FacSTDAIRServiceContext.cpp:21
stdair::FacSTDAIRServiceContext::~FacSTDAIRServiceContext
~FacSTDAIRServiceContext()
Definition
FacSTDAIRServiceContext.cpp:16
stdair::FacSupervisor::registerServiceFactory
void registerServiceFactory(FacServiceAbstract *)
Definition
FacSupervisor.cpp:44
stdair::FacSupervisor::instance
static FacSupervisor & instance()
Definition
FacSupervisor.cpp:18
stdair::STDAIR_ServiceContext
Class holding the context of the Stdair services.
Definition
STDAIR_ServiceContext.hpp:25
Generated for StdAir by
1.10.0