Mantid
Loading...
Searching...
No Matches
ICompAssembly.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 +
9#include <boost/python/class.hpp>
10#include <boost/python/register_ptr_to_python.hpp>
11
14using namespace boost::python;
15
17
19 register_ptr_to_python<std::shared_ptr<ICompAssembly>>();
20
21 class_<ICompAssembly, boost::python::bases<IComponent>, boost::noncopyable>("ICompAssembly", no_init)
22 .def("nelements", &ICompAssembly::nelements, arg("self"), "Returns the number of elements in the assembly")
23 .def("__len__", &ICompAssembly::nelements, arg("self"), "Returns the number of elements in the assembly")
24 .def("__getitem__", &ICompAssembly::operator[], (arg("self"), arg("index")),
25 "Return the component at the given index");
26}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_ICompAssembly()
Class for Assembly of geometric components.
Definition: ICompAssembly.h:30
virtual int nelements() const =0
Return the number of elements in the assembly.
base class for Geometric IComponent
Definition: IComponent.h:51