|
libodsstream
Library for mass spectrometry
|
#include <tsvreader.h>
Public Member Functions | |
| TsvReader (OdsDocHandlerInterface &handler) | |
| virtual | ~TsvReader () |
| void | parse (QFile &tsvFile) |
| void | parse (QIODevice *p_inputstream) |
| void | parse (QTextStream &in) |
| void | setSeparator (TsvSeparator separator) |
Private Member Functions | |
| bool | readCsvRow (QTextStream &in) |
| reads a CSV row based on https://stackoverflow.com/questions/27318631/parsing-through-a-csv-file-in-qt | |
Private Attributes | |
| std::size_t | m_columnNumber =0 |
| std::size_t | m_rowNumber =0 |
| OdsDocHandlerInterface & | m_handler |
| QChar | m_separator = '\t' |
Definition at line 43 of file tsvreader.h.
| TsvReader::TsvReader | ( | OdsDocHandlerInterface & | handler | ) |
creates an ODS reader with a reader handler
@Param OdsDocHandlerInterface & the interface to implement to read ODS files
Definition at line 41 of file tsvreader.cpp.
|
virtual |
Definition at line 45 of file tsvreader.cpp.
| void TsvReader::parse | ( | QFile & | tsvFile | ) |
Definition at line 67 of file tsvreader.cpp.
References m_handler, parse(), and OdsDocHandlerInterface::startSheet().
Referenced by parse().
| void TsvReader::parse | ( | QIODevice * | p_inputstream | ) |
Definition at line 95 of file tsvreader.cpp.
References OdsDocHandlerInterface::endDocument(), m_handler, and readCsvRow().
| void TsvReader::parse | ( | QTextStream & | in | ) |
Definition at line 106 of file tsvreader.cpp.
References OdsDocHandlerInterface::endDocument(), m_handler, and readCsvRow().
|
private |
reads a CSV row based on https://stackoverflow.com/questions/27318631/parsing-through-a-csv-file-in-qt
Definition at line 115 of file tsvreader.cpp.
References OdsDocHandlerInterface::endLine(), m_columnNumber, m_handler, m_rowNumber, m_separator, OdsException::qwhat(), OdsDocHandlerInterface::setCell(), OdsCell::setOfficeValueType(), OdsCell::setValueOfUndefinedType(), OdsCell::setValueString(), OdsDocHandlerInterface::startLine(), and OdsException::what().
| void TsvReader::setSeparator | ( | TsvSeparator | separator | ) |
Definition at line 49 of file tsvreader.cpp.
References comma, m_separator, semicolon, and tab.
|
private |
Definition at line 47 of file tsvreader.h.
Referenced by readCsvRow().
|
private |
Definition at line 50 of file tsvreader.h.
Referenced by parse(), parse(), parse(), and readCsvRow().
|
private |
Definition at line 48 of file tsvreader.h.
Referenced by readCsvRow().
|
private |
Definition at line 52 of file tsvreader.h.
Referenced by readCsvRow(), and setSeparator().