Go to the documentation of this file.00001
00002
00003
00004
00005 #include <cassert>
00006
00007 #include <stdair/basic/BasFileMgr.hpp>
00008 #include <stdair/basic/RandomGeneration.hpp>
00009 #include <stdair/bom/Inventory.hpp>
00010
00011 #include <trademgen/command/DemandParserHelper.hpp>
00012 #include <trademgen/command/DemandParser.hpp>
00013
00014 namespace TRADEMGEN {
00015
00016
00017 void DemandParser::
00018 generateDemand (const stdair::Filename_T& iFilename,
00019 stdair::EventQueue& ioEventQueue,
00020 stdair::RandomGeneration& ioSharedGenerator,
00021 const POSProbabilityMass_T& iDefaultPOSProbablityMass) {
00022
00023
00024 const bool doesExistAndIsReadable =
00025 stdair::BasFileMgr::doesExistAndIsReadable (iFilename);
00026 if (doesExistAndIsReadable == false) {
00027 STDAIR_LOG_ERROR ("The demand input file '" << iFilename
00028 << "' does not exist or can not be read");
00029
00030 throw DemandInputFileNotFoundException ("The demand file '" + iFilename
00031 + "' does not exist or can not "
00032 "be read");
00033 }
00034
00035
00036 DemandFileParser lDemandParser (ioEventQueue, ioSharedGenerator,
00037 iDefaultPOSProbablityMass, iFilename);
00038
00039
00040
00041 lDemandParser.generateDemand();
00042 }
00043
00044 }