Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::UUID Class Reference

The UUIDv4 class contains static operations for the UUIDv4 type. More...

#include <duckdb.hpp>

Inheritance diagram for duckdb::UUID:
Collaboration diagram for duckdb::UUID:

Static Public Member Functions

static hugeint_t GenerateRandomUUID (RandomEngine &engine)
 Generate a random UUID v4 value.
static hugeint_t GenerateRandomUUID ()
Static Public Member Functions inherited from duckdb::BaseUUID
static bool FromString (const string &str, hugeint_t &result, bool strict=false)
 Convert a uuid string to a hugeint object.
static bool FromCString (const char *str, idx_t len, hugeint_t &result)
 Convert a uuid string to a hugeint object.
static void ToString (hugeint_t input, char *buf)
 Convert a hugeint object to a uuid style string.
static hugeint_t FromUHugeint (uhugeint_t input)
 Convert a uhugeint_t object to a uuid value.
static uhugeint_t ToUHugeint (hugeint_t input)
 Convert a uuid value to a uhugeint_t object.
static hugeint_t FromBlob (const_data_ptr_t input)
 Convert 16-byte binary data to UUID (hugeint_t).
static void ToBlob (hugeint_t input, data_ptr_t output)
 Convert UUID (hugeint_t) to 16-byte binary data.
static string ToString (hugeint_t input)
 Convert a hugeint object to a uuid style string.
static hugeint_t FromString (const string &str)

Additional Inherited Members

Static Public Attributes inherited from duckdb::BaseUUID
static constexpr const uint8_t STRING_SIZE = 36
Static Protected Member Functions inherited from duckdb::BaseUUID
static hugeint_t Convert (const std::array< uint8_t, 16 > &bytes)
 Util function, which converts uint8_t array to hugeint_t.

Detailed Description

The UUIDv4 class contains static operations for the UUIDv4 type.

Member Function Documentation

◆ GenerateRandomUUID() [1/2]

hugeint_t duckdb::UUIDv4::GenerateRandomUUID ( RandomEngine & engine)
static

Generate a random UUID v4 value.

131021 {
131022 std::array<uint8_t, 16> bytes;
131023 for (int i = 0; i < 16; i += 4) {
131024 *reinterpret_cast<uint32_t *>(bytes.data() + i) = engine.NextRandomInteger();
131025 }
131026 // variant must be 10xxxxxx
131027 bytes[8] &= 0xBF;
131028 bytes[8] |= 0x80;
131029 // version must be 0100xxxx
131030 bytes[6] &= 0x4F;
131031 bytes[6] |= 0x40;
131032
131033 return Convert(bytes);
131034}
static hugeint_t Convert(const std::array< uint8_t, 16 > &bytes)
Util function, which converts uint8_t array to hugeint_t.
Definition duckdb.cpp:130995
::uint32_t uint32_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateRandomUUID() [2/2]

hugeint_t duckdb::UUIDv4::GenerateRandomUUID ( )
static
131036 {
131037 RandomEngine engine;
131038 return GenerateRandomUUID(engine);
131039}
static hugeint_t GenerateRandomUUID(RandomEngine &engine)
Generate a random UUID v4 value.
Definition duckdb.cpp:131021

The documentation for this class was generated from the following files: