diff options
author | Hop311 <Hop3114@gmail.com> | 2023-09-09 23:49:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 23:49:54 +0200 |
commit | 6278a35f4704574933464700026d8deb997da5c1 (patch) | |
tree | eb36a9b030b263d825eb93638e64deb0dbd38a78 /src/openvic-simulation/map/Region.hpp | |
parent | bec619fc8f554cb075fcef2428f3b6bdb5e88e82 (diff) | |
parent | 3d7fbd9b376811ca0ed226fa78bcc8b6279ba8dc (diff) |
Merge pull request #14 from OpenVicProject/dataloading
Dataloading scaffolding + basic culture and pop history loading
Diffstat (limited to 'src/openvic-simulation/map/Region.hpp')
-rw-r--r-- | src/openvic-simulation/map/Region.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/openvic-simulation/map/Region.hpp b/src/openvic-simulation/map/Region.hpp new file mode 100644 index 0000000..2fccf06 --- /dev/null +++ b/src/openvic-simulation/map/Region.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include "openvic-simulation/map/Province.hpp" + +namespace OpenVic { + + struct ProvinceSet { + protected: + std::vector<Province*> provinces; + bool locked = false; + + public: + bool add_province(Province* province); + void lock(bool log = false); + bool is_locked() const; + void reset(); + bool empty() const; + size_t size() const; + void reserve(size_t size); + bool contains_province(Province const* province) const; + std::vector<Province*> const& get_provinces() const; + }; + + /* REQUIREMENTS: + * MAP-6, MAP-44, MAP-48 + */ + struct Region : HasIdentifier, ProvinceSet { + friend struct Map; + + private: + Region(const std::string_view new_identifier); + + public: + Region(Region&&) = default; + + colour_t get_colour() const; + }; +} |