author | František Kučera <franta-hg@frantovo.cz> |
Sun, 18 Apr 2021 10:42:54 +0200 | |
branch | v_0 |
changeset 17 | ea36eed9683f |
parent 14 | a7596589a5b0 |
permissions | -rw-r--r-- |
14
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
/** |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
* Relational pipes |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
* Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
* |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
* This program is free software: you can redistribute it and/or modify |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
* the Free Software Foundation, version 3 of the License. |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
* |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
* |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
*/ |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
#pragma once |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
#include <vector> |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
#include <iostream> |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
#include <relpipe/reader/typedefs.h> |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
25 |
namespace relpipe { |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
26 |
namespace out { |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
27 |
namespace csv { |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
class Configuration { |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
public: |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
relpipe::reader::boolean_t writeHeader = true; |
17
ea36eed9683f
optionally write data types into the CSV header: --write-types
František Kučera <franta-hg@frantovo.cz>
parents:
14
diff
changeset
|
32 |
relpipe::reader::boolean_t writeTypes = false; |
14
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
34 |
virtual ~Configuration() { |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
35 |
} |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
36 |
}; |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
|
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
38 |
} |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
39 |
} |
a7596589a5b0
change CLI interface: options: --write-header
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
40 |
} |