diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-18 01:16:05 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-18 01:16:05 +0200 |
commit | 72add97c47f0d17fc0019bb4cfec7506740a9c7d (patch) | |
tree | 77f81dfd3ec85a659741e979c148b33b22595dd0 /src/openvic-simulation/dataloader/NodeTools.hpp | |
parent | 5549753a6ae909b1a65f52a1cc67ef2b5efae55a (diff) |
Province adjacency scaffolding
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.hpp')
-rw-r--r-- | src/openvic-simulation/dataloader/NodeTools.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.hpp b/src/openvic-simulation/dataloader/NodeTools.hpp index bb75ffe..51bbfa9 100644 --- a/src/openvic-simulation/dataloader/NodeTools.hpp +++ b/src/openvic-simulation/dataloader/NodeTools.hpp @@ -162,5 +162,13 @@ namespace OpenVic { callback_t<int64_t> assign_variable_callback_int(const std::string_view name, T& var) { return _assign_variable_callback_int<int64_t>(name, var); } + + template<typename T> + callback_t<T const&> assign_variable_callback_pointer(T const*& var) { + return [&var](T const& val) -> bool { + var = &val; + return true; + }; + } } } |