summaryrefslogtreecommitdiffstats
path: root/include/ixion/interface/session_handler.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/ixion/interface/session_handler.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/ixion/interface/session_handler.hpp b/include/ixion/interface/session_handler.hpp
new file mode 100644
index 0000000..7ed2a8e
--- /dev/null
+++ b/include/ixion/interface/session_handler.hpp
@@ -0,0 +1,50 @@
+/* -*- 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 __IXION_INTERFACE_SESSION_HANDLER_HPP__
+#define __IXION_INTERFACE_SESSION_HANDLER_HPP__
+
+#include "../formula_opcode.hpp"
+#include "../formula_function_opcode.hpp"
+#include "../env.hpp"
+
+#include <cstdlib>
+
+namespace ixion {
+
+class formula_cell;
+class formula_result;
+struct address_t;
+struct range_t;
+struct abs_address_t;
+struct table_t;
+
+namespace iface {
+
+class IXION_DLLPUBLIC session_handler
+{
+public:
+ virtual ~session_handler();
+
+ virtual void begin_cell_interpret(const abs_address_t& pos) = 0;
+ virtual void end_cell_interpret() = 0;
+ virtual void set_result(const formula_result& result) = 0;
+ virtual void set_invalid_expression(std::string_view msg) = 0;
+ virtual void set_formula_error(std::string_view msg) = 0;
+ virtual void push_token(fopcode_t fop) = 0;
+ virtual void push_value(double val) = 0;
+ virtual void push_string(size_t sid) = 0;
+ virtual void push_single_ref(const address_t& addr, const abs_address_t& pos) = 0;
+ virtual void push_range_ref(const range_t& range, const abs_address_t& pos) = 0;
+ virtual void push_table_ref(const table_t& table) = 0;
+ virtual void push_function(formula_function_t foc) = 0;
+};
+
+}}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */