VTK  9.0.20210225
Classes | Namespaces | Macros | Functions
vtkWeakPointer.h File Reference
#include "vtkWeakPointerBase.h"
#include "vtkMeta.h"
#include "vtkNew.h"
#include <type_traits>
#include <utility>
Include dependency graph for vtkWeakPointer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkWeakPointer< T >
 a weak reference to a vtkObject. More...
 

Namespaces

 vtk
 Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
 

Macros

#define VTK_WEAK_POINTER_DEFINE_OPERATOR(op)
 

Functions

template<typename T >
vtkWeakPointer< T > vtk::TakeWeakPointer (T *obj)
 Construct a vtkWeakPointer<T> containing obj. More...
 
template<class T >
ostream & operator<< (ostream &os, const vtkWeakPointer< T > &p)
 Streaming operator to print smart pointer like regular pointers. More...
 

Macro Definition Documentation

◆ VTK_WEAK_POINTER_DEFINE_OPERATOR

#define VTK_WEAK_POINTER_DEFINE_OPERATOR (   op)
Value:
template <class T, class U> \
inline bool operator op(const vtkWeakPointer<T>& l, const vtkWeakPointer<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(T* l, const vtkWeakPointer<U>& r) \
{ \
return (l op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(const vtkWeakPointer<T>& l, U* r) \
{ \
return (l.GetPointer() op r); \
} \
template <class T, class U> \
inline bool operator op(const vtkNew<T>& l, const vtkWeakPointer<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(const vtkWeakPointer<T>& l, const vtkNew<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer); \
}

Definition at line 255 of file vtkWeakPointer.h.

Function Documentation

◆ operator<<()

template<class T >
ostream& operator<< ( ostream &  os,
const vtkWeakPointer< T > &  p 
)
inline

Streaming operator to print smart pointer like regular pointers.

Definition at line 311 of file vtkWeakPointer.h.

vtkNew
Allocate and hold a VTK object.
Definition: vtkMeta.h:30
vtkWeakPointer
a weak reference to a vtkObject.
Definition: vtkMeta.h:34