TravelCCM Logo  1.00.9
C++ Travel Customer Choice Model Library
Loading...
Searching...
No Matches
TRAVELCCM_Service.hpp
Go to the documentation of this file.
1#ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
2#define __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// StdAir
8#include <stdair/basic/PassengerChoiceModel.hpp>
9#include <stdair/stdair_basic_types.hpp>
10#include <stdair/stdair_service_types.hpp>
11#include <stdair/bom/TravelSolutionTypes.hpp>
12// TravelCCM
14
16namespace stdair {
17 class STDAIR_Service;
18 class BomRoot;
19 struct BasLogParams;
20 struct BasDBParams;
21 struct BookingRequestStruct;
22}
23
24namespace TRAVELCCM {
25
27 class TRAVELCCM_ServiceContext;
28
29
34 public:
35 // ////////// Constructors and destructors //////////
51 TRAVELCCM_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
52
64 TRAVELCCM_Service (const stdair::BasLogParams&);
65
81 TRAVELCCM_Service (stdair::STDAIR_ServicePtr_T);
82
87
88
89 public:
90 // ///////////// Business methods /////////////////
94 void buildSampleBom();
95
99 void clonePersistentBom ();
100
105 void buildComplementaryLinks (stdair::BomRoot&);
106
125 void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
126
155 stdair::BookingRequestStruct
156 buildSampleBookingRequest (const bool isForCRS = false);
157
172 const stdair::TravelSolutionStruct*
173 chooseTravelSolution (stdair::TravelSolutionList_T&,
174 const stdair::BookingRequestStruct&,
175 const stdair::PassengerChoiceModel::EN_PassengerChoiceModel& iPassengerChoiceModel =
176 stdair::PassengerChoiceModel::PRICE_ORIENTED);
177
178
179 public:
180 // //////////////// Display support methods /////////////////
188 std::string csvDisplay() const;
189
197 std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
198
199
200 private:
201 // /////// Construction and Destruction helper methods ///////
210
220 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
221 const stdair::BasDBParams&);
222
231 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
232
241 void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
242 const bool iOwnStdairService);
243
248 void initServiceContext();
249
256 void initTravelCCMService();
257
261 void finalise();
262
263 private:
264 // ///////// Service Context /////////
268 TRAVELCCM_ServiceContext* _travelccmServiceContext;
269 };
270}
271#endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
Inner class holding the context for the TravelCCM Service object.
void buildComplementaryLinks(stdair::BomRoot &)
stdair::BookingRequestStruct buildSampleBookingRequest(const bool isForCRS=false)
void buildSampleTravelSolutions(stdair::TravelSolutionList_T &)
const stdair::TravelSolutionStruct * chooseTravelSolution(stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &, const stdair::PassengerChoiceModel::EN_PassengerChoiceModel &iPassengerChoiceModel=stdair::PassengerChoiceModel::PRICE_ORIENTED)
Forward declarations.