SimFQT Logo  1.00.6
C++ Simulated Fare Quote System Library
Loading...
Searching...
No Matches
SIMFQT_Service.hpp
Go to the documentation of this file.
1#ifndef __SIMFQT_SVC_SIMFQT_SERVICE_HPP
2#define __SIMFQT_SVC_SIMFQT_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// SimFQT
13
15namespace stdair {
16 class STDAIR_Service;
17 class BomRoot;
18 struct BookingRequestStruct;
19 struct BasLogParams;
20 struct BasDBParams;
21}
22
23namespace SIMFQT {
24
26 class SIMFQT_ServiceContext;
27
28
33 public:
34
35 // ////////////////// Constructors and Destructors //////////////////
47 SIMFQT_Service (const stdair::BasLogParams&);
48
61 SIMFQT_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
62
78 SIMFQT_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr);
79
88 void parseAndLoad (const FareFilePath& iFareFilename);
89
94
95
96 public:
97 // /////////// Business Methods /////////////
109 void buildSampleBom();
110
114 void clonePersistentBom ();
115
120 void buildComplementaryLinks (stdair::BomRoot&);
121
128 stdair::BookingRequestStruct buildBookingRequest(const bool isForCRS = false);
129
147 void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
148
158 void quotePrices (const stdair::BookingRequestStruct&,
159 stdair::TravelSolutionList_T&);
160
161
162 public:
163 // //////////////// Display support methods /////////////////
171 std::string csvDisplay() const;
172
180 std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
181
194 std::string csvDisplay (const stdair::AirportCode_T& ioOrigin,
195 const stdair::AirportCode_T& ioDestination,
196 const stdair::Date_T& ioDepartureDate) const;
197
206 std::string list() const;
207
220 bool check (const stdair::AirportCode_T& ioOrigin,
221 const stdair::AirportCode_T& ioDestination,
222 const stdair::Date_T& ioDepartureDate) const;
223
224 private:
225 // /////// Construction and Destruction helper methods ///////
230
235
245 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
246 const stdair::BasDBParams&);
247
256 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
257
266 void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
267 const bool iOwnStdairService);
268
273 void initServiceContext();
274
281 void initSimfqtService();
282
291 void initSimfqtService (const FareFilePath& iFareFilename);
292
296 void finalise();
297
298
299 private:
300 // ///////// Service Context /////////
304 SIMFQT_ServiceContext* _simfqtServiceContext;
305 };
306}
307#endif // __SIMFQT_SVC_SIMFQT_SERVICE_HPP
Class holding the context of the SimFQT services.
Interface for the SIMFQT Services.
bool check(const stdair::AirportCode_T &ioOrigin, const stdair::AirportCode_T &ioDestination, const stdair::Date_T &ioDepartureDate) const
void buildComplementaryLinks(stdair::BomRoot &)
void buildSampleTravelSolutions(stdair::TravelSolutionList_T &)
std::string list() const
void parseAndLoad(const FareFilePath &iFareFilename)
stdair::BookingRequestStruct buildBookingRequest(const bool isForCRS=false)
void quotePrices(const stdair::BookingRequestStruct &, stdair::TravelSolutionList_T &)
std::string csvDisplay() const
Forward declarations.
Definition: FareParser.hpp:16