BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb_guid.h
Go to the documentation of this file.
1/// @file bdlb_guid.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlb_guid.h -*-C++-*-
8#ifndef INCLUDED_BDLB_GUID
9#define INCLUDED_BDLB_GUID
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13#include <bdlscm_version.h>
14
15/// @defgroup bdlb_guid bdlb_guid
16/// @brief Provide a value-semantic type for Globally Unique Identifiers.
17/// @addtogroup bdl
18/// @{
19/// @addtogroup bdlb
20/// @{
21/// @addtogroup bdlb_guid
22/// @{
23///
24/// <h1> Outline </h1>
25/// * <a href="#bdlb_guid-purpose"> Purpose</a>
26/// * <a href="#bdlb_guid-classes"> Classes </a>
27/// * <a href="#bdlb_guid-description"> Description </a>
28/// * <a href="#bdlb_guid-usage"> Usage </a>
29///
30/// # Purpose {#bdlb_guid-purpose}
31/// Provide a value-semantic type for Globally Unique Identifiers.
32///
33/// # Classes {#bdlb_guid-classes}
34///
35/// - bdlb::Guid: value-semantic type to represent Globally Unique Identifiers
36///
37/// @see bdlb_guidutil
38///
39/// # Description {#bdlb_guid-description}
40/// This component provides a value-semantic type for Globally
41/// Unique Identifiers (GUIDs), `bdlb::Guid`, with format as described by RFC
42/// 4122 (`http://www.ietf.org/rfc/rfc4122.txt`). All equality and comparison
43/// methods are defined for these GUIDs. Note that this component does not
44/// provide the facilities to generate GUIDs, and thus makes no guarantees of
45/// uniqueness or randomness.
46///
47/// ## Usage {#bdlb_guid-usage}
48///
49///
50/// Suppose we are building a utility to create globally unique names which may
51/// be based on a common base name, such as a code-generator.
52///
53/// First, let us define the core types needed, the first of which is a utility
54/// to allocate GUIDs.
55/// @code
56/// /// This struct provides a namespace for methods to generate GUIDs.
57/// struct MyGuidGeneratorUtil {
58///
59/// // CLASS METHODS
60///
61/// /// Generate a version 1 GUID, placing the value into the
62/// /// specified 'guid' pointer. Return 0 on success, and non-zero
63/// /// otherwise.
64/// static int generate(bdlb::Guid *guid);
65/// };
66///
67/// // CLASS METHODS
68/// inline
69/// int my_GuidGeneratorUtil::generate(bdlb::Guid *guid)
70/// {
71/// // For brevity, we use a static sequence of pre-generated GUIDs.
72///
73/// static unsigned char GUIDS[][bdlb::Guid::k_GUID_NUM_BYTES] = {
74/// { 0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xba, 0xbe,
75/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
76///
77/// { 0x5c, 0x9d, 0x4e, 0x51, 0x0d, 0xf1, 0x11, 0xe4,
78/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
79///
80/// { 0x5c, 0x9d, 0x4e, 0x52, 0x0d, 0xf1, 0x11, 0xe4,
81/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
82///
83/// { 0x5c, 0x9d, 0x4e, 0x53, 0x0d, 0xf1, 0x11, 0xe4,
84/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
85///
86/// { 0x5c, 0x9d, 0x4e, 0x54, 0x0d, 0xf1, 0x11, 0xe4,
87/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
88///
89/// { 0x5c, 0x9d, 0x4e, 0x55, 0x0d, 0xf1, 0x11, 0xe4,
90/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
91///
92/// { 0x5c, 0x9d, 0x4e, 0x56, 0x0d, 0xf1, 0x11, 0xe4,
93/// 0x91, 0x91, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 },
94/// };
95///
96/// const bsl::size_t NUM_GUIDS = sizeof GUIDS / sizeof *GUIDS;
97///
98/// static bsl::size_t nextGuidIdx = 0;
99///
100/// int rval = -1;
101/// if (nextGuidIdx++ < NUM_GUIDS) {
102/// *guid = bdlb::Guid(GUIDS[nextGuidIdx]);
103/// rval = 0;
104/// }
105/// return rval;
106/// }
107/// @endcode
108/// Next, we create a utility to create unique strings.
109/// @code
110/// /// This struct provides methods to create globally unique strings.
111/// struct UniqueStringGenerator {
112///
113/// /// Create a globally unique string from the specified non-unique
114/// /// 'base' string, placing the result into the specified 'unique'
115/// /// string pointer.
116/// static int uniqueStringFromBase(bsl::string *unique,
117/// const bsl::string& base);
118/// };
119///
120/// int
121/// UniqueStringGenerator::uniqueStringFromBase(bsl::string *unique,
122/// const bsl::string& base,)
123/// {
124/// bdlb::Guid guid;
125///
126/// int rval = my_GuidGeneratorUtil::generate(&guid);
127/// if (rval == 0) {
128/// {
129/// ostringstream convert;
130/// convert << base << "-" << guid;
131/// *unique = convert.str();
132/// }
133/// return rval;
134/// }
135/// @endcode
136/// Finally, we implement a program to generate unique names for a code
137/// auto-generator.
138/// @code
139/// bsl::string baseFileName = "foo.cpp";
140/// bsl::string uniqueFileName;
141/// bsl::string previousFileName;
142///
143/// const bsl::size_t NUM_FILES = 5;
144/// for (bsl::size_t i = 0; i < NUM_FILES; ++i) {
145/// UniqueStringGenerator::uniqueStringFromBase(&uniqueFileName,
146/// baseFileName);
147/// assert(previousFileName != uniqueFileName);
148/// previousFileName = uniqueFileName;
149/// }
150/// @endcode
151/// @}
152/** @} */
153/** @} */
154
155/** @addtogroup bdl
156 * @{
157 */
158/** @addtogroup bdlb
159 * @{
160 */
161/** @addtogroup bdlb_guid
162 * @{
163 */
164
165#include <bslmf_assert.h>
169
170#include <bsls_alignedbuffer.h>
172#include <bsls_assert.h>
173#include <bsls_review.h>
174#include <bsls_types.h>
175
176#include <bsl_algorithm.h>
177#include <bsl_cstddef.h>
178#include <bsl_cstdint.h>
179#include <bsl_cstring.h>
180#include <bsl_iosfwd.h>
181#include <bsl_span.h>
182
183
184namespace bdlb {
185 // ==========
186 // bdlb::Guid
187 // ==========
188
189/// This class implements a value-semantic `Guid` type. Each object
190/// represents an unconstrained `Guid` object, but its uniqueness is *not*
191/// guaranteed, and this component provides no ability to generate a GUID.
192///
193/// This class provides a constructor and several accessors with names and
194/// parameters phrased using RFC 4122 field names. These names are used (by
195/// RFC 4122 and this component) as designators for parts of the GUID even
196/// when those names do not accurately describe the parts (for example,
197/// `time low` names bytes 0-3 of the GUID regardless of whether the values
198/// of those bytes come from a clock or are generated randomly).
199///
200/// See @ref bdlb_guid
201class Guid {
202
203 public:
204 // CLASS DATA
205 enum { k_GUID_NUM_BYTES = 16 }; // number of bytes in a guid
206 enum { k_GUID_NUM_32BITS = 4 }; // number of 32-bits in a guid
207 enum { k_GUID_NUM_CHARS = 36 }; // number of formatted chars
208
209 // TRAITS
212
213 private:
214 // DATA
215
216 // byte array to hold the guid
219 d_alignedBuffer;
220
221 // FRIENDS
222 friend bool operator==(const Guid& lhs, const Guid& rhs);
223 friend bool operator!=(const Guid& lhs, const Guid& rhs);
224
225 // PRIVATE MANIPULATORS
226
227 /// Return a pointer offering modifiable access to the most significant
228 /// byte of this guid object.
229 unsigned char *modifiableData();
230
231 public:
232 // CREATORS
233
234 /// Construct a zero-initialized guid object. Note that a zero-
235 /// initialized guid object is not a GUID according to RFC 4122.
236 Guid();
237
238 /// Destroy this object
239 ~Guid() = default;
240
241 /// Construct a guid object with the internal buffer set equal to the
242 /// specified `buffer` with the first byte representing the most
243 /// significant byte. Note that this method does guarantee that the
244 /// created guid object is a GUID.
245 explicit Guid(const unsigned char (&buffer)[k_GUID_NUM_BYTES]);
246
247 /// Construct a guid object with an internal buffer composed from the
248 /// specified `timeLow`, `timeMid`, `timeHiAndVersion`, `clockSeqHiRes`,
249 /// `clockSeqLow`, and `node` as specified by RFC 4122. Note that only
250 /// the least significant 48 bits of `node` are used in constructing
251 /// the guid.
252 Guid(unsigned long timeLow,
253 unsigned short timeMid,
254 unsigned short timeHiAndVersion,
255 unsigned char clockSeqHiRes,
256 unsigned char clockSeqLow,
258
259 /// Construct a guid object having the same value as the specified
260 /// 'original' object.
261 Guid(const Guid& original) = default;
262
263 // MANIPULATORS
264
265 /// Assign to this guid object the value of the specified 'rhs' and
266 /// return a reference to this modifiable object.
267 Guid& operator=(const Guid& rhs) = default;
268
269 /// Assign to the buffer of this guid the byte sequence in the specified
270 /// `buffer`.
271 Guid& operator=(const unsigned char (&buffer)[k_GUID_NUM_BYTES]);
272
273 /// Assign to the buffer of this guid the byte sequence in the specified
274 /// `buffer`. Note that `buffer` is treated as purely a sequence of
275 /// bytes, and no account is taken of endianness.
276 Guid& operator=(const bsl::uint32_t (&buffer)[k_GUID_NUM_32BITS]);
277
278 // ACCESSORS
279
280 /// Return a reference offering unmodifiable access to the byte at the
281 /// specified `offset` from the most significant byte of this guid
282 /// object. The behavior is undefined unless
283 /// `0 <= offset < k_GUID_NUM_BYTES`.
284 const unsigned char& operator[](bsl::size_t offset) const;
285
286 const unsigned char *begin() const;
287
288 /// Return a pointer offering unmodifiable access to the most
289 /// significant byte of this guid object.
290 const unsigned char *data() const;
291
292 /// Return a pointer one past the end of the least significant byte of
293 /// this guid object.
294 const unsigned char *end() const;
295
296 // RFC 4122 FIELD ACCESSORS
297
298 /// Return the 5-bit value of the `clk_seq_hi_res` field of this guid as
299 /// specified in RFC 4122, excluding the variant bits.
300 unsigned char clockSeqHi() const;
301
302 /// Return the 8-bit `clk_seq_hi_res` field of this guid as specified in
303 /// RFC 4122.
304 unsigned char clockSeqHiRes() const;
305
306 /// Return the 8-bit `clk_seq_low` field of this guid as specified in
307 /// RFC 4122.
308 unsigned char clockSeqLow() const;
309
310 /// Return the 48-bit `node` field of this guid as specified in RFC
311 /// 4122.
313
314 /// Return the 12-bit value of the `time_hi_and_version` field of this
315 /// guid as specified in RFC 4122, excluding the `version` bits.
316 unsigned short timeHi() const;
317
318 /// Return the 16-bit `time_hi_and_version` field of this guid as
319 /// specified in RFC 4122.
320 unsigned short timeHiAndVersion() const;
321
322 /// Return the 32-bit `time_low` field of this guid as specified in RFC
323 /// 4122.
324 unsigned long timeLow() const;
325
326 /// Return the 16-bit `time_mid` field of this guid as specified in RFC
327 /// 4122.
328 unsigned short timeMid() const;
329
330 /// Return the 3-bit `variant` portion of the `clk_seq_hi_res` field of
331 /// this guid as specified in RFC 4122.
332 unsigned char variant() const;
333
334 /// Return the four-bit `version` portion of the `time_hi_and_version`
335 /// field of this guid as specified in RFC 4122.
336 unsigned char version() const;
337
338 /// Write the value of this object to the specified output `buffer` in a
339 /// human-readable format. Note that this human-readable format is not
340 /// fully specified, and can change without notice (as can
341 /// `k_GUID_NUM_CHARS`). No trailing null terminator is written.
343
344 // ASPECTS
345
346 /// Write the value of this object to the specified output `stream` in a
347 /// human-readable format, and return a reference to `stream`.
348 /// Optionally specify an initial indentation `level`, whose absolute
349 /// value is incremented recursively for nested objects. If `level` is
350 /// specified, optionally specify `spacesPerLevel`, whose absolute value
351 /// indicates the number of spaces per indentation level for this and
352 /// all of its nested objects. If `level` is negative, suppress
353 /// indentation of the first line. If `spacesPerLevel` is negative,
354 /// format the entire output on one line, suppressing all but the
355 /// initial indentation (as governed by `level`). If `stream` is not
356 /// valid on entry, this operation has no effect. Note that this
357 /// human-readable format is not fully specified, and can change without
358 /// notice.
359 bsl::ostream& print(bsl::ostream& stream,
360 int level = 0,
361 int spacesPerLevel = 4) const;
362};
363
364// FREE OPERATORS
365
366/// Return `true` if the specified `lhs` and specified `rhs` guid objects
367/// have the same value, and `false` otherwise. Two guid objects have the
368/// same value if each corresponding byte in their internal buffers are
369/// equal.
370bool operator==(const Guid& lhs, const Guid& rhs);
371
372/// Return `true` if the specified `lhs` and specified `rhs` guid objects
373/// have different values, and `false` otherwise. Two guid objects have
374/// different value if any of corresponding byte in their internal buffers
375/// differ.
376bool operator!=(const Guid& lhs, const Guid& rhs);
377
378/// Return `true` if the value of the specified `lhs` guid object is less
379/// than the value of the specified `rhs` guid object, and `false`
380/// otherwise. Note that the comparison is accomplished using a
381/// lexicographic comparison of the internal representations.
382bool operator< (const Guid& lhs, const Guid& rhs);
383
384/// Return `true` if the value of the specified `lhs` guid object is less
385/// than or equal to the value of the specified `rhs` guid object, and
386/// `false` otherwise. Note that the comparison is accomplished using a
387/// lexicographic comparison of the internal representations.
388bool operator<=(const Guid& lhs, const Guid& rhs);
389
390/// Return `true` if the value of the specified `lhs` guid object is greater
391/// than the value of the specified `rhs` guid object, and `false`
392/// otherwise. Note that the comparison is accomplished using a
393/// lexicographic comparison of the internal representations.
394bool operator> (const Guid& lhs, const Guid& rhs);
395
396/// Return `true` if the value of the specified `lhs` guid object is greater
397/// than or equal to the value of the specified `rhs` guid object, and
398/// `false` otherwise. Note that the comparison is accomplished using a
399/// lexicographic comparison of the internal representations.
400bool operator>=(const Guid& lhs, const Guid& rhs);
401
402/// Write the value of the specified `guid` object to the specified output
403/// `stream` in a single-line format, and return a reference to `stream`.
404/// If `stream` is not valid on entry, this operation has no effect. Note
405/// that this human-readable format is not fully specified, can change
406/// without notice, and is logically equivalent to:
407/// @code
408/// print(stream, 0, -1);
409/// @endcode
410bsl::ostream& operator<<(bsl::ostream& stream, const Guid& guid);
411
412/// Invoke the specified `hashAlgorithm` on the underlying buffer held by
413/// the specified `guid` object.
414template <class HASH_ALGORITHM>
415void hashAppend(HASH_ALGORITHM& hashAlgorithm, const Guid& guid);
416
417// ============================================================================
418// INLINE DEFINITIONS
419// ============================================================================
420
421 // ----------
422 // bdlb::Guid
423 // ----------
424// CREATORS
425inline
427{
428 BSLMF_ASSERT(sizeof(d_alignedBuffer) >= k_GUID_NUM_BYTES);
429
430 bsl::fill(modifiableData(), modifiableData() + k_GUID_NUM_BYTES, 0);
431}
432
433inline
434Guid::Guid(const unsigned char (&buffer)[k_GUID_NUM_BYTES])
435{
436 BSLMF_ASSERT(sizeof(d_alignedBuffer) >= k_GUID_NUM_BYTES);
437
438 bsl::copy(buffer, buffer + k_GUID_NUM_BYTES, modifiableData());
439}
440
441inline Guid::Guid(unsigned long timeLow,
442 unsigned short timeMid,
443 unsigned short timeHiAndVersion,
444 unsigned char clockSeqHiRes,
445 unsigned char clockSeqLow,
447{
448 typedef unsigned char uc;
449
450 modifiableData()[ 0] = uc(timeLow >> 24);
451 modifiableData()[ 1] = uc(timeLow >> 16);
452 modifiableData()[ 2] = uc(timeLow >> 8);
453 modifiableData()[ 3] = uc(timeLow);
454
455 modifiableData()[ 4] = uc(timeMid >> 8);
456 modifiableData()[ 5] = uc(timeMid);
457
458 modifiableData()[ 6] = uc(timeHiAndVersion >> 8);
459 modifiableData()[ 7] = uc(timeHiAndVersion);
460
461 modifiableData()[ 8] = uc(clockSeqHiRes);
462
463 modifiableData()[ 9] = uc(clockSeqLow);
464
465 modifiableData()[10] = uc(node >> 40);
466 modifiableData()[11] = uc(node >> 32);
467 modifiableData()[12] = uc(node >> 24);
468 modifiableData()[13] = uc(node >> 16);
469 modifiableData()[14] = uc(node >> 8);
470 modifiableData()[15] = uc(node);
471}
472
473// PRIVATE MANIPULATORS
474inline
475unsigned char *Guid::modifiableData()
476{
477 return reinterpret_cast<unsigned char *>(d_alignedBuffer.buffer());
478}
479
480// MANIPULATORS
481inline
482Guid& Guid::operator=(const unsigned char (&buffer)[k_GUID_NUM_BYTES])
483{
484 BSLMF_ASSERT(sizeof(d_alignedBuffer) >= k_GUID_NUM_BYTES);
485
486 memcpy(modifiableData(), buffer, k_GUID_NUM_BYTES);
487 return *this;
488}
489
490inline
491Guid& Guid::operator=(const bsl::uint32_t (&buffer)[k_GUID_NUM_32BITS])
492{
493 BSLMF_ASSERT(sizeof(d_alignedBuffer) >= sizeof(uint32_t) *
495
496 memcpy(modifiableData(), buffer, k_GUID_NUM_BYTES);
497 return *this;
498}
499
500// ACCESSORS
501inline
502const unsigned char& Guid::operator[](bsl::size_t offset) const
503{
505 return data()[offset];
506}
507
508inline
509const unsigned char *Guid::begin() const
510{
511 return data();
512}
513
514inline
515const unsigned char *Guid::data() const
516{
517 return reinterpret_cast<const unsigned char *>(d_alignedBuffer.buffer());
518}
519
520inline
521const unsigned char *Guid::end() const
522{
523 return data() + k_GUID_NUM_BYTES;
524}
525
526 // RFC 4122 FIELD ACCESSORS
527
528inline
529unsigned char Guid::clockSeqHi() const
530{
531 return clockSeqHiRes() & 0x1F;
532}
533
534inline
535unsigned char Guid::clockSeqHiRes() const
536{
537 return data()[8];
538}
539
540inline
541unsigned char Guid::clockSeqLow() const
542{
543 return data()[9];
544}
545
546inline
548{
549 return bsls::Types::Uint64(data()[10]) << 40 |
550 bsls::Types::Uint64(data()[11]) << 32 |
551 bsls::Types::Uint64(data()[12]) << 24 |
552 bsls::Types::Uint64(data()[13]) << 16 |
553 bsls::Types::Uint64(data()[14]) << 8 |
554 data()[15];
555}
556
557inline
558unsigned short Guid::timeHi() const
559{
560 return timeHiAndVersion() & 0x0FFF;
561}
562
563inline
564unsigned short Guid::timeHiAndVersion() const
565{
566 typedef unsigned short us;
567 return us(data()[6] << 8 |
568 data()[7]);
569}
570
571inline
572unsigned long Guid::timeLow() const {
573 typedef unsigned long ul;
574 return ul(data()[0]) << 24 |
575 data()[1] << 16 |
576 data()[2] << 8 |
577 data()[3];
578}
579
580inline
581unsigned short Guid::timeMid() const {
582 typedef unsigned short us;
583 return us(data()[4] << 8 |
584 data()[5]);
585}
586
587inline
588unsigned char Guid::variant() const {
589 typedef unsigned char uc;
590 return uc(clockSeqHiRes() >> 5);
591}
592
593inline
594unsigned char Guid::version() const {
595 typedef unsigned char uc;
596 return uc(timeHiAndVersion() >> 12);
597}
598
599} // close package namespace
600
601// FREE OPERATORS
602inline
603bsl::ostream& bdlb::operator<<(bsl::ostream& stream, const bdlb::Guid& guid)
604{
605 return guid.print(stream, 0, -1);
606}
607
608inline
609bool bdlb::operator==(const bdlb::Guid& lhs, const bdlb::Guid& rhs)
610{
611 return bsl::equal(
612 lhs.data(), lhs.data() + lhs.k_GUID_NUM_BYTES, rhs.data());
613}
614
615inline
616bool bdlb::operator!=(const bdlb::Guid& lhs, const bdlb::Guid& rhs)
617{
618 return !bsl::equal(
619 lhs.data(), lhs.data() + lhs.k_GUID_NUM_BYTES, rhs.data());
620}
621
622template <class HASH_ALGORITHM>
623void bdlb::hashAppend(HASH_ALGORITHM& hashAlgorithm, const Guid& guid)
624{
625 hashAlgorithm(guid.data(), Guid::k_GUID_NUM_BYTES);
626}
627
628
629
630#endif
631
632// ----------------------------------------------------------------------------
633// Copyright 2015 Bloomberg Finance L.P.
634//
635// Licensed under the Apache License, Version 2.0 (the "License");
636// you may not use this file except in compliance with the License.
637// You may obtain a copy of the License at
638//
639// http://www.apache.org/licenses/LICENSE-2.0
640//
641// Unless required by applicable law or agreed to in writing, software
642// distributed under the License is distributed on an "AS IS" BASIS,
643// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
644// See the License for the specific language governing permissions and
645// limitations under the License.
646// ----------------------------- END-OF-FILE ----------------------------------
647
648/** @} */
649/** @} */
650/** @} */
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
Definition bdlb_guid.h:201
const unsigned char * data() const
Definition bdlb_guid.h:515
unsigned short timeMid() const
Definition bdlb_guid.h:581
unsigned char clockSeqHiRes() const
Definition bdlb_guid.h:535
@ k_GUID_NUM_BYTES
Definition bdlb_guid.h:205
const unsigned char * begin() const
Definition bdlb_guid.h:509
Guid()
Definition bdlb_guid.h:426
@ k_GUID_NUM_32BITS
Definition bdlb_guid.h:206
void format(bsl::span< char, k_GUID_NUM_CHARS > buffer) const
Guid & operator=(const Guid &rhs)=default
unsigned short timeHiAndVersion() const
Definition bdlb_guid.h:564
friend bool operator!=(const Guid &lhs, const Guid &rhs)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
unsigned char clockSeqHi() const
Definition bdlb_guid.h:529
friend bool operator==(const Guid &lhs, const Guid &rhs)
unsigned char clockSeqLow() const
Definition bdlb_guid.h:541
unsigned char variant() const
Definition bdlb_guid.h:588
unsigned long timeLow() const
Definition bdlb_guid.h:572
Guid(const Guid &original)=default
unsigned char version() const
Definition bdlb_guid.h:594
const unsigned char & operator[](bsl::size_t offset) const
Definition bdlb_guid.h:502
const unsigned char * end() const
Definition bdlb_guid.h:521
bsls::Types::Uint64 node() const
Definition bdlb_guid.h:547
unsigned short timeHi() const
Definition bdlb_guid.h:558
~Guid()=default
Destroy this object.
@ k_GUID_NUM_CHARS
Definition bdlb_guid.h:207
Definition bslstl_span.h:334
Definition bsls_alignedbuffer.h:261
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlb_algorithmworkaroundutil.h:74
bool operator!=(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const BigEndianInt16 &integer)
bool operator>=(const Guid &lhs, const Guid &rhs)
void hashAppend(HASH_ALGORITHM &hashAlgorithm, const BigEndianInt16 &object)
bool operator<=(const Guid &lhs, const Guid &rhs)
bool operator==(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
Definition bslmf_istriviallycopyable.h:329
Definition bslmf_isbitwiseequalitycomparable.h:499
Definition bsls_alignmentfromtype.h:376
unsigned long long Uint64
Definition bsls_types.h:137