StdAir Logo  1.00.8
C++ Standard Airline IT Object Library
FacSTDAIRServiceContext.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 // StdAir
10 
11 namespace stdair {
12 
13  FacSTDAIRServiceContext* FacSTDAIRServiceContext::_instance = NULL;
14 
15  // //////////////////////////////////////////////////////////////////////
17  _instance = NULL;
18  }
19 
20  // //////////////////////////////////////////////////////////////////////
22 
23  if (_instance == NULL) {
24  _instance = new FacSTDAIRServiceContext();
25  assert (_instance != NULL);
26 
28  }
29  return *_instance;
30  }
31 
32  // //////////////////////////////////////////////////////////////////////
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 }
stdair::FacSupervisor::registerServiceFactory
void registerServiceFactory(FacServiceAbstract *)
Definition: FacSupervisor.cpp:44
stdair::FacSTDAIRServiceContext::instance
static FacSTDAIRServiceContext & instance()
Definition: FacSTDAIRServiceContext.cpp:21
stdair::FacSupervisor::instance
static FacSupervisor & instance()
Definition: FacSupervisor.cpp:18
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
STDAIR_ServiceContext.hpp
stdair::FacSTDAIRServiceContext::create
STDAIR_ServiceContext & create()
Definition: FacSTDAIRServiceContext.cpp:33
stdair::FacSTDAIRServiceContext::FacSTDAIRServiceContext
FacSTDAIRServiceContext()
Definition: FacSTDAIRServiceContext.hpp:54
stdair::FacServiceAbstract::_pool
ServicePool_T _pool
Definition: FacServiceAbstract.hpp:34
FacSTDAIRServiceContext.hpp
stdair::FacSTDAIRServiceContext
Factory for Bucket.
Definition: FacSTDAIRServiceContext.hpp:18
FacSupervisor.hpp
stdair::FacSTDAIRServiceContext::~FacSTDAIRServiceContext
~FacSTDAIRServiceContext()
Definition: FacSTDAIRServiceContext.cpp:16
stdair::STDAIR_ServiceContext
Class holding the context of the Stdair services.
Definition: STDAIR_ServiceContext.hpp:25