$treeview $search $mathjax
00001 #ifndef __SIMFQT_SVC_SIMFQT_SERVICE_HPP 00002 #define __SIMFQT_SVC_SIMFQT_SERVICE_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // StdAir 00008 #include <stdair/stdair_basic_types.hpp> 00009 #include <stdair/stdair_service_types.hpp> 00010 #include <stdair/bom/TravelSolutionTypes.hpp> 00011 // SimFQT 00012 #include <simfqt/SIMFQT_Types.hpp> 00013 00015 namespace stdair { 00016 class STDAIR_Service; 00017 class BomRoot; 00018 struct BookingRequestStruct; 00019 struct BasLogParams; 00020 struct BasDBParams; 00021 } 00022 00023 namespace SIMFQT { 00024 00026 class SIMFQT_ServiceContext; 00027 00028 00032 class SIMFQT_Service { 00033 public: 00034 00035 // ////////////////// Constructors and Destructors ////////////////// 00047 SIMFQT_Service (const stdair::BasLogParams&); 00048 00061 SIMFQT_Service (const stdair::BasLogParams&, const stdair::BasDBParams&); 00062 00078 SIMFQT_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr); 00079 00088 void parseAndLoad (const FareFilePath& iFareFilename); 00089 00093 ~SIMFQT_Service(); 00094 00095 00096 public: 00097 // /////////// Business Methods ///////////// 00109 void buildSampleBom(); 00110 00114 void clonePersistentBom (); 00115 00120 void buildComplementaryLinks (stdair::BomRoot&); 00121 00128 stdair::BookingRequestStruct buildBookingRequest(const bool isForCRS = false); 00129 00147 void buildSampleTravelSolutions (stdair::TravelSolutionList_T&); 00148 00158 void quotePrices (const stdair::BookingRequestStruct&, 00159 stdair::TravelSolutionList_T&); 00160 00161 00162 public: 00163 // //////////////// Display support methods ///////////////// 00171 std::string csvDisplay() const; 00172 00180 std::string csvDisplay (const stdair::TravelSolutionList_T&) const; 00181 00194 std::string csvDisplay (const stdair::AirportCode_T& ioOrigin, 00195 const stdair::AirportCode_T& ioDestination, 00196 const stdair::Date_T& ioDepartureDate) const; 00197 00206 std::string list() const; 00207 00220 bool check (const stdair::AirportCode_T& ioOrigin, 00221 const stdair::AirportCode_T& ioDestination, 00222 const stdair::Date_T& ioDepartureDate) const; 00223 00224 private: 00225 // /////// Construction and Destruction helper methods /////// 00229 SIMFQT_Service(); 00230 00234 SIMFQT_Service (const SIMFQT_Service&); 00235 00245 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&, 00246 const stdair::BasDBParams&); 00247 00256 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&); 00257 00266 void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr, 00267 const bool iOwnStdairService); 00268 00273 void initServiceContext(); 00274 00281 void initSimfqtService(); 00282 00291 void initSimfqtService (const FareFilePath& iFareFilename); 00292 00296 void finalise(); 00297 00298 00299 private: 00300 // ///////// Service Context ///////// 00304 SIMFQT_ServiceContext* _simfqtServiceContext; 00305 }; 00306 } 00307 #endif // __SIMFQT_SVC_SIMFQT_SERVICE_HPP