AirInv Logo  1.00.11
C++ Simulated Airline Inventory Management System Library
Loading...
Searching...
No Matches
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// SEvMgr
16#include <sevmgr/SEVMGR_Types.hpp>
17// AirInv
19
20namespace AIRINV {
21
23 class AIRINV_Service;
24
28 class AIRINV_Master_ServiceContext : public stdair::ServiceAbstract {
36
37 private:
38 // ///////////////// Getters ///////////////////
42 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
43 return _stdairService;
44 }
45
49 SEVMGR::SEVMGR_ServicePtr_T getSEVMGR_ServicePtr() const {
50 return _sevmgrService;
51 }
52
56 stdair::STDAIR_Service& getSTDAIR_Service() const {
57 assert (_stdairService != NULL);
58 return *_stdairService;
59 }
60
64 const bool getOwnStdairServiceFlag() const {
65 return _ownStdairService;
66 }
67
71 const bool getOwnSEVMGRServiceFlag() const {
72 return _ownSEVMGRService;
73 }
74
79 AIRINV_Service& getAIRINV_Service() const {
80 assert (_airinvService != NULL);
81 return *_airinvService;
82 }
83
84 // ///////////////// Setters ///////////////////
88 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
89 const bool iOwnStdairService) {
90 _stdairService = ioSTDAIR_ServicePtr;
91 _ownStdairService = iOwnStdairService;
92 }
93
97 void setSEVMGR_Service (SEVMGR::SEVMGR_ServicePtr_T ioSEVMGR_ServicePtr,
98 const bool iOwnSEVMGRService) {
99 _sevmgrService = ioSEVMGR_ServicePtr;
100 _ownSEVMGRService = iOwnSEVMGRService;
101 }
102
106 void setAIRINV_Service (AIRINV_ServicePtr_T ioAIRINV_ServicePtr) {
107 _airinvService = ioAIRINV_ServicePtr;
108 }
109
110
111 private:
112 // //////////////////// Display Methods /////////////////////
116 const std::string shortDisplay() const;
117
121 const std::string display() const;
122
126 const std::string describe() const;
127
128
129 private:
131
134 AIRINV_Master_ServiceContext();
138 AIRINV_Master_ServiceContext (const AIRINV_Master_ServiceContext&);
139
143 ~AIRINV_Master_ServiceContext();
144
148 void reset();
149
150
151 private:
152 // /////////////// Children ///////////////
156 stdair::STDAIR_ServicePtr_T _stdairService;
157
161 bool _ownStdairService;
162
166 SEVMGR::SEVMGR_ServicePtr_T _sevmgrService;
167
171 bool _ownSEVMGRService;
172
173
174 private:
175 // //////////// Attributes //////////////////
179 AIRINV_ServicePtr_T _airinvService;
180 };
181
182}
183#endif // __AIRINV_SVC_AIRINVMASTERSERVICECONTEXT_HPP
Interface for the AIRINV Services.
boost::shared_ptr< AIRINV_Service > AIRINV_ServicePtr_T