Multi diag tools
Public Member Functions | List of all members
Mdt::PlainText::CsvParserTemplate< SourceIterator > Class Template Reference

CSV parser template. More...

#include <CsvParserTemplate.h>

+ Inheritance diagram for Mdt::PlainText::CsvParserTemplate< SourceIterator >:

Public Member Functions

 CsvParserTemplate ()=default
 Default constructor.
 
void setupParser (const CsvParserSettings &settings)
 Setup parser. More...
 
bool isValid () const
 Check if parser is valid. More...
 
Mdt::Expected< StringRecord > readLine (SourceIterator &first, const SourceIterator &last)
 Read one line of CSV data. More...
 

Detailed Description

template<typename SourceIterator>
class Mdt::PlainText::CsvParserTemplate< SourceIterator >

CSV parser template.

This class implements the parser logic, and can act on different input containers that have STL compatible iterators.

Template Parameters
SourceIteratorType of iterator that will act on the source.
Note
Including directly this header in a project can slow down compilation time
See also
CsvStringParser
CsvFileParser
Note
Some part of this API documentation refers to following standards:

Definition at line 40 of file CsvFileParser.h.

Member Function Documentation

template<typename SourceIterator>
bool Mdt::PlainText::CsvParserTemplate< SourceIterator >::isValid ( ) const
inline

Check if parser is valid.

Parser is valid once setupParser() was called at least once

Definition at line 146 of file CsvParserTemplate.h.

template<typename SourceIterator>
Mdt::Expected<StringRecord> Mdt::PlainText::CsvParserTemplate< SourceIterator >::readLine ( SourceIterator &  first,
const SourceIterator &  last 
)
inline

Read one line of CSV data.

Precondition
setupParser() must be called at least once before

Definition at line 155 of file CsvParserTemplate.h.

template<typename SourceIterator>
void Mdt::PlainText::CsvParserTemplate< SourceIterator >::setupParser ( const CsvParserSettings settings)
inline

Setup parser.

Precondition
settings must be valid

Definition at line 78 of file CsvParserTemplate.h.


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