diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
commit | c484829272cd13a738e35412498e12f2c9a194ac (patch) | |
tree | a1f5ec09629ee895bd3963fa8820b45f2f4c574b /src/orcus_json_cli.hpp | |
parent | Initial commit. (diff) | |
download | liborcus-upstream.tar.xz liborcus-upstream.zip |
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/orcus_json_cli.hpp')
-rw-r--r-- | src/orcus_json_cli.hpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/orcus_json_cli.hpp b/src/orcus_json_cli.hpp new file mode 100644 index 0000000..2f8db9f --- /dev/null +++ b/src/orcus_json_cli.hpp @@ -0,0 +1,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: */ |