feature: add UUID type and related functions for UUID generation and conversion
This commit is contained in:
parent
27190311c0
commit
4917595535
1 changed files with 20 additions and 0 deletions
20
Source/DrangPlatform/Include/drang/uuid.h
Normal file
20
Source/DrangPlatform/Include/drang/uuid.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include "platform.h"
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
DRANG_BEGIN_DECLS
|
||||
|
||||
typedef struct drang_uuid
|
||||
{
|
||||
uint64_t high;
|
||||
uint64_t low;
|
||||
} drang_uuid_t;
|
||||
|
||||
|
||||
|
||||
DRANG_PLATFORM_API int drang_uuid_generate(drang_uuid_t* out_uuid);
|
||||
DRANG_PLATFORM_API int drang_uuid_to_string(const drang_uuid_t* uuid, char* out_str, size_t str_size);
|
||||
DRANG_PLATFORM_API int drang_uuid_from_string(const char* str, size_t str_size, drang_uuid_t* out_uuid);
|
||||
|
||||
DRANG_END_DECLS
|
||||
Loading…
Add table
Add a link
Reference in a new issue