Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkUIDGenerator.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITK_UID_GENERATOR_INDCLUDED_FASAWE
14 #define MITK_UID_GENERATOR_INDCLUDED_FASAWE
15 
16 #include <MitkCoreExports.h>
17 #include <iostream>
18 #include <random>
19 #include <string>
20 
21 namespace mitk
22 {
35  {
36  public:
37  UIDGenerator(const char *prefix = "UID_", unsigned int lengthOfRandomPart = 8);
38 
40  std::string GetUID();
41 
42  private:
43  std::string m_Prefix;
44  unsigned int m_LengthOfRandomPart;
45  std::uniform_int_distribution<unsigned long int> m_Distribution;
46  };
47 } // namespace mitk
48 
49 #endif
#define MITKCORE_EXPORT
Generated unique IDs.
DataCollection - Class to facilitate loading/accessing structured data.