Medical Imaging Interaction Toolkit  2018.4.99-65942676
Medical Imaging Interaction Toolkit
mitk::VectorProperty< DATATYPE > Class Template Reference

Providing a std::vector as property. More...

#include <mitkVectorProperty.h>

Inheritance diagram for mitk::VectorProperty< DATATYPE >:
Collaboration diagram for mitk::VectorProperty< DATATYPE >:

Public Types

typedef std::vector< DATATYPE > VectorType
 
typedef VectorProperty< DATATYPE > Self
 
typedef BaseProperty SuperClass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::BaseProperty
typedef BaseProperty Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

std::vector< std::string > GetClassHierarchy () const override
 
const char * GetNameOfClass () const override
 
Pointer Clone () const
 
std::string GetValueAsString () const override
 
virtual const VectorTypeGetValue () const
 returns a const reference to the contained vector More...
 
virtual void SetValue (const VectorType &parameter_vector)
 sets the content vector More...
 
- Public Member Functions inherited from mitk::BaseProperty
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...
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseProperty
static const char * GetStaticNameOfClass ()
 

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...
 
- Protected Member Functions inherited from mitk::BaseProperty
 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Detailed Description

template<typename DATATYPE>
class mitk::VectorProperty< DATATYPE >

Providing a std::vector as property.

Templated over the data type of the std::vector that is held by this class. Nothing special about data handling, setting and getting of std::vectors is implemented by-value.

When checking the declaration of this class, you'll notice that it does not use the mitkClassMacro but instead writes all of its definition manually. This is in order to specifically override the GetNameOfClass() method without having to inherit again from the template (see comments in code).

Definition at line 52 of file mitkVectorProperty.h.

Member Typedef Documentation

◆ ConstPointer

template<typename DATATYPE >
typedef itk::SmartPointer<const Self> mitk::VectorProperty< DATATYPE >::ConstPointer

Definition at line 64 of file mitkVectorProperty.h.

◆ Pointer

template<typename DATATYPE >
typedef itk::SmartPointer<Self> mitk::VectorProperty< DATATYPE >::Pointer

Definition at line 63 of file mitkVectorProperty.h.

◆ Self

template<typename DATATYPE >
typedef VectorProperty<DATATYPE> mitk::VectorProperty< DATATYPE >::Self

Definition at line 61 of file mitkVectorProperty.h.

◆ SuperClass

template<typename DATATYPE >
typedef BaseProperty mitk::VectorProperty< DATATYPE >::SuperClass

Definition at line 62 of file mitkVectorProperty.h.

◆ VectorType

template<typename DATATYPE >
typedef std::vector<DATATYPE> mitk::VectorProperty< DATATYPE >::VectorType

Definition at line 55 of file mitkVectorProperty.h.

Member Function Documentation

◆ Clone()

template<typename DATATYPE >
Pointer mitk::VectorProperty< DATATYPE >::Clone ( ) const

◆ GetClassHierarchy()

template<typename DATATYPE >
std::vector<std::string> mitk::VectorProperty< DATATYPE >::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::BaseProperty.

Definition at line 65 of file mitkVectorProperty.h.

◆ GetNameOfClass()

template<typename DATATYPE >
const char* mitk::VectorProperty< DATATYPE >::GetNameOfClass ( ) const
inlineoverride

Definition at line 76 of file mitkVectorProperty.h.

◆ GetStaticNameOfClass()

template<typename DATATYPE >
static const char* mitk::VectorProperty< DATATYPE >::GetStaticNameOfClass ( )
inlinestatic

This function must return different strings in function of the template parameter! Serialization depends on this feature.

Definition at line 69 of file mitkVectorProperty.h.

◆ GetValue()

template<typename DATATYPE >
virtual const VectorType& mitk::VectorProperty< DATATYPE >::GetValue ( ) const
virtual

returns a const reference to the contained vector

◆ GetValueAsString()

template<typename DATATYPE >
std::string mitk::VectorProperty< DATATYPE >::GetValueAsString ( ) const
overridevirtual

Returns the property value as a std::string.

Since VectorProperty potentially holds many elements, it implements this function in a way that only the first and the last couple of elements really appear in the string. Missing central elements are indicated by an ellipsis ("...")

Reimplemented from mitk::BaseProperty.

◆ New()

template<typename DATATYPE >
static Pointer mitk::VectorProperty< DATATYPE >::New ( )
static

◆ SetValue()

template<typename DATATYPE >
virtual void mitk::VectorProperty< DATATYPE >::SetValue ( const VectorType parameter_vector)
virtual

sets the content vector


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