Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::PropertyPersistence Class Reference

#include <mitkPropertyPersistence.h>

Inheritance diagram for mitk::PropertyPersistence:
Collaboration diagram for mitk::PropertyPersistence:

Public Types

typedef IPropertyPersistence::InfoResultType InfoResultType
 
- Public Types inherited from mitk::IPropertyPersistence
using InfoResultType = std::list< PropertyPersistenceInfo::ConstPointer >
 
using MimeTypeNameType = PropertyPersistenceInfo::MimeTypeNameType
 

Public Member Functions

 PropertyPersistence ()
 
 ~PropertyPersistence () override
 
bool AddInfo (const PropertyPersistenceInfo *info, bool overwrite) override
 Add persistence info for a specific base data property. If there is already a property info instance for the passed property name and the same info, it won't be added. Info instances are regarded equal, if the mime types are equal. You may enforce to overwrite the old equal info for a property name by the overwrite parameter. More...
 
InfoResultType GetInfo (const std::string &propertyName, bool allowNameRegEx) const override
 Get the persistence info for a specific base data property. More...
 
InfoResultType GetInfo (const std::string &propertyName, const MimeTypeNameType &mime, bool allowMimeWildCard, bool allowNameRegEx) const override
 Get the persistence info for a specific base data property and mime type. More...
 
InfoResultType GetInfoByKey (const std::string &persistenceKey, bool allowKeyRegEx) const override
 Get the persistence info that will use the specified key. More...
 
bool HasInfo (const std::string &propertyName, bool allowNameRegEx) const override
 Check if a specific base data property has persistence info. More...
 
void RemoveAllInfo () override
 Remove all persistence info. More...
 
void RemoveInfo (const std::string &propertyName) override
 Remove persistence info instances of a specific property name/regex. More...
 
void RemoveInfo (const std::string &propertyName, const MimeTypeNameType &mime) override
 Remove persistence info instances of a specific property name/regex and mime type. More...
 
- Public Member Functions inherited from mitk::IPropertyPersistence
virtual ~IPropertyPersistence ()
 

Detailed Description

Definition at line 21 of file mitkPropertyPersistence.h.

Member Typedef Documentation

◆ InfoResultType

Constructor & Destructor Documentation

◆ PropertyPersistence()

mitk::PropertyPersistence::PropertyPersistence ( )

◆ ~PropertyPersistence()

mitk::PropertyPersistence::~PropertyPersistence ( )
override

Member Function Documentation

◆ AddInfo()

bool mitk::PropertyPersistence::AddInfo ( const PropertyPersistenceInfo info,
bool  overwrite 
)
overridevirtual

Add persistence info for a specific base data property. If there is already a property info instance for the passed property name and the same info, it won't be added. Info instances are regarded equal, if the mime types are equal. You may enforce to overwrite the old equal info for a property name by the overwrite parameter.

Parameters
[in]infoPersistence info of the property.
[in]overwriteOverwrite already existing persistence info.
Returns
True if persistence info was added successfully.

Implements mitk::IPropertyPersistence.

◆ GetInfo() [1/2]

InfoResultType mitk::PropertyPersistence::GetInfo ( const std::string &  propertyName,
bool  allowNameRegEx 
) const
overridevirtual

Get the persistence info for a specific base data property.

Parameters
[in]propertyNameName of the property.
[in]allowNameRegExIndicates if also added info instances with regexs are being checked.
Returns
Property persistence info or null pointer if no persistence info is available.

Implements mitk::IPropertyPersistence.

◆ GetInfo() [2/2]

InfoResultType mitk::PropertyPersistence::GetInfo ( const std::string &  propertyName,
const MimeTypeNameType mime,
bool  allowMimeWildCard,
bool  allowNameRegEx 
) const
overridevirtual

Get the persistence info for a specific base data property and mime type.

Parameters
[in]propertyNameName of the property.
[in]mimeName of the mime type the info is specified for.
[in]allowMimeWildCardIndicates if wildcard is allowed. If it is allowed, the method will first try to find the specified info. If no info was found but an info exists with the mime type name PropertyPersistenceInfo::ANY_MIMETYPE_NAME(), the later info will be returned as fall back option.
[in]allowNameRegExIndicates if also added info instances with regexs are being checked.
Returns
Property persistence info or null pointer if no persistence info is available.

Implements mitk::IPropertyPersistence.

◆ GetInfoByKey()

InfoResultType mitk::PropertyPersistence::GetInfoByKey ( const std::string &  persistenceKey,
bool  allowKeyRegEx 
) const
overridevirtual

Get the persistence info that will use the specified key.

Parameters
[in]persistenceKeyName of the property.
[in]allowKeyRegExIndicates if also added info instances with regexs for the key are being checked.
Returns
Property persistence info or null pointer if no persistence info is available.

Implements mitk::IPropertyPersistence.

◆ HasInfo()

bool mitk::PropertyPersistence::HasInfo ( const std::string &  propertyName,
bool  allowNameRegEx 
) const
overridevirtual

Check if a specific base data property has persistence info.

Parameters
[in]propertyNameName of the property.
[in]allowNameRegExIndicates if also added info instances with regexs are being checked.
Returns
True if the property has persistence info, false otherwise.

Implements mitk::IPropertyPersistence.

◆ RemoveAllInfo()

void mitk::PropertyPersistence::RemoveAllInfo ( )
overridevirtual

Remove all persistence info.

Implements mitk::IPropertyPersistence.

◆ RemoveInfo() [1/2]

void mitk::PropertyPersistence::RemoveInfo ( const std::string &  propertyName)
overridevirtual

Remove persistence info instances of a specific property name/regex.

Parameters
[in]propertyNameRegistered name or regex that should be removed.

Implements mitk::IPropertyPersistence.

◆ RemoveInfo() [2/2]

void mitk::PropertyPersistence::RemoveInfo ( const std::string &  propertyName,
const MimeTypeNameType mime 
)
overridevirtual

Remove persistence info instances of a specific property name/regex and mime type.

Parameters
[in]propertyNameRegistered name or regex that should be removed.
[in]mimeName of the mime type.

Implements mitk::IPropertyPersistence.


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