VTK
9.2.6
Common
Core
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
23
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
31
class
VTKCOMMONCORE_EXPORT
vtkWeakReference
:
public
vtkObject
32
{
33
public
:
34
vtkTypeMacro(
vtkWeakReference
,
vtkObject
);
35
static
vtkWeakReference
*
New
();
36
vtkWeakReference
();
37
~vtkWeakReference
()
override
;
38
42
void
Set
(
vtkObject
*
object
);
43
47
vtkObject
*
Get
();
48
49
private
:
50
vtkWeakPointer<vtkObject>
Object;
51
};
52
53
#endif
54
55
// VTK-HeaderTest-Exclude: vtkWeakReference.h
vtkObject::vtkObject
vtkObject()
vtkWeakPointer
a weak reference to a vtkObject.
Definition
vtkWeakPointer.h:59
vtkWeakReference::vtkWeakReference
vtkWeakReference()
vtkWeakReference::~vtkWeakReference
~vtkWeakReference() override
vtkWeakReference::Set
void Set(vtkObject *object)
Set the vtkObject to maintain a weak reference to.
vtkWeakReference::New
static vtkWeakReference * New()
vtkWeakReference::Get
vtkObject * Get()
Get the vtkObject pointer or nullptr if the object has been collected.
vtkObject.h
vtkWeakPointer.h
Generated on Thu Feb 27 2025 00:00:00 for VTK by
1.13.2