|
Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
|
Namespaces | |
| namespace | anonymous_namespace{http_client.cpp} |
Classes | |
| class | http_client |
| Minimal, synchronous HTTP GET client built on libcurl. More... | |
| struct | options |
| Configuration for fetching entities via MediaWiki/Wikibase API. More... | |
| struct | network_metrics |
| Thread-safe counters describing client-side networking activity. More... | |
| struct | http_response |
| Result object for an HTTP transfer. More... | |
| struct | network_options |
| Fixed runtime options for the HTTP client. More... | |
Typedefs | |
| using | parameter = std::pair<std::string, std::string> |
| Single query parameter: key=value (pre-encoding is handled by libcurl). | |
| using | parameter_list = std::vector<parameter> |
| Ordered list of query parameters appended to the URL. | |
Enumerations | |
| enum class | interface { command_line , interactive } |
| enum class | entity_kind { item , property , lexeme , mediainfo , entity_schema , form , sense , any , unknown } |
| Wikidata entity kind. More... | |
Functions | |
| std::mt19937_64 & | rng () |
| Shared PRNG seeded on first use. | |
| std::string | random_hex (std::size_t n) |
Return exactly n random hexadecimal characters (lowercase). | |
| using corespace::parameter = std::pair<std::string, std::string> |
| using corespace::parameter_list = std::vector<parameter> |
|
strong |
Wikidata entity kind.
Names include the canonical identifier prefixes for clarity:
Definition at line 46 of file utils.hpp.
|
strong |
| std::string corespace::random_hex | ( | const std::size_t | n | ) |
Return exactly n random hexadecimal characters (lowercase).
The function draws 4-bit nibbles from the shared PRNG. Characters are not zero-padded beyond the requested length; each position is an independent, uniformly distributed hex digit.
Definition at line 33 of file rng.cpp.
References rng().
Referenced by arachnespace::arachne::new_group().


| std::mt19937_64 & corespace::rng | ( | ) |
Shared PRNG seeded on first use.
The generator is a process-wide std::mt19937_64 seeded from std::random_device. Calls from multiple threads share the same engine and therefore require external synchronization if deterministic ordering is important.
Definition at line 28 of file rng.cpp.
Referenced by random_hex().
