![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Lumiera unique object identifier. More...
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 | LUMIERA_UID_INITIALIZER(l) |
| #define | LUMIERA_UID_FMT |
| #define | LUMIERA_UID_CHAR(l, n) ((unsigned char*)l)[n] |
| #define | LUMIERA_UID_ELEMENTS(l) |
| #define | LUIDGEN PLEASE_RUN_THE_LUIDGEN_TOOL_ON_THIS_FILE |
| LUIDGEN will be replaced by the 'luidgen' tool with a random uuid. | |
Functions | |
| void * | lumiera_uid_ptr_get (const lumiera_uid *luid) |
| Retrieve a generic pointer stored in a luid. | |
| void | lumiera_uid_gen (lumiera_uid *luid) |
| Generate a new luid. | |
| void | lumiera_uid_set_ptr (lumiera_uid *luid, void *ptr) |
| Store a generic pointer in a luid. | |
| 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. | |
| size_t | lumiera_uid_hash (const lumiera_uid *luid) |
| Generate a hash sum over an luid. | |
| #define LUMIERA_UID_INITIALIZER | ( | l | ) |
| #define LUMIERA_UID_FMT |
| #define LUMIERA_UID_ELEMENTS | ( | l | ) |
| #define LUIDGEN PLEASE_RUN_THE_LUIDGEN_TOOL_ON_THIS_FILE |
| void * lumiera_uid_ptr_get | ( | const lumiera_uid * | luid | ) |
| void lumiera_uid_gen | ( | lumiera_uid * | luid | ) |
Generate a new luid.
Definition at line 48 of file luid.c.
References NULL.
Referenced by LuidH::LuidH(), and main().
Here is the caller graph for this function:| void lumiera_uid_set_ptr | ( | lumiera_uid * | luid, |
| void * | ptr | ||
| ) |
Store a generic pointer in a luid.
Definition at line 33 of file luid.c.
Referenced by lib::idi::anonymous_namespace{entry-id.hpp}::buildHash(), and main().
Here is the caller graph for this function:| void lumiera_uid_copy | ( | lumiera_uid * | dest, |
| lumiera_uid * | src | ||
| ) |
Copy an luid.
Definition at line 90 of file luid.c.
Referenced by HashIndexed_test::checkLUID_passing(), and main().
Here is the caller graph for this function:| int lumiera_uid_eq | ( | const lumiera_uid * | luida, |
| const lumiera_uid * | luidb | ||
| ) |
Test 2 luid's for equality.
Definition at line 97 of file luid.c.
Referenced by lumiera_invokey_eq(), main(), and LuidH::operator==().
Here is the caller graph for this function:| size_t lumiera_uid_hash | ( | const lumiera_uid * | luid | ) |
Generate a hash sum over an luid.
Definition at line 103 of file luid.c.
Referenced by LuidH::LuidH(), and LuidH::operator HashVal().
Here is the caller graph for this function: