$treeview $search $mathjax
TravelCCM Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

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 &  ,
const stdair::BasDBParams &   
)

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:
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 &   ) 

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

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


Member Function Documentation

void TRAVELCCM::TRAVELCCM_Service::buildSampleBom (  ) 

void TRAVELCCM::TRAVELCCM_Service::clonePersistentBom (  ) 

void TRAVELCCM::TRAVELCCM_Service::buildComplementaryLinks ( stdair::BomRoot &   ) 

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

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.

References TRAVELCCM::TRAVELCCM_ServiceContext::getSTDAIR_Service().

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:
const bool isForCRS Whether the sample booking request is for CRS.
Returns:
BookingRequestStruct& Sample booking request structure.

Definition at line 301 of file TRAVELCCM_Service.cpp.

References TRAVELCCM::TRAVELCCM_ServiceContext::getSTDAIR_Service().

const stdair::TravelSolutionStruct * TRAVELCCM::TRAVELCCM_Service::chooseTravelSolution ( stdair::TravelSolutionList_T &  ,
const stdair::BookingRequestStruct &  ,
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.
const stdair::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.

References TRAVELCCM::ChoiceManager::chooseTravelSolution().

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.

References TRAVELCCM::TRAVELCCM_ServiceContext::getSTDAIR_Service().

std::string TRAVELCCM::TRAVELCCM_Service::csvDisplay ( const stdair::TravelSolutionList_T &   )  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.

References TRAVELCCM::TRAVELCCM_ServiceContext::getSTDAIR_Service().


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