Symphony Of Empires
BuildingType Struct Reference

Type for military outposts. More...

#include <building.hpp>

Inheritance diagram for BuildingType:
Collaboration diagram for BuildingType:

Public Member Functions

bool can_plot_on_sea () const
 
bool can_plot_on_land () const
 
bool can_build_land_units () const
 
bool can_build_naval_units () const
 
bool can_build_air_units () const
 
bool can_build_military () const
 Can this building type build a military unit. More...
 
void can_plot_on_sea (bool b)
 
void can_plot_on_land (bool b)
 
void can_build_land_units (bool b)
 
void can_build_naval_units (bool b)
 
void can_build_air_units (bool b)
 
- Public Member Functions inherited from Entity< T >
constexpr Entity () noexcept=default
 
constexpr Entity (Entity &&) noexcept=default
 
constexpr Entity (const Entity &) noexcept=default
 
constexpr Entityoperator= (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::bitset< 4 > flags
 
float num_req_workers = 0.f
 
CommodityId output_id
 
std::vector< CommodityIdinput_ids
 
std::vector< std::pair< CommodityId, float > > req_goods
 
std::vector< TechnologyIdreq_technologies
 
- Public Attributes inherited from RefnameEntity< BuildingTypeId >
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...
 

Detailed Description

Type for military outposts.

Definition at line 38 of file building.hpp.

Member Function Documentation

◆ can_build_air_units() [1/2]

bool BuildingType::can_build_air_units ( ) const
inline

Definition at line 43 of file building.hpp.

Here is the caller graph for this function:

◆ can_build_air_units() [2/2]

void BuildingType::can_build_air_units ( bool  b)
inline

Definition at line 54 of file building.hpp.

◆ can_build_land_units() [1/2]

bool BuildingType::can_build_land_units ( ) const
inline

Definition at line 41 of file building.hpp.

Here is the caller graph for this function:

◆ can_build_land_units() [2/2]

void BuildingType::can_build_land_units ( bool  b)
inline

Definition at line 52 of file building.hpp.

◆ can_build_military()

bool BuildingType::can_build_military ( ) const
inline

Can this building type build a military unit.

Definition at line 46 of file building.hpp.

Here is the call graph for this function:

◆ can_build_naval_units() [1/2]

bool BuildingType::can_build_naval_units ( ) const
inline

Definition at line 42 of file building.hpp.

Here is the caller graph for this function:

◆ can_build_naval_units() [2/2]

void BuildingType::can_build_naval_units ( bool  b)
inline

Definition at line 53 of file building.hpp.

◆ can_plot_on_land() [1/2]

bool BuildingType::can_plot_on_land ( ) const
inline

Definition at line 40 of file building.hpp.

◆ can_plot_on_land() [2/2]

void BuildingType::can_plot_on_land ( bool  b)
inline

Definition at line 51 of file building.hpp.

◆ can_plot_on_sea() [1/2]

bool BuildingType::can_plot_on_sea ( ) const
inline

Definition at line 39 of file building.hpp.

◆ can_plot_on_sea() [2/2]

void BuildingType::can_plot_on_sea ( bool  b)
inline

Definition at line 50 of file building.hpp.

Member Data Documentation

◆ flags

std::bitset<4> BuildingType::flags

Definition at line 57 of file building.hpp.

◆ input_ids

std::vector<CommodityId> BuildingType::input_ids

Definition at line 63 of file building.hpp.

◆ name

Eng3D::StringRef BuildingType::name

Definition at line 56 of file building.hpp.

◆ num_req_workers

float BuildingType::num_req_workers = 0.f

Definition at line 61 of file building.hpp.

◆ output_id

CommodityId BuildingType::output_id

Definition at line 62 of file building.hpp.

◆ req_goods

std::vector<std::pair<CommodityId, float> > BuildingType::req_goods

Definition at line 65 of file building.hpp.

◆ req_technologies

std::vector<TechnologyId> BuildingType::req_technologies

Definition at line 66 of file building.hpp.


The documentation for this struct was generated from the following file: