Mantid
Loading...
Searching...
No Matches
SpectrumInfoPythonIterator.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 +
8
9#include <boost/python/class.hpp>
10#include <boost/python/iterator.hpp>
11#include <boost/python/module.hpp>
12#include <boost/python/reference_existing_object.hpp>
13
15using namespace boost::python;
16
17// Export SpectrumInfoPythonIterator
19
20 // Export to Python
21 class_<SpectrumInfoPythonIterator>("SpectrumInfoPythonIterator", no_init)
22 .def("__iter__", objects::identity_function())
23 .def("__next__", &SpectrumInfoPythonIterator::next, return_value_policy<reference_existing_object>());
24}
void export_SpectrumInfoPythonIterator()