27 #include<pni/core/types.hpp>
28 #include <boost/spirit/include/qi.hpp>
30 #include "../exceptions.hpp"
60 typename ITERT = pni::core::string::const_iterator
90 result_type
operator()(
const pni::core::string &data)
const
99 if(!qi::parse(data.begin(),data.end(),_rule>qi::eoi,buffer))
102 "Failure parsing primitive type!");
106 catch(
const expectation_error &error)
119 "Failure during type conversion!");
default conversion trait
Definition: conversion_trait.hpp:46
boost::spirit::qi::expectation_failure< iterator_type > expectation_error
parser exception type
Definition: parsers/parser.hpp:70
general parser related error
Definition: exceptions.hpp:99
static result_type convert(read_type &&v)
conversion function
Definition: conversion_trait.hpp:61
trait_type::read_type read_type
type used for reading the data
Definition: parsers/parser.hpp:75
conversion_trait< result_type > trait_type
conversion trait type
Definition: parsers/parser.hpp:73
ITERT iterator_type
iterator type
Definition: parsers/parser.hpp:66
result_type operator()(const pni::core::string &data) const
parser primitive type
Definition: parsers/parser.hpp:90
Definition: spirit_container_traits.hpp:33
parser for primitive types
Definition: parsers/parser.hpp:62
Definition: cbf_reader.hpp:41
T read_type
the type to read
Definition: conversion_trait.hpp:51
get_rule_type< iterator_type, read_type >::type _rule
rule which will be used to read the data
Definition: parsers/parser.hpp:77
T result_type
result type of the parsing process
Definition: parsers/parser.hpp:68
obtain rule type
Definition: get_rule_type.hpp:48