Mantid
Loading...
Searching...
No Matches
FunctionProperty.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
10#include <boost/python/class.hpp>
11
17using namespace boost::python;
18
20 // FuncitonProperty has base PropertyWithValue<std::shared_ptr<IFunction>>
21 // which must be exported
22 using HeldType = std::shared_ptr<IFunction>;
23 PropertyWithValueExporter<HeldType>::define("FunctionPropertyWithValue");
24
25 class_<FunctionProperty, bases<PropertyWithValue<HeldType>>, boost::noncopyable>("FunctionProperty", no_init)
26 .def(
27 init<const std::string &, const unsigned int>((arg("self"), arg("name"), arg("direction") = Direction::Input),
28 "Constructs a FunctionProperty with the given name"));
29}
void export_FunctionProperty()
A property class for functions.
This is an interface to a fitting function - a semi-abstarct class.
Definition IFunction.h:167
The concrete, templated class for properties.
Describes the direction (within an algorithm) of a Property.
Definition Property.h:51
@ Input
An input workspace.
Definition Property.h:54
A helper struct to export PropertyWithValue<> types to Python.