3 #ifndef GAUDIKERNEL_PARSERS_ICPP
4 #define GAUDIKERNEL_PARSERS_ICPP 1
16 #include "boost/bind.hpp"
20 #include <boost/version.hpp>
21 #if BOOST_VERSION >= 103800
23 #if !defined(BOOST_SPIRIT_USE_OLD_NAMESPACE)
24 #define BOOST_SPIRIT_USE_OLD_NAMESPACE
26 #include <boost/spirit/include/classic.hpp>
27 #include <boost/spirit/include/phoenix1.hpp>
29 #include <boost/spirit.hpp>
30 #include <boost/spirit/phoenix.hpp>
35 #include "GaudiKernel/Parsers.h"
36 #include "GaudiKernel/Grammars.h"
64 typedef boost::spirit::position_iterator<string::const_iterator>
IteratorT;
68 {
return IteratorT ( input.begin(), input.end() ) ; }
84 template<
typename IntegerT>
86 (IntegerT& result,
const string& input)
88 IntGrammar<IntegerT>
g;
92 g[var(result)=arg1]).full;
111 template<
typename IntegerT>
113 ( std::vector<IntegerT>& result,
const string& input)
115 VectorGrammar<IntGrammar<IntegerT> >
g;
120 SkipperGrammar()).full;
136 template<
typename CharT>
138 ( CharT& result ,
const string& input )
140 CharGrammar<CharT>
g;
144 g[var(result)=arg1]).full;
163 template<
typename CharT>
165 (std::vector<CharT>& result,
const string& input)
167 VectorGrammar<CharGrammar<CharT> >
g;
172 SkipperGrammar()).full;
187 template<
typename RealT>
189 ( RealT& result ,
const string& input)
191 RealGrammar<RealT>
g;
196 SkipperGrammar()).full;
215 template<
typename RealT>
217 ( std::vector<RealT>& result,
const string& input)
219 VectorGrammar< RealGrammar<RealT> >
g;
224 SkipperGrammar()).full;
IteratorT createIterator(const std::string &input)
create the position iterator from the input
StatusCode parse_real_vector(std::vector< RealT > &result, const string &input)
helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities int...
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
StatusCode parse_integer(IntegerT &result, const string &input)
helper function to "merge" the implementation of all parsers for integer-like quantities into one tem...
boost::spirit::position_iterator< string::const_iterator > IteratorT
the actual type of position iterator
This class is used for returning status codes from appropriate routines.
StatusCode parse_real(RealT &result, const string &input)
helper function to "merge" the implementation of all parsers for "float-like" quantities into one tem...
StatusCode parse_integer_vector(std::vector< IntegerT > &result, const string &input)
helper function to "merge" the implementation of all parsers for vector of integer-like quantities in...
StatusCode parse_char(CharT &result, const string &input)
helper function to "merge" the implementation of all parsers for "char-like" quantities into one temp...
StatusCode parse_char_vector(std::vector< CharT > &result, const string &input)
helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities int...
Helper functions to set/get the application return code.