Project Alice
Loading...
Searching...
No Matches
demographics.hpp File Reference
#include "dcon_generated.hpp"
#include "system_state.hpp"
Include dependency graph for demographics.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  demographics::ideology_buffer
 
struct  demographics::issues_buffer
 
struct  demographics::promotion_buffer
 
struct  demographics::assimilation_buffer
 
struct  demographics::migration_buffer
 

Namespaces

namespace  pop_demographics
 
namespace  demographics
 

Functions

dcon::pop_demographics_key pop_demographics::to_key (sys::state const &state, dcon::ideology_id v)
 
dcon::pop_demographics_key pop_demographics::to_key (sys::state const &state, dcon::issue_option_id v)
 
uint32_t pop_demographics::size (sys::state const &state)
 
uint8_t pop_demographics::to_pu8 (float v)
 
uint16_t pop_demographics::to_pu16 (float v)
 
uint16_t pop_demographics::to_pmc (float v)
 
ve::int_vector pop_demographics::to_pu8 (ve::fp_vector v)
 
ve::int_vector pop_demographics::to_pu16 (ve::fp_vector v)
 
ve::int_vector pop_demographics::to_pmc (ve::fp_vector v)
 
float pop_demographics::from_pu8 (uint8_t v)
 
float pop_demographics::from_pu16 (uint16_t v)
 
float pop_demographics::from_pmc (uint16_t v)
 
ve::fp_vector pop_demographics::from_pu8 (ve::int_vector v)
 
ve::fp_vector pop_demographics::from_pu16 (ve::int_vector v)
 
ve::fp_vector pop_demographics::from_pmc (ve::int_vector v)
 
void pop_demographics::regenerate_is_primary_or_accepted (sys::state &state)
 
float pop_demographics::get_demo (sys::state const &state, dcon::pop_id p, dcon::pop_demographics_key k)
 
void pop_demographics::set_demo (sys::state &state, dcon::pop_id p, dcon::pop_demographics_key k, float v)
 
