AirTSP Logo  1.01.11
C++ Simulated Airline Travel Solution Provider (TSP) Library
Loading...
Searching...
No Matches
AIRTSP_Service.hpp
Go to the documentation of this file.
1#ifndef __AIRTSP_SVC_AIRTSP_SERVICE_HPP
2#define __AIRTSP_SVC_AIRTSP_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/stdair_file.hpp>
11#include <stdair/bom/TravelSolutionTypes.hpp>
12
14namespace stdair {
15 class STDAIR_Service;
16 class BomRoot;
17 struct BasLogParams;
18 struct BasDBParams;
19 struct BookingRequestStruct;
20 struct TravelSolutionStruct;
21}
22
23namespace AIRTSP {
24
27
28
33 public:
34 // ////////////////// Constructors and Destructors //////////////////
50 AIRTSP_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
51
63 AIRTSP_Service (const stdair::BasLogParams&);
64
80 AIRTSP_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr);
81
90 void parseAndLoad (const stdair::ScheduleFilePath&);
91
101 void parseAndLoad (const stdair::ScheduleFilePath&,
102 const stdair::ODFilePath&);
103
108
109
110 public:
111 // /////////// Business Methods /////////////
119 void buildSampleBom();
120
124 void clonePersistentBom ();
125
129 void buildComplementaryLinks (stdair::BomRoot&);
130
135 void buildSegmentPathList (stdair::TravelSolutionList_T&,
136 const stdair::BookingRequestStruct&);
137
143 void simulate();
144
145
146 public:
147 // //////////////// Export support methods /////////////////
159 std::string jsonExportFlightDateObjects (const stdair::AirlineCode_T&,
160 const stdair::FlightNumber_T&,
161 const stdair::Date_T& iDepartureDate) const;
162
163
164 public:
165 // //////////////// Display support methods /////////////////
173 std::string csvDisplay() const;
174
188 std::string csvDisplay (const stdair::AirlineCode_T&,
189 const stdair::FlightNumber_T&,
190 const stdair::Date_T& iDepartureDate) const;
191
192
193 private:
194 // /////// Construction and Destruction helper methods ///////
199
204
214 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
215 const stdair::BasDBParams&);
216
225 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
226
235 void addStdAirService (stdair::STDAIR_ServicePtr_T,
236 const bool iOwnStdairService);
237
242 void initServiceContext();
243
250 void initAirtspService();
251
255 void finalise();
256
257
258 private:
259 // ///////// Service Context /////////
263 AIRTSP_ServiceContext* _airtspServiceContext;
264 };
265}
266#endif // __AIRTSP_SVC_AIRTSP_SERVICE_HPP
Class holding the context of the Airtsp services.
Interface for the Airtsp Services.
void buildComplementaryLinks(stdair::BomRoot &)
void parseAndLoad(const stdair::ScheduleFilePath &)
std::string csvDisplay() const
std::string jsonExportFlightDateObjects(const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const
void buildSegmentPathList(stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &)
Forward declarations.