Orcus
Loading...
Searching...
No Matches
config.hpp
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
7
8#ifndef INCLUDED_ORCUS_CONFIG_HPP
9#define INCLUDED_ORCUS_CONFIG_HPP
10
11#include "orcus/env.hpp"
12#include "orcus/types.hpp"
13
14#include <string>
15#include <variant>
16
17namespace orcus {
18
19struct ORCUS_DLLPUBLIC config
20{
21 format_t input_format;
22
28 {
31
37 };
38
39 // TODO: add config for other formats as needed.
40 using data_type = std::variant<csv_config>;
41
45 bool debug;
46
53
54 data_type data;
55
56 config(format_t input_format);
57};
58
59struct ORCUS_DLLPUBLIC json_config
60{
66 std::string input_path;
67
75
79 bool resolve_references = false;
80
92
93 json_config();
94 ~json_config();
95};
96
97struct ORCUS_DLLPUBLIC yaml_config
98{
99 enum class output_format_type { none, yaml, json };
100
101 std::string input_path;
102 std::string output_path;
103
104 output_format_type output_format;
105
106 yaml_config();
107 ~yaml_config();
108};
109
110}
111
112#endif
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition config.hpp:28
bool split_to_multiple_sheets
Definition config.hpp:36
size_t header_row_size
Definition config.hpp:30
bool structure_check
Definition config.hpp:52
bool debug
Definition config.hpp:45
bool persistent_string_values
Definition config.hpp:91
bool resolve_references
Definition config.hpp:79
bool preserve_object_order
Definition config.hpp:74
std::string input_path
Definition config.hpp:66