float pop_demographics::get_militancy (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_militancy (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_consciousness (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_consciousness (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_literacy (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_literacy (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_employment (sys::state const &state, dcon::pop_id p)
 
float pop_demographics::get_raw_employment (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_employment (sys::state &state, dcon::pop_id p, float v)
 
void pop_demographics::set_raw_employment (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_life_needs (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_life_needs (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_everyday_needs (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_everyday_needs (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_luxury_needs (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_luxury_needs (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_social_reform_desire (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_social_reform_desire (sys::state &state, dcon::pop_id p, float v)
 
float pop_demographics::get_political_reform_desire (sys::state const &state, dcon::pop_id p)
 
void pop_demographics::set_political_reform_desire (sys::state &state, dcon::pop_id p, float v)
 
template<typename T >
auto pop_demographics::get_employment (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_raw_employment (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_social_reform_desire (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_political_reform_desire (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_militancy (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_consciousness (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_literacy (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_life_needs (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_everyday_needs (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_luxury_needs (sys::state const &state, T p)
 
template<typename T >
auto pop_demographics::get_demo (sys::state const &state, T p, dcon::pop_demographics_key k)
 
constexpr dcon::demographics_key demographics::total (0)
 
constexpr dcon::demographics_key demographics::employable (1)
 
constexpr dcon::demographics_key demographics::employed (2)
 
constexpr dcon::demographics_key demographics::consciousness (3)
 
constexpr dcon::demographics_key demographics::militancy (4)
 
constexpr dcon::demographics_key demographics::literacy (5)
 
constexpr dcon::demographics_key demographics::political_reform_desire (6)
 
constexpr dcon::demographics_key demographics::social_reform_desire (7)
 
constexpr dcon::demographics_key demographics::poor_militancy (8)
 
constexpr dcon::demographics_key demographics::middle_militancy (9)
 
constexpr dcon::demographics_key demographics::rich_militancy (10)
 
constexpr dcon::demographics_key demographics::poor_life_needs (11)
 
constexpr dcon::demographics_key demographics::middle_life_needs (12)
 
constexpr dcon::demographics_key demographics::rich_life_needs (13)
 
constexpr dcon::demographics_key demographics::poor_everyday_needs (14)
 
constexpr dcon::demographics_key demographics::middle_everyday_needs (15)
 
constexpr dcon::demographics_key demographics::rich_everyday_needs (16)
 
constexpr dcon::demographics_key demographics::poor_luxury_needs (17)
 
constexpr dcon::demographics_key demographics::middle_luxury_needs (18)
 
constexpr dcon::demographics_key demographics::rich_luxury_needs (19)
 
constexpr dcon::demographics_key demographics::poor_total (20)
 
constexpr dcon::demographics_key demographics::middle_total (21)
 
constexpr dcon::demographics_key demographics::rich_total (22)
 
dcon::demographics_key demographics::to_key (sys::state const &state, dcon::ideology_id v)
 
dcon::demographics_key demographics::to_key (sys::state const &state, dcon::issue_option_id v)
 
dcon::demographics_key demographics::to_key (sys::state const &state, dcon::pop_type_id v)
 
dcon::demographics_key demographics::to_key (sys::state const &state, dcon::culture_id v)
 
dcon::demographics_key demographics::to_key (sys::state const &state, dcon::religion_id v)
 
dcon::demographics_key demographics::to_employment_key (sys::state const &state, dcon::pop_type_id v)
 
uint32_t demographics::size (sys::state const &state)
 
void demographics::regenerate_jingoism_support (sys::state &state, dcon::nation_id n)
 
void demographics::regenerate_from_pop_data_full (sys::state &state)
 
void demographics::alt_regenerate_from_pop_data_full (sys::state &state)
 
void demographics::regenerate_from_pop_data_daily (sys::state &state)
 
void demographics::alt_regenerate_from_pop_data_daily (sys::state &state)
 
void demographics::alt_demographics_update_extras (sys::state &state)
 
void demographics::update_literacy (sys::state &state, uint32_t offset, uint32_t divisions)
 
void demographics::update_consciousness (sys::state &state, uint32_t offset, uint32_t divisions)
 
void demographics::update_militancy (sys::state &state, uint32_t offset, uint32_t divisions)
 
void demographics::update_ideologies (sys::state &state, uint32_t offset, uint32_t divisions, ideology_buffer &ibuf)
 
void demographics::update_issues (sys::state &state, uint32_t offset, uint32_t divisions, issues_buffer &ibuf)
 
void demographics::update_growth (sys::state &state, uint32_t offset, uint32_t divisions)
 
void demographics::update_type_changes (sys::state &state, uint32_t offset, uint32_t divisions, promotion_buffer &pbuf)
 
void demographics::update_assimilation (sys::state &state, uint32_t offset, uint32_t divisions, assimilation_buffer &pbuf)
 
void demographics::update_internal_migration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
void demographics::update_colonial_migration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
void demographics::update_immigration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
float demographics::get_estimated_literacy_change (sys::state &state, dcon::nation_id n)
 
float demographics::get_estimated_mil_change (sys::state &state, dcon::nation_id n)
 
float demographics::get_estimated_con_change (sys::state &state, dcon::nation_id n)
 
float demographics::get_estimated_promotion (sys::state &state, dcon::nation_id n)
 
void demographics::apply_ideologies (sys::state &state, uint32_t offset, uint32_t divisions, ideology_buffer &pbuf)
 
void demographics::apply_issues (sys::state &state, uint32_t offset, uint32_t divisions, issues_buffer &pbuf)
 
void demographics::apply_type_changes (sys::state &state, uint32_t offset, uint32_t divisions, promotion_buffer &pbuf)
 
void demographics::apply_assimilation (sys::state &state, uint32_t offset, uint32_t divisions, assimilation_buffer &pbuf)
 
void demographics::apply_internal_migration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
void demographics::apply_colonial_migration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
void demographics::apply_immigration (sys::state &state, uint32_t offset, uint32_t divisions, migration_buffer &pbuf)
 
void demographics::remove_size_zero_pops (sys::state &state)
 
void demographics::remove_small_pops (sys::state &state)
 
float demographics::get_monthly_pop_increase (sys::state &state, dcon::pop_id ids)
 
int64_t demographics::get_monthly_pop_increase (sys::state &state, dcon::nation_id n)
 
int64_t demographics::get_monthly_pop_increase (sys::state &state, dcon::state_instance_id n)
 
int64_t demographics::get_monthly_pop_increase (sys::state &state, dcon::province_id n)
 
float demographics::get_estimated_literacy_change (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_mil_change (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_con_change (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_type_change (sys::state &state, dcon::pop_id ids)
 
float demographics::get_effective_estimation_type_change (sys::state &state, dcon::nation_id nation, dcon::pop_type_id target_type)
 
float demographics::get_estimated_promotion (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_demotion (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_assimilation (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_internal_migration (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_colonial_migration (sys::state &state, dcon::pop_id ids)
 
float demographics::get_estimated_emigration (sys::state &state, dcon::pop_id ids)
 
void demographics::estimate_directed_immigration (sys::state &state, dcon::nation_id n, std::vector< float > &national_amounts)
 
float demographics::calculate_nation_sol (sys::state &state, dcon::nation_id nation_id)
 
void demographics::reduce_pop_size_safe (sys::state &state, dcon::pop_id pop_id, int32_t amount)
 

Variables

constexpr uint32_t pop_demographics::count_special_keys = 0
 
constexpr float pop_demographics::pop_mc_scaling = 10.0f / float(std::numeric_limits<uint16_t>::max())
 
constexpr float pop_demographics::pop_u16_scaling = 1.0f / float(std::numeric_limits<uint16_t>::max())
 
constexpr float pop_demographics::pop_u8_scaling = 1.0f / float(std::numeric_limits<uint8_t>::max())
 
constexpr float pop_demographics::inv_pop_mc_scaling = float(std::numeric_limits<uint16_t>::max()) / 10.0f
 
constexpr float pop_demographics::inv_pop_u16_scaling = float(std::numeric_limits<uint16_t>::max())
 
constexpr float pop_demographics::inv_pop_u8_scaling = float(std::numeric_limits<uint8_t>::max())
 
constexpr uint32_t demographics::count_special_keys = 23