Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
kernel
src
Exports
ArrayOrderedPairsValidator.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/ArrayOrderedPairsValidator.h
"
8
#include <boost/python/class.hpp>
9
#include <boost/python/make_constructor.hpp>
10
#include <boost/python/return_value_policy.hpp>
11
12
using
Mantid::Kernel::ArrayOrderedPairsValidator
;
13
using
Mantid::Kernel::IValidator
;
14
using namespace
boost::python
;
15
16
namespace
{
17
template
<
typename
TYPE>
ArrayOrderedPairsValidator<TYPE>
*createArrayOrderedPairsValidator() {
18
return
new
ArrayOrderedPairsValidator<TYPE>
();
19
}
20
21
#define EXPORT_PAIRSVALIDATOR(type, prefix) \
22
class_<ArrayOrderedPairsValidator<type>, bases<IValidator>, boost::noncopyable>(#prefix \
23
"ArrayOrderedPairsValidator"
) \
24
.def("__init__", make_constructor(&createArrayOrderedPairsValidator<type>, default_call_policies()));
25
}
// namespace
26
void
export_ArrayOrderedPairsValidator
() {
27
EXPORT_PAIRSVALIDATOR
(
double
, Float);
28
EXPORT_PAIRSVALIDATOR
(
long
, Int);
29
}
ArrayOrderedPairsValidator.h
export_ArrayOrderedPairsValidator
void export_ArrayOrderedPairsValidator()
Definition:
ArrayOrderedPairsValidator.cpp:26
EXPORT_PAIRSVALIDATOR
#define EXPORT_PAIRSVALIDATOR(type, prefix)
Definition:
ArrayOrderedPairsValidator.cpp:21
Mantid::Kernel::ArrayOrderedPairsValidator
Kernel/ArrayOrderedPairsValidator.h.
Definition:
ArrayOrderedPairsValidator.h:23
Mantid::Kernel::IValidator
IValidator is the basic interface for all validators for properties.
Definition:
IValidator.h:43
boost::python
Definition:
NDArray.h:50
Generated on Tue Jan 3 2023 11:57:50 for Mantid by
1.9.5