aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/interface/LoadBase.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-01-24 09:49:36 +0100
committer GitHub <noreply@github.com>2024-01-24 09:49:36 +0100
commit76d9463cc1a72c24592f79d3d7a9c8e337165d8c (patch)
treef251fc210fabef585cce802c410da78ab68f59d8 /src/openvic-simulation/interface/LoadBase.hpp
parent6bcb1e70a15755ceb0aaa13a080f85f8edb50911 (diff)
parent13d652813e2a662875b0364ec0d1bfe99e9004d6 (diff)
Merge pull request #138 from OpenVicProject/unit-rework
Reworked Units and added IdentifierPointerRegistry
Diffstat (limited to 'src/openvic-simulation/interface/LoadBase.hpp')
-rw-r--r--src/openvic-simulation/interface/LoadBase.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/openvic-simulation/interface/LoadBase.hpp b/src/openvic-simulation/interface/LoadBase.hpp
index 74aece9..3363651 100644
--- a/src/openvic-simulation/interface/LoadBase.hpp
+++ b/src/openvic-simulation/interface/LoadBase.hpp
@@ -67,11 +67,18 @@ namespace OpenVic {
template<typename Value, typename... Context>
requires std::derived_from<Value, Named<Context...>>
struct RegistryValueInfoNamed {
- using value_type = Value;
+ using internal_value_type = Value;
+ using external_value_type = Value;
- static constexpr std::string_view get_identifier(value_type const& item) {
+ static constexpr std::string_view get_identifier(internal_value_type const& item) {
return item.get_name();
}
+ static constexpr external_value_type& get_external_value(internal_value_type& item) {
+ return item;
+ }
+ static constexpr external_value_type const& get_external_value(internal_value_type const& item) {
+ return item;
+ }
};
template<typename Value, typename... Context>