Go to the documentation of this file.00001 #ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP
00002 #define __TRAVELCCM_SVC_TRAVELCCM_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 <travelccm/TRAVELCCM_Types.hpp>
00013
00015 namespace stdair {
00016 class STDAIR_Service;
00017 struct BasLogParams;
00018 struct BasDBParams;
00019 struct BookingRequestStruct;
00020 }
00021
00022 namespace TRAVELCCM {
00023
00025 class TRAVELCCM_ServiceContext;
00026
00027
00031 class TRAVELCCM_Service {
00032 public:
00033
00049 TRAVELCCM_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
00050
00062 TRAVELCCM_Service (const stdair::BasLogParams&);
00063
00079 TRAVELCCM_Service (stdair::STDAIR_ServicePtr_T);
00080
00084 ~TRAVELCCM_Service();
00085
00086
00087 public:
00088
00092 void buildSampleBom();
00093
00112 void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
00113
00142 stdair::BookingRequestStruct
00143 buildSampleBookingRequest (const bool isForCRS = false);
00144
00159 const stdair::TravelSolutionStruct*
00160 chooseTravelSolution (stdair::TravelSolutionList_T&,
00161 const stdair::BookingRequestStruct&);
00162
00163
00164 public:
00165
00173 std::string csvDisplay() const;
00174
00182 std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
00183
00184
00185 private:
00186
00190 TRAVELCCM_Service();
00194 TRAVELCCM_Service (const TRAVELCCM_Service&);
00195
00205 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
00206 const stdair::BasDBParams&);
00207
00216 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
00217
00226 void addStdAirService (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00227 const bool iOwnStdairService);
00228
00233 void initServiceContext();
00234
00241 void initTravelCCMService();
00242
00246 void finalise();
00247
00248 private:
00249
00253 TRAVELCCM_ServiceContext* _travelccmServiceContext;
00254 };
00255 }
00256 #endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_HPP