diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h b/Code/Mantid/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h index edbd2d70d720f478be2b95e0904ebe1ab1e1a525..533c9942cdd251169ddc1fa24ea1386ef566d14b 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h @@ -64,6 +64,12 @@ public: /// Set description of parameter of decorated function by name. virtual void setParameterDescription(const std::string &name, const std::string &description); + + /// Value of i-th active parameter of the decorated function. + virtual double activeParameter(size_t i) const; + /// Set new value of i-th active parameter of the decorated function. + virtual void setActiveParameter(size_t i, double value); + /// Get parameter of decorated function by name. virtual double getParameter(const std::string &name) const; /// Total number of parameters of decorated function. diff --git a/Code/Mantid/Framework/API/src/FunctionParameterDecorator.cpp b/Code/Mantid/Framework/API/src/FunctionParameterDecorator.cpp index c2fb3100429099340b5b97c87b2c5b5840bf3cf1..fce40a88b01593bf7d223c202981e8bd75e95d8e 100644 --- a/Code/Mantid/Framework/API/src/FunctionParameterDecorator.cpp +++ b/Code/Mantid/Framework/API/src/FunctionParameterDecorator.cpp @@ -72,6 +72,18 @@ void FunctionParameterDecorator::setParameterDescription( m_wrappedFunction->setParameterDescription(name, description); } +double FunctionParameterDecorator::activeParameter(size_t i) const { + throwIfNoFunctionSet(); + + return m_wrappedFunction->activeParameter(i); +} + +void FunctionParameterDecorator::setActiveParameter(size_t i, double value) { + throwIfNoFunctionSet(); + + m_wrappedFunction->setActiveParameter(i, value); +} + double FunctionParameterDecorator::getParameter(const std::string &name) const { throwIfNoFunctionSet();