aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.hpp')
-rw-r--r--src/openvic-simulation/dataloader/NodeTools.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.hpp b/src/openvic-simulation/dataloader/NodeTools.hpp
index acf5a41..30cba65 100644
--- a/src/openvic-simulation/dataloader/NodeTools.hpp
+++ b/src/openvic-simulation/dataloader/NodeTools.hpp
@@ -5,6 +5,7 @@
#include <optional>
#include <type_traits>
+#include <openvic-dataloader/detail/SymbolIntern.hpp>
#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
#include <tsl/ordered_set.h>
@@ -173,6 +174,10 @@ namespace OpenVic {
node_callback_t expect_length(callback_t<size_t> callback);
node_callback_t expect_key(
+ ovdl::symbol<char> key, node_callback_t callback, bool* key_found = nullptr, bool allow_duplicates = false
+ );
+
+ node_callback_t expect_key(
std::string_view key, node_callback_t callback, bool* key_found = nullptr, bool allow_duplicates = false
);
@@ -269,14 +274,10 @@ namespace OpenVic {
return ret;
}
- template<StringMapCase Case>
- constexpr bool add_key_map_entries(template_key_map_t<Case>& key_map) {
+ template<IsOrderedMap Map>
+ constexpr bool add_key_map_entries(Map&& key_map) {
return true;
}
- template<StringMapCase Case>
- constexpr bool add_key_map_entries(template_key_map_t<Case>&& key_map) {
- return add_key_map_entries(key_map);
- }
template<IsOrderedMap Map, typename... Args>
bool add_key_map_entries(