Go to the documentation of this file.00001 #ifndef __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP
00002 #define __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP
00003
00004
00005
00006
00007
00008 #include <string>
00009
00010 #include <boost/shared_ptr.hpp>
00011
00012 #include <stdair/stdair_service_types.hpp>
00013 #include <stdair/service/ServiceAbstract.hpp>
00014
00015 #include <rmol/RMOL_Types.hpp>
00016
00017 #include <airrac/AIRRAC_Types.hpp>
00018
00019 #include <airinv/AIRINV_Types.hpp>
00020
00021 namespace AIRINV {
00022
00026 class AIRINV_ServiceContext : public stdair::ServiceAbstract {
00032 friend class AIRINV_Service;
00033 friend class FacAirinvServiceContext;
00034
00035 private:
00036
00040 stdair::AirlineCode_T getAirlineCode() const {
00041 return _airlineCode;
00042 }
00043
00047 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00048 return _stdairService;
00049 }
00050
00054 stdair::STDAIR_Service& getSTDAIR_Service() const {
00055 assert (_stdairService != NULL);
00056 return *_stdairService;
00057 }
00058
00062 const bool getOwnStdairServiceFlag() const {
00063 return _ownStdairService;
00064 }
00065
00069 RMOL::RMOL_Service& getRMOL_Service() const {
00070 assert (_rmolService != NULL);
00071 return *_rmolService;
00072 }
00073
00077 AIRRAC::AIRRAC_Service& getAIRRAC_Service() const {
00078 assert (_airracService != NULL);
00079 return *_airracService;
00080 }
00081
00082
00083 private:
00084
00088 void setAirlineCode (const stdair::AirlineCode_T& iAirlineCode) {
00089 _airlineCode = iAirlineCode;
00090 }
00091
00095 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00096 const bool iOwnStdairService) {
00097 _stdairService = ioSTDAIR_ServicePtr;
00098 _ownStdairService = iOwnStdairService;
00099 }
00100
00104 void setRMOL_Service (RMOL::RMOL_ServicePtr_T ioRMOL_ServicePtr) {
00105 _rmolService = ioRMOL_ServicePtr;
00106 }
00107
00111 void setAIRRAC_Service (AIRRAC::AIRRAC_ServicePtr_T ioAIRRAC_ServicePtr) {
00112 _airracService = ioAIRRAC_ServicePtr;
00113 }
00114
00115
00116 private:
00117
00121 const std::string shortDisplay() const;
00122
00126 const std::string display() const;
00127
00131 const std::string describe() const;
00132
00133
00134 private:
00136
00139 AIRINV_ServiceContext (const stdair::AirlineCode_T&);
00143 AIRINV_ServiceContext();
00147 AIRINV_ServiceContext (const AIRINV_ServiceContext&);
00148
00152 ~AIRINV_ServiceContext();
00153
00157 void reset();
00158
00159
00160 private:
00161
00165 stdair::STDAIR_ServicePtr_T _stdairService;
00166
00170 bool _ownStdairService;
00171
00175 RMOL::RMOL_ServicePtr_T _rmolService;
00176
00180 AIRRAC::AIRRAC_ServicePtr_T _airracService;
00181
00182 private:
00183
00188 stdair::AirlineCode_T _airlineCode;
00189 };
00190
00191 }
00192 #endif // __AIRINV_SVC_AIRINVSERVICECONTEXT_HPP