Medical Imaging Interaction Toolkit
2018.4.99-389bf124
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... | |
~PropertyPersistenceInfo () override | |
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 32 of file mitkPropertyPersistenceInfo.h.
typedef itk::SmartPointer<const Self> mitk::PropertyPersistenceInfo::ConstPointer |
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::DeserializationFunctionType = std::function<mitk::BaseProperty::Pointer(const std::string &)> |
Definition at line 35 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::MimeTypeNameType = std::string |
Definition at line 37 of file mitkPropertyPersistenceInfo.h.
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
using mitk::PropertyPersistenceInfo::SerializationFunctionType = std::function<std::string(const mitk::BaseProperty *)> |
Definition at line 36 of file mitkPropertyPersistenceInfo.h.
typedef itk::LightObject mitk::PropertyPersistenceInfo::Superclass |
Definition at line 39 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 50 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 56 of file mitkPropertyPersistenceInfo.cpp.
|
overrideprotected |
Definition at line 64 of file mitkPropertyPersistenceInfo.cpp.
|
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 225 of file mitkPropertyPersistenceInfo.cpp.
References mitk::IOMimeTypes::DEFAULT_BASE_NAME().
Referenced by mitk::PropertyPersistence::GetInfo(), mitk::ItkImageIO::Read(), and testDeserializeFunction().
Pointer mitk::PropertyPersistenceInfo::Clone | ( | ) | const |
|
inlinevirtual |
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
|
virtual |
const mitk::PropertyPersistenceInfo::DeserializationFunctionType mitk::PropertyPersistenceInfo::GetDeserializationFunction | ( | ) | const |
Definition at line 147 of file mitkPropertyPersistenceInfo.cpp.
std::string mitk::PropertyPersistenceInfo::GetKey | ( | ) | const |
Definition at line 74 of file mitkPropertyPersistenceInfo.cpp.
Referenced by UnRegExByKey().
const std::string & mitk::PropertyPersistenceInfo::GetKeyTemplate | ( | ) | const |
Definition at line 126 of file mitkPropertyPersistenceInfo.cpp.
Referenced by UnRegExByName().
const mitk::PropertyPersistenceInfo::MimeTypeNameType & mitk::PropertyPersistenceInfo::GetMimeTypeName | ( | ) | const |
Definition at line 136 of file mitkPropertyPersistenceInfo.cpp.
Referenced by mitk::PropertyPersistence::AddInfo().
std::string mitk::PropertyPersistenceInfo::GetName | ( | ) | const |
Definition at line 69 of file mitkPropertyPersistenceInfo.cpp.
Referenced by mitk::PropertyPersistence::AddInfo(), and UnRegExByName().
const std::string & mitk::PropertyPersistenceInfo::GetNameTemplate | ( | ) | const |
Definition at line 131 of file mitkPropertyPersistenceInfo.cpp.
Referenced by UnRegExByKey().
const mitk::PropertyPersistenceInfo::SerializationFunctionType mitk::PropertyPersistenceInfo::GetSerializationFunction | ( | ) | const |
Definition at line 158 of file mitkPropertyPersistenceInfo.cpp.
|
inlinestatic |
Definition at line 39 of file mitkPropertyPersistenceInfo.h.
bool mitk::PropertyPersistenceInfo::IsRegEx | ( | ) | const |
Definition at line 121 of file mitkPropertyPersistenceInfo.cpp.
Referenced by UnRegExByKey(), and UnRegExByName().
|
static |
Referenced by mitk::pa::InSilicoTissueVolume::AddDoubleProperty(), mitk::pa::InSilicoTissueVolume::AddIntProperty(), mitk::DICOMTagsOfInterestService::AddTagOfInterest(), main(), mitk::CustomTagParser::ParseDicomPropertyString(), mitk::ItkImageIO::Read(), testDeserializeFunction(), UnRegExByKey(), and UnRegExByName().
|
inlinestatic |
Definition at line 41 of file mitkPropertyPersistenceInfo.h.
|
inlinestatic |
Definition at line 42 of file mitkPropertyPersistenceInfo.h.
|
overrideprotected |
Definition at line 231 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::SetDeserializationFunction | ( | const DeserializationFunctionType & | fnc | ) |
Definition at line 152 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::SetMimeTypeName | ( | const MimeTypeNameType & | mimeTypeName | ) |
Definition at line 141 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::SetName | ( | const std::string & | name | ) |
Definition at line 79 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::SetNameAndKey | ( | const std::string & | name, |
const std::string & | key | ||
) |
Definition at line 88 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::SetSerializationFunction | ( | const SerializationFunctionType & | fnc | ) |
Definition at line 164 of file mitkPropertyPersistenceInfo.cpp.
mitk::PropertyPersistenceInfo::Pointer mitk::PropertyPersistenceInfo::UnRegExByKey | ( | const std::string & | key | ) | const |
Definition at line 211 of file mitkPropertyPersistenceInfo.cpp.
References GenerateFromTemplate(), GetKey(), GetNameTemplate(), IsRegEx(), and New().
mitk::PropertyPersistenceInfo::Pointer mitk::PropertyPersistenceInfo::UnRegExByName | ( | const std::string & | propertyName | ) | const |
Definition at line 196 of file mitkPropertyPersistenceInfo.cpp.
References GenerateFromTemplate(), GetKeyTemplate(), GetName(), IsRegEx(), 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 97 of file mitkPropertyPersistenceInfo.cpp.
void mitk::PropertyPersistenceInfo::UseRegEx | ( | const std::string & | nameRegEx, |
const std::string & | nameTemplate, | ||
const std::string & | keyRegEx, | ||
const std::string | keyTemplate | ||
) |
Definition at line 107 of file mitkPropertyPersistenceInfo.cpp.