7#include "MantidAPI/ProductFunction.h"
8#include <boost/python/class.hpp>
9#include <boost/python/overloads.hpp>
12using Mantid::API::ProductFunction;
17using getParameterType1 = double (ProductFunction::*)(size_t)
const;
18using getParameterType2 = double (ProductFunction::*)(
const std::string &)
const;
20using setParameterType2 = void (ProductFunction::*)(
const std::string &,
const double &, bool);
27 class_<ProductFunction, bases<IFunction>, boost::noncopyable>(
"ProductFunction",
"Composite Fit functions")
28 .def(
"nFunctions", &ProductFunction::nFunctions, arg(
"self"),
"Get the number of member functions.")
29 .def(
"__len__", &ProductFunction::nFunctions, arg(
"self"),
"Get the number of member functions.")
30 .def(
"getFunction", &ProductFunction::getFunction, (arg(
"self"), arg(
"i")),
"Get the i-th function.")
31 .def(
"__getitem__", &ProductFunction::getFunction, (arg(
"self"), arg(
"i")),
"Get the i-th function.")
32 .def(
"add", &ProductFunction::addFunction, (arg(
"self"), arg(
"function")),
"Add a member function.")
33 .def(
"getParameterValue", (getParameterType1)&ProductFunction::getParameter, (arg(
"self"), arg(
"i")),
34 "Get value of parameter of given index.")
35 .def(
"getParameterValue", (getParameterType2)&ProductFunction::getParameter, (arg(
"self"), arg(
"name")),
36 "Get value of parameter of given name.")
37 .def(
"__getitem__", (getParameterType2)&ProductFunction::getParameter, (arg(
"self"), arg(
"name")),
38 "Get value of parameter of given name.")
39 .def(
"__setitem__", (setParameterType2)&ProductFunction::setParameter,
40 setParameterType2_Overloads((arg(
"self"), arg(
"name"), arg(
"value"), arg(
"explicitlySet")),
41 "Get value of parameter of given name."))
42 .def(
"__delitem__", &ProductFunction::removeFunction, (arg(
"self"), arg(
"index")));
void export_ProductFunction()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader, valueAsPrettyStr, 0, 2) void export_Property()
This is an interface to a fitting function - a semi-abstarct class.