Skip to content

Class endstone::UUID

ClassList > 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

std::uint8_t endstone::UUID::data[16];

Public Functions Documentation

function begin [½]

Returns an iterator to the first byte.

inline std::uint8_t * endstone::UUID::begin () noexcept

Returns:

Pointer to the first byte


function begin [2/2]

Returns an iterator to the first byte.

inline const  uint8_t * endstone::UUID::begin () noexcept const

Returns:

Pointer to the first byte


function end [½]

Returns an iterator past the last byte.

inline std::uint8_t * endstone::UUID::end () noexcept

Returns:

Pointer past the last byte


function end [2/2]

Returns an iterator past the last byte.

inline const  uint8_t * endstone::UUID::end () noexcept const

Returns:

Pointer past the last byte


function isNil

Checks whether this UUID is nil (all bytes are zero).

inline bool endstone::UUID::isNil () noexcept const

Returns:

true if every byte is zero, false otherwise


function str

Returns the canonical hyphenated string representation of this UUID .

inline std::string endstone::UUID::str () const

Returns:

The UUID formatted as a 36-character string


function swap

Swaps the contents of this UUID with another.

inline void endstone::UUID::swap (
    UUID & rhs
) noexcept

Parameters:

  • rhs The UUID to swap with

function version

Returns the version number encoded in this UUID .

inline int endstone::UUID::version () noexcept const

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 .

static inline constexpr std::size_t endstone::UUID::size () noexcept

Returns:

The size in bytes (always 16)



The documentation for this class was generated from the following file include/endstone/util/uuid.h