|
Address Generator 2.1.2
Postal addresses with real streets by place, laid out in each country's format for C++23
|
Requires C++23 (e.g.,
-std=c++23for GCC/Clang,/std:c++latestfor MSVC).
API Reference · Usage Guide · Data and Method · Releases
Postal addresses with real streets by place, laid out in each country's format.
Rue de la Paix, Hauptstraße) instead.12 Rua Augusta / 1100-053 Lisbon, Kirchstraße 84 / 10886 Berlin, 84 Elm Street / Laramie, WY 82071), with the number before or after the street as the country writes it, postcodes in the country's format and units in the country's style.get_street and get_postcode draw from the same streams as get_address, so they return the street and postcode of the address with the same seed.address_request::script selects the Latin-script layout where a country has one; Japanese addresses are written large to small with block numbers.city-generator) and the address is in it; the places are the same GeoNames places city-generator uses.get_address(request, seed) for reproducible results, and address::seed() for replaying a previous generation with the same request and data.extend()), checked before they are applied.to_json() on every result, and a signature() recording the seed and the data it came from.DASMIG_ADDRESS_EMBED to build the lite tier into the program, for WebAssembly and other builds without files.adg instances with their own data and random engine.addressgen.hpp is the library released here. Keep core.hpp and the core/ directory (dasmig-core) in the same directory. Add
to the files you want to use it in, and supply the resources folder (or define DASMIG_ADDRESS_EMBED).
See the usage guide for everything else.
Tested with:
-std=c++23)-std=c++23)/std:c++latest)| Dependency | Version | Bundled | Purpose |
|---|---|---|---|
| dasmig-core | 1.4 | Yes (core.hpp, core/) | Platform-independent random engine and distributions, data layers, JSON |
| Catch2 | 3.x | Yes (amalgamated) | Unit testing |
| Library | Description |
|---|---|
| biodata-generator | Procedural human physical characteristics |
| birth-generator | Demographically plausible birthdays |
| city-generator | Weighted city selection by population |
| country-generator | Weighted country selection by population |
| device-generator | Devices, browsers, user agents and IP addresses that fit together |
| email-generator | Email addresses in each country's style |
| entity-generator | ECS-based entity generation |
| interest-generator | Religion, hobbies and favourite media by country, age and sex |
| name-generator | Culturally appropriate full names |
| nickname-generator | Gamer-style nicknames |
| occupation-generator | Employment status, education and occupation by country, age and sex |
| persona-generator | Complete characters composed from the other generators |
| phone-generator | Phone numbers valid in each country's numbering plan |
| relationship-generator | Families around a person: parents, siblings, partners and children |
| trait-generator | Personality traits with conflicts, synergies and Big Five axes |
| user-generator | Complete user records: account, username, email, phone and address |
This library is released under the MIT License.