Class endstone::UUID¶
Implementation of Universally Unique Identifier (UUID ).More...
#include <endstone/util/uuid.h>
Public Attributes¶
| Type | Name |
|---|---|
| std::uint8_t | data = {0} |
Public Functions¶
| Type | Name |
|---|---|
| std::uint8_t * | begin () noexcept Returns an iterator to the first byte. |
| const uint8_t * | begin () noexcept const Returns an iterator to the first byte. |
| std::uint8_t * | end () noexcept Returns an iterator past the last byte. |
| const uint8_t * | end () noexcept const Returns an iterator past the last byte. |
| bool | isNil () noexcept const Checks whether this UUID is nil (all bytes are zero). |
| std::string | str () const Returns the canonical hyphenated string representation of this UUID . |
| void | swap (UUID & rhs) noexcept Swaps the contents of this UUID with another. |
| int | version () noexcept const Returns the version number encoded in this UUID . |
Public Static Functions¶
| Type | Name |
|---|---|
| constexpr std::size_t | size () noexcept Returns the number of bytes in a UUID . |
Detailed Description¶
Adapted from https://github.com/boostorg/uuid/blob/develop/include/boost/uuid/uuid.hpp
Public Attributes Documentation¶
variable data¶
Public Functions Documentation¶
function begin [½]¶
Returns an iterator to the first byte.
Returns:
Pointer to the first byte
function begin [2/2]¶
Returns an iterator to the first byte.
Returns:
Pointer to the first byte
function end [½]¶
Returns an iterator past the last byte.
Returns:
Pointer past the last byte
function end [2/2]¶
Returns an iterator past the last byte.
Returns:
Pointer past the last byte
function isNil¶
Checks whether this UUID is nil (all bytes are zero).
Returns:
true if every byte is zero, false otherwise
function str¶
Returns the canonical hyphenated string representation of this UUID .
Returns:
The UUID formatted as a 36-character string
function swap¶
Swaps the contents of this UUID with another.
Parameters:
rhsThe UUID to swap with
function version¶
Returns the version number encoded in this UUID .
Returns:
The UUID version (1-5), or -1 if it is not a recognized version
Public Static Functions Documentation¶
function size¶
Returns the number of bytes in a UUID .
Returns:
The size in bytes (always 16)
The documentation for this class was generated from the following file include/endstone/util/uuid.h