|
CeresEngine 0.2.0
A game development framework
|
Represents a universally unique identifier (UUID). More...
#include <CeresEngine/Foundation/UUID.hpp>
Public Member Functions | |
| constexpr | UUID ()=default |
| Initializes an empty UUID. | |
| constexpr | UUID (const UInt32 data1, const UInt32 data2, const UInt32 data3, const UInt32 data4) |
| Initializes an UUID using framework's UUID representation. | |
| UUID (StringView uuid) | |
| Initializes an UUID using its string representation. | |
| UUID (const char *uuid) | |
| Initializes an UUID using its string representation. | |
| constexpr bool | empty () const |
| Checks has the UUID been initialized to a valid value. | |
| String | toString () const |
| Converts the UUID into its string representation. | |
| void | toString (String &str) const |
| Converts the UUID into its string representation. | |
| void | copyTo (Byte *buffer) const |
| Copies the UUID into a buffer. | |
| void | copyFrom (const Byte *buffer) |
| Copies the UUID from a buffer. | |
Static Public Member Functions | |
| static UUID | random () |
| Generate a new random universally unique identifier. | |
| static UUID | withNamespace (const UUID &ns, StringView name) |
| Generate a new random universally unique identifier. | |
| static UUID | fromName (StringView name) |
| Generate a new UUID based on a name. | |
| template<typename Generator > | |
| static UUID | random (Generator generator) |
| Generate a new random universally unique identifier. | |
Public Attributes | |
| UInt32 | raw [4] = {0, 0, 0, 0} |
| The UUID raw representation. | |
Friends | |
| constexpr bool | operator== (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for equality. | |
| constexpr bool | operator!= (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for inequality. | |
| constexpr bool | operator< (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for ordering. | |
| constexpr bool | operator> (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for ordering. | |
| constexpr bool | operator<= (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for ordering. | |
| constexpr bool | operator>= (const UUID &lhs, const UUID &rhs) noexcept |
| Compares two UUID objects for ordering. | |
| String | toString (const UUID &uuid) |
| Converts the UUID into its string representation. | |
| std::ostream & | operator<< (std::ostream &os, const UUID &uuid) |
| Prints a string representation of a UUID into a standard output stream. | |
Represents a universally unique identifier (UUID).
A UUID is a 128-bit value that is unique across all devices and time.
|
explicit |
Initializes an UUID using its string representation.
Initializes an UUID using its string representation.
Copies the UUID from a buffer.
| buffer | The buffer to copy from |
Copies the UUID into a buffer.
| buffer | The buffer to copy to |
|
static |
Generate a new random universally unique identifier.
| String CeresEngine::UUID::toString | ( | ) | const |
Converts the UUID into its string representation.
| str | The string to output the representation to |
|
static |
Generate a new random universally unique identifier.
Compares two UUID objects for inequality.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if both UUIDs are not equal Compares two UUID objects for ordering.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if a is considered to come before b. Prints a string representation of a UUID into a standard output stream.
| os | The output stream |
| uuid | The uuid |
os Compares two UUID objects for ordering.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if a is considered to come before or is equal to b. Compares two UUID objects for equality.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if both UUIDs are equal Compares two UUID objects for ordering.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if a is considered to come after b. Compares two UUID objects for ordering.
| lhs | The left hand-side argument |
| rhs | The right hand-side argument |
true if a is considered to come after or is equal to b.