aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics/Issue.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-22 23:11:42 +0100
committer GitHub <noreply@github.com>2023-11-22 23:11:42 +0100
commita54898b7770e0d66b729216173960686c67e58bb (patch)
treeaf8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/politics/Issue.hpp
parente76336cd92639f4ec71088fc4c80aea4c25528cd (diff)
parent738a203e0d8b4df87c42888043b99c13d5d97511 (diff)
Merge pull request #78 from OpenVicProject/property-macro
Refactoring (*mostly* related to the property macro)
Diffstat (limited to 'src/openvic-simulation/politics/Issue.hpp')
-rw-r--r--src/openvic-simulation/politics/Issue.hpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/openvic-simulation/politics/Issue.hpp b/src/openvic-simulation/politics/Issue.hpp
index 84aa886..0dceae9 100644
--- a/src/openvic-simulation/politics/Issue.hpp
+++ b/src/openvic-simulation/politics/Issue.hpp
@@ -25,7 +25,7 @@ namespace OpenVic {
friend struct IssueManager;
private:
- IssueGroup const& group;
+ IssueGroup const& PROPERTY(group);
// TODO: policy modifiers, policy rule changes
@@ -34,7 +34,6 @@ namespace OpenVic {
public:
Issue(Issue&&) = default;
- IssueGroup const& get_group() const;
};
// Reform type (i.e. political_issues)
@@ -56,17 +55,14 @@ namespace OpenVic {
friend struct IssueManager;
private:
- ReformType const& type;
- const bool ordered; // next_step_only
- const bool administrative;
+ ReformType const& PROPERTY(type);
+ const bool PROPERTY_CUSTOM_NAME(ordered, is_ordered); // next_step_only
+ const bool PROPERTY_CUSTOM_NAME(administrative, is_administrative);
ReformGroup(std::string_view identifier, ReformType const& type, bool ordered, bool administrative);
public:
ReformGroup(ReformGroup&&) = default;
- ReformType const& get_type() const;
- bool is_ordered() const;
- bool is_administrative() const;
};
// Reform (i.e. yes_slavery)
@@ -74,8 +70,8 @@ namespace OpenVic {
friend struct IssueManager;
private:
- ReformGroup const& reform_group; // stores an already casted reference
- const size_t ordinal; // assigned by the parser to allow policy sorting
+ ReformGroup const& PROPERTY(reform_group); // stores an already casted reference
+ const size_t PROPERTY(ordinal); // assigned by the parser to allow policy sorting
Reform(std::string_view new_identifier, ReformGroup const& group, size_t ordinal);
@@ -83,9 +79,6 @@ namespace OpenVic {
public:
Reform(Reform&&) = default;
- ReformGroup const& get_reform_group() const;
- ReformType const& get_type() const;
- size_t get_ordinal() const;
};
// Issue manager - holds the registries