From 85155e033e9b03d71752626137a75f6418a5786c Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sun, 10 Dec 2023 13:35:25 +0100 Subject: feat: implemented pop history loading --- src/openvic-simulation/history/ProvinceHistory.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/openvic-simulation/history/ProvinceHistory.hpp') diff --git a/src/openvic-simulation/history/ProvinceHistory.hpp b/src/openvic-simulation/history/ProvinceHistory.hpp index e4adc08..b69408e 100644 --- a/src/openvic-simulation/history/ProvinceHistory.hpp +++ b/src/openvic-simulation/history/ProvinceHistory.hpp @@ -17,6 +17,7 @@ namespace OpenVic { struct ProvinceHistoryEntry : HistoryEntry { friend struct ProvinceHistoryMap; + friend struct ProvinceHistoryManager; private: Province const& PROPERTY(province); @@ -33,8 +34,10 @@ namespace OpenVic { std::map PROPERTY(province_buildings); std::map PROPERTY(state_buildings); fixed_point_map_t PROPERTY(party_loyalties); + std::vector PROPERTY(pops); ProvinceHistoryEntry(Province const& new_province, Date new_date); + bool _load_province_pop_history(PopManager const& pop_manager, ast::NodeCPtr root); }; struct ProvinceHistoryManager; @@ -45,6 +48,8 @@ namespace OpenVic { private: Province const& PROPERTY(province); + ProvinceHistoryEntry* _get_entry(Date date); + protected: ProvinceHistoryMap(Province const& new_province); @@ -66,5 +71,6 @@ namespace OpenVic { ProvinceHistoryMap const* get_province_history(Province const* province) const; bool load_province_history_file(GameManager const& game_manager, Province const& province, ast::NodeCPtr root); + bool load_pop_history_file(GameManager const& game_manager, Date date, ast::NodeCPtr root); }; } // namespace OpenVic -- cgit v1.2.3-56-ga3b1