Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PropertyTransience Class Reference

Implementation of the IPropertyTransience service interface. More...

#include <mitkPropertyTransience.h>

Inheritance diagram for mitk::PropertyTransience:
Collaboration diagram for mitk::PropertyTransience:

Public Member Functions

 PropertyTransience ()
 
 ~PropertyTransience () override
 
 PropertyTransience (const PropertyTransience &)=delete
 
PropertyTransience & operator= (const PropertyTransience &)=delete
 
bool IsTransient (const BaseData *data, const std::string &propertyName) const override
 Check whether a property is transient for the given node data. More...
 
- Public Member Functions inherited from mitk::IPropertyTransience
virtual ~IPropertyTransience ()
 
template<class TData , typename = std::enable_if_t<std::is_base_of_v<BaseData, TData>>>
void AddTransient (const std::string &propertyName)
 Declare a property transient for nodes whose data is-a TData. More...
 

Protected Member Functions

void InternalAddTransient (const std::string &propertyName, std::function< bool(const BaseData *)> dataTypeMatcher) override
 Register a transient property with a data-type matcher. More...
 

Detailed Description

Implementation of the IPropertyTransience service interface.

Holds a list of (property name, data-type matcher) rules and reports a property as transient if any rule for that name matches the queried data.

See also
IPropertyTransience

Definition at line 30 of file mitkPropertyTransience.h.

Constructor & Destructor Documentation

◆ PropertyTransience() [1/2]

mitk::PropertyTransience::PropertyTransience ( )

◆ ~PropertyTransience()

mitk::PropertyTransience::~PropertyTransience ( )
override

◆ PropertyTransience() [2/2]

mitk::PropertyTransience::PropertyTransience ( const PropertyTransience &  )
delete

Member Function Documentation

◆ InternalAddTransient()

void mitk::PropertyTransience::InternalAddTransient ( const std::string &  propertyName,
std::function< bool(const BaseData *)>  dataTypeMatcher 
)
overrideprotectedvirtual

Register a transient property with a data-type matcher.

Called by the public AddTransient() template.

Parameters
[in]propertyNameName of the transient property.
[in]dataTypeMatcherPredicate returning true if the rule applies to the passed BaseData.

Implements mitk::IPropertyTransience.

◆ IsTransient()

bool mitk::PropertyTransience::IsTransient ( const BaseData *  data,
const std::string &  propertyName 
) const
overridevirtual

Check whether a property is transient for the given node data.

Parameters
[in]dataThe node's BaseData. May be null (e.g. a data-less node); rules registered for mitk::BaseData still match, type-specific rules do not.
[in]propertyNameName of the property to check.
Returns
True if any registered rule for propertyName matches the data type.

Implements mitk::IPropertyTransience.

◆ operator=()

PropertyTransience& mitk::PropertyTransience::operator= ( const PropertyTransience &  )
delete

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