| Symphony Of Empires
    | 
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economical operations on every single tile. More...
#include <province.hpp>


| Classes | |
| struct | Battle | 
| Public Member Functions | |
| float | total_pops () const | 
| float | average_militancy () const | 
| float | get_attractiveness (const Pop &pop) const | 
| void | add_building (const BuildingType &building_type) | 
| void | cancel_construction_project () | 
| bool | is_neighbour (const Province &province) const | 
| glm::vec2 | get_pos () const | 
| float | euclidean_distance (const Province &other_province, glm::vec2 world_size, float radius) const | 
| const std::vector< Building > & | get_buildings () const | 
| std::vector< Building > & | get_buildings () | 
| bool | is_populated () const | 
| void | unpopulate () | 
|  Public Member Functions inherited from Entity< T > | |
| constexpr | Entity () noexcept=default | 
| constexpr | Entity (Entity &&) noexcept=default | 
| constexpr | Entity (const Entity &) noexcept=default | 
| constexpr Entity & | operator= (const Entity &) noexcept=default | 
| constexpr | ~Entity () noexcept=default | 
| constexpr bool | is_invalid () const | 
| Checks if the current id is invalid.  More... | |
| constexpr bool | is_valid () const | 
| Checks if the current id is valid.  More... | |
| constexpr | operator Id () const noexcept | 
| constexpr | operator size_t () const noexcept | 
| constexpr Id | get_id () const | 
| Public Attributes | |
| Eng3D::StringRef | name | 
| std::uint32_t | color = 0 | 
| bool | is_coastal = false | 
| float | base_attractive = 0.f | 
| Eng3D::Rect | box_area = Eng3D::Rect(0.f, 0.f, 0.f, 0.f) | 
| NationId | owner_id | 
| NationId | controller_id | 
| TerrainTypeId | terrain_type_id | 
| std::vector< uint32_t > | rgo_size | 
| std::array< Pop, 7 > | pops | 
| std::vector< Product > | products | 
| std::vector< Building > | buildings | 
| struct Province::Battle | battle | 
| std::vector< NationId > | nuclei | 
| std::vector< ProvinceId > | neighbour_ids | 
| std::vector< float > | languages | 
| Percentage of each languages from 0 to 1.  More... | |
| std::vector< float > | religions | 
| Percentage of each religion prescence on the pops, from 0 to 1.  More... | |
|  Public Attributes inherited from RefnameEntity< ProvinceId > | |
| Eng3D::StringRef | ref_name | 
|  Public Attributes inherited from Entity< T > | |
| Id | cached_id | 
| Id used to speed up Id lookups on any context.  More... | |
| Additional Inherited Members | |
|  Public Types inherited from Entity< T > | |
| using | Id = T | 
|  Static Public Member Functions inherited from Entity< T > | |
| constexpr static Id | invalid () | 
| Returns an invalid id.  More... | |
| constexpr static bool | is_invalid (Id id) | 
| Checks if the id is not valid.  More... | |
| constexpr static bool | is_valid (Id id) | 
| Checks if the id is valid.  More... | |
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economical operations on every single tile.
Definition at line 48 of file province.hpp.
| void Province::add_building | ( | const BuildingType & | building_type | ) | 
Definition at line 48 of file province.cpp.
| 
 | inline | 
Definition at line 58 of file province.hpp.
| void Province::cancel_construction_project | ( | ) | 
| float Province::euclidean_distance | ( | const Province & | other_province, | 
| glm::vec2 | world_size, | ||
| float | radius | ||
| ) | const | 
Definition at line 59 of file province.cpp.


| float Province::get_attractiveness | ( | const Pop & | pop | ) | const | 
Definition at line 42 of file province.cpp.
| 
 | inline | 
Definition at line 80 of file province.hpp.
| 
 | inline | 
Definition at line 76 of file province.hpp.
| 
 | inline | 
| bool Province::is_neighbour | ( | const Province & | province | ) | const | 
Definition at line 68 of file province.cpp.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
Definition at line 91 of file province.hpp.
| float Province::base_attractive = 0.f | 
Definition at line 99 of file province.hpp.
| struct Province::Battle Province::battle | 
| Eng3D::Rect Province::box_area = Eng3D::Rect(0.f, 0.f, 0.f, 0.f) | 
Definition at line 102 of file province.hpp.
| std::vector<Building> Province::buildings | 
Definition at line 110 of file province.hpp.
| std::uint32_t Province::color = 0 | 
Definition at line 97 of file province.hpp.
| NationId Province::controller_id | 
Definition at line 104 of file province.hpp.
| bool Province::is_coastal = false | 
Definition at line 98 of file province.hpp.
| std::vector<float> Province::languages | 
Percentage of each languages from 0 to 1.
Definition at line 126 of file province.hpp.
| Eng3D::StringRef Province::name | 
Definition at line 96 of file province.hpp.
| std::vector<ProvinceId> Province::neighbour_ids | 
Definition at line 124 of file province.hpp.
| std::vector<NationId> Province::nuclei | 
Definition at line 123 of file province.hpp.
| NationId Province::owner_id | 
Definition at line 103 of file province.hpp.
| std::array<Pop, 7> Province::pops | 
Definition at line 107 of file province.hpp.
| std::vector<Product> Province::products | 
Definition at line 109 of file province.hpp.
| std::vector<float> Province::religions | 
Percentage of each religion prescence on the pops, from 0 to 1.
Definition at line 128 of file province.hpp.
| std::vector<uint32_t> Province::rgo_size | 
Definition at line 106 of file province.hpp.
| TerrainTypeId Province::terrain_type_id | 
Definition at line 105 of file province.hpp.