14#include <boost/lexical_cast.hpp>
37 const std::string &changedPropName)
const {
49 if (!(currentProperty->isDefault() || currentProperty->isDynamicDefault()))
57 g_log.
warning() <<
"`SetDefaultWhenProperty::applyChanges`: one of the properies '" << currentPropName <<
"' or '"
59 <<
" is not present on the algorithm.\n";
60 }
catch (
const std::runtime_error &e) {
63 g_log.
warning() <<
"`SetDefaultWhenProperty::applyChanges`: exception thrown within provided callback.\n"
64 <<
"If the callback was a Python `Callable`, the stack trace follows:\n"
65 <<
"-------------------------------------------------------------------------\n"
66 << e.what() <<
"\n-------------------------------------------------------------------------\n";
74 throw std::runtime_error(
"SetDefaultWhenProperty: circular dependency detected");
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Exception for when an item is not found in a collection.
Interface to PropertyManager.
virtual Property * getPointerToProperty(const std::string &name) const =0
Get a pointer to property by name.
Interface for modifiers to Property's that specify if they should be enabled or visible in a GUI.
The Logger class is in charge of the publishing messages from the framework through various channels.
void warning(const std::string &msg)
Logs at warning level.
void setIsDynamicDefault(const bool &flag)
Set or clear the flag indicating whether or not the property's value has been set programmatically.
std::vector< std::string > dependsOn(const std::string &thisProp) const override
Other properties that this property depends on.
bool applyChanges(const Mantid::Kernel::IPropertyManager *algo, const std::string ¤tPropName) override
If a new value should be set, the change is applied here.
std::function< bool(const Mantid::Kernel::IPropertyManager *, Property *, Property *)> m_changeCriterion
Criterion to determine if a new dynamic-default value should be set: in which case this function shou...
bool isConditionChanged(const IPropertyManager *algo, const std::string &changedPropName) const override
Return true when change criterion should be tested.
IPropertySettings * clone() const override
Make a copy of the present type of IPropertySettings.
std::string m_watchedPropName
Name of the watched property.
Logger g_log("DateAndTime")