0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
}
Generated on Thu Aug 16 2012 03:18:50 for StdAir by
1.8.1.2