|
pstore2
|
The uuid class is used to represent Universally Unique Identifiers (UUID) as defined by RFC 4122. More...
#include <uuid.hpp>
Public Member Functions | |
| uuid (std::string const &s) | |
| Converts a string following the convention defined by RFC4122 to a UUID. More... | |
| constexpr | uuid (container_type const &c) |
| A constructor used to construct a specific UUID from its binary value. | |
| iterator | begin () noexcept |
| const_iterator | begin () const noexcept |
| iterator | end () noexcept |
| const_iterator | end () const noexcept |
| container_type const & | array () const noexcept |
| auto | variant () const noexcept -> variant_type |
| auto | version () const noexcept -> version_type |
| bool | is_null () const noexcept |
| std::string | str () const |
| Yields a string representation of the UUID following the convention defined by RFC4122. | |
Static Public Member Functions | |
| static maybe< uuid > | from_string (std::string const &s) |
| Converts a string to a UUID following the convention defined by RFC4122. More... | |
Static Public Attributes | |
| static constexpr auto | elements = std::size_t{16} |
| static constexpr auto | string_length = elements * 2 + 4 |
| RFC4122 defines the UUID string representation which includes 16 two-digit hex numbers and 4 hyphens. More... | |
Friends | |
| bool | operator== (uuid const &lhs, uuid const &rhs) noexcept |
| bool | operator!= (uuid const &lhs, uuid const &rhs) noexcept |
| bool | operator< (uuid const &lhs, uuid const &rhs) noexcept |
| bool | operator<= (uuid const &lhs, uuid const &rhs) noexcept |
| bool | operator> (uuid const &lhs, uuid const &rhs) noexcept |
| bool | operator>= (uuid const &lhs, uuid const &rhs) noexcept |
The uuid class is used to represent Universally Unique Identifiers (UUID) as defined by RFC 4122.
Specifically, it will generate version 4 (random) UUIDs but can be used to record all versions and variants.
|
explicit |
Converts a string following the convention defined by RFC4122 to a UUID.
If the string is not valid an error is raised.
Converts a string to a UUID following the convention defined by RFC4122.
If the string is not valid, returns nothing<uuid>.
| s | A string to be converted to a UUID. |
s was valid according to the description in RFC4122. If the string was invalid, nothing<uuid>.
|
noexcept |
OCLINT (PH - bitwise operator is just fine)
OCLINT (PH - bitwise operator is just fine)
OCLINT (PH - bitwise operator is just fine)
OCLINT (PH - bitwise operator is just fine)
|
static |
RFC4122 defines the UUID string representation which includes 16 two-digit hex numbers and 4 hyphens.
1.8.13