AirRAC Logo  1.00.11
C++ Simulated Revenue Accounting (RAC) System Library
Loading...
Searching...
No Matches
YieldParser.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <cassert>
6#include <string>
7// StdAir
8#include <stdair/basic/BasFileMgr.hpp>
9// AirRAC
12
13namespace AIRRAC {
14
15 // //////////////////////////////////////////////////////////////////////
17 stdair::BomRoot& ioBomRoot) {
18
19 const stdair::Filename_T lFilename = iYieldFilename.name();
20
21 // Check that the file path given as input corresponds to an actual file
22 const bool doesExistAndIsReadable =
23 stdair::BasFileMgr::doesExistAndIsReadable (lFilename);
24 if (doesExistAndIsReadable == false) {
25 STDAIR_LOG_ERROR ("The yield input file, '" << lFilename
26 << "', can not be retrieved on the file-system");
27 throw YieldInputFileNotFoundException ("The yield file '" + lFilename
28 + "' does not exist or can not "
29 "be read");
30 }
31
32 // Initialise the yield file parser.
33 YieldFileParser lYieldParser (ioBomRoot, lFilename);
34
35 // Parse the CSV-formatted yield store input file, and generate the
36 // corresponding Yield-related objects.
37 lYieldParser.generateYieldStore();
38 }
39}
static void generateYieldStore(const YieldFilePath &, stdair::BomRoot &)