Go to the documentation of this file.00001 #ifndef __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP
00002 #define __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP
00003
00004
00005
00006
00007
00008 #include <stdair/stdair_basic_types.hpp>
00009 #include <stdair/stdair_service_types.hpp>
00010 #include <stdair/bom/TravelSolutionTypes.hpp>
00011
00012 #include <airsched/AIRSCHED_Types.hpp>
00013
00015 namespace stdair {
00016 class STDAIR_Service;
00017 struct BasLogParams;
00018 struct BasDBParams;
00019 struct BookingRequestStruct;
00020 struct TravelSolutionStruct;
00021 }
00022
00023 namespace AIRSCHED {
00024
00026 class AIRSCHED_ServiceContext;
00027
00028
00032 class AIRSCHED_Service {
00033 public:
00034
00050 AIRSCHED_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
00051
00063 AIRSCHED_Service (const stdair::BasLogParams&);
00064
00080 AIRSCHED_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr);
00081
00090 void parseAndLoad (const stdair::Filename_T& iScheduleInputFilename);
00091
00101 void parseAndLoad (const stdair::Filename_T& iScheduleFilename,
00102 const stdair::Filename_T& iODInputFilename);
00103
00107 ~AIRSCHED_Service();
00108
00109
00110 public:
00111
00119 void buildSampleBom();
00120
00125 void buildSegmentPathList (stdair::TravelSolutionList_T&,
00126 const stdair::BookingRequestStruct&);
00127
00133 void simulate();
00134
00135
00136 public:
00137
00149 std::string jsonExport (const stdair::AirlineCode_T&,
00150 const stdair::FlightNumber_T&,
00151 const stdair::Date_T& iDepartureDate) const;
00152
00153
00154 public:
00155
00163 std::string csvDisplay() const;
00164
00178 std::string csvDisplay (const stdair::AirlineCode_T&,
00179 const stdair::FlightNumber_T&,
00180 const stdair::Date_T& iDepartureDate) const;
00181
00182
00183 private:
00184
00188 AIRSCHED_Service();
00189
00193 AIRSCHED_Service (const AIRSCHED_Service&);
00194
00204 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
00205 const stdair::BasDBParams&);
00206
00215 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
00216
00225 void addStdAirService (stdair::STDAIR_ServicePtr_T,
00226 const bool iOwnStdairService);
00227
00232 void initServiceContext();
00233
00240 void initAirschedService();
00241
00245 void finalise();
00246
00247
00248 private:
00249
00253 AIRSCHED_ServiceContext* _airschedServiceContext;
00254 };
00255 }
00256 #endif // __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP