VTK  9.1.0
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

namespace  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.
 
template<class T >
ostream & operator<< (ostream &os, const vtkWeakPointer< T > &p)
 Streaming operator to print smart pointer like regular pointers.
 

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); \
}
Allocate and hold a VTK object.
Definition: vtkNew.h:165
a weak reference to a vtkObject.

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.