[#BloombergLP-bdlb-Guid] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::Guid :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/Guid/_04enum.adoc[`Unnamed enum`] | GUID layout constants. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/Guid/2constructor-0a.adoc[`Guid`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlb/Guid/operator_assign-025.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdlb/Guid/begin.adoc[`begin`] | Return a pointer to the first byte of this GUID. | xref:BloombergLP/bdlb/Guid/clockSeqHi.adoc[`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. | xref:BloombergLP/bdlb/Guid/clockSeqHiRes.adoc[`clockSeqHiRes`] | Return the 8‐bit `clk_seq_hi_res` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/clockSeqLow.adoc[`clockSeqLow`] | Return the 8‐bit `clk_seq_low` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/data.adoc[`data`] | Return a pointer offering unmodifiable access to the most significant byte of this guid object. | xref:BloombergLP/bdlb/Guid/end.adoc[`end`] | Return a pointer one past the end of the least significant byte of this guid object. | xref:BloombergLP/bdlb/Guid/format.adoc[`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. | xref:BloombergLP/bdlb/Guid/node.adoc[`node`] | Return the 48‐bit `node` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/operator_subs.adoc[`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`. | xref:BloombergLP/bdlb/Guid/print.adoc[`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. | xref:BloombergLP/bdlb/Guid/timeHi.adoc[`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. | xref:BloombergLP/bdlb/Guid/timeHiAndVersion.adoc[`timeHiAndVersion`] | Return the 16‐bit `time_hi_and_version` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/timeLow.adoc[`timeLow`] | Return the 32‐bit `time_low` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/timeMid.adoc[`timeMid`] | Return the 16‐bit `time_mid` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/variant.adoc[`variant`] | Return the 3‐bit `variant` portion of the `clk_seq_hi_res` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/version.adoc[`version`] | Return the four‐bit `version` portion of the `time_hi_and_version` field of this guid as specified in RFC 4122. | xref:BloombergLP/bdlb/Guid/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<Guid, is_trivially_copyable>`] | Declare that this type is bitwise equality comparable. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlb/operator_not_eq-0ef.adoc[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. | `xref:BloombergLP/bdlb/operator_eq-03b.adoc[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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/operator_lt-01e.adoc[`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. | xref:BloombergLP/bdlb/operator_le-0f5.adoc[`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. | xref:BloombergLP/bdlb/operator_gt-0f6.adoc[`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. | xref:BloombergLP/bdlb/operator_ge-05f.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#