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 +
7//----------------------------------------------------------------------
8// Includes
9//----------------------------------------------------------------------
12
13namespace Mantid::Geometry {
14
15IObjComponent::IObjComponent() { handle = std::make_unique<GeometryHandler>(this); }
16
20IObjComponent::IObjComponent(GeometryHandler *the_handler) { handle.reset(the_handler); }
21
22// Looking to get rid of the first of these constructors in due course (and
23// probably add others)
25
32 if (h == nullptr)
33 return;
34 this->handle.reset(h);
35}
36
41 // Copy constructor just creates new handle. Copies nothing.
42 handle = std::make_unique<GeometryHandler>(this);
43}
44
51 if (&rhs != this) {
52 // Assignment operator copies nothing. Just creates new handle.
53 handle = std::make_unique<GeometryHandler>(this);
54 }
55 return *this;
56}
57} // namespace Mantid::Geometry
const std::vector< double > & rhs
Handles rendering of all object Geometry.
Object Component class, this class brings together the physical attributes of the component to the po...
Definition: IObjComponent.h:37
void setGeometryHandler(GeometryHandler *h)
Reset the current geometry handler.
std::unique_ptr< GeometryHandler > handle
Geometry Handle for rendering.
IObjComponent & operator=(const IObjComponent &rhs)
Assignment operator.