TravelCCM Logo  1.00.9
C++ Travel Customer Choice Model Library
ChoiceManager.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 // StdAir
7 #include <stdair/bom/TravelSolutionStruct.hpp>
8 #include <stdair/bom/BookingRequestStruct.hpp>
9 // TravelCCM
12 
13 namespace TRAVELCCM {
14 
15  // ////////////////////////////////////////////////////////////////////
16  const stdair::TravelSolutionStruct* ChoiceManager::
17  chooseTravelSolution (stdair::TravelSolutionList_T& ioTravelSolutionList,
18  const stdair::BookingRequestStruct& iBookingRequest,
19  const stdair::PassengerChoiceModel::EN_PassengerChoiceModel& iPassengerChoiceModel) {
20 
21  const CustomerChoiceModel* lCustomerChoiceModel =
22  CustomerChoiceModel::create (iPassengerChoiceModel);
23 
24  // Return the adequate travel solution according to the chosen passenger
25  // choice model
26  const stdair::TravelSolutionStruct* oTravelSolution_ptr =
27  lCustomerChoiceModel->chooseTravelSolution (ioTravelSolutionList,
28  iBookingRequest);
29 
30  return oTravelSolution_ptr;
31  }
32 
33 }
static const stdair::TravelSolutionStruct * chooseTravelSolution(stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &, const stdair::PassengerChoiceModel::EN_PassengerChoiceModel &)
static const CustomerChoiceModel * create(const stdair::PassengerChoiceModel::EN_PassengerChoiceModel &)
virtual const stdair::TravelSolutionStruct * chooseTravelSolution(stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &) const =0