Mantid
Loading...
Searching...
No Matches
IObjComponent.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
18namespace {
26std::shared_ptr<Mantid::Geometry::IObject> getShape(const IObjComponent &self) {
27 return std::const_pointer_cast<Mantid::Geometry::IObject>(self.shape());
28}
29} // namespace
30
32 register_ptr_to_python<std::shared_ptr<IObjComponent>>();
33
34 class_<IObjComponent, boost::python::bases<IComponent>, boost::noncopyable>("IObjComponent", no_init)
35 .def("shape", &getShape, arg("self"),
36 "Get the object that represents "
37 "the physical shape of this "
38 "component");
39}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_IObjComponent()
base class for Geometric IComponent
Definition: IComponent.h:51
Object Component class, this class brings together the physical attributes of the component to the po...
Definition: IObjComponent.h:37
virtual const std::shared_ptr< const IObject > shape() const =0
Returns the shape of the Object.