Project Alice
Loading...
Searching...
No Matches
pop_demographics Namespace Reference

Functions

dcon::pop_demographics_key to_key (sys::state const &state, dcon::ideology_id v)
 
dcon::pop_demographics_key to_key (sys::state const &state, dcon::issue_option_id v)
 
uint32_t size (sys::state const &state)
 
void regenerate_is_primary_or_accepted (sys::state &state)
 
float get_demo (sys::state const &state, dcon::pop_id p, dcon::pop_demographics_key k)
 
void set_demo (sys::state &state, dcon::pop_id p, dcon::pop_demographics_key k, float v)
 
template<typename T >
void set_demo (sys::state &state, T p, dcon::pop_demographics_key k, ve::fp_vector v)
 
float get_militancy (sys::state const &state, dcon::pop_id p)
 
void set_militancy (sys::state &state, dcon::pop_id p, float v)
 
template<typename T >
void set_militancy (sys::state &state, T p, ve::fp_vector v)
 
float get_consciousness (sys::state const &state, dcon::pop_id p)
 
void set_consciousness (sys::state &state, dcon::pop_id p, float v)
 
template<typename T >
void set_consciousness (sys::state &state, T p, ve::fp_vector v)
 
float get_literacy (sys::state const &state, dcon::pop_id p)
 
template<typename T >
void set_literacy (sys::state &state, T p, ve::fp_vector v)
 
void set_literacy (sys::state &state, dcon::pop_id p, float v)
 
float get_employment (sys::state const &state, dcon::pop_id p)
 
float get_raw_employment (sys::state const &state, dcon::pop_id p)
 
void set_employment (sys::state &state, dcon::pop_id p, float v)
 
void set_raw_employment (sys::state &state, dcon::pop_id p, float v)
 
float get_life_needs (sys::state const &state, dcon::pop_id p)
 
void set_life_needs (sys::state &state, dcon::pop_id p, float v)
 
float get_everyday_needs (sys::state const &state, dcon::pop_id p)
 
void set_everyday_needs (sys::state &state, dcon::pop_id p, float v)
 
float get_luxury_needs (sys::state const &state, dcon::pop_id p)
 
void set_luxury_needs (sys::state &state, dcon::pop_id p, float v)
 
float get_social_reform_desire (sys::state const &state, dcon::pop_id p)
 
void set_social_reform_desire (sys::state &state, dcon::pop_id p, float v)
 
float get_political_reform_desire (sys::state const &state, dcon::pop_id p)
 
void set_political_reform_desire (sys::state &state, dcon::pop_id p, float v)
 
uint8_t to_pu8 (float v)
 
uint16_t to_pu16 (float v)
 
uint16_t to_pmc (float v)
 
ve::int_vector to_pu8 (ve::fp_vector v)
 
ve::int_vector to_pu16 (ve::fp_vector v)
 
ve::int_vector to_pmc (ve::fp_vector v)
 
float from_pu8 (uint8_t v)
 
float from_pu16 (uint16_t v)
 
float from_pmc (uint16_t v)
 
ve::fp_vector from_pu8 (ve::int_vector v)
 
ve::fp_vector from_pu16 (ve::int_vector v)
 
ve::fp_vector from_pmc (ve::int_vector v)
 
template<typename T >
auto get_employment (sys::state const &state, T p)
 
template<typename T >
auto get_raw_employment (sys::state const &state, T p)
 
template<typename T >
auto get_social_reform_desire (sys::state const &state, T p)
 
template<typename T >
auto get_political_reform_desire (sys::state const &state, T p)
 
template<typename T >
auto get_militancy (sys::state const &state, T p)
 
template<typename T >
auto get_consciousness (sys::state const &state, T p)
 
template<typename T >
auto get_literacy (sys::state const &state, T p)
 
template<typename T >
auto get_life_needs (sys::state const &state, T p)
 
template<typename T >
auto get_everyday_needs (sys::state const &state, T p)
 
template<typename T >
auto get_luxury_needs (sys::state const &state, T p)
 
template<typename T >
auto get_demo (sys::state const &state, T p, dcon::pop_demographics_key k)
 

Variables

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

Function Documentation

◆ from_pmc() [1/2]

float pop_demographics::from_pmc ( uint16_t  v)
inline

Definition at line 45 of file demographics.hpp.

Here is the caller graph for this function:

◆ from_pmc() [2/2]

ve::fp_vector pop_demographics::from_pmc ( ve::int_vector  v)
inline

Definition at line 55 of file demographics.hpp.

Here is the call graph for this function:

◆ from_pu16() [1/2]

float pop_demographics::from_pu16 ( uint16_t  v)
inline

Definition at line 42 of file demographics.hpp.

Here is the caller graph for this function:

◆ from_pu16() [2/2]

