Go to the documentation of this file.00001 #ifndef __AIRRAC_SVC_AIRRAC_SERVICE_HPP
00002 #define __AIRRAC_SVC_AIRRAC_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 <airrac/AIRRAC_Types.hpp>
00013
00014
00015 namespace stdair {
00016 class STDAIR_Service;
00017 struct BasLogParams;
00018 struct BasDBParams;
00019 }
00020
00021 namespace AIRRAC {
00022
00024 class AIRRAC_ServiceContext;
00025
00029 class AIRRAC_Service {
00030 public:
00031
00032
00044 AIRRAC_Service (const stdair::BasLogParams&);
00045
00058 AIRRAC_Service (const stdair::BasLogParams&, const stdair::BasDBParams&);
00059
00075 AIRRAC_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr);
00076
00085 void parseAndLoad (const YieldFilePath& iYieldFilename);
00086
00087
00091 ~AIRRAC_Service();
00092
00093
00094 public:
00095
00099 void calculateYields (stdair::TravelSolutionList_T&);
00100
00104 void updateYields();
00105
00112 void buildSampleBom();
00113
00131 void buildSampleTravelSolutions (stdair::TravelSolutionList_T&);
00132
00133
00134 public:
00135
00143 std::string csvDisplay() const;
00144
00152 std::string csvDisplay (const stdair::TravelSolutionList_T&) const;
00153
00154
00155 private:
00156
00160 AIRRAC_Service();
00161
00165 AIRRAC_Service (const AIRRAC_Service&);
00166
00171 void initServiceContext();
00172
00182 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&,
00183 const stdair::BasDBParams&);
00184
00193 stdair::STDAIR_ServicePtr_T initStdAirService (const stdair::BasLogParams&);
00194
00203 void addStdAirService (stdair::STDAIR_ServicePtr_T,
00204 const bool iOwnStdairService);
00205
00212 void initAirracService();
00213
00222 void initAirracService (const YieldFilePath& iYieldFilename);
00223
00227 void finalise();
00228
00229
00230 private:
00231
00235 AIRRAC_ServiceContext* _airracServiceContext;
00236 };
00237 }
00238 #endif // __AIRRAC_SVC_AIRRAC_SERVICE_HPP