Mantid
Loading...
Searching...
No Matches
FilteredTimeSeriesProperty.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 +
10
11#include <boost/python/class.hpp>
12#include <boost/python/implicit.hpp>
13#include <boost/python/register_ptr_to_python.hpp>
14#include <boost/python/return_value_policy.hpp>
15
19using namespace boost::python;
20
26
27namespace {
29#define EXPORT_FILTEREDTIMESERIES_PROP(TYPE, Prefix) \
30 register_ptr_to_python<FilteredTimeSeriesProperty<TYPE> *>(); \
31 \
32 class_<FilteredTimeSeriesProperty<TYPE>, bases<TimeSeriesProperty<TYPE>>, boost::noncopyable>( \
33 #Prefix "FilteredTimeSeriesProperty", no_init) \
34 .def(init<TimeSeriesProperty<TYPE> *, const TimeSeriesProperty<bool> &>( \
35 "Constructor", (arg("self"), arg("source"), arg("filter")))) \
36 .def("unfiltered", &FilteredTimeSeriesProperty<TYPE>::unfiltered, (arg("self")), \
37 return_value_policy<RemoveConst>(), "Returns a time series containing the unfiltered data");
38} // namespace
39
41 EXPORT_FILTEREDTIMESERIES_PROP(double, Float);
43 EXPORT_FILTEREDTIMESERIES_PROP(int32_t, Int32);
44 EXPORT_FILTEREDTIMESERIES_PROP(int64_t, Int64);
45 EXPORT_FILTEREDTIMESERIES_PROP(std::string, String);
46}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
#define EXPORT_FILTEREDTIMESERIES_PROP(TYPE, Prefix)
Macro to reduce copy-and-paste.
void export_FilteredTimeSeriesProperty()
Templated class that defines a filtered time series but still gives access to the original data.
A specialised Property class for holding a series of time-value pairs.
Implements the RemoveConst policy.
Definition: RemoveConst.h:108