diff --git a/Modules/Core/include/mitkIPropertyOwner.h b/Modules/Core/include/mitkIPropertyOwner.h index c8963530b1..938f145767 100644 --- a/Modules/Core/include/mitkIPropertyOwner.h +++ b/Modules/Core/include/mitkIPropertyOwner.h @@ -1,59 +1,59 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef mitkIPropertyOwner_h #define mitkIPropertyOwner_h #include #include namespace mitk { class MITKCORE_EXPORT IPropertyOwner : public IPropertyProvider { public: virtual ~IPropertyOwner(); /** * \brief Get property by its name. * * \param[in] propertyName Name of property. * \param[in] contextName Optional, default is empty string (default * context). Search in specified context. * \param[in] fallBackOnDefaultContext Optional, default is true. Also * search in default context if property was not found in given * context. * * \return Found property, nullptr otherwise. */ - virtual BaseProperty * GetProperty(const std::string &propertyName, const std::string &contextName = "", bool fallBackOnDefaultContext = true) = 0; + virtual BaseProperty * GetNonConstProperty(const std::string &propertyName, const std::string &contextName = "", bool fallBackOnDefaultContext = true) = 0; /** * \brief Add new or change existent property. * * \param[in] propertyName Name of property. * \param[in] property The actual property. * \param[in] contextName Optional, default is empty string (default context). Context in which the property is set. * \param[in] fallBackOnDefaultContext Optional, default is false. Set * property in default context if given context does not * exist. */ virtual void SetProperty(const std::string &propertyName, BaseProperty *property, const std::string &contextName = "", bool fallBackOnDefaultContext = false) = 0; }; } #endif diff --git a/Modules/Core/include/mitkIPropertyProvider.h b/Modules/Core/include/mitkIPropertyProvider.h index e2a0ed15af..2187e4972f 100644 --- a/Modules/Core/include/mitkIPropertyProvider.h +++ b/Modules/Core/include/mitkIPropertyProvider.h @@ -1,65 +1,65 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef mitkIPropertyProvider_h #define mitkIPropertyProvider_h #include #include namespace mitk { class MITKCORE_EXPORT IPropertyProvider { public: virtual ~IPropertyProvider(); /** * \brief Get property by its name. * * \param[in] propertyName Name of property. * \param[in] contextName Optional, default is empty string (default * context). Search in specified context. * \param[in] fallBackOnDefaultContext Optional, default is true. Also * search in default context if property was not found in given * context. * * \return Found property, nullptr otherwise. */ - virtual BaseProperty::ConstPointer GetProperty(const std::string &propertyName, const std::string &contextName = "", bool fallBackOnDefaultContext = true) const = 0; + virtual BaseProperty::ConstPointer GetConstProperty(const std::string &propertyName, const std::string &contextName = "", bool fallBackOnDefaultContext = true) const = 0; /** * \brief Query names of existing properties. * * \param[in] contextName Optional, default is empty string (default * context). Search in specified context. * \param[in] includeDefaultContext Optional, default is false. Include * default context. * * \return List of property names. */ virtual std::vector GetPropertyNames(const std::string &contextName = "", bool includeDefaultContext = false) const = 0; /** * \brief Query names of existing contexts. * * \return List of context names. */ virtual std::vector GetPropertyContextNames() const = 0; }; } #endif