Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
api
src
Exports
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 +
7
#include "
MantidPythonInterface/api/SpectrumInfoPythonIterator.h
"
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
14
using
Mantid::PythonInterface::SpectrumInfoPythonIterator
;
15
using namespace
boost::python
;
16
17
// Export SpectrumInfoPythonIterator
18
void
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
}
export_SpectrumInfoPythonIterator
void export_SpectrumInfoPythonIterator()
Definition
SpectrumInfoPythonIterator.cpp:18
SpectrumInfoPythonIterator.h
Mantid::PythonInterface::SpectrumInfoPythonIterator
SpectrumInfoPythonIterator.
Definition
SpectrumInfoPythonIterator.h:42
Mantid::PythonInterface::SpectrumInfoPythonIterator::next
const SpectrumInfoItem< SpectrumInfo > & next()
Definition
SpectrumInfoPythonIterator.h:47
boost::python
Definition
NDArray.h:50
Generated by
1.9.8