ve::fp_vector pop_demographics::from_pu16 ( ve::int_vector  v)
inline

Definition at line 52 of file demographics.hpp.

Here is the call graph for this function:

◆ from_pu8() [1/2]

float pop_demographics::from_pu8 ( uint8_t  v)
inline

Definition at line 39 of file demographics.hpp.

Here is the caller graph for this function:

◆ from_pu8() [2/2]

ve::fp_vector pop_demographics::from_pu8 ( ve::int_vector  v)
inline

Definition at line 49 of file demographics.hpp.

Here is the call graph for this function:

◆ get_consciousness() [1/2]

float pop_demographics::get_consciousness ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 64 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_consciousness() [2/2]

template<typename T >
auto pop_demographics::get_consciousness ( sys::state const &  state,
p 
)

Definition at line 109 of file demographics.hpp.

Here is the call graph for this function:

◆ get_demo() [1/2]

float pop_demographics::get_demo ( sys::state const &  state,
dcon::pop_id  p,
dcon::pop_demographics_key  k 
)

Definition at line 42 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_demo() [2/2]

template<typename T >
auto pop_demographics::get_demo ( sys::state const &  state,
p,
dcon::pop_demographics_key  k 
)

Definition at line 134 of file demographics.hpp.

Here is the call graph for this function:

◆ get_employment() [1/2]

float pop_demographics::get_employment ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 86 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_employment() [2/2]

template<typename T >
auto pop_demographics::get_employment ( sys::state const &  state,
p 
)

Definition at line 84 of file demographics.hpp.

Here is the call graph for this function:

◆ get_everyday_needs() [1/2]

float pop_demographics::get_everyday_needs ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 107 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_everyday_needs() [2/2]

template<typename T >
auto pop_demographics::get_everyday_needs ( sys::state const &  state,
p 
)

Definition at line 124 of file demographics.hpp.

Here is the call graph for this function:

◆ get_life_needs() [1/2]

float pop_demographics::get_life_needs ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 100 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_life_needs() [2/2]

template<typename T >
auto pop_demographics::get_life_needs ( sys::state const &  state,
p 
)

Definition at line 119 of file demographics.hpp.

Here is the call graph for this function:

◆ get_literacy() [1/2]

float pop_demographics::get_literacy ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 75 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_literacy() [2/2]

template<typename T >
auto pop_demographics::get_literacy ( sys::state const &  state,
p 
)

Definition at line 114 of file demographics.hpp.

Here is the call graph for this function:

◆ get_luxury_needs() [1/2]

float pop_demographics::get_luxury_needs ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 114 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_luxury_needs() [2/2]

template<typename T >
auto pop_demographics::get_luxury_needs ( sys::state const &  state,
p 
)

Definition at line 129 of file demographics.hpp.

Here is the call graph for this function:

◆ get_militancy() [1/2]

float pop_demographics::get_militancy ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 53 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_militancy() [2/2]

template<typename T >
auto pop_demographics::get_militancy ( sys::state const &  state,
p 
)

Definition at line 104 of file demographics.hpp.

Here is the call graph for this function:

◆ get_political_reform_desire() [1/2]

float pop_demographics::get_political_reform_desire ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 128 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_political_reform_desire() [2/2]

template<typename T >
auto pop_demographics::get_political_reform_desire ( sys::state const &  state,
p 
)

Definition at line 99 of file demographics.hpp.

Here is the call graph for this function:

◆ get_raw_employment() [1/2]

float pop_demographics::get_raw_employment ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 90 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_raw_employment() [2/2]

template<typename T >
auto pop_demographics::get_raw_employment ( sys::state const &  state,
p 
)

Definition at line 89 of file demographics.hpp.

Here is the call graph for this function:

◆ get_social_reform_desire() [1/2]

float pop_demographics::get_social_reform_desire ( sys::state const &  state,
dcon::pop_id  p 
)

Definition at line 121 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_social_reform_desire() [2/2]

template<typename T >
auto pop_demographics::get_social_reform_desire ( sys::state const &  state,
p 
)

Definition at line 94 of file demographics.hpp.

Here is the call graph for this function:

◆ regenerate_is_primary_or_accepted()

void pop_demographics::regenerate_is_primary_or_accepted ( sys::state state)

Definition at line 27 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_consciousness() [1/2]

void pop_demographics::set_consciousness ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 68 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_consciousness() [2/2]

template<typename T >
void pop_demographics::set_consciousness ( sys::state state,
p,
ve::fp_vector  v 
)

Definition at line 72 of file demographics.cpp.

Here is the call graph for this function:

◆ set_demo() [1/2]

void pop_demographics::set_demo ( sys::state state,
dcon::pop_id  p,
dcon::pop_demographics_key  k,
float  v 
)

Definition at line 46 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_demo() [2/2]

