summaryrefslogtreecommitdiffstats
path: root/include/ixion/named_expressions_iterator.hpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:47:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:47:37 +0000
commit00e2eb4fd0266c5be01e3a527a66aaad5ab4b634 (patch)
treea6a58bd544eb0b76b9d3acc678ea88791acca045 /include/ixion/named_expressions_iterator.hpp
parentInitial commit. (diff)
downloadlibixion-00e2eb4fd0266c5be01e3a527a66aaad5ab4b634.tar.xz
libixion-00e2eb4fd0266c5be01e3a527a66aaad5ab4b634.zip
Adding upstream version 0.19.0.upstream/0.19.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/ixion/named_expressions_iterator.hpp')
-rw-r--r--include/ixion/named_expressions_iterator.hpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/ixion/named_expressions_iterator.hpp b/include/ixion/named_expressions_iterator.hpp
new file mode 100644
index 0000000..7511fef
--- /dev/null
+++ b/include/ixion/named_expressions_iterator.hpp
@@ -0,0 +1,57 @@
+/* -*- 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_IXION_NAMED_EXPRESSIONS_ITERATOR_HPP
+#define INCLUDED_IXION_NAMED_EXPRESSIONS_ITERATOR_HPP
+
+#include "types.hpp"
+#include "formula_tokens_fwd.hpp"
+
+#include <memory>
+#include <iosfwd>
+#include <string>
+
+namespace ixion {
+
+class model_context;
+struct abs_address_t;
+
+class IXION_DLLPUBLIC named_expressions_iterator
+{
+ friend class model_context;
+
+ struct impl;
+ std::unique_ptr<impl> mp_impl;
+
+ named_expressions_iterator(const model_context& cxt, sheet_t scope);
+
+public:
+ named_expressions_iterator();
+ named_expressions_iterator(const named_expressions_iterator& other);
+ named_expressions_iterator(named_expressions_iterator&& other);
+ ~named_expressions_iterator();
+
+ struct named_expression
+ {
+ const std::string* name;
+ const named_expression_t* expression;
+ };
+
+ size_t size() const;
+ bool has() const;
+ void next();
+
+ named_expression get() const;
+
+ named_expressions_iterator& operator= (const named_expressions_iterator& other);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */