![]() |
Nickname Generator 5.2.2
Gamer-style nickname generation for C++23
|
Return type for nickname generation, holding both the transformed nickname and the original source string. More...
#include <nicknamegen.hpp>
Public Member Functions | |
| std::wstring | plain () const |
| Return the original word or name used to generate this nickname. | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this nickname. | |
| const core::seed_signature & | signature () const |
| The seed and the data this nickname was generated from. | |
| void | to_json (core::json_writer &w) const |
Write this nickname as a JSON object {"nickname":…,"source":…,"signature":{…}}. | |
| std::string | to_json () const |
| This nickname as a JSON document. | |
| operator std::wstring () const | |
| Implicit conversion to std::wstring. | |
Friends | |
| class | nng |
| Allows nng to construct nicknames. | |
| std::wostream & | operator<< (std::wostream &wos, const nickname &nickname) |
| Stream the nickname to a wide output stream. | |
Return type for nickname generation, holding both the transformed nickname and the original source string.
Supports implicit conversion to std::wstring, streaming via operator<< and JSON output via to_json().
Definition at line 99 of file nicknamegen.hpp.
|
inline |
Implicit conversion to std::wstring.
Definition at line 149 of file nicknamegen.hpp.
|
inline |
Return the original word or name used to generate this nickname.
Definition at line 104 of file nicknamegen.hpp.
|
inline |
Retrieve the random seed used to generate this nickname.
Definition at line 112 of file nicknamegen.hpp.
|
inline |
The seed and the data this nickname was generated from.
data is nng::data_hash() at the time of generation. Definition at line 120 of file nicknamegen.hpp.
|
inline |
This nickname as a JSON document.
Definition at line 140 of file nicknamegen.hpp.
|
inline |
Write this nickname as a JSON object {"nickname":…,"source":…,"signature":{…}}.
| w | Writer positioned where a value is allowed. |
Definition at line 128 of file nicknamegen.hpp.
|
friend |
Allows nng to construct nicknames.
Definition at line 179 of file nicknamegen.hpp.
|
friend |
Stream the nickname to a wide output stream.
| wos | Output stream. |
| nickname | Nickname to stream. |
Definition at line 158 of file nicknamegen.hpp.