A uuid contains the raw bytes for a UUID. More...
#include <zorba/util/uuid.h>
Public Types | |
| typedef const_pointer | const_iterator |
| typedef value_type const * | const_pointer |
| typedef value_type const & | const_reference |
| typedef std::ptrdiff_t | difference_type |
| typedef pointer | iterator |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef std::size_t | size_type |
| typedef unsigned char | value_type |
| enum | variant { ncs, rfc4122, microsoft, future } |
| enum | version { unknown, time_based = 0x10, dce_security = 0x20, name_based_md5 = 0x30, random_number_based = 0x40, name_based_sha1 = 0x50 } |
Public Member Functions | |
| iterator | begin () |
| Creates an iterator to the beginning of the data. More... | |
| const_iterator | begin () const |
| Creates a const_iterator to the beginning of the data. More... | |
| iterator | end () |
| Creates an iterator to one past the end of the data. More... | |
| const_iterator | end () const |
| Creates a const_iterator to one past the end of the data. More... | |
| variant | get_variant () const |
| Gets the variant of this UUID. More... | |
| version | get_version () const |
| Gets the version of this UUID. More... | |
| size_type | size () const |
| Gets the size of the UUID data. More... | |
| void | swap (uuid &that) |
| Swaps this UUID's data with that of another. More... | |
Static Public Member Functions | |
| static void | create (uuid *result) |
| Creates a UUID. More... | |
Public Attributes | |
| value_type | data [16] |
| The raw UUID data. More... | |
A uuid contains the raw bytes for a UUID.
Note that this is intentially a struct with no constructors, no destructor, and no user-defined assignment operators so that it remains a POD.
See also:
The UUID data is stored as an array of 16 8-bit bytes comprising the 128 bits that is a UUID. The data is intentionally not stored as shown in "Appendix A - Sample Implementation" of RFC 4122 (the struct with individial fields such as time_low, time_mid, etc.) since C++ does not guarantee that the struct fields will be laid out in memory as shown in section "4.1.2. Layout and Byte Order" due to possible padding.
| typedef value_type const* zorba::uuid::const_pointer |
| typedef value_type const& zorba::uuid::const_reference |
| typedef std::ptrdiff_t zorba::uuid::difference_type |
| typedef pointer zorba::uuid::iterator |
| typedef value_type* zorba::uuid::pointer |
| typedef value_type& zorba::uuid::reference |
| typedef std::size_t zorba::uuid::size_type |
| typedef unsigned char zorba::uuid::value_type |
| enum zorba::uuid::variant |
| enum zorba::uuid::version |
|
inline |
Creates an iterator to the beginning of the data.
Definition at line 92 of file uuid.h.
Referenced by zorba::operator<(), zorba::operator==(), and swap().
|
inline |
|
static |
Creates a UUID.
The variant and version of the UUID created is platform-dependent.
| result | A pointer to the result. |
|
inline |
Creates an iterator to one past the end of the data.
Definition at line 110 of file uuid.h.
Referenced by zorba::operator<(), and zorba::operator==().
|
inline |
| variant zorba::uuid::get_variant | ( | ) | const |
Gets the variant of this UUID.
| version zorba::uuid::get_version | ( | ) | const |
Gets the version of this UUID.
|
inline |
|
inline |
Swaps this UUID's data with that of another.
| that | The other UUID to swap data with. |
Definition at line 137 of file uuid.h.
References begin().
Referenced by zorba::swap().
| value_type zorba::uuid::data[16] |