#include <travelccm/TRAVELCCM_Service.hpp>
Public Member Functions | |
TRAVELCCM_Service (const stdair::BasLogParams &, const stdair::BasDBParams &) | |
TRAVELCCM_Service (const stdair::BasLogParams &) | |
TRAVELCCM_Service (stdair::STDAIR_ServicePtr_T) | |
~TRAVELCCM_Service () | |
void | buildSampleBom () |
void | clonePersistentBom () |
void | buildComplementaryLinks (stdair::BomRoot &) |
void | buildSampleTravelSolutions (stdair::TravelSolutionList_T &) |
stdair::BookingRequestStruct | buildSampleBookingRequest (const bool isForCRS=false) |
const stdair::TravelSolutionStruct * | chooseTravelSolution (stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &, const stdair::PassengerChoiceModel::EN_PassengerChoiceModel &iPassengerChoiceModel=stdair::PassengerChoiceModel::PRICE_ORIENTED) |
std::string | csvDisplay () const |
std::string | csvDisplay (const stdair::TravelSolutionList_T &) const |
Interface for the TRAVELCCM Services.
Definition at line 33 of file TRAVELCCM_Service.hpp.
TRAVELCCM::TRAVELCCM_Service::TRAVELCCM_Service | ( | const stdair::BasLogParams & | iLogParams, |
const stdair::BasDBParams & | iDBParams | ||
) |
Constructor.
The init() method is called; see the corresponding documentation for more details.
A reference on an output stream is given, so that log outputs can be directed onto that stream.
Moreover, database connection parameters are given, so that a session can be created on the corresponding database.
const | stdair::BasLogParams& Parameters for the output log stream. |
const | stdair::BasDBParams& Parameters for the database access. |
Definition at line 36 of file TRAVELCCM_Service.cpp.
TRAVELCCM::TRAVELCCM_Service::TRAVELCCM_Service | ( | const stdair::BasLogParams & | iLogParams | ) |
Constructor.
The init() method is called; see the corresponding documentation for more details.
A reference on an output stream is given, so that log outputs can be directed onto that stream.
const | stdair::BasLogParams& Parameters for the output log stream. |
Definition at line 57 of file TRAVELCCM_Service.cpp.
TRAVELCCM::TRAVELCCM_Service::TRAVELCCM_Service | ( | stdair::STDAIR_ServicePtr_T | ioSTDAIR_Service_ptr | ) |
Constructor.
The init() method is called; see the corresponding documentation for more details.
Moreover, as no reference on any output stream is given, it is assumed that the StdAir log service has already been initialised with the proper log output stream by some other methods in the calling chain (for instance, when the TRAVELCCM_Service is itself being initialised by another library service such as TVLSIM_Service).
stdair::STDAIR_ServicePtr_T | Reference on the STDAIR service. |
Definition at line 78 of file TRAVELCCM_Service.cpp.
TRAVELCCM::TRAVELCCM_Service::~TRAVELCCM_Service | ( | ) |
Destructor.
Definition at line 94 of file TRAVELCCM_Service.cpp.
void TRAVELCCM::TRAVELCCM_Service::buildSampleBom | ( | ) |
Build a sample BOM tree, and attach it to the BomRoot instance.
Definition at line 170 of file TRAVELCCM_Service.cpp.
References buildComplementaryLinks(), and clonePersistentBom().
void TRAVELCCM::TRAVELCCM_Service::clonePersistentBom | ( | ) |
Clone the persistent BOM object.
Definition at line 228 of file TRAVELCCM_Service.cpp.
References buildComplementaryLinks().
Referenced by buildSampleBom().
void TRAVELCCM::TRAVELCCM_Service::buildComplementaryLinks | ( | stdair::BomRoot & | ioBomRoot | ) |
Build all the complementary links in the given bom root object.
Definition at line 273 of file TRAVELCCM_Service.cpp.
Referenced by buildSampleBom(), and clonePersistentBom().
void TRAVELCCM::TRAVELCCM_Service::buildSampleTravelSolutions | ( | stdair::TravelSolutionList_T & | ioTSList | ) |
Build a sample list of travel solutions.
As of now (March 2011), that list is made of the following travel solutions:
stdair::TravelSolutionList_T& | Sample list of travel solution structures. It should be given empty. It is altered with the returned sample. |
Definition at line 279 of file TRAVELCCM_Service.cpp.
stdair::BookingRequestStruct TRAVELCCM::TRAVELCCM_Service::buildSampleBookingRequest | ( | const bool | isForCRS = false | ) |
Build a sample booking request structure.
As of now (March 2011), the sample booking request is made of the following parameters:
As of now (March 2011), the CRS-related booking request is made of the following parameters:
const | bool isForCRS Whether the sample booking request is for CRS. |
Definition at line 301 of file TRAVELCCM_Service.cpp.
const stdair::TravelSolutionStruct * TRAVELCCM::TRAVELCCM_Service::chooseTravelSolution | ( | stdair::TravelSolutionList_T & | ioTravelSolutionList, |
const stdair::BookingRequestStruct & | iBookingRequest, | ||
const stdair::PassengerChoiceModel::EN_PassengerChoiceModel & | iPassengerChoiceModel = stdair::PassengerChoiceModel::PRICE_ORIENTED |
||
) |
Choose the travel solution and the fare option within the given list of travel solutions.
The returned pointer will be NULL if no travel solution is chosen (e.g., when the Willingness-To-Pay is too low).
stdair::TravelSolutionList_T& | The list of travel solution to choose among. |
const | stdair::BookingRequestStruct& The booking request and its context. |
Definition at line 366 of file TRAVELCCM_Service.cpp.
std::string TRAVELCCM::TRAVELCCM_Service::csvDisplay | ( | ) | const |
Recursively display (dump in the returned string) the objects of the BOM tree.
Definition at line 322 of file TRAVELCCM_Service.cpp.
std::string TRAVELCCM::TRAVELCCM_Service::csvDisplay | ( | const stdair::TravelSolutionList_T & | iTravelSolutionList | ) | const |
Display (dump in the returned string) the full list of travel solution structures.
Definition at line 345 of file TRAVELCCM_Service.cpp.