Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Lumiera unique object identifier.
Lumiera unique identifiers are 128 byte random values. Unlike standard uuid's we don't tag a version within them and we may store generic pointers within the storage space occupied by an LUID.
Due to the extremely huge number space, LUID values can be used as unique identifiers without the need to check for duplicates or collisions. At various places, LUIDs are thus used right away on creation of new object instances or elements, in case a distinguishable object identity is required, e.g.
Moreover, there is a Luidgen tool to generate fixed LUIDs to be included into source code. It works by replacing the token LUIDGEN
in the source code text by a newly generated (random) LUID in octal representation.
LUIDs can also be used to generate hash values for hash table storage.
Definition in file luid.h.
Macros | |
#define | LUIDGEN PLEASE_RUN_THE_LUIDGEN_TOOL_ON_THIS_FILE |
LUIDGEN will be replaced by the 'luidgen' tool with a random uuid. | |
#define | LUMIERA_UID_CHAR(l, n) ((unsigned char*)l)[n] |
#define | LUMIERA_UID_ELEMENTS(l) |
#define | LUMIERA_UID_FMT |
#define | LUMIERA_UID_INITIALIZER(l) |
Functions | |
void | lumiera_uid_copy (lumiera_uid *dest, lumiera_uid *src) |
Copy an luid. | |
int | lumiera_uid_eq (const lumiera_uid *luida, const lumiera_uid *luidb) |
Test 2 luid's for equality. | |
void | lumiera_uid_gen (lumiera_uid *luid) |
Generate a new luid. | |
size_t | lumiera_uid_hash (const lumiera_uid *luid) |
Generate a hash sum over an luid. | |
void * | lumiera_uid_ptr_get (const lumiera_uid *luid) |
Retrieve a generic pointer stored in a luid. | |
void | lumiera_uid_set_ptr (lumiera_uid *luid, void *ptr) |
Store a generic pointer in a luid. | |
#define LUMIERA_UID_INITIALIZER | ( | l | ) |
#define LUMIERA_UID_FMT |
#define LUMIERA_UID_ELEMENTS | ( | l | ) |