diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-01-12 21:53:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 21:53:46 +0100 |
commit | 7b5a960ee9fce4241f83e5217bcf8f43af99f330 (patch) | |
tree | 60101bdfe575a25c9ef10cdcc52691140795405d /src/openvic-simulation/misc/Modifier.hpp | |
parent | e79d3e0416e62883c697225b090d03abafc7bb30 (diff) | |
parent | 177a0051eceb657ad838048d9532e306e18ce4e5 (diff) |
Merge pull request #126 from OpenVicProject/improve_modifiers
Case insensitive modifiers & added more
Diffstat (limited to 'src/openvic-simulation/misc/Modifier.hpp')
-rw-r--r-- | src/openvic-simulation/misc/Modifier.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/openvic-simulation/misc/Modifier.hpp b/src/openvic-simulation/misc/Modifier.hpp index 033cc47..83efe9b 100644 --- a/src/openvic-simulation/misc/Modifier.hpp +++ b/src/openvic-simulation/misc/Modifier.hpp @@ -3,6 +3,9 @@ #include "openvic-simulation/scripts/ConditionScript.hpp" #include "openvic-simulation/types/IdentifierRegistry.hpp" +#include "dataloader/NodeTools.hpp" + + namespace OpenVic { struct ModifierManager; @@ -115,8 +118,8 @@ namespace OpenVic { * so instead we use an IdentifierInstanceRegistry (using std::unique_ptr's under the hood). */ private: - IdentifierInstanceRegistry<ModifierEffect> IDENTIFIER_REGISTRY(modifier_effect); - string_set_t complex_modifiers; + CaseInsensitiveIdentifierInstanceRegistry<ModifierEffect> IDENTIFIER_REGISTRY(modifier_effect); + case_insensitive_string_set_t complex_modifiers; IdentifierRegistry<Modifier> IDENTIFIER_REGISTRY(event_modifier); IdentifierRegistry<Modifier> IDENTIFIER_REGISTRY(static_modifier); @@ -135,6 +138,8 @@ namespace OpenVic { ); bool register_complex_modifier(std::string_view identifier); + static std::string + get_flat_identifier(const std::string_view complex_modifier_identifier, const std::string_view variant_identifier); bool setup_modifier_effects(); |