$treeview $search $mathjax
00001 #ifndef __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP 00002 #define __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // STL 00008 #include <string> 00009 // Boost 00010 #include <boost/shared_ptr.hpp> 00011 // StdAir 00012 #include <stdair/stdair_service_types.hpp> 00013 #include <stdair/service/ServiceAbstract.hpp> 00014 // RMOL 00015 #include <rmol/RMOL_Types.hpp> 00016 // AIRRAC 00017 #include <airrac/AIRRAC_Types.hpp> 00018 // SEvMgr 00019 #include <sevmgr/SEVMGR_Types.hpp> 00020 // AirInv 00021 #include <airinv/AIRINV_Types.hpp> 00022 00023 namespace AIRINV { 00024 00028 class AIRINV_ServiceContext : public stdair::ServiceAbstract { 00034 friend class AIRINV_Service; 00035 friend class FacAirinvServiceContext; 00036 00037 private: 00038 // ///////////////// Getters /////////////////// 00042 stdair::AirlineCode_T getAirlineCode() const { 00043 return _airlineCode; 00044 } 00045 00049 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const { 00050 return _stdairService; 00051 } 00052 00056 stdair::STDAIR_Service& getSTDAIR_Service() const { 00057 assert (_stdairService != NULL); 00058 return *_stdairService; 00059 } 00060 00064 const bool getOwnStdairServiceFlag() const { 00065 return _ownStdairService; 00066 } 00067 00071 RMOL::RMOL_Service& getRMOL_Service() const { 00072 assert (_rmolService != NULL); 00073 return *_rmolService; 00074 } 00075 00079 AIRRAC::AIRRAC_Service& getAIRRAC_Service() const { 00080 assert (_airracService != NULL); 00081 return *_airracService; 00082 } 00083 00087 SEVMGR::SEVMGR_ServicePtr_T getSEVMGR_ServicePtr() const { 00088 return _sevmgrService; 00089 } 00090 00094 SEVMGR::SEVMGR_Service& getSEVMGR_Service() const { 00095 assert (_sevmgrService != NULL); 00096 return *_sevmgrService; 00097 } 00098 00102 const bool getOwnSEVMGRServiceFlag() const { 00103 return _ownSEVMGRService; 00104 } 00105 00106 00107 private: 00108 // ///////////////// Setters /////////////////// 00112 void setAirlineCode (const stdair::AirlineCode_T& iAirlineCode) { 00113 _airlineCode = iAirlineCode; 00114 } 00115 00119 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr, 00120 const bool iOwnStdairService) { 00121 _stdairService = ioSTDAIR_ServicePtr; 00122 _ownStdairService = iOwnStdairService; 00123 } 00124 00128 void setRMOL_Service (RMOL::RMOL_ServicePtr_T ioRMOL_ServicePtr) { 00129 _rmolService = ioRMOL_ServicePtr; 00130 } 00131 00135 void setAIRRAC_Service (AIRRAC::AIRRAC_ServicePtr_T ioAIRRAC_ServicePtr) { 00136 _airracService = ioAIRRAC_ServicePtr; 00137 } 00138 00142 void setSEVMGR_Service (SEVMGR::SEVMGR_ServicePtr_T ioSEVMGR_ServicePtr, 00143 const bool iOwnSEVMGRService) { 00144 _sevmgrService = ioSEVMGR_ServicePtr; 00145 _ownSEVMGRService = iOwnSEVMGRService; 00146 } 00147 00148 private: 00149 // //////////////////// Display Methods ///////////////////// 00153 const std::string shortDisplay() const; 00154 00158 const std::string display() const; 00159 00163 const std::string describe() const; 00164 00165 00166 private: 00168 00171 AIRINV_ServiceContext (const stdair::AirlineCode_T&); 00175 AIRINV_ServiceContext(); 00179 AIRINV_ServiceContext (const AIRINV_ServiceContext&); 00180 00184 ~AIRINV_ServiceContext(); 00185 00189 void reset(); 00190 00191 00192 private: 00193 // /////////////// Children /////////////// 00197 stdair::STDAIR_ServicePtr_T _stdairService; 00198 00202 bool _ownStdairService; 00203 00207 RMOL::RMOL_ServicePtr_T _rmolService; 00208 00212 SEVMGR::SEVMGR_ServicePtr_T _sevmgrService; 00213 00217 bool _ownSEVMGRService; 00218 00222 AIRRAC::AIRRAC_ServicePtr_T _airracService; 00223 00224 private: 00225 // //////////// Attributes //////////// 00230 stdair::AirlineCode_T _airlineCode; 00231 }; 00232 00233 } 00234 #endif // __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP