|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Generates unique identifier strings. More...
#include <mitkUIDGenerator.h>
Public Member Functions | |
| UIDGenerator (const char *prefix="") | |
| Construct a UID generator with an optional prefix. More... | |
| std::string | GetUID () |
| Generate and return a new unique ID string. More... | |
Generates unique identifier strings.
Produces unique IDs based on the UUID specification (RFC 4122) using a random generator. The generator is thread-safe.
An optional prefix can be specified for human-readable context (e.g. to indicate the purpose of the UID), but it is not required for uniqueness.
Definition at line 33 of file mitkUIDGenerator.h.
|
explicit |
Construct a UID generator with an optional prefix.
| [in] | prefix | A string prepended to every generated UID. May be empty. |
| std::string mitk::UIDGenerator::GetUID | ( | ) |
Generate and return a new unique ID string.
Each call produces a different unique ID. The format is the optional prefix followed by a random UUID.