diff options
Diffstat (limited to 'src/openvic-simulation/interface')
-rw-r--r-- | src/openvic-simulation/interface/LoadBase.hpp | 11 |
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> |