diff options
author | Hop311 <Hop3114@gmail.com> | 2023-11-22 23:11:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 23:11:42 +0100 |
commit | a54898b7770e0d66b729216173960686c67e58bb (patch) | |
tree | af8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/politics/Government.hpp | |
parent | e76336cd92639f4ec71088fc4c80aea4c25528cd (diff) | |
parent | 738a203e0d8b4df87c42888043b99c13d5d97511 (diff) |
Merge pull request #78 from OpenVicProject/property-macro
Refactoring (*mostly* related to the property macro)
Diffstat (limited to 'src/openvic-simulation/politics/Government.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Government.hpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/openvic-simulation/politics/Government.hpp b/src/openvic-simulation/politics/Government.hpp index 9fff111..fde7d32 100644 --- a/src/openvic-simulation/politics/Government.hpp +++ b/src/openvic-simulation/politics/Government.hpp @@ -9,10 +9,11 @@ namespace OpenVic { friend struct GovernmentTypeManager; private: - const std::vector<Ideology const*> ideologies; - const bool elections, appoint_ruling_party; - const Timespan term_duration; - const std::string flag_type_identifier; + const std::vector<Ideology const*> PROPERTY(ideologies); + const bool PROPERTY_CUSTOM_NAME(elections, holds_elections); + const bool PROPERTY_CUSTOM_NAME(appoint_ruling_party, can_appoint_ruling_party); + const Timespan PROPERTY(term_duration); + const std::string PROPERTY_CUSTOM_NAME(flag_type_identifier, get_flag_type); GovernmentType( std::string_view new_identifier, std::vector<Ideology const*>&& new_ideologies, bool new_elections, @@ -23,11 +24,6 @@ namespace OpenVic { 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_term_duration() const; - std::string_view get_flag_type() const; }; struct GovernmentTypeManager { |