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 {
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: */
Definition: config.hpp:109
dump_format_t output_format
Definition: config.hpp:78
size_t header_row_size
Definition: config.hpp:29
Definition: config.hpp:26
std::string input_path
Definition: config.hpp:67
Definition: config.hpp:18
std::string output_path
Definition: config.hpp:73
bool resolve_references
Definition: config.hpp:91
bool preserve_object_order
Definition: config.hpp:86
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:103