Mantid
Loading...
Searching...
No Matches
DetectorInfoPythonIterator.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/geometry/DetectorInfoPythonIterator.h"
9#include <boost/python/class.hpp>
10#include <boost/python/iterator.hpp>
11#include <boost/python/module.hpp>
12
13using Mantid::PythonInterface::DetectorInfoPythonIterator;
14using namespace boost::python;
15
16// Export DetectorInfoPythonIterator
18
19 // Export to Python
20 class_<DetectorInfoPythonIterator>("DetectorInfoPythonIterator", no_init)
21 .def("__iter__", objects::identity_function())
22#ifdef IS_PY2K
23 .def("next", &DetectorInfoPythonIterator::next)
24#else
25 .def("__next__", &DetectorInfoPythonIterator::next)
26#endif
27 ;
28}
void export_DetectorInfoPythonIterator()