libpniio
|
container parser More...
#include <string_sequence_rule.hpp>
Public Member Functions | |
string_sequence_rule () | |
default constructor More... | |
string_sequence_rule (char del) | |
constructor More... | |
string_sequence_rule (char start, char stop) | |
constructor More... | |
string_sequence_rule (char start, char stop, char del) | |
constructor More... | |
Data Fields | |
boost::spirit::qi::rule< ITERT, pni::core::string()> | element_rule_ |
rule to parse a single element of the sequence More... | |
boost::spirit::qi::rule< ITERT > | start_ |
rule for the start symbol of the sequence More... | |
boost::spirit::qi::rule< ITERT > | stop_ |
rule for the stop symbol for the sequence More... | |
boost::spirit::qi::rule< ITERT > | delimiter_ |
rule for the delimiter symbol for the sequence More... | |
boost::spirit::qi::rule< ITERT, ST()> | sequence_ |
the full rule to parse the sequence More... | |
boost::phoenix::function < trim_string > | trim |
lazy function to trim the read string More... | |
This parser reads a linear container of data from a string. The data type of the container is assumed to be homogeneous. This means that all elements must match with the parser selected for the element type.
In their string representation container data is assumed to be embraced between a start and a stop token. The elements are assumed to be separated by a delimiter token.
The container can be any STL compliant container type.
ITERT | input iterator type |
ST | container type |
|
inline |
When using the default constructor the elements are assumed to be separated by an arbitrary number of blanks. No start and stop symbol are taken into account.
|
inline |
This version of the sequence_rule constructor allows passing a a custom delimiter symbol. The delimiter_rule class is used to parse the delimiter. Thus, the delimiter symbol can have an arbitrary number of preceding and tailing blanks.
del | delimiter character for the sequence |
|
inline |
Set a start and stop symbol. In this case the rule expects that the sequence is embraced into a start and stop symbol. However, the individual elements are still separated by an arbitrary number of blanks.
start | the start symbol for the sequence |
stop | the stop symbol for the sequence |
|
inline |
Customizes the start and stop symbol as well as the delimiter symbol.
start | the start symbol for the sequence |
stop | the stop symbol for the sequence |
del | the delimiter symbol for the sequence |
boost::spirit::qi::rule<ITERT> pni::io::string_sequence_rule< ITERT, ST >::delimiter_ |
boost::spirit::qi::rule<ITERT,pni::core::string()> pni::io::string_sequence_rule< ITERT, ST >::element_rule_ |
boost::spirit::qi::rule<ITERT,ST()> pni::io::string_sequence_rule< ITERT, ST >::sequence_ |
boost::spirit::qi::rule<ITERT> pni::io::string_sequence_rule< ITERT, ST >::start_ |
boost::spirit::qi::rule<ITERT> pni::io::string_sequence_rule< ITERT, ST >::stop_ |
boost::phoenix::function<trim_string> pni::io::string_sequence_rule< ITERT, ST >::trim |