![]() |
Country Generator 1.0.1
Procedural country generation for C++23
|
Return type for country generation, holding all data fields. More...
#include <countrygen.hpp>
Public Member Functions | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this country. | |
| operator std::string () const | |
| Implicit conversion to std::string. | |
Public Attributes | |
| std::string | cca2 |
| ISO 3166-1 alpha-2 code (e.g. "BR"). | |
| std::string | cca3 |
| ISO 3166-1 alpha-3 code (e.g. "BRA"). | |
| std::string | ccn3 |
| ISO 3166-1 numeric code (e.g. "076"). | |
| std::string | name_common |
| Common English name (e.g. "Brazil"). | |
| std::string | name_official |
| Official English name (e.g. "Federative Republic of Brazil"). | |
| std::string | capital |
| Capital city (semicolon-separated if multiple). | |
| std::string | region |
| UN geoscheme region (e.g. "Americas"). | |
| std::string | subregion |
| UN geoscheme subregion (e.g. "South America"). | |
| std::string | continent |
| Continent (semicolon-separated if multiple). | |
| double | latitude {0.0} |
| WGS84 latitude in decimal degrees. | |
| double | longitude {0.0} |
| WGS84 longitude in decimal degrees. | |
| std::uint64_t | area {0} |
| Total land area in km². | |
| std::uint64_t | population {0} |
| Total population. | |
| bool | landlocked {false} |
| Whether the country is landlocked. | |
| bool | independent {false} |
| Whether the country is an independent sovereign state. | |
| bool | un_member {false} |
| Whether the country is a UN member. | |
| std::string | languages |
| Semicolon-separated language names (e.g. "Portuguese"). | |
| std::string | currency_code |
| Primary ISO 4217 currency code (e.g. "BRL"). | |
| std::string | currency_name |
| Primary currency name (e.g. "Brazilian real"). | |
| std::string | currency_symbol |
| Primary currency symbol (e.g. "R$"). | |
| std::string | borders |
| Semicolon-separated ISO alpha-3 border codes. | |
| std::string | timezones |
| Semicolon-separated UTC offset strings. | |
| std::string | driving_side |
| Driving side: "right" or "left". | |
| std::string | tld |
| Country-code top-level domain (e.g. ".br"). | |
| std::string | idd_root |
| IDD root (e.g. "+5"). | |
| std::string | idd_suffix |
| IDD primary suffix (e.g. "5"). | |
| std::string | demonym_m |
| English male demonym (e.g. "Brazilian"). | |
| std::string | demonym_f |
| English female demonym (e.g. "Brazilian"). | |
| std::string | flag_emoji |
| Unicode flag emoji. | |
| std::string | income_level |
| World Bank income level (e.g. "Upper middle income"). | |
| std::string | start_of_week |
| Start of the week: "monday", "sunday", or "saturday". | |
Friends | |
| class | cntg |
| std::ostream & | operator<< (std::ostream &os, const country &c) |
| Stream the common name to an output stream. | |
Return type for country generation, holding all data fields.
Supports implicit conversion to std::string (returns the common name) and streaming via operator<<.
Definition at line 43 of file countrygen.hpp.
|
inline |
Implicit conversion to std::string.
Definition at line 165 of file countrygen.hpp.
|
inline |
Retrieve the random seed used to generate this country.
Definition at line 158 of file countrygen.hpp.
|
friend |
Definition at line 180 of file countrygen.hpp.
|
friend |
Stream the common name to an output stream.
Definition at line 171 of file countrygen.hpp.
| std::uint64_t dasmig::country::area {0} |
Total land area in km².
Definition at line 84 of file countrygen.hpp.
| std::string dasmig::country::borders |
Semicolon-separated ISO alpha-3 border codes.
Definition at line 117 of file countrygen.hpp.
| std::string dasmig::country::capital |
Capital city (semicolon-separated if multiple).
Definition at line 64 of file countrygen.hpp.
| std::string dasmig::country::cca2 |
ISO 3166-1 alpha-2 code (e.g. "BR").
Definition at line 49 of file countrygen.hpp.
| std::string dasmig::country::cca3 |
ISO 3166-1 alpha-3 code (e.g. "BRA").
Definition at line 52 of file countrygen.hpp.
| std::string dasmig::country::ccn3 |
ISO 3166-1 numeric code (e.g. "076").
Definition at line 55 of file countrygen.hpp.
| std::string dasmig::country::continent |
Continent (semicolon-separated if multiple).
Definition at line 75 of file countrygen.hpp.
| std::string dasmig::country::currency_code |
Primary ISO 4217 currency code (e.g. "BRL").
Definition at line 106 of file countrygen.hpp.
| std::string dasmig::country::currency_name |
Primary currency name (e.g. "Brazilian real").
Definition at line 109 of file countrygen.hpp.
| std::string dasmig::country::currency_symbol |
Primary currency symbol (e.g. "R$").
Definition at line 112 of file countrygen.hpp.
| std::string dasmig::country::demonym_f |
English female demonym (e.g. "Brazilian").
Definition at line 142 of file countrygen.hpp.
| std::string dasmig::country::demonym_m |
English male demonym (e.g. "Brazilian").
Definition at line 139 of file countrygen.hpp.
| std::string dasmig::country::driving_side |
Driving side: "right" or "left".
Definition at line 123 of file countrygen.hpp.
| std::string dasmig::country::flag_emoji |
Unicode flag emoji.
Definition at line 145 of file countrygen.hpp.
| std::string dasmig::country::idd_root |
IDD root (e.g. "+5").
Definition at line 131 of file countrygen.hpp.
| std::string dasmig::country::idd_suffix |
IDD primary suffix (e.g. "5").
Definition at line 134 of file countrygen.hpp.
| std::string dasmig::country::income_level |
World Bank income level (e.g. "Upper middle income").
Definition at line 148 of file countrygen.hpp.
| bool dasmig::country::independent {false} |
Whether the country is an independent sovereign state.
Definition at line 95 of file countrygen.hpp.
| bool dasmig::country::landlocked {false} |
Whether the country is landlocked.
Definition at line 90 of file countrygen.hpp.
| std::string dasmig::country::languages |
Semicolon-separated language names (e.g. "Portuguese").
Definition at line 103 of file countrygen.hpp.
| double dasmig::country::latitude {0.0} |
WGS84 latitude in decimal degrees.
Definition at line 78 of file countrygen.hpp.
| double dasmig::country::longitude {0.0} |
WGS84 longitude in decimal degrees.
Definition at line 81 of file countrygen.hpp.
| std::string dasmig::country::name_common |
Common English name (e.g. "Brazil").
Definition at line 58 of file countrygen.hpp.
| std::string dasmig::country::name_official |
Official English name (e.g. "Federative Republic of Brazil").
Definition at line 61 of file countrygen.hpp.
| std::uint64_t dasmig::country::population {0} |
Total population.
Definition at line 87 of file countrygen.hpp.
| std::string dasmig::country::region |
UN geoscheme region (e.g. "Americas").
Definition at line 69 of file countrygen.hpp.
| std::string dasmig::country::start_of_week |
Start of the week: "monday", "sunday", or "saturday".
Definition at line 151 of file countrygen.hpp.
| std::string dasmig::country::subregion |
UN geoscheme subregion (e.g. "South America").
Definition at line 72 of file countrygen.hpp.
| std::string dasmig::country::timezones |
Semicolon-separated UTC offset strings.
Definition at line 120 of file countrygen.hpp.
| std::string dasmig::country::tld |
Country-code top-level domain (e.g. ".br").
Definition at line 128 of file countrygen.hpp.
| bool dasmig::country::un_member {false} |
Whether the country is a UN member.
Definition at line 98 of file countrygen.hpp.