AirRAC Logo  1.00.0
C++ Simulated Revenue Accounting (RAC) System Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
AIRRAC::AIRRAC_Service Class Reference

Interface for the AIRRAC Services. More...

#include <airrac/AIRRAC_Service.hpp>

List of all members.

Public Member Functions

 AIRRAC_Service (const stdair::BasLogParams &)
 AIRRAC_Service (const stdair::BasLogParams &, const stdair::BasDBParams &)
 AIRRAC_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr)
void parseAndLoad (const YieldFilePath &iYieldFilename)
 ~AIRRAC_Service ()
void calculateYields (stdair::TravelSolutionList_T &)
void updateYields (stdair::BomRoot &)
void buildSampleBom ()
void clonePersistentBom ()
void buildComplementaryLinks (stdair::BomRoot &)
void buildSampleTravelSolutions (stdair::TravelSolutionList_T &)
std::string csvDisplay () const
std::string csvDisplay (const stdair::TravelSolutionList_T &) const

Detailed Description

Interface for the AIRRAC Services.

Definition at line 30 of file AIRRAC_Service.hpp.


Constructor & Destructor Documentation

AIRRAC::AIRRAC_Service::AIRRAC_Service ( const stdair::BasLogParams &  iLogParams)

Constructor.

The initAirracService() 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 34 of file AIRRAC_Service.cpp.

AIRRAC::AIRRAC_Service::AIRRAC_Service ( const stdair::BasLogParams &  iLogParams,
const stdair::BasDBParams &  iDBParams 
)

Constructor.

The initAirracService() 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.
conststdair::BasDBParams& Parameters for the database access.

Definition at line 54 of file AIRRAC_Service.cpp.

AIRRAC::AIRRAC_Service::AIRRAC_Service ( stdair::STDAIR_ServicePtr_T  ioSTDAIR_ServicePtr)

Constructor.

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

Parameters:
stdair::STDAIR_ServicePtr_TReference on the STDAIR service.

Definition at line 76 of file AIRRAC_Service.cpp.

AIRRAC::AIRRAC_Service::~AIRRAC_Service ( )

Destructor.

Definition at line 92 of file AIRRAC_Service.cpp.


Member Function Documentation

void AIRRAC::AIRRAC_Service::parseAndLoad ( const YieldFilePath iYieldFilename)

Parse the yield input file, 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:
constYieldFilePath& Filename of the input yield file.

Definition at line 170 of file AIRRAC_Service.cpp.

References buildComplementaryLinks(), clonePersistentBom(), and AIRRAC::YieldParser::generateYieldStore().

Referenced by main().

void AIRRAC::AIRRAC_Service::calculateYields ( stdair::TravelSolutionList_T &  ioTravelSolutionList)

Calculate/retrieve a yield.

Definition at line 402 of file AIRRAC_Service.cpp.

void AIRRAC::AIRRAC_Service::updateYields ( stdair::BomRoot &  ioBomRoot)

Update the yields for booking classes and O&D.

Definition at line 433 of file AIRRAC_Service.cpp.

void AIRRAC::AIRRAC_Service::buildSampleBom ( )

Build a sample BOM tree.

For now, no object is created: the BOM tree remains empty. In the future, it will hold a sample yield store.

Definition at line 223 of file AIRRAC_Service.cpp.

References buildComplementaryLinks(), and clonePersistentBom().

Referenced by main().

void AIRRAC::AIRRAC_Service::clonePersistentBom ( )

Clone the persistent sample BOM tree.

Definition at line 280 of file AIRRAC_Service.cpp.

References buildComplementaryLinks().

Referenced by buildSampleBom(), and parseAndLoad().

void AIRRAC::AIRRAC_Service::buildComplementaryLinks ( stdair::BomRoot &  ioBomRoot)

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

Note:
Do nothing for now.

Definition at line 326 of file AIRRAC_Service.cpp.

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

void AIRRAC::AIRRAC_Service::buildSampleTravelSolutions ( stdair::TravelSolutionList_T &  ioTravelSolutionList)

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:
TravelSolutionList_T&Sample list of travel solution structures. It should be given empty. It is altered with the returned sample.

Definition at line 332 of file AIRRAC_Service.cpp.

Referenced by main().

std::string AIRRAC::AIRRAC_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 352 of file AIRRAC_Service.cpp.

Referenced by main().

std::string AIRRAC::AIRRAC_Service::csvDisplay ( const stdair::TravelSolutionList_T &  ioTravelSolutionList) 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 380 of file AIRRAC_Service.cpp.


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