blob: 2f8db9f9cd2d938351a20fe8a5838e5ee86b9edc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_ORCUS_ORCUS_JSON_CLI_HPP
#define INCLUDED_ORCUS_ORCUS_JSON_CLI_HPP
#include "orcus/stream.hpp"
#include "cli_global.hpp"
#include <ostream>
namespace orcus {
struct json_config;
namespace detail {
enum class mode_t
{
unknown,
convert,
map,
map_gen,
structure
};
struct cmd_params
{
std::unique_ptr<json_config> config; //< json parser configuration.
std::unique_ptr<output_stream> os;
mode_t mode = mode_t::convert;
file_content map_file;
cmd_params(const cmd_params&) = delete;
cmd_params& operator= (const cmd_params&) = delete;
cmd_params();
cmd_params(cmd_params&& other);
~cmd_params();
};
void map_to_sheets_and_dump(const file_content& content, cmd_params& params);
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|