Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkIdentifiable.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 mitkIdentifiable_h
14 #define mitkIdentifiable_h
15 
16 #include <string>
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
46  {
47  public:
48  using UIDType = std::string;
49 
52 
57  explicit Identifiable(const UIDType &uid);
58 
60  Identifiable(const Identifiable &) = delete;
61 
63  Identifiable(Identifiable &&) noexcept;
64 
66  virtual ~Identifiable();
67 
69  Identifiable & operator =(const Identifiable &) = delete;
70 
76  Identifiable & operator =(Identifiable &&other) noexcept;
77 
82  virtual UIDType GetUID() const;
83 
98  UIDType GetRuntimeUID() const noexcept;
99 
100  protected:
101  virtual void SetUID(const UIDType& uid);
102 
103  private:
104  friend class UIDManipulator;
105 
106  struct Impl;
107  Impl *m_Impl;
108  };
109 }
110 
111 #endif
#define MITKCORE_EXPORT
Base class of identifiable objects.
std::string UIDType
Type alias for unique identifiers.
Identifiable(const UIDType &uid)
Construct with a pre-existing UID.
Identifiable()
Default constructor. Generates a new random UID.
Identifiable(Identifiable &&) noexcept
Move constructor. Transfers ownership of the UID.
Identifiable(const Identifiable &)=delete
Copy construction is deleted to prevent UID duplication.
Change the unique ID of an mitk::Identifiable.
Find image slices visible on a given plane.