1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
FRAT5Parser.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// StdAir
8
#include <stdair/basic/BasFileMgr.hpp>
9
#include <stdair/bom/BomRoot.hpp>
10
#include <stdair/service/Logger.hpp>
11
// Airinv
12
#include <
airinv/command/FRAT5ParserHelper.hpp
>
13
#include <
airinv/command/FRAT5Parser.hpp
>
14
#include <
airinv/command/InventoryManager.hpp
>
15
16
namespace
AIRINV
{
17
18
// //////////////////////////////////////////////////////////////////////
19
void
FRAT5Parser::
20
parse
(
const
stdair::FRAT5FilePath& iFRAT5Filename,
21
stdair::BomRoot& ioBomRoot) {
22
23
const
stdair::Filename_T lFilename = iFRAT5Filename.name();
24
25
// Check that the file path given as input corresponds to an actual file
26
bool
doesExistAndIsReadable =
27
stdair::BasFileMgr::doesExistAndIsReadable (lFilename);
28
if
(doesExistAndIsReadable ==
false
) {
29
std::ostringstream oMessage;
30
oMessage <<
"The FRAT5 input file, '"
<< lFilename
31
<<
"', can not be retrieved on the file-system"
;
32
STDAIR_LOG_ERROR (oMessage.str());
33
throw
FRAT5InputFileNotFoundException
(oMessage.str());
34
}
35
36
// Initialise the FRAT5 file parser.
37
FRAT5FileParser
lFRAT5Parser (ioBomRoot, lFilename);
38
39
// Parse the CSV-formatted FRAT5 input file, and generate the
40
// corresponding FRAT5 curves.
41
lFRAT5Parser.
generateFRAT5Curves
();
42
}
43
}
FRAT5ParserHelper.hpp
FRAT5Parser.hpp
InventoryManager.hpp
AIRINV::FRAT5FileParser
Definition
FRAT5ParserHelper.hpp:126
AIRINV::FRAT5FileParser::generateFRAT5Curves
bool generateFRAT5Curves()
Definition
FRAT5ParserHelper.cpp:202
AIRINV::FRAT5InputFileNotFoundException
Definition
AIRINV_Types.hpp:130
AIRINV::FRAT5Parser::parse
static void parse(const stdair::FRAT5FilePath &iFRAT5InputFilename, stdair::BomRoot &)
Definition
FRAT5Parser.cpp:20
AIRINV
Definition
AIRINV_Master_Service.hpp:38
Generated on
for AirInv by
1.17.0