AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AIRINV_Master_ServiceContext.hpp
Go to the documentation of this file.
1 #ifndef __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP
2 #define __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // Boost
10 #include <boost/shared_ptr.hpp>
11 // StdAir
12 #include <stdair/stdair_service_types.hpp>
13 #include <stdair/bom/Inventory.hpp>
14 #include <stdair/service/ServiceAbstract.hpp>
15 // AirInv
16 #include <airinv/AIRINV_Types.hpp>
17 
18 namespace AIRINV {
19 
21  class AIRINV_Service;
22 
26  class AIRINV_Master_ServiceContext : public stdair::ServiceAbstract {
32  friend class AIRINV_Master_Service;
34 
35  private:
36  // ///////////////// Getters ///////////////////
40  stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
41  return _stdairService;
42  }
43 
47  stdair::STDAIR_Service& getSTDAIR_Service() const {
48  assert (_stdairService != NULL);
49  return *_stdairService;
50  }
51 
55  const bool getOwnStdairServiceFlag() const {
56  return _ownStdairService;
57  }
58 
63  AIRINV_Service& getAIRINV_Service() const {
64  assert (_airinvService != NULL);
65  return *_airinvService;
66  }
67 
68  // ///////////////// Setters ///////////////////
72  void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
73  const bool iOwnStdairService) {
74  _stdairService = ioSTDAIR_ServicePtr;
75  _ownStdairService = iOwnStdairService;
76  }
77 
81  void setAIRINV_Service (AIRINV_ServicePtr_T ioAIRINV_ServicePtr) {
82  _airinvService = ioAIRINV_ServicePtr;
83  }
84 
85 
86  private:
87  // //////////////////// Display Methods /////////////////////
91  const std::string shortDisplay() const;
92 
96  const std::string display() const;
97 
101  const std::string describe() const;
102 
103 
104  private:
106 
109  AIRINV_Master_ServiceContext();
113  AIRINV_Master_ServiceContext (const AIRINV_Master_ServiceContext&);
114 
118  ~AIRINV_Master_ServiceContext();
119 
123  void reset();
124 
125 
126  private:
127  // /////////////// Children ///////////////
131  stdair::STDAIR_ServicePtr_T _stdairService;
132 
136  bool _ownStdairService;
137 
138 
139  private:
140  // //////////// Attributes //////////////////
144  AIRINV_ServicePtr_T _airinvService;
145  };
146 
147 }
148 #endif // __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP