libpniio
|
value rule More...
#include <value_rule.hpp>
Data Structures | |
struct | value_constructor |
value construction lazy function More... | |
class | value_constructor_visitor |
visitor for value construction More... | |
Public Member Functions | |
value_rule () | |
default constructor More... | |
Data Fields | |
boost::mpl::at< spirit_rules, pni::core::int64 >::type | integer_rule_ |
rule for parsing an integer More... | |
boost::mpl::at< spirit_rules, pni::core::float64 >::type | float_rule_ |
rule for parsing a floating point number More... | |
complex_rule< ITERT, pni::core::complex64 > | complex_rule_ |
rule for parsing a complex number More... | |
boost::spirit::qi::rule< ITERT, pni::core::value()> | value_ |
value reading rule More... | |
boost::spirit::qi::rule< ITERT > | sign_rule |
rule to match the + or - sign More... | |
boost::spirit::qi::rule< ITERT > | float_signs |
rule to match . or e used to denote a floating point number More... | |
boost::phoenix::function < value_constructor > | construct_value |
lazy function to assemble a value instance More... | |
This rule parses an input string and automatically selects the proper parser for the input value. From its ASCII representation the particular type a value belongs to is not entirely visible. For instance it is not possible to distinguish the different integer types from a single ASCII representation. Neither is this possible for floating point types and complex types. Thus, the number of different parsers used in this rule are limitted. As a fallback the string parser is the last resort tho get the data parsed. The following parsers will be used internally
A typical application would be to parse the value part of key-value pairs in an ASCII file where the data type of the attribute is not known in advance. The rule will make a best guess to automatically find the appropriate type or uses a string representation in the worst case.
The input string is assumed to be stripped from all leading and trailing blank and newline symbols. The rule is only default constructible. No additional options have to be applied.
ITERT | iterator type |
|
inline |
complex_rule<ITERT,pni::core::complex64> pni::io::value_rule< ITERT >::complex_rule_ |
boost::phoenix::function<value_constructor> pni::io::value_rule< ITERT >::construct_value |
boost::mpl::at< spirit_rules, pni::core::float64 >::type pni::io::value_rule< ITERT >::float_rule_ |
boost::spirit::qi::rule<ITERT> pni::io::value_rule< ITERT >::float_signs |
boost::mpl::at< spirit_rules, pni::core::int64 >::type pni::io::value_rule< ITERT >::integer_rule_ |
boost::spirit::qi::rule<ITERT> pni::io::value_rule< ITERT >::sign_rule |
boost::spirit::qi::rule<ITERT,pni::core::value()> pni::io::value_rule< ITERT >::value_ |