author | František Kučera <franta-hg@frantovo.cz> |
Sun, 27 Oct 2019 01:21:59 +0200 | |
branch | v_0 |
changeset 5 | accf73de6778 |
parent 4 | a0689654b3c2 |
child 7 | ff69af3c67a3 |
permissions | -rw-r--r-- |
1
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
/** |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
* Relational pipes |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
* Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
* |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
* This program is free software: you can redistribute it and/or modify |
7d6ac51c0d48
configuration and CLI parser
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 |
4
a0689654b3c2
fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents:
2
diff
changeset
|
7 |
* the Free Software Foundation, version 3 of the License. |
1
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
* |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
* |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
*/ |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
#pragma once |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
#include <vector> |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
#include <relpipe/writer/typedefs.h> |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
namespace relpipe { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
25 |
namespace in { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
26 |
namespace xmltable { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
27 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
class AttributeRecipe { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
public: |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
virtual ~AttributeRecipe() { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
32 |
} |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
34 |
relpipe::writer::string_t name; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
35 |
relpipe::writer::TypeId type; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
36 |
relpipe::writer::string_t xpath; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
}; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
38 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
39 |
class RelationConfiguration { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
40 |
public: |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
41 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
42 |
virtual ~RelationConfiguration() { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
43 |
} |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
44 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
45 |
relpipe::writer::string_t relation; |
2
0d3eb5129582
convert arbitrary XML to one or more relations
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
46 |
relpipe::writer::boolean_t nameIsXPath = false; |
1
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
47 |
relpipe::writer::string_t xpath; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
48 |
std::vector<AttributeRecipe> attributes; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
49 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
50 |
}; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
51 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
52 |
class Configuration { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
53 |
public: |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
54 |
std::vector<RelationConfiguration> relationConfigurations; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
55 |
std::vector<relpipe::writer::string_t> namespaceMappings; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
56 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
57 |
virtual ~Configuration() { |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
58 |
} |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
59 |
}; |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
60 |
|
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
61 |
} |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
62 |
} |
7d6ac51c0d48
configuration and CLI parser
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
63 |
} |