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 +
9#include <boost/python/class.hpp>
10
16using namespace boost::python;
17
19 // FuncitonProperty has base PropertyWithValue<std::shared_ptr<IFunction>>
20 // which must be exported
21 using HeldType = std::shared_ptr<IFunction>;
22 PropertyWithValueExporter<HeldType>::define("FunctionPropertyWithValue");
23
24 class_<FunctionProperty, bases<PropertyWithValue<HeldType>>, boost::noncopyable>("FunctionProperty", no_init)
25 .def(
26 init<const std::string &, const unsigned int>((arg("self"), arg("name"), arg("direction") = Direction::Input),
27 "Constructs a FunctionProperty with the given name"));
28}
void export_FunctionProperty()
A property class for functions.
This is an interface to a fitting function - a semi-abstarct class.
Definition: IFunction.h:163
The concrete, templated class for properties.
Describes the direction (within an algorithm) of a Property.
Definition: Property.h:50
@ Input
An input workspace.
Definition: Property.h:53
A helper struct to export PropertyWithValue<> types to Python.
static void define(const char *pythonClassName)