Medical Imaging Interaction Toolkit  2016.11.0
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

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetNameOfClass () const override
 
Pointer Clone () const
 
virtual 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)
 
virtual ~BaseProperty ()
 

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 56 of file mitkVectorProperty.h.

Member Typedef Documentation

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

Definition at line 68 of file mitkVectorProperty.h.

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

Definition at line 67 of file mitkVectorProperty.h.

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

Definition at line 65 of file mitkVectorProperty.h.

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

Definition at line 66 of file mitkVectorProperty.h.

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

Definition at line 59 of file mitkVectorProperty.h.

Member Function Documentation

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

Reimplemented from mitk::BaseProperty.

Definition at line 69 of file mitkVectorProperty.h.

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

Definition at line 80 of file mitkVectorProperty.h.

References mitk::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 73 of file mitkVectorProperty.h.

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

returns a const reference to the contained vector

Definition at line 83 of file mitkVectorProperty.cpp.

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.

Definition at line 42 of file mitkVectorProperty.cpp.

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

sets the content vector

Definition at line 77 of file mitkVectorProperty.cpp.


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