diff options
author | Joel Machens <ajmach6@gmail.com> | 2023-10-15 23:09:21 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-10-17 00:33:22 +0200 |
commit | f4f41b6c51ce7a1d719759128b2af92604df5182 (patch) | |
tree | be293fe4b4597b74c9d35143a551a8fb33f80290 /src/openvic-simulation/politics/NationalValue.hpp | |
parent | fe319098e49c9841219a9e118a30ebef05eb2c51 (diff) |
Add National Values Loading
Diffstat (limited to 'src/openvic-simulation/politics/NationalValue.hpp')
-rw-r--r-- | src/openvic-simulation/politics/NationalValue.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/openvic-simulation/politics/NationalValue.hpp b/src/openvic-simulation/politics/NationalValue.hpp new file mode 100644 index 0000000..09ef85e --- /dev/null +++ b/src/openvic-simulation/politics/NationalValue.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include "openvic-simulation/Modifier.hpp" +#include "openvic-simulation/types/IdentifierRegistry.hpp" + +namespace OpenVic { + struct NationalValueManager; + + struct NationalValue : HasIdentifier { + friend struct NationalValueManager; + + private: + const ModifierValue modifiers; + + NationalValue(std::string_view new_identifier, ModifierValue&& new_modifiers); + + public: + NationalValue(NationalValue&&) = default; + + ModifierValue const& get_modifiers() const; + }; + + struct NationalValueManager { + private: + IdentifierRegistry<NationalValue> national_values; + + public: + NationalValueManager(); + + bool add_national_value(std::string_view identifier, ModifierValue&& modifiers); + IDENTIFIER_REGISTRY_ACCESSORS(national_value) + + bool load_national_values_file(ModifierManager const& modifier_manager, ast::NodeCPtr root); + }; +} // namespace OpenVic |