9#include <boost/python/class.hpp>
10#include <boost/python/register_ptr_to_python.hpp>
26std::shared_ptr<Mantid::Geometry::IObject> getShape(
const IObjComponent &self) {
27 if (PyErr_Warn(PyExc_DeprecationWarning,
28 "'IObjComponent.shape' is deprecated in Mantid 7.0, "
29 "use 'ComponentInfo.shape' instead. "
30 "For more information, see the instrument access layers concept page: "
31 "https://docs.mantidproject.org/nightly/concepts/InstrumentAccessLayers.html") < 0)
32 throw boost::python::error_already_set();
33 return std::const_pointer_cast<Mantid::Geometry::IObject>(self.
shape());
38 register_ptr_to_python<std::shared_ptr<IObjComponent>>();
40 class_<IObjComponent, boost::python::bases<IComponent>, boost::noncopyable>(
"IObjComponent", no_init)
41 .def(
"shape", &getShape, arg(
"self"),
42 "Get the object that represents "
43 "the physical shape of this "
44 "component (deprecated, use ComponentInfo.shape)");
#define GET_POINTER_SPECIALIZATION(TYPE)
void export_IObjComponent()
base class for Geometric IComponent
Object Component class, this class brings together the physical attributes of the component to the po...
virtual const std::shared_ptr< const IObject > shape() const =0
Returns the shape of the Object.