Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <mitkGenericProperty.h>
Public Types | |
typedef GenericProperty | Self |
typedef BaseProperty | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef T | ValueType |
Public Types inherited from mitk::BaseProperty | |
typedef BaseProperty | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual void | SetValue (T _arg) |
virtual T | GetValue () const |
std::string | GetValueAsString () const override |
bool | ToJSON (nlohmann::json &) const override |
Serialize property value(s) to JSON. More... | |
bool | FromJSON (const nlohmann::json &) override |
Deserialize property value(s) from JSON. More... | |
BaseProperty & | operator= (const BaseProperty &property) |
Assigns property to this BaseProperty instance. More... | |
Public Member Functions inherited from mitk::BaseProperty | |
Pointer | Clone () const |
bool | operator== (const BaseProperty &property) const |
Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More... | |
BaseProperty & | operator= (const BaseProperty &property) |
Assigns property to this BaseProperty instance. More... | |
bool | AssignProperty (const BaseProperty &property) |
Assigns property to this BaseProperty instance. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New (T _arg) |
Static Public Member Functions inherited from mitk::BaseProperty | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
GenericProperty () | |
GenericProperty (T x) | |
GenericProperty (const GenericProperty &other) | |
Protected Member Functions inherited from mitk::BaseProperty | |
BaseProperty () | |
BaseProperty (const BaseProperty &other) | |
~BaseProperty () override | |
Protected Attributes | |
T | m_Value |
Additional Inherited Members | |
Static Public Attributes inherited from mitk::BaseProperty | |
static const std::string | VALUE_CANNOT_BE_CONVERTED_TO_STRING |
Default return value if a property which can not be returned as string. More... | |
@ brief Template class for generating properties for int, float, bool, etc.
This class template can be instantiated for all classes/internal types that fulfills these requirements:
Note: you must use the macros mitkDeclareGenericProperty and mitkDefineGenericProperty to provide specializations for concrete types (e.g. BoolProperty). See mitkProperties.h for examples. If you don't use these macros, GetNameOfClass() will return "GenericProperty", which will mess up serialization for example.
Definition at line 46 of file mitkGenericProperty.h.
typedef itk::SmartPointer<const Self> mitk::GenericProperty< T >::ConstPointer |
Definition at line 49 of file mitkGenericProperty.h.
typedef itk::SmartPointer<Self> mitk::GenericProperty< T >::Pointer |
Definition at line 49 of file mitkGenericProperty.h.
typedef GenericProperty mitk::GenericProperty< T >::Self |
Definition at line 49 of file mitkGenericProperty.h.
typedef BaseProperty mitk::GenericProperty< T >::Superclass |
Definition at line 49 of file mitkGenericProperty.h.
typedef T mitk::GenericProperty< T >::ValueType |
Definition at line 51 of file mitkGenericProperty.h.
|
inlineprotected |
Definition at line 78 of file mitkGenericProperty.h.
|
inlineprotected |
Definition at line 79 of file mitkGenericProperty.h.
|
inlineprotected |
Definition at line 80 of file mitkGenericProperty.h.
Pointer mitk::GenericProperty< T >::Clone | ( | ) | const |
|
inlineoverridevirtual |
Deserialize property value(s) from JSON.
Rely on exceptions for error handling when implementing deserialization.
Implements mitk::BaseProperty.
Definition at line 70 of file mitkGenericProperty.h.
|
inlineoverridevirtual |
Reimplemented from mitk::BaseProperty.
Definition at line 49 of file mitkGenericProperty.h.
|
virtual |
Reimplemented from mitk::BaseProperty.
|
inlinestatic |
Definition at line 49 of file mitkGenericProperty.h.
|
virtual |
|
inlineoverridevirtual |
Reimplemented from mitk::BaseProperty.
Definition at line 58 of file mitkGenericProperty.h.
|
inlinestatic |
Definition at line 50 of file mitkGenericProperty.h.
BaseProperty& mitk::BaseProperty::operator= |
Assigns property to this BaseProperty instance.
Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling of polymorphic assignments. The assignment operator of the subclass should be disabled and the baseclass operator should be made visible using "using" statements.
|
virtual |
|
inlineoverridevirtual |
Serialize property value(s) to JSON.
Rely on exceptions for error handling when implementing serialization.
Implements mitk::BaseProperty.
Definition at line 65 of file mitkGenericProperty.h.
|
protected |
Definition at line 81 of file mitkGenericProperty.h.