Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Property persistence info. This class is used to specify the way the persistance of a property of BaseData derived instances is handled. The info specifies the key for property, as well as the mime type the info is defined for and should be used. Additionally the functions for deserialization and serialization of the property can be defined. As default. More...
#include <mitkPropertyPersistenceInfo.h>
Public Types | |
using | DeserializationFunctionType = std::function< mitk::BaseProperty::Pointer(const std::string &)> |
using | SerializationFunctionType = std::function< std::string(const mitk::BaseProperty *)> |
using | MimeTypeNameType = std::string |
typedef PropertyPersistenceInfo | Self |
typedef itk::LightObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
std::string | GetName () const |
std::string | GetKey () const |
void | SetName (const std::string &name) |
void | SetNameAndKey (const std::string &name, const std::string &key) |
bool | IsRegEx () const |
void | UseRegEx (const std::string &nameRegEx, const std::string &nameTemplate) |
void | UseRegEx (const std::string &nameRegEx, const std::string &nameTemplate, const std::string &keyRegEx, const std::string keyTemplate) |
const std::string & | GetKeyTemplate () const |
const std::string & | GetNameTemplate () const |
const MimeTypeNameType & | GetMimeTypeName () const |
void | SetMimeTypeName (const MimeTypeNameType &mimeTypeName) |
const DeserializationFunctionType | GetDeserializationFunction () const |
void | SetDeserializationFunction (const DeserializationFunctionType &fnc) |
const SerializationFunctionType | GetSerializationFunction () const |
void | SetSerializationFunction (const SerializationFunctionType &fnc) |
PropertyPersistenceInfo::Pointer | UnRegExByName (const std::string &propertyName) const |
PropertyPersistenceInfo::Pointer | UnRegExByKey (const std::string &key) const |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
static Pointer | New (const std::string &_arg) |
static Pointer | New (const std::string &_arga, const std::string &_argb) |
static MimeTypeNameType | ANY_MIMETYPE_NAME () |
Protected Member Functions | |
PropertyPersistenceInfo (const std::string &name="") | |
Constructor. More... | |
PropertyPersistenceInfo (const std::string &name, const std::string &mimeTypeName) | |
Constructor. More... | |
virtual | ~PropertyPersistenceInfo () |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Property persistence info. This class is used to specify the way the persistance of a property of BaseData derived instances is handled. The info specifies the key for property, as well as the mime type the info is defined for and should be used. Additionally the functions for deserialization and serialization of the property can be defined. As default.
Definition at line 36 of file mitkPropertyPersistenceInfo.h.
typedef itk::SmartPointer<const Self> mitk::PropertyPersistenceInfo::ConstPointer |
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::DeserializationFunctionType = std::function<mitk::BaseProperty::Pointer(const std::string &)> |
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::MimeTypeNameType = std::string |
Definition at line 41 of file mitkPropertyPersistenceInfo.h.
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::SerializationFunctionType = std::function<std::string(const mitk::BaseProperty *)> |
Definition at line 40 of file mitkPropertyPersistenceInfo.h.
typedef itk::LightObject mitk::PropertyPersistenceInfo::Superclass |
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
|
protected |
Constructor.
[in] | name | Name is the name of the property that described by the info. Key will be the same. |
Definition at line 54 of file mitkPropertyPersistenceInfo.cpp.
|
protected |
Constructor.
[in] | name | Name is the name of the property that described by the info. Key will be the same. |
[in] | mimeTypeName | mime type the info is defined for. |
Definition at line 60 of file mitkPropertyPersistenceInfo.cpp.
|
protectedvirtual |
Definition at line 68 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
|
static |
This mime type name indicates that a info can be used for any mime type as long as another info with a more specific mime type is not available.
Definition at line 229 of file mitkPropertyPersistenceInfo.cpp.
References mitk::IOMimeTypes::DEFAULT_BASE_NAME().
Referenced by mitk::PropertyPersistence::GetInfo(), and mitk::ItkImageIO::Read().
Pointer mitk::PropertyPersistenceInfo::Clone | ( | ) | const |
|
inlinevirtual |
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
|
virtual |
const mitk::PropertyPersistenceInfo::DeserializationFunctionType mitk::PropertyPersistenceInfo::GetDeserializationFunction | ( | ) | const |
Definition at line 151 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
std::string mitk::PropertyPersistenceInfo::GetKey | ( | ) | const |
Definition at line 78 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
const std::string & mitk::PropertyPersistenceInfo::GetKeyTemplate | ( | ) | const |
Definition at line 130 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
const mitk::PropertyPersistenceInfo::MimeTypeNameType & mitk::PropertyPersistenceInfo::GetMimeTypeName | ( | ) | const |
Definition at line 140 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
Referenced by mitk::PropertyPersistence::AddInfo().
std::string mitk::PropertyPersistenceInfo::GetName | ( | ) | const |
Definition at line 73 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
Referenced by mitk::PropertyPersistence::AddInfo().
const std::string & mitk::PropertyPersistenceInfo::GetNameTemplate | ( | ) | const |
Definition at line 135 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
const mitk::PropertyPersistenceInfo::SerializationFunctionType mitk::PropertyPersistenceInfo::GetSerializationFunction | ( | ) | const |
Definition at line 162 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
|
inlinestatic |
Definition at line 43 of file mitkPropertyPersistenceInfo.h.
bool mitk::PropertyPersistenceInfo::IsRegEx | ( | ) | const |
Definition at line 125 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
|
static |
|
inlinestatic |
Definition at line 44 of file mitkPropertyPersistenceInfo.h.
|
inlinestatic |
Definition at line 45 of file mitkPropertyPersistenceInfo.h.
|
overrideprotectedvirtual |
Definition at line 235 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::SetDeserializationFunction | ( | const DeserializationFunctionType & | fnc | ) |
Definition at line 156 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::SetMimeTypeName | ( | const MimeTypeNameType & | mimeTypeName | ) |
Definition at line 145 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::SetName | ( | const std::string & | name | ) |
Definition at line 83 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::SetNameAndKey | ( | const std::string & | name, |
const std::string & | key | ||
) |
Definition at line 92 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::SetSerializationFunction | ( | const SerializationFunctionType & | fnc | ) |
Definition at line 168 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
mitk::PropertyPersistenceInfo::Pointer mitk::PropertyPersistenceInfo::UnRegExByKey | ( | const std::string & | key | ) | const |
Definition at line 215 of file mitkPropertyPersistenceInfo.cpp.
References GenerateFromTemplate(), mitk::m_Impl, and New().
mitk::PropertyPersistenceInfo::Pointer mitk::PropertyPersistenceInfo::UnRegExByName | ( | const std::string & | propertyName | ) | const |
Definition at line 200 of file mitkPropertyPersistenceInfo.cpp.
References GenerateFromTemplate(), GetName(), mitk::m_Impl, and New().
void mitk::PropertyPersistenceInfo::UseRegEx | ( | const std::string & | nameRegEx, |
const std::string & | nameTemplate | ||
) |
Sets the name and the key identifier as a regular expression that describes valid names and keys.
Definition at line 101 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.
void mitk::PropertyPersistenceInfo::UseRegEx | ( | const std::string & | nameRegEx, |
const std::string & | nameTemplate, | ||
const std::string & | keyRegEx, | ||
const std::string | keyTemplate | ||
) |
Definition at line 111 of file mitkPropertyPersistenceInfo.cpp.
References mitk::m_Impl.