Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
kernel
src
Exports
SetValueWhenProperty.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 +
7
#include "
MantidKernel/SetValueWhenProperty.h
"
8
#include "
MantidPythonInterface/core/StdFunctionExporter.h
"
9
#include <boost/python.hpp>
10
#include <functional>
11
#include <string>
12
13
using
Mantid::PythonInterface::std_function_from_python
;
14
15
using namespace
Mantid::Kernel
;
16
using namespace
boost::python
;
17
18
void
export_SetValueWhenProperty
() {
19
20
std_function_from_python<std::string, std::string, std::string>
();
// register converter
21
22
class_<SetValueWhenProperty, bases<IPropertySettings>>(
"SetValueWhenProperty"
, no_init)
// no default constructor
23
24
.def(init<std::string, std::function<std::string(std::string, std::string)>>(
25
(arg(
"self"
), arg(
"watchedPropName"
), arg(
"changeCriterion"
)),
26
"Set value of property when watched-property value criterion is satisfied"
));
27
}
export_SetValueWhenProperty
void export_SetValueWhenProperty()
Definition
SetValueWhenProperty.cpp:18
SetValueWhenProperty.h
StdFunctionExporter.h
Mantid::Kernel
Definition
AnnularRingAbsorption.h:15
boost::python
Definition
NDArray.h:50
Mantid::PythonInterface::std_function_from_python
Definition
StdFunctionExporter.h:30
Generated by
1.9.8