|
Address Generator 2.1.2
Postal addresses with real streets by place, laid out in each country's format for C++23
|
Return type for street generation: a street of a place. More...
#include <addressgen.hpp>
Public Member Functions | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this street. | |
| const core::seed_signature & | signature () const |
| The seed and the data this street was generated from. | |
| void | to_json (core::json_writer &w) const |
| Write this street as a JSON object. | |
| std::string | to_json () const |
| This street as a JSON document. | |
| operator std::string () const | |
| Implicit conversion to std::string. | |
Public Attributes | |
| std::string | name |
| The street's name, with its type. | |
| std::string | country_code |
| ISO 3166-1 alpha-2. | |
| std::string | city |
| The place the street is in. | |
| bool | real_street {false} |
| True when it comes from the place's own data, false when composed. | |
| std::uint32_t | geonameid {0} |
| The place's GeoNames id; 0 for a place given by name only. | |
Friends | |
| class | adg |
| std::ostream & | operator<< (std::ostream &os, const street &v) |
| Stream the name to an output stream. | |
Return type for street generation: a street of a place.
Converts to the street's name, streams as it and writes JSON.
Definition at line 222 of file addressgen.hpp.
|
inline |
Implicit conversion to std::string.
Definition at line 265 of file addressgen.hpp.
|
inline |
Retrieve the random seed used to generate this street.
Definition at line 233 of file addressgen.hpp.
|
inline |
The seed and the data this street was generated from.
Definition at line 237 of file addressgen.hpp.
|
inline |
|
inline |
Write this street as a JSON object.
| w | Writer positioned where a value is allowed. |
Definition at line 241 of file addressgen.hpp.
|
friend |
Definition at line 279 of file addressgen.hpp.
|
friend |
Stream the name to an output stream.
| os | Output stream. |
| v | The street to stream. |
Definition at line 271 of file addressgen.hpp.
| std::string dasmig::street::city |
The place the street is in.
Definition at line 227 of file addressgen.hpp.
| std::string dasmig::street::country_code |
ISO 3166-1 alpha-2.
Definition at line 226 of file addressgen.hpp.
| std::uint32_t dasmig::street::geonameid {0} |
The place's GeoNames id; 0 for a place given by name only.
Definition at line 229 of file addressgen.hpp.
| std::string dasmig::street::name |
The street's name, with its type.
Definition at line 225 of file addressgen.hpp.
| bool dasmig::street::real_street {false} |
True when it comes from the place's own data, false when composed.
Definition at line 228 of file addressgen.hpp.