odsstream
Loading...
Searching...
No Matches
tsvreader.h
Go to the documentation of this file.
1
8/*******************************************************************************
9 * Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>.
10 *
11 * This file is part of the libodsstream library.
12 *
13 * libodsstream is a library to read and write ODS documents as streams
14 * Copyright (C) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU Lesser General Public License as published
18 *by the Free Software Foundation, either version 3 of the License, or (at your
19 *option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * Contributors:
30 * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
31 *implementation
32 ******************************************************************************/
33
34#pragma once
35
36#include <QFile>
37#include <QTextStream>
38#include "config.h"
39#include "reader/odscell.h"
41
42
44{
45
46 private:
47 std::size_t m_columnNumber=0;
48 std::size_t m_rowNumber=0;
49
50 OdsDocHandlerInterface &m_handler;
51
52 QChar m_separator = '\t';
53
54 public:
63 virtual ~TsvReader();
64
65
66 void parse(QFile &tsvFile);
67 void parse(QIODevice *p_inputstream);
68 void parse(QTextStream &in);
69
70 void setSeparator(TsvSeparator separator);
71
72
73 private:
78 bool readCsvRow(QTextStream &in);
79};
Definition odsdochandlerinterface.h:43
Definition tsvreader.h:44
interface to use as a wildcard to writer in either TSV, ODS TSVdirectory writers any kind of writer c...