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  bool 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 {
62  enum class output_format_type
63  {
65  none,
67  xml,
69  json,
71  check
72  };
73 
79  std::string input_path;
80 
85  std::string output_path;
86 
91 
99 
104 
116 
117  json_config();
118  ~json_config();
119 };
120 
121 struct ORCUS_DLLPUBLIC yaml_config
122 {
123  enum class output_format_type { none, yaml, json };
124 
125  std::string input_path;
126  std::string output_path;
127 
128  output_format_type output_format;
129 
130  yaml_config();
131  ~yaml_config();
132 };
133 
134 }
135 
136 #endif
137 
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: config.hpp:121
output_format_type output_format
Definition: config.hpp:90
size_t header_row_size
Definition: config.hpp:29
Definition: config.hpp:26
std::string input_path
Definition: config.hpp:79
Definition: config.hpp:18
std::string output_path
Definition: config.hpp:85
bool resolve_references
Definition: config.hpp:103
bool preserve_object_order
Definition: config.hpp:98
Definition: config.hpp:60
bool debug
Definition: config.hpp:41
bool structure_check
Definition: config.hpp:48
bool split_to_multiple_sheets
Definition: config.hpp:35
Definition: base64.hpp:15
bool persistent_string_values
Definition: config.hpp:115
output_format_type
Definition: config.hpp:62