VTK  9.1.0
vtkWeakReference.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkWeakReference.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
24#ifndef vtkWeakReference_h
25#define vtkWeakReference_h
26
27#include "vtkCommonCoreModule.h" // For export macro
28#include "vtkObject.h"
29#include "vtkWeakPointer.h"
30
31class VTKCOMMONCORE_EXPORT vtkWeakReference : public vtkObject
32{
33public:
38
42 void Set(vtkObject* object);
43
48
49private:
51};
52
53#endif
54
55// VTK-HeaderTest-Exclude: vtkWeakReference.h
abstract base class for most VTK objects
Definition: vtkObject.h:73
Utility class to hold 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.