AirSched Logo  0.1.4
C++ Simulated Airline Schedule Manager Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AIRSCHED_Service.hpp
Go to the documentation of this file.
1 #ifndef __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP
2 #define __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
8 #include <stdair/stdair_basic_types.hpp>
9 #include <stdair/stdair_service_types.hpp>
10 #include <stdair/bom/TravelSolutionTypes.hpp>
11 // AirSched
13 
15 namespace stdair {
16  class STDAIR_Service;
17  struct BasLogParams;
18  struct BasDBParams;
19  struct BookingRequestStruct;
20  struct TravelSolutionStruct;
21 }
22 
23 namespace AIRSCHED {
24 
27 
28 
33  public:
34  // ////////////////// Constructors and Destructors //////////////////
50  AIRSCHED_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
51 
63  AIRSCHED_Service (const stdair::BasLogParams&);
64 
80  AIRSCHED_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr);
81 
90  void parseAndLoad (const stdair::Filename_T& iScheduleInputFilename);
91 
101  void parseAndLoad (const stdair::Filename_T& iScheduleFilename,
102  const stdair::Filename_T& iODInputFilename);
103 
108 
109 
110  public:
111  // /////////// Business Methods /////////////
119  void buildSampleBom();
120 
125  void buildSegmentPathList (stdair::TravelSolutionList_T&,
126  const stdair::BookingRequestStruct&);
127 
133  void simulate();
134 
135 
136  public:
137  // //////////////// Export support methods /////////////////
149  std::string jsonExport (const stdair::AirlineCode_T&,
150  const stdair::FlightNumber_T&,
151  const stdair::Date_T& iDepartureDate) const;
152 
153 
154  public:
155  // //////////////// Display support methods /////////////////
163  std::string csvDisplay() const;
164 
178  std::string csvDisplay (const stdair::AirlineCode_T&,
179  const stdair::FlightNumber_T&,
180  const stdair::Date_T& iDepartureDate) const;
181 
182 
183  private:
184  // /////// Construction and Destruction helper methods ///////
189 
194 
204  stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
205  const stdair::BasDBParams&);
206 
215  stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
216 
225  void addStdAirService (stdair::STDAIR_ServicePtr_T,
226  const bool iOwnStdairService);
227 
232  void initServiceContext();
233 
240  void initAirschedService();
241 
245  void finalise();
246 
247 
248  private:
249  // ///////// Service Context /////////
253  AIRSCHED_ServiceContext* _airschedServiceContext;
254  };
255 }
256 #endif // __AIRSCHED_SVC_AIRSCHED_SERVICE_HPP