aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-31 01:47:31 +0100
committer hop311 <hop3114@gmail.com>2024-01-02 14:41:28 +0100
commit5f64f983d0cead266a28791be42162c443fd2a75 (patch)
treeda5fbb48d6c01d6faedd16b46ff846c65fdb4c33 /src/openvic-simulation/dataloader/NodeTools.hpp
parent9988b21278dc1c8df044631bd2935a7e450a7bff (diff)
Added framework for loading all Conditions and Effects
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.hpp')
-rw-r--r--src/openvic-simulation/dataloader/NodeTools.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.hpp b/src/openvic-simulation/dataloader/NodeTools.hpp
index f3224aa..f5f960f 100644
--- a/src/openvic-simulation/dataloader/NodeTools.hpp
+++ b/src/openvic-simulation/dataloader/NodeTools.hpp
@@ -1,11 +1,8 @@
#pragma once
-#include <concepts>
#include <cstdint>
#include <functional>
-#include <map>
#include <optional>
-#include <set>
#include <type_traits>
#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
@@ -134,7 +131,9 @@ namespace OpenVic {
node_callback_t expect_list(node_callback_t callback);
node_callback_t expect_length(callback_t<size_t> callback);
- node_callback_t expect_key(std::string_view key, node_callback_t callback, bool* key_found = nullptr);
+ node_callback_t expect_key(
+ std::string_view key, node_callback_t callback, bool* key_found = nullptr, bool allow_duplicates = false
+ );
node_callback_t expect_dictionary_and_length(length_callback_t length_callback, key_value_callback_t callback);
node_callback_t expect_dictionary(key_value_callback_t callback);