diff options
author | hop311 <hop3114@gmail.com> | 2024-01-23 01:17:38 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-23 23:33:40 +0100 |
commit | 13d652813e2a662875b0364ec0d1bfe99e9004d6 (patch) | |
tree | f251fc210fabef585cce802c410da78ab68f59d8 /src/openvic-simulation/interface | |
parent | 268a6948c0400905dfc335427395519689f067f5 (diff) |
Reworked Units and added IdentifierPointerRegistryunit-rework
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> |