13 #ifndef mitkSmartPointerProperty_h
14 #define mitkSmartPointerProperty_h
43 itkFactorylessNewMacro(Self);
133 using BaseProperty::operator=;
150 typedef std::map<itk::Object *, unsigned int> ReferenceCountMapType;
151 typedef std::map<itk::Object *, std::string> ReferencesUIDMapType;
152 typedef std::map<SmartPointerProperty *, std::string> ReadInSmartPointersMapType;
153 typedef std::map<std::string, itk::Object *> ReadInTargetsMapType;
156 static ReferenceCountMapType m_ReferenceCount;
157 static ReferencesUIDMapType m_ReferencesUID;
158 static ReadInSmartPointersMapType m_ReadInInstances;
159 static ReadInTargetsMapType m_ReadInTargets;
Abstract base class for properties.
Property containing a smart pointer to an itk::Object.
itk::Object::Pointer m_SmartPointer
static std::string GetReferenceUIDFor(itk::Object *)
Get the reference UID for the given object.
itk::Object::Pointer GetSmartPointer() const
Get the stored smart pointer.
bool FromJSON(const nlohmann::json &j) override
JSON deserialization is not supported for SmartPointerProperty.
std::string GetValueAsString() const override
Return the UID of the pointed-to object as a string.
SmartPointerProperty(const SmartPointerProperty &)
SmartPointerProperty(itk::Object *=nullptr)
bool ToJSON(nlohmann::json &j) const override
JSON serialization is not supported for SmartPointerProperty.
void SetSmartPointer(itk::Object *)
Set the stored smart pointer.
ValueType GetValue() const
Get the stored smart pointer (alias for GetSmartPointer()).
mitkCloneMacro(SmartPointerProperty)
mitkClassMacro(SmartPointerProperty, BaseProperty)
static void RegisterPointerTarget(itk::Object *, const std::string uid)
Register an object as a potential target for XML deserialization.
void SetValue(const ValueType &)
Set the stored smart pointer (alias for SetSmartPointer()).
static unsigned int GetReferenceCountFor(itk::Object *)
Get the number of SmartPointerProperties referencing the given object.
static void PostProcessXMLReading()
Resolve all smart pointer references after XML deserialization.
mitkNewMacro1Param(SmartPointerProperty, itk::Object *)
itk::Object::Pointer ValueType
The type of the value stored by this property.
Generates unique identifier strings.
Find image slices visible on a given plane.