libpniio
Public Member Functions | Data Fields
pni::io::delimiter_rule< ITERT > Struct Template Reference

delimiter parser More...

#include <delimiter_rule.hpp>

Inheritance diagram for pni::io::delimiter_rule< ITERT >:
Inheritance graph
[legend]
Collaboration diagram for pni::io::delimiter_rule< ITERT >:
Collaboration graph
[legend]

Public Member Functions

 delimiter_rule ()
 default constructor More...
 
 delimiter_rule (char symbol)
 constructor More...
 

Data Fields

boost::spirit::qi::rule< ITERT,
pni::core::string()> 
delimiter
 main parser rule More...
 

Detailed Description

template<typename ITERT>
struct pni::io::delimiter_rule< ITERT >

This parser is used for delimiters which for instance separate columns in a CSV file. By default the separator is at least one blank symbol. Alternatively one can define a special single character as a delimiter. This character can be preceded and followed by an arbitrary number of blanks.

This parser itself is hardly usefull. However, it is a quite handy component in connection with other parsers (for instance the sequence_parser).

Template Parameters
ITERTiterator type for the parser
See also
sequence_parser

Constructor & Destructor Documentation

template<typename ITERT>
pni::io::delimiter_rule< ITERT >::delimiter_rule ( )
inline

Using the default constructor the delimiter will match one plus an arbitrary number of blanks.

template<typename ITERT>
pni::io::delimiter_rule< ITERT >::delimiter_rule ( char  symbol)
inline

The resulting delimiter rule will match the symbol passed to the constructor as a delimiter symbol. The symbol can be surrounded by an arbitrary number of blanks. If symbol is set to ' ' the delimiter rule will behave as created with the default constructor.

Parameters
symbolthe delimiter symbol

Field Documentation

template<typename ITERT>
boost::spirit::qi::rule<ITERT,pni::core::string()> pni::io::delimiter_rule< ITERT >::delimiter

The documentation for this struct was generated from the following file: