#include <mitkIPropertyOwner.h>
|
| ~IPropertyOwner () override |
|
virtual BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true)=0 |
| Get property by its key. More...
|
|
virtual void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0 |
| Add new or change existent property. More...
|
|
virtual void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0 |
| Removes a property. If the property does not exist, nothing will be done. More...
|
|
virtual | ~IPropertyProvider () |
|
virtual BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const =0 |
| Get property by its key. More...
|
|
virtual std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const =0 |
| Query keys of existing properties. More...
|
|
virtual std::vector< std::string > | GetPropertyContextNames () const =0 |
| Query names of existing contexts. More...
|
|
Interface implemented by classes that provide write/read access to property information.
Definition at line 22 of file mitkIPropertyOwner.h.
◆ ~IPropertyOwner()
mitk::IPropertyOwner::~IPropertyOwner |
( |
| ) |
|
|
override |
◆ GetNonConstProperty()
virtual BaseProperty* mitk::IPropertyOwner::GetNonConstProperty |
( |
const std::string & |
propertyKey, |
|
|
const std::string & |
contextName = "" , |
|
|
bool |
fallBackOnDefaultContext = true |
|
) |
| |
|
pure virtual |
Get property by its key.
- Parameters
-
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given context. |
- Returns
- Found property, nullptr otherwise.
Implemented in mitk::PropertyList, mitk::DataNode, and mitk::BaseData.
◆ RemoveProperty()
virtual void mitk::IPropertyOwner::RemoveProperty |
( |
const std::string & |
propertyKey, |
|
|
const std::string & |
contextName = "" , |
|
|
bool |
fallBackOnDefaultContext = false |
|
) |
| |
|
pure virtual |
Removes a property. If the property does not exist, nothing will be done.
- Parameters
-
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is removed. |
[in] | fallBackOnDefaultContext | Optional, default is false. Remove property in default context if given context does not exist. |
- Precondition
- If a context is specified by contextName, this context must be known by the owner or fallBackOnDefaultContext must be true. If violated an mitk::Exception is thrown.
-
propertyKey must be a none empty string. If violated an mitk::Exception is thrown.
Implemented in mitk::PropertyList, mitk::DataNode, and mitk::BaseData.
◆ SetProperty()
virtual void mitk::IPropertyOwner::SetProperty |
( |
const std::string & |
propertyKey, |
|
|
BaseProperty * |
property, |
|
|
const std::string & |
contextName = "" , |
|
|
bool |
fallBackOnDefaultContext = false |
|
) |
| |
|
pure virtual |
Add new or change existent property.
- Parameters
-
[in] | propertyKey | Key of property. |
[in] | property | The actual property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is set. |
[in] | fallBackOnDefaultContext | Optional, default is false. Set property in default context if given context does not exist. |
- Precondition
- If a context is specified by contextName, this context must be known by the owner or fallBackOnDefaultContext must be true. If violated an mitk::Exception is thrown.
-
propertyKey must be a none empty string. If violated an mitk::Exception is thrown.
Implemented in mitk::PropertyList, mitk::DataNode, mitk::Label, and mitk::BaseData.
The documentation for this class was generated from the following file: