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  {
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 
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 
86 
91 
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: */
Definition: config.hpp:28
bool split_to_multiple_sheets
Definition: config.hpp:36
size_t header_row_size
Definition: config.hpp:30
Definition: config.hpp:20
bool structure_check
Definition: config.hpp:52
bool debug
Definition: config.hpp:45
Definition: config.hpp:60
std::string output_path
Definition: config.hpp:72
bool persistent_string_values
Definition: config.hpp:102
bool resolve_references
Definition: config.hpp:90
dump_format_t output_format
Definition: config.hpp:77
bool preserve_object_order
Definition: config.hpp:85
std::string input_path
Definition: config.hpp:66
Definition: config.hpp:109