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 
16 namespace orcus {
17 
18 struct ORCUS_DLLPUBLIC config
19 {
20  format_t input_format;
21 
26  struct csv_config
27  {
30 
36  };
37 
41  uint16_t debug;
42 
49 
50  union
51  {
52  csv_config csv;
53 
54  // TODO : add config for other formats as needed.
55  };
56 
57  config(format_t input_format);
58 };
59 
60 struct ORCUS_DLLPUBLIC json_config
61 {
67  std::string input_path;
68 
73  std::string output_path;
74 
78  dump_format_t output_format;
79 
87 
92 
104 
105  json_config();
106  ~json_config();
107 };
108 
109 struct ORCUS_DLLPUBLIC yaml_config
110 {
111  enum class output_format_type { none, yaml, json };
112 
113  std::string input_path;
114  std::string output_path;
115 
116  output_format_type output_format;
117 
118  yaml_config();
119  ~yaml_config();
120 };
121 
122 }
123 
124 #endif
125 
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::config::debug
uint16_t debug
Definition: config.hpp:41
orcus::config::csv_config::header_row_size
size_t header_row_size
Definition: config.hpp:29
orcus::config::csv_config::split_to_multiple_sheets
bool split_to_multiple_sheets
Definition: config.hpp:35
orcus::config::structure_check
bool structure_check
Definition: config.hpp:48
orcus::config
Definition: config.hpp:19
orcus::json_config
Definition: config.hpp:61
orcus::json_config::output_format
dump_format_t output_format
Definition: config.hpp:78
orcus::json_config::output_path
std::string output_path
Definition: config.hpp:73
orcus::json_config::input_path
std::string input_path
Definition: config.hpp:67
orcus::json_config::resolve_references
bool resolve_references
Definition: config.hpp:91
orcus::yaml_config
Definition: config.hpp:110
orcus::config::csv_config
Definition: config.hpp:27
orcus::json_config::persistent_string_values
bool persistent_string_values
Definition: config.hpp:103
orcus::json_config::preserve_object_order
bool preserve_object_order
Definition: config.hpp:86