Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::BaseProperty Class Referenceabstract

Abstract base class for properties. More...

#include <mitkBaseProperty.h>

Inheritance diagram for mitk::BaseProperty:
Collaboration diagram for mitk::BaseProperty:

Public Types

typedef BaseProperty Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
bool operator== (const BaseProperty &property) const
 Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More...
 
BasePropertyoperator= (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
bool AssignProperty (const BaseProperty &property)
 Assigns property to this BaseProperty instance. More...
 
virtual std::string GetValueAsString () const
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 

Static Public Attributes

static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
 Default return value if a property which can not be returned as string. More...
 

Protected Member Functions

 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Detailed Description

Abstract base class for properties.

Base class for properties. Properties are arbitrary additional information (to define a new type of information you have to define a subclass of BaseProperty) that can be added to a PropertyList. Concrete subclasses of BaseProperty should define Set-/Get-methods to assess the property value, which should be stored by value (not by reference). Subclasses must implement an operator==(const BaseProperty& property), which is used by PropertyList to check whether a property has been changed.

Definition at line 35 of file mitkBaseProperty.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 38 of file mitkBaseProperty.h.

◆ Pointer

◆ Self

Definition at line 38 of file mitkBaseProperty.h.

◆ Superclass

typedef itk::Object mitk::BaseProperty::Superclass

Definition at line 38 of file mitkBaseProperty.h.

Constructor & Destructor Documentation

◆ BaseProperty() [1/2]

mitk::BaseProperty::BaseProperty ( )
protected

◆ BaseProperty() [2/2]

mitk::BaseProperty::BaseProperty ( const BaseProperty other)
protected

◆ ~BaseProperty()

mitk::BaseProperty::~BaseProperty ( )
overrideprotected

Member Function Documentation

◆ AssignProperty()

bool mitk::BaseProperty::AssignProperty ( const BaseProperty property)

Assigns property to this BaseProperty instance.

This method is identical to the assignment operator, except for the return type. It allows to directly check if the assignment was successful.

◆ Clone()

Pointer mitk::BaseProperty::Clone ( ) const

◆ GetClassHierarchy()

◆ GetClassName()

◆ GetStaticNameOfClass()

static const char* mitk::BaseProperty::GetStaticNameOfClass ( )
inlinestatic

Definition at line 38 of file mitkBaseProperty.h.

◆ GetValueAsString()

◆ operator=()

BaseProperty& mitk::BaseProperty::operator= ( const BaseProperty property)

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.

◆ operator==()

bool mitk::BaseProperty::operator== ( const BaseProperty property) const

Subclasses must implement IsEqual(const BaseProperty&) to support comparison.

operator== which is used by PropertyList to check whether a property has been changed.

Member Data Documentation

◆ VALUE_CANNOT_BE_CONVERTED_TO_STRING

const std::string mitk::BaseProperty::VALUE_CANNOT_BE_CONVERTED_TO_STRING
static

Default return value if a property which can not be returned as string.

Definition at line 69 of file mitkBaseProperty.h.


The documentation for this class was generated from the following file: