diff options
author | hop311 <hop3114@gmail.com> | 2023-10-12 21:19:00 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-10-12 21:19:00 +0200 |
commit | e50c67eb1aaa54f5fb31425f81616bea4e6b880a (patch) | |
tree | c4fbc6ee494f8ad33a8de36be5fc300165ce05fc /src/openvic-simulation/politics/Government.hpp | |
parent | bb22324da1225a0ac458c1d69893bb3bd28bd6b7 (diff) |
Lots of accumulated changes
Diffstat (limited to 'src/openvic-simulation/politics/Government.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Government.hpp | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/src/openvic-simulation/politics/Government.hpp b/src/openvic-simulation/politics/Government.hpp index a8fc00f..3bc754c 100644 --- a/src/openvic-simulation/politics/Government.hpp +++ b/src/openvic-simulation/politics/Government.hpp @@ -1,43 +1,42 @@ #pragma once -#include "openvic-simulation/types/IdentifierRegistry.hpp" #include "openvic-simulation/politics/Ideology.hpp" namespace OpenVic { - struct GovernmentTypeManager; + struct GovernmentTypeManager; - struct GovernmentType : HasIdentifier { - friend struct GovernmentTypeManager; + struct GovernmentType : HasIdentifier { + friend struct GovernmentTypeManager; - private: - std::vector<Ideology const*> ideologies; - const bool elections, appoint_ruling_party; - const Timespan election_duration; - const std::string flag_type_identifier; + private: + const std::vector<Ideology const*> ideologies; + const bool elections, appoint_ruling_party; + const Timespan term_duration; + const std::string flag_type_identifier; - GovernmentType(std::string_view new_identifier, std::vector<Ideology const*> new_ideologies, bool new_elections, bool new_appoint_ruling_party, Timespan new_election_duration, std::string_view new_flag_type_identifier); + GovernmentType(std::string_view new_identifier, std::vector<Ideology const*>&& new_ideologies, bool new_elections, bool new_appoint_ruling_party, Timespan new_term_duration, std::string_view new_flag_type_identifier); - public: - GovernmentType(GovernmentType&&) = default; + public: + GovernmentType(GovernmentType&&) = default; - bool is_ideology_compatible(Ideology const* ideology) const; - std::vector<Ideology const*> const& get_ideologies() const; - bool holds_elections() const; - bool can_appoint_ruling_party() const; - Timespan get_election_duration() const; - std::string_view get_flag_type() const; - }; + bool is_ideology_compatible(Ideology const* ideology) const; + std::vector<Ideology const*> const& get_ideologies() const; + bool holds_elections() const; + bool can_appoint_ruling_party() const; + Timespan get_term_duration() const; + std::string const& get_flag_type() const; + }; - struct GovernmentTypeManager { - private: - IdentifierRegistry<GovernmentType> government_types; + struct GovernmentTypeManager { + private: + IdentifierRegistry<GovernmentType> government_types; - public: - GovernmentTypeManager(); + public: + GovernmentTypeManager(); - bool add_government_type(std::string_view identifier, std::vector<Ideology const*> ideologies, bool elections, bool appoint_ruling_party, Timespan election_duration, std::string_view flag_type); - IDENTIFIER_REGISTRY_ACCESSORS(GovernmentType, government_type) + bool add_government_type(std::string_view identifier, std::vector<Ideology const*> ideologies, bool elections, bool appoint_ruling_party, Timespan term_duration, std::string_view flag_type); + IDENTIFIER_REGISTRY_ACCESSORS(government_type) - bool load_government_types_file(IdeologyManager const& ideology_manager, ast::NodeCPtr root); - }; + bool load_government_types_file(IdeologyManager const& ideology_manager, ast::NodeCPtr root); + }; } // namespace OpenVic |