Orcus
Loading...
Searching...
No Matches
include
orcus
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
17
namespace
orcus {
18
19
struct
ORCUS_DLLPUBLIC
config
20
{
21
format_t input_format;
22
27
struct
csv_config
28
{
30
size_t
header_row_size
;
31
36
bool
split_to_multiple_sheets
;
37
};
38
39
// TODO: add config for other formats as needed.
40
using
data_type = std::variant<csv_config>;
41
45
bool
debug
;
46
52
bool
structure_check
;
53
54
data_type data;
55
56
config
(format_t input_format);
57
};
58
59
struct
ORCUS_DLLPUBLIC
json_config
60
{
66
std::string
input_path
;
67
72
std::string
output_path
;
73
77
dump_format_t
output_format
;
78
85
bool
preserve_object_order
;
86
90
bool
resolve_references
;
91
102
bool
persistent_string_values
;
103
104
json_config
();
105
~json_config
();
106
};
107
108
struct
ORCUS_DLLPUBLIC
yaml_config
109
{
110
enum class
output_format_type { none, yaml, json };
111
112
std::string input_path;
113
std::string output_path;
114
115
output_format_type output_format;
116
117
yaml_config
();
118
~yaml_config
();
119
};
120
121
}
122
123
#endif
124
125
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::config::csv_config
Definition
config.hpp:28
orcus::config::csv_config::split_to_multiple_sheets
bool split_to_multiple_sheets
Definition
config.hpp:36
orcus::config::csv_config::header_row_size
size_t header_row_size
Definition
config.hpp:30
orcus::config
Definition
config.hpp:20
orcus::config::structure_check
bool structure_check
Definition
config.hpp:52
orcus::config::debug
bool debug
Definition
config.hpp:45
orcus::json_config
Definition
config.hpp:60
orcus::json_config::output_path
std::string output_path
Definition
config.hpp:72
orcus::json_config::persistent_string_values
bool persistent_string_values
Definition
config.hpp:102
orcus::json_config::resolve_references
bool resolve_references
Definition
config.hpp:90
orcus::json_config::output_format
dump_format_t output_format
Definition
config.hpp:77
orcus::json_config::preserve_object_order
bool preserve_object_order
Definition
config.hpp:85
orcus::json_config::input_path
std::string input_path
Definition
config.hpp:66
orcus::yaml_config
Definition
config.hpp:109
Generated on Sun Mar 31 2024 02:42:10 for Orcus by
1.10.0