Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
kernel
src
Exports
PropertyWithValue.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 "
MantidPythonInterface/core/PropertyWithValueExporter.h
"
8
9
#include <boost/python/copy_const_reference.hpp>
10
11
using
Mantid::PythonInterface::PropertyWithValueExporter
;
12
13
void
export_BasicPropertyWithValueTypes
() {
14
// ints & vectors
15
PropertyWithValueExporter<int>::define
(
"IntPropertyWithValue"
);
16
PropertyWithValueExporter<std::vector<int>
>::define(
"VectorIntPropertyWithValue"
);
17
PropertyWithValueExporter<unsigned int>::define
(
"UIntPropertyWithValue"
);
18
PropertyWithValueExporter<std::vector<unsigned int>
>::define(
"VectorUIntPropertyWithValue"
);
19
20
// longs & vectors
21
PropertyWithValueExporter<long>::define
(
"LongPropertyWithValue"
);
22
PropertyWithValueExporter<std::vector<long>
>::define(
"VectorLongPropertyWithValue"
);
23
PropertyWithValueExporter<unsigned long>::define
(
"ULongPropertyWithValue"
);
24
PropertyWithValueExporter<std::vector<unsigned long>
>::define(
"VectorULongPropertyWithValue"
);
25
26
// long long long longs & vectors
27
PropertyWithValueExporter<long long>::define
(
"LongLongPropertyWithValue"
);
28
PropertyWithValueExporter<std::vector<long long>
>::define(
"VectorLongLongPropertyWithValue"
);
29
PropertyWithValueExporter<unsigned long long>::define
(
"ULongLongPropertyWithValue"
);
30
PropertyWithValueExporter<std::vector<unsigned long long>
>::define(
"VectorULongLongPropertyWithValue"
);
31
32
// double
33
PropertyWithValueExporter<double>::define
(
"FloatPropertyWithValue"
);
34
PropertyWithValueExporter<std::vector<double>
>::define(
"VectorFloatPropertyWithValue"
);
35
36
// boolean
37
PropertyWithValueExporter<bool>::define
(
"BoolPropertyWithValue"
);
38
PropertyWithValueExporter<std::vector<bool>
>::define(
"VectorBoolPropertyWithValue"
);
39
40
// std::string
41
PropertyWithValueExporter<std::string>::define
(
"StringPropertyWithValue"
);
42
PropertyWithValueExporter<std::vector<std::string>
>::define(
"VectorStringPropertyWithValue"
);
43
}
PropertyWithValueExporter.h
export_BasicPropertyWithValueTypes
void export_BasicPropertyWithValueTypes()
Definition:
PropertyWithValue.cpp:13
Mantid::PythonInterface::PropertyWithValueExporter
A helper struct to export PropertyWithValue<> types to Python.
Definition:
PropertyWithValueExporter.h:40
Mantid::PythonInterface::PropertyWithValueExporter::define
static void define(const char *pythonClassName)
Definition:
PropertyWithValueExporter.h:41
Generated on Tue Jan 3 2023 11:57:23 for Mantid by
1.9.5