|
Multi diag tools
|
CSV parser that acts on a file as input. More...
#include <CsvFileParser.h>
Public Member Functions | |
| CsvFileParser () | |
| Default constructor. | |
| void | setCsvSettings (const CsvParserSettings &settings) |
| Set CSV settings. More... | |
| bool | openFile (const QFileInfo &fileInfo, const QByteArray &encoding) |
| Open CSV file. More... | |
| bool | isOpen () const |
| Check if a CSV file is open. | |
| void | closeFile () |
| Close CSV file. | |
| bool | atEnd () const |
| Check about end of file. More... | |
| Mdt::Expected< StringRecord > | readLine () |
| Read one line in CSV file. More... | |
| Mdt::Expected< StringRecordList > | readAll () |
| Read the entire CSV file. More... | |
| Mdt::Error | lastError () const |
| Get last error. | |
CSV parser that acts on a file as input.
Definition at line 48 of file CsvFileParser.h.
| bool Mdt::PlainText::CsvFileParser::atEnd | ( | ) | const |
Check about end of file.
If no file is open, this function returns allways true
Definition at line 82 of file CsvFileParser.cpp.
| bool Mdt::PlainText::CsvFileParser::openFile | ( | const QFileInfo & | fileInfo, |
| const QByteArray & | encoding | ||
| ) |
Open CSV file.
| fileInfo | Path to CSV file that must be open |
| encoding | Encoding name of the CSV file format. Will use QTextCodec::codecForName() to get apropriate codec. |
Definition at line 47 of file CsvFileParser.cpp.
| Expected< StringRecordList > Mdt::PlainText::CsvFileParser::readAll | ( | ) |
Read the entire CSV file.
Definition at line 108 of file CsvFileParser.cpp.
| Expected< StringRecord > Mdt::PlainText::CsvFileParser::readLine | ( | ) |
Read one line in CSV file.
Definition at line 87 of file CsvFileParser.cpp.
| void Mdt::PlainText::CsvFileParser::setCsvSettings | ( | const CsvParserSettings & | settings | ) |
Set CSV settings.
Definition at line 39 of file CsvFileParser.cpp.
1.8.11