template<typename T >
void pop_demographics::set_demo ( sys::state state,
p,
dcon::pop_demographics_key  k,
ve::fp_vector  v 
)

Definition at line 50 of file demographics.cpp.

Here is the call graph for this function:

◆ set_employment()

void pop_demographics::set_employment ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 94 of file demographics.cpp.

Here is the call graph for this function:

◆ set_everyday_needs()

void pop_demographics::set_everyday_needs ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 111 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_life_needs()

void pop_demographics::set_life_needs ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 104 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_literacy() [1/2]

void pop_demographics::set_literacy ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 83 of file demographics.cpp.

Here is the call graph for this function:

◆ set_literacy() [2/2]

template<typename T >
void pop_demographics::set_literacy ( sys::state state,
p,
ve::fp_vector  v 
)

Definition at line 80 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_luxury_needs()

void pop_demographics::set_luxury_needs ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 118 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_militancy() [1/2]

void pop_demographics::set_militancy ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 57 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_militancy() [2/2]

template<typename T >
void pop_demographics::set_militancy ( sys::state state,
p,
ve::fp_vector  v 
)

Definition at line 61 of file demographics.cpp.

Here is the call graph for this function:

◆ set_political_reform_desire()

void pop_demographics::set_political_reform_desire ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 132 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_raw_employment()

void pop_demographics::set_raw_employment ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 97 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_social_reform_desire()

void pop_demographics::set_social_reform_desire ( sys::state state,
dcon::pop_id  p,
float  v 
)

Definition at line 125 of file demographics.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

uint32_t pop_demographics::size ( sys::state const &  state)

Definition at line 23 of file demographics.cpp.

◆ to_key() [1/2]

dcon::pop_demographics_key pop_demographics::to_key ( sys::state const &  state,
dcon::ideology_id  v 
)

Definition at line 16 of file demographics.cpp.

Here is the caller graph for this function:

◆ to_key() [2/2]

dcon::pop_demographics_key pop_demographics::to_key ( sys::state const &  state,
dcon::issue_option_id  v 
)

Definition at line 19 of file demographics.cpp.

◆ to_pmc() [1/2]

uint16_t pop_demographics::to_pmc ( float  v)
inline

Definition at line 26 of file demographics.hpp.

Here is the caller graph for this function:

◆ to_pmc() [2/2]

ve::int_vector pop_demographics::to_pmc ( ve::fp_vector  v)
inline

Definition at line 35 of file demographics.hpp.

Here is the call graph for this function:

◆ to_pu16() [1/2]

uint16_t pop_demographics::to_pu16 ( float  v)
inline

Definition at line 23 of file demographics.hpp.

Here is the caller graph for this function:

◆ to_pu16() [2/2]

ve::int_vector pop_demographics::to_pu16 ( ve::fp_vector  v)
inline

Definition at line 32 of file demographics.hpp.

Here is the call graph for this function:

◆ to_pu8() [1/2]

uint8_t pop_demographics::to_pu8 ( float  v)
inline

Definition at line 20 of file demographics.hpp.

Here is the caller graph for this function:

◆ to_pu8() [2/2]

ve::int_vector pop_demographics::to_pu8 ( ve::fp_vector  v)
inline

Definition at line 29 of file demographics.hpp.

Here is the call graph for this function:

Variable Documentation

◆ count_special_keys

constexpr uint32_t pop_demographics::count_special_keys = 0
inlineconstexpr

Definition at line 7 of file demographics.hpp.

◆ inv_pop_mc_scaling

constexpr float pop_demographics::inv_pop_mc_scaling = float(std::numeric_limits<uint16_t>::max()) / 10.0f
inlineconstexpr

Definition at line 16 of file demographics.hpp.

◆ inv_pop_u16_scaling

constexpr float pop_demographics::inv_pop_u16_scaling = float(std::numeric_limits<uint16_t>::max())
inlineconstexpr

Definition at line 17 of file demographics.hpp.

◆ inv_pop_u8_scaling

constexpr float pop_demographics::inv_pop_u8_scaling = float(std::numeric_limits<uint8_t>::max())
inlineconstexpr

Definition at line 18 of file demographics.hpp.

◆ pop_mc_scaling

constexpr float pop_demographics::pop_mc_scaling = 10.0f / float(std::numeric_limits<uint16_t>::max())
inlineconstexpr

Definition at line 13 of file demographics.hpp.

◆ pop_u16_scaling

constexpr float pop_demographics::pop_u16_scaling = 1.0f / float(std::numeric_limits<uint16_t>::max())
inlineconstexpr

Definition at line 14 of file demographics.hpp.

◆ pop_u8_scaling

constexpr float pop_demographics::pop_u8_scaling = 1.0f / float(std::numeric_limits<uint8_t>::max())
inlineconstexpr

Definition at line 15 of file demographics.hpp.