libpniio
|
container parser More...
#include <sequence_rule.hpp>
Public Types | |
typedef ST::value_type | value_type |
value type of the sequence type More... | |
Public Member Functions | |
sequence_rule () | |
default constructor More... | |
sequence_rule (char del) | |
constructor More... | |
sequence_rule (char start, char stop) | |
constructor More... | |
sequence_rule (char start, char stop, char del) | |
constructor More... | |
Data Fields | |
get_rule_type< ITERT, value_type >::type | element_rule_ |
rule to parse the value_type of the sequence More... | |
delimiter_rule< ITERT > | delimiter_ |
delimiter rule 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 of the sequence More... | |
char | start_symbol_ |
a possible start symbol More... | |
char | stop_symbol_ |
a possible stop symbol More... | |
boost::spirit::qi::rule< ITERT, ST()> | sequence_ |
the full rule to parse the sequence 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 |
CTYPE | container type |
typedef ST::value_type pni::io::sequence_rule< ITERT, ST >::value_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 | the delimiter symbol used in the rule |
|
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 used for the sequence |
stop | the stop symbol used 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 |
delimiter_rule<ITERT> pni::io::sequence_rule< ITERT, ST >::delimiter_ |
get_rule_type<ITERT,value_type>::type pni::io::sequence_rule< ITERT, ST >::element_rule_ |
boost::spirit::qi::rule<ITERT,ST()> pni::io::sequence_rule< ITERT, ST >::sequence_ |
boost::spirit::qi::rule<ITERT> pni::io::sequence_rule< ITERT, ST >::start_ |
char pni::io::sequence_rule< ITERT, ST >::start_symbol_ |
boost::spirit::qi::rule<ITERT> pni::io::sequence_rule< ITERT, ST >::stop_ |
char pni::io::sequence_rule< ITERT, ST >::stop_symbol_ |