From 33787f89686cd03a6ae7305bc51add5ac47fbde2 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Tue, 19 Sep 2023 21:58:29 +0200 Subject: feat: added PartyIssue and PoliticalReform structs --- src/openvic-simulation/politics/PartyIssue.hpp | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/openvic-simulation/politics/PartyIssue.hpp (limited to 'src/openvic-simulation/politics/PartyIssue.hpp') diff --git a/src/openvic-simulation/politics/PartyIssue.hpp b/src/openvic-simulation/politics/PartyIssue.hpp new file mode 100644 index 0000000..8b0acdc --- /dev/null +++ b/src/openvic-simulation/politics/PartyIssue.hpp @@ -0,0 +1,48 @@ +#pragma once + +#include "types/IdentifierRegistry.hpp" + +namespace OpenVic { + struct PartyIssueManager; + + struct PartyIssueGroup : HasIdentifier { + friend struct PartyIssueManager; + + private: + PartyIssueGroup(const std::string_view new_identifier); + + public: + PartyIssueGroup(PartyIssueGroup&&) = default; + }; + + struct PartyIssue : HasIdentifier { + friend struct PartyIssueManager; + + private: + PartyIssueGroup const& group; + + //TODO - modifiers when party with issue is in power + + PartyIssue(const std::string_view new_identifier, PartyIssueGroup const& new_group); + + public: + PartyIssue(PartyIssue&&) = default; + }; + + struct PartyIssueManager { + private: + IdentifierRegistry party_issue_groups; + IdentifierRegistry party_issues; + + public: + PartyIssueManager(); + + bool add_party_issue_group(const std::string_view identifier); + IDENTIFIER_REGISTRY_ACCESSORS(PartyIssueGroup, party_issue_group) + + bool add_party_issue(const std::string_view identifier, PartyIssueGroup const* group); + IDENTIFIER_REGISTRY_ACCESSORS(PartyIssue, party_issue) + + //TODO - loaders + }; +} \ No newline at end of file -- cgit v1.2.3-56-ga3b1