Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
kernel
src
Exports
SetDefaultWhenProperty.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/SetDefaultWhenProperty.h
"
8
#include "
MantidKernel/IPropertyManager.h
"
9
#include "
MantidKernel/IPropertySettings.h
"
10
#include "
MantidKernel/Property.h
"
11
#include "
MantidPythonInterface/core/StdFunctionExporter.h
"
12
13
#include <boost/python.hpp>
14
// #include <boost/python/converter/registry.hpp>
15
#include <functional>
16
#include <string>
17
#include <type_traits>
18
19
using
Mantid::PythonInterface::std_function_from_python
;
20
21
using namespace
Mantid::Kernel
;
22
using namespace
boost::python
;
23
24
void
export_SetDefaultWhenProperty
() {
25
26
std_function_from_python
<bool,
const
Mantid::Kernel::IPropertyManager
*,
Property
*,
27
Property
*>();
// register converter
28
29
class_<SetDefaultWhenProperty, bases<IPropertySettings>>(
"SetDefaultWhenProperty"
, no_init)
// no default constructor
30
31
.def(init<std::string, std::function<
bool
(
const
Mantid::Kernel::IPropertyManager
*,
Property
*,
Property
*)>>(
32
(arg(
"self"
), arg(
"watchedPropName"
), arg(
"changeCriterion"
)),
33
"Update dynamic-default value of property when criterion is satisfied for watched property."
));
34
}
IPropertyManager.h
IPropertySettings.h
Property.h
export_SetDefaultWhenProperty
void export_SetDefaultWhenProperty()
Definition
SetDefaultWhenProperty.cpp:24
SetDefaultWhenProperty.h
StdFunctionExporter.h
Mantid::Kernel::IPropertyManager
Interface to PropertyManager.
Definition
IPropertyManager.h:59
Mantid::Kernel::Property
Base class for properties.
Definition
Property.h:94
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