StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasParserTypes.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BAS_BASCOMPARSERTYPES_HPP
2 #define __STDAIR_BAS_BASCOMPARSERTYPES_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // Boost Spirit (Parsing)
10 #include <boost/spirit/include/qi.hpp>
11 #include <boost/spirit/include/phoenix_core.hpp>
12 #include <boost/spirit/include/phoenix_operator.hpp>
13 #include <boost/spirit/include/support_multi_pass.hpp>
14 // STDAIR
16 
17 namespace stdair {
18 
19  // ////////////////////////////////////////////////////////////////////
20  //
21  // Definition of Basic Types
22  //
23  // ////////////////////////////////////////////////////////////////////
24  // The types of iterator, scanner and rule are then derived from
25  // the parsing unit.
26  typedef std::istreambuf_iterator<char> base_iterator_t;
27  typedef boost::spirit::multi_pass<base_iterator_t> iterator_t;
28 
29  // ////////////////////////////////////////////////////////////////////
30  //
31  // Parser related types
32  //
33  // ////////////////////////////////////////////////////////////////////
35  typedef boost::spirit::qi::int_parser<unsigned int, 10, 1, 1> int1_p_t;
36 
38  typedef boost::spirit::qi::uint_parser<int, 10, 2, 2> uint2_p_t;
39 
41  typedef boost::spirit::qi::uint_parser<int, 10, 4, 4> uint4_p_t;
42 
44  typedef boost::spirit::qi::uint_parser<int, 10, 1, 4> uint1_4_p_t;
45 
47  typedef boost::spirit::qi::uint_parser<hour_t, 10, 2, 2> hour_p_t;
48  typedef boost::spirit::qi::uint_parser<minute_t, 10, 2, 2> minute_p_t;
49  typedef boost::spirit::qi::uint_parser<second_t, 10, 2, 2> second_p_t;
50  typedef boost::spirit::qi::uint_parser<year_t, 10, 4, 4> year_p_t;
51  typedef boost::spirit::qi::uint_parser<month_t, 10, 2, 2> month_p_t;
52  typedef boost::spirit::qi::uint_parser<day_t, 10, 2, 2> day_p_t;
53 }
54 #endif // __STDAIR_BAS_BASCOMPARSERTYPES_HPP