1.00.1
C++ Travel Customer Choice Model Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
Pages
FacTRAVELCCMServiceContext.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
// TravelCCM
9
#include <
travelccm/factory/FacTRAVELCCMServiceContext.hpp
>
10
#include <
travelccm/service/TRAVELCCM_ServiceContext.hpp
>
11
12
namespace
TRAVELCCM {
13
14
FacTRAVELCCMServiceContext* FacTRAVELCCMServiceContext::_instance = NULL;
15
16
// ////////////////////////////////////////////////////////////////////
17
FacTRAVELCCMServiceContext::~FacTRAVELCCMServiceContext
() {
18
_instance = NULL;
19
}
20
21
// ////////////////////////////////////////////////////////////////////
22
FacTRAVELCCMServiceContext
&
FacTRAVELCCMServiceContext::instance
() {
23
24
if
(_instance == NULL) {
25
_instance =
new
FacTRAVELCCMServiceContext
();
26
assert (_instance != NULL);
27
28
stdair::FacSupervisor::instance().registerServiceFactory (_instance);
29
}
30
return
*_instance;
31
}
32
33
// ////////////////////////////////////////////////////////////////////
34
TRAVELCCM_ServiceContext
&
FacTRAVELCCMServiceContext::create
() {
35
TRAVELCCM_ServiceContext
* aServiceContext_ptr = NULL;
36
37
aServiceContext_ptr =
new
TRAVELCCM_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
}
TRAVELCCM::FacTRAVELCCMServiceContext::FacTRAVELCCMServiceContext
FacTRAVELCCMServiceContext()
Definition:
FacTRAVELCCMServiceContext.hpp:42
TRAVELCCM::FacTRAVELCCMServiceContext::instance
static FacTRAVELCCMServiceContext & instance()
Definition:
FacTRAVELCCMServiceContext.cpp:22
TRAVELCCM::TRAVELCCM_ServiceContext
Inner class holding the context for the TravelCCM Service object.
Definition:
TRAVELCCM_ServiceContext.hpp:23
TRAVELCCM::FacTRAVELCCMServiceContext::create
TRAVELCCM_ServiceContext & create()
Definition:
FacTRAVELCCMServiceContext.cpp:34
TRAVELCCM::FacTRAVELCCMServiceContext
Definition:
FacTRAVELCCMServiceContext.hpp:18
TRAVELCCM::FacTRAVELCCMServiceContext::~FacTRAVELCCMServiceContext
~FacTRAVELCCMServiceContext()
Definition:
FacTRAVELCCMServiceContext.cpp:17
TRAVELCCM_ServiceContext.hpp
FacTRAVELCCMServiceContext.hpp
Generated on Mon Sep 1 2014 12:45:43 for TravelCCM by
1.8.7