Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Generated unique IDs. More...
#include <mitkUIDGenerator.h>
Public Member Functions | |
UIDGenerator (const char *prefix="UID_", unsigned int lengthOfRandomPart=8) | |
std::string | GetUID () |
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.
mitk::UIDGenerator::UIDGenerator | ( | const char * | prefix = "UID_" , |
unsigned int | lengthOfRandomPart = 8 |
||
) |
Definition at line 26 of file mitkUIDGenerator.cpp.
References MITK_ERROR.
std::string mitk::UIDGenerator::GetUID | ( | ) |
Definition at line 40 of file mitkUIDGenerator.cpp.
Referenced by mitk::SceneIO::CreateEmptyTempDirectory(), mitk::EnsureUID(), mitk::PersistenceService::GetPropertyList(), newGeneratorInstancesHeapTest(), newGeneratorInstancesTest(), mitk::IGTLDeviceSource::RegisterAsMicroservice(), mitk::NavigationDataSource::RegisterAsMicroservice(), mitk::IGTLMessageSource::RegisterAsMicroservice(), mitk::USCombinedModality::RegisterAsMicroservice(), mitk::USImageLoggingFilter::SaveImages(), mitk::SceneIO::SaveScene(), and severalGeneratorInstancesTest().