Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::UIDGenerator Class Reference

Generated unique IDs. More...

#include <mitkUIDGenerator.h>

Public Member Functions

 UIDGenerator (const char *prefix="UID_", unsigned int lengthOfRandomPart=8)
 
std::string GetUID ()
 

Detailed Description

Generated unique IDs.

Creates (somehow most of the time) unique IDs from a given prefix, the current date/time and a random part.

The prefix is given to the constructor, together with the desired length of the random part (minimum 5 digits).

The current implementation uses the time in seconds in combination with an a random part. This should assure a unique ID on a very high probability. Still, there is a very small chance to get identical random numbers. A feature request for improved UID generation is handled in BUG 14333.

Definition at line 44 of file mitkUIDGenerator.h.

Constructor & Destructor Documentation

mitk::UIDGenerator::UIDGenerator ( const char *  prefix = "UID_",
unsigned int  lengthOfRandomPart = 8 
)

Definition at line 26 of file mitkUIDGenerator.cpp.

References MITK_ERROR.

Member Function Documentation


The documentation for this class was generated from the following files: