1.01.17
C++ Simulated Airline Travel Solution Provider (TSP) Library
Toggle main menu visibility
Loading...
Searching...
No Matches
OnDParser.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
// StdAir
7
#include <stdair/basic/BasFileMgr.hpp>
8
#include <stdair/service/Logger.hpp>
9
#include <stdair/bom/BomRoot.hpp>
10
// AirTSP
11
#include <
airtsp/command/OnDParserHelper.hpp
>
12
#include <
airtsp/command/OnDParser.hpp
>
13
14
namespace
AIRTSP
{
15
16
// //////////////////////////////////////////////////////////////////////
17
void
OnDParser::generateOnDPeriods
(
const
stdair::ODFilePath& iODFilename,
18
stdair::BomRoot& ioBomRoot) {
19
20
const
stdair::Filename_T lFilename = iODFilename.name();
21
22
// Check that the file path given as input corresponds to an actual file
23
const
bool
doesExistAndIsReadable =
24
stdair::BasFileMgr::doesExistAndIsReadable (lFilename);
25
26
if
(doesExistAndIsReadable ==
false
) {
27
STDAIR_LOG_ERROR (
"The O&D input file, '"
<< lFilename
28
<<
"', can not be retrieved on the file-system"
);
29
throw
OnDInputFileNotFoundException
(
"The O&D file "
+ lFilename
30
+
" does not exist or can not be "
31
"read"
);
32
}
33
34
// Initialise the O&D-Period file parser.
35
OnDPeriodFileParser
lOnDPeriodParser (lFilename, ioBomRoot);
36
37
// Parse the CSV-formatted O&D input file, and generate the
38
// corresponding O&D-Period for the airlines.
39
lOnDPeriodParser.
generateOnDPeriods
();
40
}
41
42
}
OnDParserHelper.hpp
OnDParser.hpp
AIRTSP::OnDInputFileNotFoundException
Definition
AIRTSP_Types.hpp:35
AIRTSP::OnDParser::generateOnDPeriods
static void generateOnDPeriods(const stdair::ODFilePath &, stdair::BomRoot &)
Definition
OnDParser.cpp:17
AIRTSP::OnDPeriodFileParser
Definition
OnDParserHelper.hpp:161
AIRTSP::OnDPeriodFileParser::generateOnDPeriods
bool generateOnDPeriods()
Definition
OnDParserHelper.cpp:378
AIRTSP
Definition
AIRTSP_Service.hpp:23
Generated on
for AirTSP by
1.17.0