generate overloads
Declared in <bdlb_guidutil.h>
Generate and return a single GUID meeting the RFC 4122 version 4 specification, consisting of 122 randomly generated bits, two "variant" bits set to 10, and four "version" bits set to 0100.
static
Guid
generate();
» more...
Generate a sequence of GUIDs meeting the RFC 4122 version 4 specification, and load the resulting GUIDs into the array referred to by the specified result. Optionally specify numGuids, indicating the number of GUIDs to load into the result array. If numGuids is not supplied, a default of 1 is used. An RFC 4122 version 4 GUID consists of 122 randomly generated bits, two "variant" bits set to 10, and four "version" bits set to 0100. The behavior is undefined unless result refers to a contiguous sequence of at least numGuids Guid objects.
static
void
generate(
Guid* result,
std::size_t numGuids = 1);
» more...
Generate a sequence of GUIDs meeting the RFC 4122 version 4 specification, and load the bytes of the resulting GUIDs into the array referred to by the specified result. Optionally specify numGuids, indicating the number of GUIDs to load into the result array. If numGuids is not supplied, a default of 1 is used. An RFC 4122 version 4 GUID consists of 122 randomly generated bits, two "variant" bits set to 10, and four "version" bits set to 0100. The behavior is undefined unless result refers to a contiguous sequence of at least 16 * numGuids bytes.
static
void
generate(
unsigned char* result,
std::size_t numGuids = 1);
» more...