14#include <boost/lexical_cast.hpp>
34 throw std::runtime_error(
"Algorithm properties passed to SetValueWhenProperty was null");
43 throw std::runtime_error(
"Property " +
m_watchedPropName +
" was not found in SetValueWhenProperty");
57 bool hasWatchedPropChanged =
false;
58 if (watchedProp->name() == changedPropName) {
59 hasWatchedPropChanged =
true;
62 return hasWatchedPropChanged;
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.
Base class for properties.
virtual std::string setValue(const std::string &)=0
Set the value of the property via a string.
virtual std::string value() const =0
Returns the value of the property as a string.
bool isConditionChanged(const IPropertyManager *algo, const std::string &changedPropName) const override
Return true always.
void applyChanges(const Mantid::Kernel::IPropertyManager *algo, Kernel::Property *const pProp) override
If a new value should be set, the change is applied here.
std::string getPropertyValue(const IPropertyManager *algo) const
Checks the algorithm and property are both valid and attempts to get the value associated with the pr...
std::function< std::string(std::string, std::string)> m_changeCriterion
Function to check if changes should be applied.
std::string m_watchedPropName
Name of the watched property, based on which we may set the value of the current property.
IPropertySettings * clone() const override
Make a copy of the present type of IPropertySettings.
void modify_allowed_values(Property *const)
Stub function to satisfy the interface.