Go to the documentation of this file.00001
00002
00003
00004
00005 #include <cassert>
00006 #include <string>
00007
00008 #include <stdair/basic/BasFileMgr.hpp>
00009 #include <stdair/service/Logger.hpp>
00010
00011 #include <simfqt/command/FareParserHelper.hpp>
00012 #include <simfqt/command/FareParser.hpp>
00013
00014 namespace SIMFQT {
00015
00016
00017 void FareParser::fareRuleGeneration (const FareFilePath& iFareFilename,
00018 stdair::BomRoot& ioBomRoot) {
00019
00020 const stdair::Filename_T lFilename = iFareFilename.name();
00021
00022
00023 const bool doesExistAndIsReadable =
00024 stdair::BasFileMgr::doesExistAndIsReadable (lFilename);
00025 if (doesExistAndIsReadable == false) {
00026 STDAIR_LOG_ERROR ("The fare input file, '" << lFilename
00027 << "', can not be retrieved on the file-system");
00028 throw FareInputFileNotFoundException ("The fare input file '" + lFilename
00029 + "' does not exist or can not "
00030 "be read");
00031 }
00032
00033
00034 FareRuleFileParser lFareRuleFileParser (ioBomRoot, lFilename);
00035
00036
00037
00038 lFareRuleFileParser.generateFareRules ();
00039
00040 }
00041
00042 }