Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
geometry
src
Exports
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"
8
#include "
MantidPythonInterface/core/VersionCompat.h
"
9
#include <boost/python/class.hpp>
10
#include <boost/python/iterator.hpp>
11
#include <boost/python/module.hpp>
12
13
using
Mantid::PythonInterface::ComponentInfoPythonIterator;
14
using namespace
boost::python
;
15
16
// Export ComponentInfoPythonIterator
17
void
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
}
export_ComponentInfoPythonIterator
void export_ComponentInfoPythonIterator()
Definition
ComponentInfoPythonIterator.cpp:17
VersionCompat.h
boost::python
Definition
NDArray.h:50
Generated by
1.9.8