[#BloombergLP-bdlb-Guid]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::Guid
:relfileprefix: ../../
:mrdocs:

This class implements a value&hyphen;semantic `Guid` type&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;guid&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Guid;
----

== Description

Each object represents an unconstrained `Guid` object, but its uniqueness is _not_ guaranteed, and this component provides no ability to generate a GUID&period;

This class provides a constructor and several accessors with names and parameters phrased using RFC 4122 field names&period; 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&hyphen;3 of the GUID regardless of whether the values of those bytes come from a clock or are generated randomly)&period;

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/Guid/_04enum.adoc[`Unnamed enum`] 
| GUID layout constants&period;
|===


== 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&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlb/Guid/begin.adoc[`begin`] 
| Return a pointer to the first byte of this GUID&period;
| xref:BloombergLP/bdlb/Guid/clockSeqHi.adoc[`clockSeqHi`] 
| Return the 5&hyphen;bit value of the `clk&lowbar;seq&lowbar;hi&lowbar;res` field of this guid as specified in RFC 4122, excluding the variant bits&period;
| xref:BloombergLP/bdlb/Guid/clockSeqHiRes.adoc[`clockSeqHiRes`] 
| Return the 8&hyphen;bit `clk&lowbar;seq&lowbar;hi&lowbar;res` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/clockSeqLow.adoc[`clockSeqLow`] 
| Return the 8&hyphen;bit `clk&lowbar;seq&lowbar;low` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/data.adoc[`data`] 
| Return a pointer offering unmodifiable access to the most significant byte of this guid object&period;
| xref:BloombergLP/bdlb/Guid/end.adoc[`end`] 
| Return a pointer one past the end of the least significant byte of this guid object&period;
| xref:BloombergLP/bdlb/Guid/format.adoc[`format`] 
| Write the value of this object to the specified output `buffer`&period;
| xref:BloombergLP/bdlb/Guid/node.adoc[`node`] 
| Return the 48&hyphen;bit `node` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Return the byte at the specified `offset` in this guid&period;
| xref:BloombergLP/bdlb/Guid/print.adoc[`print`] 
| Write the value of this object to the specified output `stream`&period;
| xref:BloombergLP/bdlb/Guid/timeHi.adoc[`timeHi`] 
| Return the 12&hyphen;bit value of the `time&lowbar;hi&lowbar;and&lowbar;version` field of this guid as specified in RFC 4122, excluding the `version` bits&period;
| xref:BloombergLP/bdlb/Guid/timeHiAndVersion.adoc[`timeHiAndVersion`] 
| Return the 16&hyphen;bit `time&lowbar;hi&lowbar;and&lowbar;version` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/timeLow.adoc[`timeLow`] 
| Return the 32&hyphen;bit `time&lowbar;low` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/timeMid.adoc[`timeMid`] 
| Return the 16&hyphen;bit `time&lowbar;mid` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/variant.adoc[`variant`] 
| Return the 3&hyphen;bit `variant` portion of the `clk&lowbar;seq&lowbar;hi&lowbar;res` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/version.adoc[`version`] 
| Return the four&hyphen;bit `version` portion of the `time&lowbar;hi&lowbar;and&lowbar;version` field of this guid as specified in RFC 4122&period;
| xref:BloombergLP/bdlb/Guid/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Guid, is&lowbar;trivially&lowbar;copyable&gt;`] 
| Declare that this type is bitwise equality comparable&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlb/operator_not_eq-0ef.adoc[BloombergLP::bdlb::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` have different values&period;
| `xref:BloombergLP/bdlb/operator_eq-03b.adoc[BloombergLP::bdlb::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` have the same value&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/operator_lt-01e.adoc[`operator&lt;`]
| Return `true` if the specified `lhs` is less than the specified `rhs`&period;
| xref:BloombergLP/bdlb/operator_le-0f5.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` is less than or equal to `rhs`&period;
| xref:BloombergLP/bdlb/operator_gt-0f6.adoc[`operator&gt;`]
| Return `true` if the specified `lhs` is greater than the specified `rhs`&period;
| xref:BloombergLP/bdlb/operator_ge-05f.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` is greater than or equal to `rhs`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
