This class implements a value‐semantic Guid type. Each object represents an unconstrained Guid object, but its uniqueness is not guaranteed, and this component provides no ability to generate a GUID.

Synopsis

Declared in <bdlb_guid.h>

class Guid;

Description

This class provides a constructor and several accessors with names and parameters phrased using RFC 4122 field names. These names are used (by RFC 4122 and this component) as designators for parts of the GUID even when those names do not accurately describe the parts (for example, time low names bytes 0‐3 of the GUID regardless of whether the values of those bytes come from a clock or are generated randomly).

Enums

Name

Description

Unnamed enum

GUID layout constants.

Member Functions

Name

Description

Guid [constructor]

Constructors

operator=

Assignment operators

begin

Return a pointer to the first byte of this GUID.

clockSeqHi

Return the 5‐bit value of the clk_seq_hi_res field of this guid as specified in RFC 4122, excluding the variant bits.

clockSeqHiRes

Return the 8‐bit clk_seq_hi_res field of this guid as specified in RFC 4122.

clockSeqLow

Return the 8‐bit clk_seq_low field of this guid as specified in RFC 4122.

data

Return a pointer offering unmodifiable access to the most significant byte of this guid object.

end

Return a pointer one past the end of the least significant byte of this guid object.

format

Write the value of this object to the specified output buffer in a human‐readable format. Note that this human‐readable format is not fully specified, and can change without notice (as can k_GUID_NUM_CHARS). No trailing null terminator is written.

node

Return the 48‐bit node field of this guid as specified in RFC 4122.

operator[]

Return a reference offering unmodifiable access to the byte at the specified offset from the most significant byte of this guid object. The behavior is undefined unless 0 <= offset < k_GUID_NUM_BYTES.

print

Write the value of this object to the specified output stream in a human‐readable format, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that this human‐readable format is not fully specified, and can change without notice.

timeHi

Return the 12‐bit value of the time_hi_and_version field of this guid as specified in RFC 4122, excluding the version bits.

timeHiAndVersion

Return the 16‐bit time_hi_and_version field of this guid as specified in RFC 4122.

timeLow

Return the 32‐bit time_low field of this guid as specified in RFC 4122.

timeMid

Return the 16‐bit time_mid field of this guid as specified in RFC 4122.

variant

Return the 3‐bit variant portion of the clk_seq_hi_res field of this guid as specified in RFC 4122.

version

Return the four‐bit version portion of the time_hi_and_version field of this guid as specified in RFC 4122.

operator BloombergLP::bslmf::NestedTraitDeclaration<Guid, is_trivially_copyable>

Declare that this type is bitwise equality comparable.

Friends

Name

Description

BloombergLP::bdlb::operator!=

Return true if the specified lhs and specified rhs guid objects have different values, and false otherwise. Two guid objects have different value if any of corresponding byte in their internal buffers differ.

BloombergLP::bdlb::operator==

Return true if the specified lhs and specified rhs guid objects have the same value, and false otherwise. Two guid objects have the same value if each corresponding byte in their internal buffers are equal.

Non-Member Functions

Name

Description

operator<

Return true if the value of the specified lhs guid object is less than the value of the specified rhs guid object, and false otherwise. Note that the comparison is accomplished using a lexicographic comparison of the internal representations.

operator<=

Return true if the value of the specified lhs guid object is less than or equal to the value of the specified rhs guid object, and false otherwise. Note that the comparison is accomplished using a lexicographic comparison of the internal representations.

operator>

Return true if the value of the specified lhs guid object is greater than the value of the specified rhs guid object, and false otherwise. Note that the comparison is accomplished using a lexicographic comparison of the internal representations.

operator>=

Return true if the value of the specified lhs guid object is greater than or equal to the value of the specified rhs guid object, and false otherwise. Note that the comparison is accomplished using a lexicographic comparison of the internal representations.

Created with MrDocs