VTK
dox
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
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
vtkWeakReference::~vtkWeakReference
~vtkWeakReference() override
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:60
vtkWeakReference
Utility class to hold a weak reference to a vtkObject.
Definition:
vtkWeakReference.h:32
vtkWeakReference::Get
vtkObject * Get()
Get the vtkObject pointer or nullptr if the object has been collected.
vtkWeakReference::vtkWeakReference
vtkWeakReference()
vtkWeakPointer.h
vtkObject.h
vtkWeakReference::New
static vtkWeakReference * New()
vtkWeakReference::Set
void Set(vtkObject *object)
Set the vtkObject to maintain a weak reference to.
vtkWeakPointer< vtkObject >
Generated by
1.8.20