persona-generator 4.1.3
Complete characters composed from the other dasmig generators for C++23
Loading...
Searching...
No Matches
dasmig::persona_request Struct Reference

What a persona call asks for. More...

#include <personagen.hpp>

Public Attributes

std::optional< std::string > country {}
 ISO 3166-1 alpha-2 code (any case). Unset draws one of psg::supported_countries(), weighted by population.
 
std::optional< sex > person_sex {}
 Biological sex; unset draws it from the birth.
 
std::optional< age_range > ages {}
 Inclusive age range in completed years; unset draws from the country's age pyramid.
 
std::chrono::year_month_day reference_date {birth_request::default_reference_date}
 The date ages are computed at. The default is birth-generator's (2023-07-01); the library never reads the clock.
 
std::size_t traits {3}
 How many personality traits to draw.
 
std::optional< family_request > relations {}
 Also draw the people around the persona: parents, siblings, partners and children (relationship-generator). Unset by default, and then nothing about the persona changes.
 

Detailed Description

What a persona call asks for.

Every generation call takes one; persona_request{} asks for the defaults. Choices are never stored on the generator, so one call cannot change the next. Every field is optional: what is left out is drawn, and what is given conditions the draws that depend on it (the country sets the city, the name culture, the body and the job; the age and sex set the rest).

Definition at line 52 of file personagen.hpp.

Member Data Documentation

◆ ages

std::optional<age_range> dasmig::persona_request::ages {}

Inclusive age range in completed years; unset draws from the country's age pyramid.

Definition at line 63 of file personagen.hpp.

◆ country

std::optional<std::string> dasmig::persona_request::country {}

ISO 3166-1 alpha-2 code (any case). Unset draws one of psg::supported_countries(), weighted by population.

Definition at line 56 of file personagen.hpp.

◆ person_sex

std::optional<sex> dasmig::persona_request::person_sex {}

Biological sex; unset draws it from the birth.

Definition at line 59 of file personagen.hpp.

◆ reference_date

std::chrono::year_month_day dasmig::persona_request::reference_date {birth_request::default_reference_date}

The date ages are computed at. The default is birth-generator's (2023-07-01); the library never reads the clock.

Definition at line 67 of file personagen.hpp.

◆ relations

std::optional<family_request> dasmig::persona_request::relations {}

Also draw the people around the persona: parents, siblings, partners and children (relationship-generator). Unset by default, and then nothing about the persona changes.

The anchor of this request is replaced by the persona (its country, sex, birth date and name) and its reference_date by this request's; the rest (up, down, siblings, partners, names, name_culture) is used as given. The family is drawn from its own seed, split from the persona's, so the rest of the persona is the same with and without it.

Definition at line 81 of file personagen.hpp.

◆ traits

std::size_t dasmig::persona_request::traits {3}

How many personality traits to draw.

Definition at line 70 of file personagen.hpp.


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