diff options
author | hop311 <hop3114@gmail.com> | 2024-06-04 00:39:34 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-06-06 19:39:35 +0200 |
commit | 37cdd775ac738b2a1264e32471385376e5a34f3a (patch) | |
tree | f3a9a107f1bd4b6b6d8035a96ac659bcc15f176b /src/openvic-simulation/military/Deployment.hpp | |
parent | e286cfef29d7c431ba33cd77283e838e6fba05d2 (diff) |
Province const/mutable separation + State cleanupconst-mutable
Diffstat (limited to 'src/openvic-simulation/military/Deployment.hpp')
-rw-r--r-- | src/openvic-simulation/military/Deployment.hpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/openvic-simulation/military/Deployment.hpp b/src/openvic-simulation/military/Deployment.hpp index 8966397..6f4c21f 100644 --- a/src/openvic-simulation/military/Deployment.hpp +++ b/src/openvic-simulation/military/Deployment.hpp @@ -4,26 +4,30 @@ #include <string_view> #include <vector> -#include "openvic-simulation/dataloader/Dataloader.hpp" -#include "openvic-simulation/map/Province.hpp" #include "openvic-simulation/military/Leader.hpp" -#include "openvic-simulation/military/UnitType.hpp" +#include "openvic-simulation/types/HasIdentifier.hpp" +#include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { + struct ProvinceDefinition; + struct RegimentType; + struct RegimentDeployment { friend struct DeploymentManager; private: std::string PROPERTY(name); RegimentType const& PROPERTY(type); - Province const* PROPERTY(home); + ProvinceDefinition const* PROPERTY(home); - RegimentDeployment(std::string_view new_name, RegimentType const& new_type, Province const* new_home); + RegimentDeployment(std::string_view new_name, RegimentType const& new_type, ProvinceDefinition const* new_home); public: RegimentDeployment(RegimentDeployment&&) = default; }; + struct ShipType; + struct ShipDeployment { friend struct DeploymentManager; @@ -42,11 +46,11 @@ namespace OpenVic { private: std::string PROPERTY(name); - Province const* PROPERTY(location); + ProvinceDefinition const* PROPERTY(location); std::vector<RegimentDeployment> PROPERTY(regiments); ArmyDeployment( - std::string_view new_name, Province const* new_location, std::vector<RegimentDeployment>&& new_regiments + std::string_view new_name, ProvinceDefinition const* new_location, std::vector<RegimentDeployment>&& new_regiments ); public: @@ -58,10 +62,12 @@ namespace OpenVic { private: std::string PROPERTY(name); - Province const* PROPERTY(location); + ProvinceDefinition const* PROPERTY(location); std::vector<ShipDeployment> PROPERTY(ships); - NavyDeployment(std::string_view new_name, Province const* new_location, std::vector<ShipDeployment>&& new_ships); + NavyDeployment( + std::string_view new_name, ProvinceDefinition const* new_location, std::vector<ShipDeployment>&& new_ships + ); public: NavyDeployment(NavyDeployment&&) = default; @@ -84,6 +90,9 @@ namespace OpenVic { Deployment(Deployment&&) = default; }; + struct GameManager; + class Dataloader; + struct DeploymentManager { private: IdentifierRegistry<Deployment> IDENTIFIER_REGISTRY(deployment); @@ -102,4 +111,4 @@ namespace OpenVic { size_t get_missing_oob_file_count() const; }; -} // namespace OpenVic +} |