OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
version.hpp
Go to the documentation of this file.
1 //
2 // Copyright & License: See Copyright.readme in src directory
3 //
4 
9 #ifndef VERSION_HPP_
10 #define VERSION_HPP_
11 
12 #include "ast.hpp"
13 #include "skipper.hpp"
14 #include "error_handler.hpp"
15 
16 #include <boost/config/warning_disable.hpp>
17 #include <boost/spirit/include/qi.hpp>
18 #include <boost/fusion/include/adapt_struct.hpp>
19 
20 #define BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
21 #define BOOST_SPIRIT_QI_DEBUG
22 
23 namespace SDDS {
24  struct version
25  {
27  };
28 
29  inline std::ostream& operator<<(std::ostream& out, const version& head) {
30  out << "layout version is " << head.layoutVersion_m;
31  return out;
32  }
33 }
34 
37  (short, layoutVersion_m)
38 )
39 
40 namespace SDDS { namespace parser
41 {
42  namespace qi = boost::spirit::qi;
43  namespace ascii = boost::spirit::ascii;
44  namespace phx = boost::phoenix;
45 
46  template <typename Iterator>
47  struct version_parser: qi::grammar<Iterator, version(), skipper<Iterator> >
48  {
49  version_parser(error_handler<Iterator> & _error_handler);
50 
51  qi::rule<Iterator, version(), skipper<Iterator> > start;
52  };
53 }}
54 #endif /* VERSION_HPP_ */
BOOST_FUSION_ADAPT_STRUCT(SDDS::column,(boost::optional< std::string >, name_m)(boost::optional< SDDS::ast::datatype >, type_m)(boost::optional< std::string >, units_m)(boost::optional< std::string >, description_m)(SDDS::ast::variant_t, value_m)) namespace SDDS
Definition: column.hpp:173
short layoutVersion_m
Definition: version.hpp:26
std::ostream & operator<<(std::ostream &out, const array &)
Definition: array.hpp:89