summaryrefslogtreecommitdiffstats
path: root/src/orcus_json_cli.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/orcus_json_cli.hpp')
-rw-r--r--src/orcus_json_cli.hpp54
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: */