StdAir Logo  1.00.3
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 }
Handle on the StdAir library context.
static FacSupervisor & instance()
Class holding the context of the Stdair services.
static FacSTDAIRServiceContext & instance()
void registerServiceFactory(FacServiceAbstract *)