VTK  9.6.20260320
vtkWeakReference.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
14
15#ifndef vtkWeakReference_h
16#define vtkWeakReference_h
17
18#include "vtkCommonCoreModule.h" // For export macro
19#include "vtkObject.h"
20#include "vtkWeakPointer.h"
21
22VTK_ABI_NAMESPACE_BEGIN
23class VTKCOMMONCORE_EXPORT vtkWeakReference : public vtkObject
24{
25public:
30
34 void Set(vtkObject* object);
35
40
41private:
43};
44
45VTK_ABI_NAMESPACE_END
46#endif
47
48// VTK-HeaderTest-Exclude: vtkWeakReference.h
a weak reference to a vtkObject.
~vtkWeakReference() override
void Set(vtkObject *object)
Set the vtkObject to maintain a weak reference to.
static vtkWeakReference * New()
vtkObject * Get()
Get the vtkObject pointer or nullptr if the object has been collected.