![]() |
Birth Generator 3.2.2
Procedural birth date generation for C++23
|
All per-call birth filters and settings. More...
#include <birthgen.hpp>
Public Attributes | |
| std::optional< std::string > | country_code {} |
| ISO 3166-1 alpha-2 code, or random. | |
| std::optional< dasmig::sex > | bio_sex {} |
| Fixed biological sex, or drawn. | |
| std::optional< year_t > | year {} |
| Fixed birth year, or derived from age. | |
| std::optional< age_range > | ages {} |
| Inclusive ages; values above 100 clamp to 100. | |
| bool | weighted {true} |
| Population-weighted (true) or uniform country. | |
| std::chrono::year_month_day | reference_date {default_reference_date} |
| Date ages are computed at. | |
Static Public Attributes | |
| static constexpr std::chrono::year_month_day | default_reference_date |
| 1 July 2023, the date of the UN population estimates. | |
All per-call birth filters and settings.
An omitted country selects a random country. Omitted sex, year and ages use the country's demographic distributions. A fixed year and an age range are mutually exclusive. Replay requires the same request and data.
Definition at line 62 of file birthgen.hpp.
| std::optional<age_range> dasmig::birth_request::ages {} |
Inclusive ages; values above 100 clamp to 100.
Definition at line 75 of file birthgen.hpp.
| std::optional<dasmig::sex> dasmig::birth_request::bio_sex {} |
Fixed biological sex, or drawn.
Definition at line 71 of file birthgen.hpp.
| std::optional<std::string> dasmig::birth_request::country_code {} |
ISO 3166-1 alpha-2 code, or random.
Definition at line 69 of file birthgen.hpp.
|
staticconstexpr |
1 July 2023, the date of the UN population estimates.
Definition at line 65 of file birthgen.hpp.
| std::chrono::year_month_day dasmig::birth_request::reference_date {default_reference_date} |
Date ages are computed at.
Definition at line 77 of file birthgen.hpp.
| bool dasmig::birth_request::weighted {true} |
Population-weighted (true) or uniform country.
Definition at line 76 of file birthgen.hpp.
| std::optional<year_t> dasmig::birth_request::year {} |
Fixed birth year, or derived from age.
Definition at line 73 of file birthgen.hpp.