|
enum | Variant {
VAR_UNKNOWN = -1,
VAR_NCS = 0,
VAR_RFC_4122 = 2,
VAR_MICROSOFT = 6,
VAR_RESERVED = 7
} |
|
enum | Version {
VER_UNKNOWN = -1,
VER_TIME = 1,
VER_DCE = 2,
VER_NAME_MD5 = 3,
VER_RANDOM = 4,
VER_NAME_SHA1 = 5
} |
|
typedef unsigned char * | iterator |
|
|
| Uuid ()=default |
| 32 Uuid + 4 dashes + 2 brackets + 1 terminate
|
|
| Uuid (const char *string, size_t stringLength=0) |
|
bool | IsNull () const |
|
Variant | GetVariant () const |
|
Version | GetVersion () const |
|
int | ToString (char *output, int outputSize, bool isBrackets=true, bool isDashes=true) const |
|
template<size_t SizeT> |
int | ToString (char(&output)[SizeT], bool isBrackets=true, bool isDashes=true) const |
|
template<class StringType > |
StringType | ToString (bool isBrackets=true, bool isDashes=true) const |
| The only requirements is that StringType can be constructed from char* and it can copied.
|
|
template<class StringType > |
void | ToString (StringType &result, bool isBrackets=true, bool isDashes=true) const |
| For inplace version we require resize, data and size members.
|
|
AZ_MATH_INLINE bool | operator== (const Uuid &rhs) const |
|
AZ_MATH_INLINE bool | operator!= (const Uuid &rhs) const |
|
bool | operator< (const Uuid &rhs) const |
|
bool | operator> (const Uuid &rhs) const |
|
bool | operator<= (const Uuid &rhs) const |
|
bool | operator>= (const Uuid &rhs) const |
|
Uuid | operator+ (const Uuid &rhs) const |
| Adding two UUID generates SHA1 Uuid based on the data of both uuids.
|
|
AZ_MATH_INLINE Uuid & | operator+= (const Uuid &rhs) |
|
AZ_MATH_INLINE iterator | begin () |
|
AZ_MATH_INLINE iterator | end () |
|
AZ_MATH_INLINE const_iterator | begin () const |
|
AZ_MATH_INLINE const_iterator | end () const |
|
size_t | GetHash () const |
|
|
static Uuid | CreateNull () |
|
static Uuid | Create () |
| Create a Uuid (VAR_RFC_4122,VER_RANDOM)
|
|
static Uuid | CreateString (const char *string, size_t stringLength=0) |
|
static Uuid | CreateStringSkipWarnings (const char *string, size_t stringLength, bool skipWarnings) |
|
static Uuid | CreateStringPermissive (const char *string, size_t stringLength=0, bool skipWarnings=true) |
|
static Uuid | CreateRandom () |
|
static Uuid | CreateName (const char *name) |
| Create a UUID based on a string name (sha1)
|
|
static Uuid | CreateData (const void *data, size_t dataSize) |
| Create a UUID based on a byte stream (sha1)
|
|
|
const typedef unsigned char * | const_iterator |
|
unsigned char | data [16] |
|
|
static constexpr int | ValidUuidStringLength = 32 |
|
static const size_t | MaxStringBuffer = 39 |
| Number of characters (data only, no extra formatting) in a valid UUID string.
|
|
◆ CreateString()
static Uuid AZ::Uuid::CreateString |
( |
const char * |
string, |
|
|
size_t |
stringLength = 0 |
|
) |
| |
|
static |
This function accepts the following formats, if format is invalid it returns a NULL UUID. 0123456789abcdef0123456789abcdef 01234567-89ab-cdef-0123-456789abcdef {01234567-89ab-cdef-0123-456789abcdef} {0123456789abcdef0123456789abcdef}
- Parameters
-
string | pointer to a string buffer |
stringLength | if zero 'string' pointer must be null terminated so we can compute it's length, otherwise you can provide the length of the buffer. |
◆ ToString() [1/2]
int AZ::Uuid::ToString |
( |
char * |
output, |
|
|
int |
outputSize, |
|
|
bool |
isBrackets = true , |
|
|
bool |
isDashes = true |
|
) |
| const |
Outputs to a string in one of the following formats 0123456789abcdef0123456789abcdef 01234567-89ab-cdef-0123-456789abcdef {01234567-89ab-cdef-0123-456789abcdef} {0123456789abcdef0123456789abcdef}
- Returns
- if positive number of characters written to the buffer (including terminate) if negative the the number of characters required for output (nothing is writen to the output), including terminating character.
◆ ToString() [2/2]
template<size_t SizeT>
int AZ::Uuid::ToString |
( |
char(&) |
output[SizeT], |
|
|
bool |
isBrackets = true , |
|
|
bool |
isDashes = true |
|
) |
| const |
|
inline |
Outputs to a string in one of the following formats 0123456789abcdef0123456789abcdef 01234567-89ab-cdef-0123-456789abcdef {01234567-89ab-cdef-0123-456789abcdef} {0123456789abcdef0123456789abcdef}
- Returns
- if positive number of characters written to the buffer (including terminate) if negative the the number of characters required for output (nothing is writen to the output), including terminating character.
The documentation for this struct was generated from the following file:
- Code/Framework/AzCore/AzCore/Math/Uuid.h