$treeview $search $mathjax
AirTSP Logo  1.01.2
$projectbrief
$projectbrief
$searchbox

AIRTSP::AIRTSP_Service Class Reference

Interface for the Airtsp Services. More...

#include <airtsp/AIRTSP_Service.hpp>

List of all members.

Public Member Functions

 AIRTSP_Service (const stdair::BasLogParams &, const stdair::BasDBParams &)
 AIRTSP_Service (const stdair::BasLogParams &)
 AIRTSP_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr)
void parseAndLoad (const stdair::ScheduleFilePath &)
void parseAndLoad (const stdair::ScheduleFilePath &, const stdair::ODFilePath &)
 ~AIRTSP_Service ()
void buildSampleBom ()
void clonePersistentBom ()
void buildComplementaryLinks (stdair::BomRoot &)
void buildSegmentPathList (stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &)
void simulate ()
std::string jsonExportFlightDateObjects (const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const
std::string csvDisplay () const
std::string csvDisplay (const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const

Detailed Description

Interface for the Airtsp Services.

Definition at line 32 of file AIRTSP_Service.hpp.


Constructor & Destructor Documentation

AIRTSP::AIRTSP_Service::AIRTSP_Service ( const stdair::BasLogParams &  iLogParams,
const stdair::BasDBParams &  iDBParams 
)

Constructor.

The initAirtspService() 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 62 of file AIRTSP_Service.cpp.

AIRTSP::AIRTSP_Service::AIRTSP_Service ( const stdair::BasLogParams &  iLogParams  ) 

Constructor.

The initAirtspService() 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 42 of file AIRTSP_Service.cpp.

AIRTSP::AIRTSP_Service::AIRTSP_Service ( stdair::STDAIR_ServicePtr_T  ioSTDAIR_ServicePtr  ) 

Constructor.

The initAirtspService() 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 AIRTSP_Service is itself being initialised by another library service such as SIMCRS_Service).

Parameters:
stdair::STDAIR_ServicePtr_T Reference on the STDAIR service.

Definition at line 84 of file AIRTSP_Service.cpp.

AIRTSP::AIRTSP_Service::~AIRTSP_Service (  ) 

Destructor.

Definition at line 100 of file AIRTSP_Service.cpp.


Member Function Documentation

void AIRTSP::AIRTSP_Service::parseAndLoad ( const stdair::ScheduleFilePath &  iScheduleInputFilePath  ) 

Parse the schedule input file and load it into memory.

The CSV file, describing the airline schedule for the simulator, is parsed and instantiated in memory accordingly.

Parameters:
const stdair::ScheduleFilePath& Filename of the input schedule file.

Definition at line 178 of file AIRTSP_Service.cpp.

References buildComplementaryLinks(), clonePersistentBom(), and AIRTSP::ScheduleParser::generateInventories().

Referenced by main(), and parseAndLoad().

void AIRTSP::AIRTSP_Service::parseAndLoad ( const stdair::ScheduleFilePath &  iScheduleInputFilePath,
const stdair::ODFilePath &  iODInputFilePath 
)

Parse the schedule and O&D input files, and load them into memory.

The CSV files, describing the airline schedule and the O&Ds for the simulator, are parsed and instantiated in memory accordingly.

Parameters:
const stdair::ScheduleFilePath& Filename of the input schedule file.
const stdair::ODFilePath& Filename of the input O&D file.

Definition at line 230 of file AIRTSP_Service.cpp.

References buildComplementaryLinks(), AIRTSP::OnDParser::generateOnDPeriods(), and parseAndLoad().

void AIRTSP::AIRTSP_Service::buildSampleBom (  ) 

Build a sample BOM tree, and attach it to the BomRoot instance.

The BOM tree is based on two actual inventories (one for BA, another for AF). Each inventory contains one flight. One of those flights has two legs (and therefore three segments).

Definition at line 287 of file AIRTSP_Service.cpp.

References buildComplementaryLinks(), and clonePersistentBom().

Referenced by main().

void AIRTSP::AIRTSP_Service::clonePersistentBom (  ) 

Clone the persistent BOM object.

Definition at line 344 of file AIRTSP_Service.cpp.

References buildComplementaryLinks().

Referenced by buildSampleBom(), and parseAndLoad().

void AIRTSP::AIRTSP_Service::buildComplementaryLinks ( stdair::BomRoot &  ioBomRoot  ) 

Build all the complementary links in the given bom root object.

Definition at line 384 of file AIRTSP_Service.cpp.

References AIRTSP::SegmentPathGenerator::createSegmentPathNetwork().

Referenced by buildSampleBom(), clonePersistentBom(), and parseAndLoad().

void AIRTSP::AIRTSP_Service::buildSegmentPathList ( stdair::TravelSolutionList_T &  ioTravelSolutionList,
const stdair::BookingRequestStruct &  iBookingRequest 
)

Calculate and return a list of travel solutions corresponding to a given product demand.

Definition at line 498 of file AIRTSP_Service.cpp.

Referenced by main().

void AIRTSP::AIRTSP_Service::simulate (  ) 

Perform a small simulation, which uses the Customer Choice Model (CCM).

Currently, that method does nothing.

Definition at line 470 of file AIRTSP_Service.cpp.

std::string AIRTSP::AIRTSP_Service::jsonExportFlightDateObjects ( const stdair::AirlineCode_T &  iAirlineCode,
const stdair::FlightNumber_T &  iFlightNumber,
const stdair::Date_T &  iDepartureDate 
) const

Recursively dump, in the returned string and in JSON format, the flight-period corresponding to the parameters given as input.

Parameters:
const stdair::AirlineCode_T& Airline code of the flight to dump.
const stdair::FlightNumber_T& Flight number of the flight to dump.
const stdair::Date_T& Departure date of a flight within the flight period to dump.
Returns:
std::string Output string in which the BOM tree is JSON-ified.

Definition at line 401 of file AIRTSP_Service.cpp.

std::string AIRTSP::AIRTSP_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 425 of file AIRTSP_Service.cpp.

std::string AIRTSP::AIRTSP_Service::csvDisplay ( const stdair::AirlineCode_T &  iAirlineCode,
const stdair::FlightNumber_T &  iFlightNumber,
const stdair::Date_T &  iDepartureDate 
) const

Recursively display (dump in the returned string) the flight-period corresponding to the parameters given as input.

Parameters:
const stdair::AirlineCode_T& Airline code of the flight period to display.
const stdair::FlightNumber_T& Flight number of the flight to display.
const stdair::Date_T& Departure date of a flight within the flight-period to display.
Returns:
std::string Output string in which the BOM tree is logged/dumped.

Definition at line 447 of file AIRTSP_Service.cpp.


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