Lumiera  0.pre.03
»edit your freedom«
CsvParser Class Reference

#include "lib/stat/csv.hpp"

Description

Parser to split one line of CSV data into fields.

Remarks
iterator-like throw-away object
  • the bool evaluation indicates more fields to extract
  • dereference to get the field as string
  • increment to move to the next field
Exceptions
error::Invalidon CSV format violation

Definition at line 250 of file csv.hpp.

Public Member Functions

 CsvParser (string &line)
 
 ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (CsvParser)
 
void fail () const
 
size_t getParsedFieldCnt ()
 
bool isParseFail () const
 
bool isValid () const
 
 operator bool () const
 
string operator* () const
 
void operator++ ()
 
- Public Member Functions inherited from RegexSearchIter
 RegexSearchIter (string const &toParse, regex const &regex)
 
 RegexSearchIter (string_view toParse, regex const &regex)
 
bool empty () const
 
 ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (RegexSearchIter)
 
bool isValid () const
 
 LIFT_PARENT_INCREMENT_OPERATOR (std::sregex_iterator)
 
 operator bool () const
 

Private Member Functions

util::RegexSearchIter const & curr () const
 
util::RegexSearchIter end () const
 

Private Attributes

size_t field_ {0}
 
string const & line_ {}
 
size_t pos_ {0}
 
+ Inheritance diagram for CsvParser:
+ Collaboration diagram for CsvParser:

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