|
Address Generator 2.1.2
Postal addresses with real streets by place, laid out in each country's format for C++23
|
What an address call asks for. More...
#include <addressgen.hpp>
Public Attributes | |
| std::optional< std::string > | country {std::nullopt} |
| ISO-3166 two-letter country code, or a country drawn when absent. | |
| std::optional< place_ref > | place {std::nullopt} |
| Anchor the address to this place instead of drawing one. | |
| bool | weighted {true} |
| Weighted selection (default): countries and places by population, streets by address count. False selects uniformly. | |
| std::optional< double > | unit_chance {std::nullopt} |
| Chance of a unit (apartment, flat) in the address; the country's default when absent. Countries without a unit style never have one. | |
| address_script | script {address_script::local} |
The script of the layout and of the street name. With latin, a street named in another script is given by its Latin name when the data has one (OpenStreetMap's name:en and similar tags); otherwise it keeps the local name. Place names are Latin either way. | |
What an address call asks for.
Every generation call takes one; address_request{} asks for the defaults. Choices are never stored on the generator, so one call cannot change the next.
Definition at line 66 of file addressgen.hpp.
| std::optional<std::string> dasmig::address_request::country {std::nullopt} |
ISO-3166 two-letter country code, or a country drawn when absent.
Definition at line 69 of file addressgen.hpp.
| std::optional<place_ref> dasmig::address_request::place {std::nullopt} |
Anchor the address to this place instead of drawing one.
A place the data does not know is used as given (its street comes from the composed fallback and its postcode from the country's pattern), which needs country.
Definition at line 76 of file addressgen.hpp.
| address_script dasmig::address_request::script {address_script::local} |
The script of the layout and of the street name. With latin, a street named in another script is given by its Latin name when the data has one (OpenStreetMap's name:en and similar tags); otherwise it keeps the local name. Place names are Latin either way.
Definition at line 91 of file addressgen.hpp.
| std::optional<double> dasmig::address_request::unit_chance {std::nullopt} |
Chance of a unit (apartment, flat) in the address; the country's default when absent. Countries without a unit style never have one.
Definition at line 85 of file addressgen.hpp.
| bool dasmig::address_request::weighted {true} |
Weighted selection (default): countries and places by population, streets by address count. False selects uniformly.
Definition at line 80 of file addressgen.hpp.