1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
FRAT5ParserHelper.hpp
Go to the documentation of this file.
1
#ifndef __AIRINV_CMD_FRAT5PARSERHELPER_HPP
2
#define __AIRINV_CMD_FRAT5PARSERHELPER_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <string>
9
// StdAir
10
#include <stdair/command/CmdAbstract.hpp>
11
// Airinv
12
#include <
airinv/AIRINV_Types.hpp
>
13
#include <
airinv/basic/BasParserTypes.hpp
>
14
#include <
airinv/bom/FRAT5Struct.hpp
>
15
16
// Forward declarations
17
namespace
stdair
{
18
class
BomRoot;
19
}
20
21
namespace
AIRINV
{
22
23
namespace
FRAT5ParserHelper
{
24
25
// ///////////////////////////////////////////////////////////////////
26
// Semantic actions
27
// ///////////////////////////////////////////////////////////////////
29
struct
ParserSemanticAction
{
31
ParserSemanticAction
(
FRAT5Struct
&);
33
FRAT5Struct
&
_frat5
;
34
};
35
37
struct
storeCurveKey
:
public
ParserSemanticAction
{
39
storeCurveKey
(
FRAT5Struct
&);
41
void
operator()
(
iterator_t
iStr,
iterator_t
iStrEnd)
const
;
42
};
43
45
struct
storeDTD
:
public
ParserSemanticAction
{
47
storeDTD
(
FRAT5Struct
&);
49
void
operator()
(
int
iDTD)
const
;
50
};
51
53
struct
storeFRAT5Value
:
public
ParserSemanticAction
{
55
storeFRAT5Value
(
FRAT5Struct
&);
57
void
operator()
(
double
iReal)
const
;
58
};
59
61
struct
doEndCurve
:
public
ParserSemanticAction
{
63
doEndCurve
(stdair::BomRoot&,
FRAT5Struct
&);
65
void
operator()
(
iterator_t
iStr,
iterator_t
iStrEnd)
const
;
67
stdair::BomRoot&
_bomRoot
;
68
};
69
71
//
72
// (Boost Spirit) Grammar Definition
73
//
75
87
89
struct
FRAT5Parser
:
90
public
boost::spirit::classic::grammar
<FRAT5Parser> {
91
92
FRAT5Parser
(stdair::BomRoot&,
FRAT5Struct
&);
93
94
template
<
typename
ScannerT>
95
struct
definition
{
96
definition
(
FRAT5Parser
const
& self);
97
98
// Instantiation of rules
99
boost::spirit::classic::rule<ScannerT>
curve_list
,
100
not_to_be_parsed
,
curve
,
key
,
map
,
value_pair
,
curve_end
;
101
103
boost::spirit::classic::rule<ScannerT>
const
&
start
()
const
;
104
};
105
106
// Parser Context
107
stdair::BomRoot&
_bomRoot
;
108
FRAT5Struct
&
_frat5
;
109
};
110
}
111
114
115
117
//
118
// Entry class for the file parser
119
//
121
126
class
FRAT5FileParser
:
public
stdair::CmdAbstract {
127
public
:
129
FRAT5FileParser
(stdair::BomRoot& ioBomRoot,
130
const
stdair::Filename_T& iFilename);
131
133
bool
generateFRAT5Curves
();
134
135
private
:
137
void
init();
138
139
private
:
140
// Attributes
142
stdair::Filename_T _filename;
143
145
iterator_t
_startIterator;
146
148
iterator_t
_endIterator;
149
151
stdair::BomRoot& _bomRoot;
152
154
FRAT5Struct
_frat5;
155
};
156
157
}
158
#endif
// __AIRINV_CMD_FRAT5PARSERHELPER_HPP
AIRINV_Types.hpp
BasParserTypes.hpp
FRAT5Struct.hpp
AIRINV::FRAT5FileParser::FRAT5FileParser
FRAT5FileParser(stdair::BomRoot &ioBomRoot, const stdair::Filename_T &iFilename)
Definition
FRAT5ParserHelper.cpp:178
AIRINV::FRAT5FileParser::generateFRAT5Curves
bool generateFRAT5Curves()
Definition
FRAT5ParserHelper.cpp:202
boost::spirit::classic::grammar
AIRINV::FRAT5ParserHelper
Definition
FRAT5ParserHelper.cpp:20
AIRINV
Definition
AIRINV_Master_Service.hpp:38
AIRINV::iterator_t
boost::spirit::classic::file_iterator< char_t > iterator_t
Definition
BasParserTypes.hpp:35
stdair
Forward declarations.
Definition
AIRINV_Master_Service.hpp:25
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::curve_end
boost::spirit::classic::rule< ScannerT > curve_end
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::curve_list
boost::spirit::classic::rule< ScannerT > curve_list
Definition
FRAT5ParserHelper.hpp:99
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::start
boost::spirit::classic::rule< ScannerT > const & start() const
Definition
FRAT5ParserHelper.cpp:164
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::value_pair
boost::spirit::classic::rule< ScannerT > value_pair
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::key
boost::spirit::classic::rule< ScannerT > key
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::not_to_be_parsed
boost::spirit::classic::rule< ScannerT > not_to_be_parsed
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::definition
definition(FRAT5Parser const &self)
Definition
FRAT5ParserHelper.cpp:124
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::map
boost::spirit::classic::rule< ScannerT > map
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::definition::curve
boost::spirit::classic::rule< ScannerT > curve
Definition
FRAT5ParserHelper.hpp:100
AIRINV::FRAT5ParserHelper::FRAT5Parser::FRAT5Parser
FRAT5Parser(stdair::BomRoot &, FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:115
AIRINV::FRAT5ParserHelper::FRAT5Parser::_frat5
FRAT5Struct & _frat5
Definition
FRAT5ParserHelper.hpp:108
AIRINV::FRAT5ParserHelper::FRAT5Parser::_bomRoot
stdair::BomRoot & _bomRoot
Definition
FRAT5ParserHelper.hpp:107
AIRINV::FRAT5ParserHelper::ParserSemanticAction::ParserSemanticAction
ParserSemanticAction(FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:27
AIRINV::FRAT5ParserHelper::ParserSemanticAction::_frat5
FRAT5Struct & _frat5
Definition
FRAT5ParserHelper.hpp:33
AIRINV::FRAT5ParserHelper::doEndCurve::_bomRoot
stdair::BomRoot & _bomRoot
Definition
FRAT5ParserHelper.hpp:67
AIRINV::FRAT5ParserHelper::doEndCurve::operator()
void operator()(iterator_t iStr, iterator_t iStrEnd) const
Definition
FRAT5ParserHelper.cpp:88
AIRINV::FRAT5ParserHelper::doEndCurve::doEndCurve
doEndCurve(stdair::BomRoot &, FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:80
AIRINV::FRAT5ParserHelper::storeCurveKey::operator()
void operator()(iterator_t iStr, iterator_t iStrEnd) const
Definition
FRAT5ParserHelper.cpp:38
AIRINV::FRAT5ParserHelper::storeCurveKey::storeCurveKey
storeCurveKey(FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:33
AIRINV::FRAT5ParserHelper::storeDTD::storeDTD
storeDTD(FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:46
AIRINV::FRAT5ParserHelper::storeDTD::operator()
void operator()(int iDTD) const
Definition
FRAT5ParserHelper.cpp:51
AIRINV::FRAT5ParserHelper::storeFRAT5Value::storeFRAT5Value
storeFRAT5Value(FRAT5Struct &)
Definition
FRAT5ParserHelper.cpp:57
AIRINV::FRAT5ParserHelper::storeFRAT5Value::operator()
void operator()(double iReal) const
Definition
FRAT5ParserHelper.cpp:62
AIRINV::FRAT5Struct
Definition
FRAT5Struct.hpp:15
Generated on
for AirInv by
1.17.0