From 00e2eb4fd0266c5be01e3a527a66aaad5ab4b634 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:47:37 +0200 Subject: Adding upstream version 0.19.0. Signed-off-by: Daniel Baumann --- include/ixion/named_expressions_iterator.hpp | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/ixion/named_expressions_iterator.hpp (limited to 'include/ixion/named_expressions_iterator.hpp') 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 +#include +#include + +namespace ixion { + +class model_context; +struct abs_address_t; + +class IXION_DLLPUBLIC named_expressions_iterator +{ + friend class model_context; + + struct impl; + std::unique_ptr 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: */ -- cgit v1.2.3