GATE
guids.h File Reference

GUID structure and generation. More...

#include "gate/gate_core_api.h"
#include "gate/gatetypes.h"

Classes

struct  gate_guid_class
 gate_guid_t structure More...
 

Typedefs

typedef struct gate_guid_class gate_guid_t
 gate_guid_t structure
 

Functions

GATE_CORE_API gate_result_t gate_guid_generate (gate_guid_t *guid)
 Generates a new globally unique identifier.
 
GATE_CORE_API gate_bool_t gate_guid_equals (gate_guid_t const *g1, gate_guid_t const *g2)
 Compares two GUIDs and returns true if they are equal.
 
GATE_CORE_API gate_result_t gate_guid_to_string (gate_guid_t const *srcguid, char dsttext[37])
 Fills a 37 character buffer with a string representation of the GUID.
 
GATE_CORE_API gate_result_t gate_guid_parse_string (char const *srctext, gate_size_t srctextlen, gate_guid_t *dstguid)
 Parses a text buffer content to build a GUID structure from it.
 

Detailed Description

GUID structure and generation.

Function Documentation

◆ gate_guid_equals()

GATE_CORE_API gate_bool_t gate_guid_equals ( gate_guid_t const * g1,
gate_guid_t const * g2 )

Compares two GUIDs and returns true if they are equal.

Parameters
[in]g1Pointer to first guid to be compared with second
[in]g2Pointer to second guid to be compared with first
Returns
true if g1 and g2 point to two equal GUID structures

◆ gate_guid_generate()

GATE_CORE_API gate_result_t gate_guid_generate ( gate_guid_t * guid)

Generates a new globally unique identifier.

Parameters
[out]guidpointer to GUID structure
Returns
result code

◆ gate_guid_parse_string()

GATE_CORE_API gate_result_t gate_guid_parse_string ( char const * srctext,
gate_size_t srctextlen,
gate_guid_t * dstguid )

Parses a text buffer content to build a GUID structure from it.

Parameters
[in]srctextPointer to text to be parsed
[in]srctextlenAmount of characters in srctext
[out]dstguidPointer to GUID that is set to parsed values
Returns
result code

◆ gate_guid_to_string()

GATE_CORE_API gate_result_t gate_guid_to_string ( gate_guid_t const * srcguid,
char dsttext[37] )

Fills a 37 character buffer with a string representation of the GUID.

Parameters
[in]srcguidPointer to GUID that is going to be printed
[out]dsttextbuffer to at least 37 characters to receive the GUID's string representation
Returns
result code