TravelCCM Logo  1.00.1
C++ Travel Customer Choice Model Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
TRAVELCCM::TRAVELCCM_Service Class Reference

#include <travelccm/TRAVELCCM_Service.hpp>

List of all members.

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

Detailed Description

Interface for the TRAVELCCM Services.

Definition at line 33 of file TRAVELCCM_Service.hpp.


Constructor & Destructor Documentation

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.

Parameters:
conststdair::BasLogParams& Parameters for the output log stream.
conststdair::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.

Parameters:
conststdair::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).

Parameters:
stdair::STDAIR_ServicePtr_TReference 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.


Member Function Documentation

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.

Note:
Do nothing for now.

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:

  • BA9
  • LHR-SYD
  • 2011-06-10
  • Q
  • WTP: 900
  • Change fee: 20; Non refundable; Saturday night stay
Parameters:
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:

  • Return trip (inbound): LHR-SYD (POS: LHR, Channel: DN),
  • Departing 10-JUN-2011 around 8:00, staying 7 days
  • Requested on 15-MAY-2011 at 10:00
  • Economy cabin, 3 persons, FF member
  • WTP: 1000.0 EUR
  • Dis-utility: 100.0 EUR/hour

As of now (March 2011), the CRS-related booking request is made of the following parameters:

  • Return trip (inbound): SIN-BKK (POS: SIN, Channel: IN),
  • Departing 30-JAN-2010 around 10:00, staying 7 days
  • Requested on 22-JAN-2010 at 10:00
  • Economy cabin, 3 persons, FF member
  • WTP: 1000.0 EUR
  • Dis-utility: 100.0 EUR/hour
Parameters:
constbool isForCRS Whether the sample booking request is for CRS.
Returns:
BookingRequestStruct& Sample booking request structure.

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).

Parameters:
stdair::TravelSolutionList_T&The list of travel solution to choose among.
conststdair::BookingRequestStruct& The booking request and its context.
Returns:
stdair::TravelSolutionStruct* The chosen travel solution. NULL when not found.

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.

Returns:
std::string Output string in which the BOM tree is logged/dumped.

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.

Returns:
std::string Output string in which the list of travel solutions is logged/dumped.

Definition at line 345 of file TRAVELCCM_Service.cpp.


The documentation for this class was generated from the following files: