From 41d50b15ac978530a53ed99eea36f180e1d27b16 Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 14 Jun 2024 23:06:19 +0100 Subject: Renamed Country to CountryDefinition --- src/openvic-simulation/country/CountryInstance.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/openvic-simulation/country/CountryInstance.hpp') diff --git a/src/openvic-simulation/country/CountryInstance.hpp b/src/openvic-simulation/country/CountryInstance.hpp index 68d2bb2..45924b2 100644 --- a/src/openvic-simulation/country/CountryInstance.hpp +++ b/src/openvic-simulation/country/CountryInstance.hpp @@ -4,10 +4,11 @@ #include "openvic-simulation/types/Date.hpp" #include "openvic-simulation/types/fixed_point/FixedPointMap.hpp" +#include "openvic-simulation/types/IdentifierRegistry.hpp" #include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { - struct Country; + struct CountryDefinition; struct Culture; struct Religion; struct CountryParty; @@ -21,8 +22,9 @@ namespace OpenVic { /* Representation of an existing country that is currently in-game. */ struct CountryInstance { friend struct CountryInstanceManager; + private: - Country const* PROPERTY_RW(base_country); + CountryDefinition const* PROPERTY_RW(country_definition); Culture const* PROPERTY_RW(primary_culture); std::vector PROPERTY(accepted_cultures); Religion const* PROPERTY_RW(religion); @@ -40,7 +42,7 @@ namespace OpenVic { std::vector PROPERTY(reforms); // TODO: should be map of reform groups to active reforms: must set defaults & validate applied history // TODO: Military units + OOBs; will probably need an extensible deployment class - CountryInstance(Country const* new_base_country); + CountryInstance(CountryDefinition const* new_country_definition); public: std::string_view get_identifier() const; @@ -56,17 +58,17 @@ namespace OpenVic { bool apply_history_to_country(CountryHistoryEntry const* entry); }; - struct CountryManager; + struct CountryDefinitionManager; struct CountryHistoryManager; struct UnitInstanceManager; struct MapInstance; struct CountryInstanceManager { private: - std::vector PROPERTY(country_instances); + IdentifierRegistry IDENTIFIER_REGISTRY(country_instance); public: - bool generate_country_instances(CountryManager const& country_manager); + bool generate_country_instances(CountryDefinitionManager const& country_definition_manager); bool apply_history_to_countries( CountryHistoryManager const& history_manager, Date date, UnitInstanceManager& unit_instance_manager, -- cgit v1.2.3-56-ga3b1