|
Interest Generator 3.0.1
Religion, hobbies and favourite media by country, age and sex for C++23
|
Return type for interest generation. More...
#include <interestgen.hpp>
Public Member Functions | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this interest. | |
| const core::seed_signature & | signature () const |
| The seed and the data this interest was generated from. | |
| std::string | to_string () const |
| Human-readable summary string. | |
| void | to_json (core::json_writer &w) const |
| Write this interest as a JSON object. | |
| std::string | to_json () const |
| This interest as a JSON document. | |
| operator std::string () const | |
| Implicit conversion to std::string. | |
Public Attributes | |
| std::string | country_code |
| ISO 3166-1 alpha-2 code of the country drawn from. | |
| std::string | religion |
Religion label (the religion column). | |
| std::string | religion_group |
Major group of the religion (the group column). | |
| std::vector< interest_item > | hobbies |
| Hobbies, in the order they were drawn. | |
| std::vector< interest_item > | films |
| Favourite film genres. | |
| std::vector< interest_item > | games |
| Favourite game genres. | |
| std::vector< interest_item > | books |
| Favourite book genres. | |
| std::vector< interest_item > | music |
| Favourite music genres. | |
Friends | |
| class | intg |
| std::ostream & | operator<< (std::ostream &os, const interest &v) |
| Stream the summary to an output stream. | |
Return type for interest generation.
Supports implicit conversion to std::string (the religion), streaming via operator<< and JSON output via to_json().
Definition at line 66 of file interestgen.hpp.
|
inline |
Implicit conversion to std::string.
Definition at line 125 of file interestgen.hpp.
|
inline |
Retrieve the random seed used to generate this interest.
Definition at line 81 of file interestgen.hpp.
|
inline |
The seed and the data this interest was generated from.
data is intg::data_hash() at the time of generation. Definition at line 86 of file interestgen.hpp.
|
inline |
This interest as a JSON document.
{"country_code":"BR","religion":"...","religion_group":"...","hobbies":[{"key":"...","label":"..."}],...,"signature":{...}}. Definition at line 116 of file interestgen.hpp.
|
inline |
Write this interest as a JSON object.
| w | Writer positioned where a value is allowed. |
Definition at line 97 of file interestgen.hpp.
|
inline |
|
friend |
Definition at line 153 of file interestgen.hpp.
|
friend |
Stream the summary to an output stream.
| os | Output stream. |
| v | The interest to stream. |
Definition at line 134 of file interestgen.hpp.
| std::vector<interest_item> dasmig::interest::books |
Favourite book genres.
Definition at line 75 of file interestgen.hpp.
| std::string dasmig::interest::country_code |
ISO 3166-1 alpha-2 code of the country drawn from.
Definition at line 69 of file interestgen.hpp.
| std::vector<interest_item> dasmig::interest::films |
Favourite film genres.
Definition at line 73 of file interestgen.hpp.
| std::vector<interest_item> dasmig::interest::games |
Favourite game genres.
Definition at line 74 of file interestgen.hpp.
| std::vector<interest_item> dasmig::interest::hobbies |
Hobbies, in the order they were drawn.
Definition at line 72 of file interestgen.hpp.
| std::vector<interest_item> dasmig::interest::music |
Favourite music genres.
Definition at line 76 of file interestgen.hpp.
| std::string dasmig::interest::religion |
Religion label (the religion column).
Definition at line 70 of file interestgen.hpp.
| std::string dasmig::interest::religion_group |
Major group of the religion (the group column).
Definition at line 71 of file interestgen.hpp.