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