aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country/CountryInstance.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-06-15 00:06:19 +0200
committer hop311 <hop3114@gmail.com>2024-06-20 20:33:02 +0200
commit41d50b15ac978530a53ed99eea36f180e1d27b16 (patch)
tree236036a544c54d678fc79344677566c3b060d335 /src/openvic-simulation/country/CountryInstance.hpp
parentbfd539513af435564daf70f94f6cce146dd5c948 (diff)
Renamed Country to CountryDefinitioncountry-definition
Diffstat (limited to 'src/openvic-simulation/country/CountryInstance.hpp')
-rw-r--r--src/openvic-simulation/country/CountryInstance.hpp14
1 files changed, 8 insertions, 6 deletions
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<Culture const*> PROPERTY(accepted_cultures);
Religion const* PROPERTY_RW(religion);
@@ -40,7 +42,7 @@ namespace OpenVic {
std::vector<Reform const*> 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<CountryInstance> PROPERTY(country_instances);
+ IdentifierRegistry<CountryInstance> 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,