Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITK_UID_GENERATOR_INDCLUDED_FASAWE
18 #define MITK_UID_GENERATOR_INDCLUDED_FASAWE
19 
20 #include <MitkCoreExports.h>
21 #include <itkMersenneTwisterRandomVariateGenerator.h>
22 #include <string>
23 
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable : 4251)
27 #endif
28 
29 namespace mitk
30 {
45  {
46  public:
47  UIDGenerator(const char *prefix = "UID_", unsigned int lengthOfRandomPart = 8);
48 
50  std::string GetUID();
51 
52  private:
53  std::string m_Prefix;
54  unsigned int m_LengthOfRandomPart;
56  };
57 }
58 
59 #ifdef _MSC_VER
60 #pragma warning(pop)
61 #endif
62 
63 #endif
itk::SmartPointer< Self > Pointer
#define MITKCORE_EXPORT
Generated unique IDs.
DataCollection - Class to facilitate loading/accessing structured data.