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