|
Relationship Generator 1.2.2
Believable families around a person: parents, siblings, partners and children, with ages and names for C++23
|
Relationship Generator library — believable families around a person: parents, siblings, partners and children, with ages and names for C++23. More...
#include <dasmig/birthgen.hpp>#include <dasmig/namegen.hpp>#include "core.hpp"#include <algorithm>#include <array>#include <cctype>#include <chrono>#include <cmath>#include <cstddef>#include <cstdint>#include <filesystem>#include <format>#include <initializer_list>#include <map>#include <optional>#include <ostream>#include <span>#include <stdexcept>#include <string>#include <string_view>#include <system_error>#include <unordered_map>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | dasmig::person_name |
| A name the caller already has, as plain words. More... | |
| struct | dasmig::known_person |
| Someone the caller already knows: used to build the family of a member of a family that exists, so that both agree. More... | |
| struct | dasmig::known_sibling |
| A brother or sister the caller already knows. More... | |
| struct | dasmig::known_child |
| A child the caller already knows. More... | |
| struct | dasmig::known_union |
| A union of the anchor that the caller already knows, with the children it had. More... | |
| struct | dasmig::anchor_spec |
| The person a family is built around, as plain values. More... | |
| struct | dasmig::family_request |
| What a family call asks for. More... | |
| struct | dasmig::person |
| A person in a family: who they are to the anchor, their name and when they live. More... | |
| struct | dasmig::edge |
| A link between two members, by id. More... | |
| struct | dasmig::household |
| Who the anchor lives with. More... | |
| class | dasmig::family |
| Return type for family generation. More... | |
| class | dasmig::relg |
| Relationship Generator: builds believable families around a person. More... | |
| struct | dasmig::relg::sources |
| The library instances a family is drawn from. More... | |
Enumerations | |
| enum class | dasmig::relation : std::uint8_t { anchor , father , mother , sibling , half_sibling , paternal_grandfather , paternal_grandmother , maternal_grandfather , maternal_grandmother , partner , child , grandchild , stepchild , stepfather , stepmother , stepsibling } |
| How a member is related to the anchor. More... | |
| enum class | dasmig::edge_kind : std::uint8_t { parent_of , sibling_of , partner_of , step_parent_of } |
| How two members are linked. More... | |
| enum class | dasmig::union_end : std::uint8_t { ongoing , divorce , death } |
| How a union ended. More... | |
| enum class | dasmig::household_type : std::uint8_t { one_person , couple , nuclear , single_parent , with_parents , multi_generation , other } |
| The kind of home the anchor lives in at the reference date. More... | |
| enum class | dasmig::data_source : std::uint8_t { country , subregion , world } |
| Where a table's values came from for the family's country. More... | |
| enum class | dasmig::family_table : std::uint8_t { regions , fertility , unions , households , defaults , parameters } |
| The tables of the family data, for extending it. More... | |
Functions | |
| constexpr std::string_view | dasmig::relation_name (relation r) noexcept |
The name of a relation as it appears in JSON (paternal_grandfather). | |
| constexpr std::string_view | dasmig::union_end_name (union_end e) noexcept |
| The name of an ending as it appears in JSON. | |
| constexpr std::string_view | dasmig::household_type_name (household_type t) noexcept |
| The name of a household type as it appears in JSON. | |
| constexpr std::string_view | dasmig::data_source_name (data_source s) noexcept |
| The name of a data source as it appears in JSON. | |
Relationship Generator library — believable families around a person: parents, siblings, partners and children, with ages and names for C++23.
Definition in file relgen.hpp.
|
strong |
Where a table's values came from for the family's country.
| Enumerator | |
|---|---|
| country | The country's own row. |
| subregion | The median of its UN subregion. |
| world | The world median. |
Definition at line 327 of file relgen.hpp.
|
strong |
How two members are linked.
Definition at line 245 of file relgen.hpp.
|
strong |
The tables of the family data, for extending it.
Definition at line 598 of file relgen.hpp.
|
strong |
The kind of home the anchor lives in at the reference date.
Definition at line 289 of file relgen.hpp.
|
strong |
How a member is related to the anchor.
Definition at line 179 of file relgen.hpp.
|
strong |
How a union ended.
| Enumerator | |
|---|---|
| ongoing | It has not ended at the reference date. |
| divorce | The partners separated. |
| death | The partner died. |
Definition at line 254 of file relgen.hpp.
|
constexprnoexcept |
The name of a data source as it appears in JSON.
| s | The source. |
country, subregion or world. Definition at line 337 of file relgen.hpp.
|
constexprnoexcept |
The name of a household type as it appears in JSON.
| t | The type. |
one_person, couple, nuclear, single_parent, with_parents, multi_generation or other. Definition at line 304 of file relgen.hpp.
|
constexprnoexcept |
The name of a relation as it appears in JSON (paternal_grandfather).
| r | The relation. |
Definition at line 202 of file relgen.hpp.
|
constexprnoexcept |
The name of an ending as it appears in JSON.
| e | The ending. |
ongoing, divorce or death. Definition at line 264 of file relgen.hpp.