VTK: Common/Core/vtkSmartPointer.h File Reference

| VTK 9.3.1

Classes | Namespaces | Macros | Functions
vtkSmartPointer.h File Reference
`#include "vtkSmartPointerBase.h"`
`#include "vtkMeta.h"`
`#include "vtkNew.h"`
`#include <functional>`
`#include <type_traits>`
`#include <utility>`
Include dependency graph for vtkSmartPointer.h:

Go to the source code of this file.

## Classes
class | vtkSmartPointer< T >
| Hold a reference to a vtkObjectBase instance. More...
struct | std::hash< vtkSmartPointer< T > >

## Namespaces
| std
| vtk
| Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.

## Macros
#define | VTK_SMART_POINTER_DEFINE_OPERATOR(op)

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

## Macro Definition Documentation

## ◆ VTK_SMART_POINTER_DEFINE_OPERATOR

#define VTK_SMART_POINTER_DEFINE_OPERATOR | ( |  | op | ) |

Value:
template <class T, class U> \
inline bool operator op(const vtkSmartPointer<T>& l, const vtkSmartPointer<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(T* l, const vtkSmartPointer<U>& r) \
{ \
return (l op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(const vtkSmartPointer<T>& l, U* r) \
{ \
return (l.GetPointer() op r); \
} \
template <class T, class U> \
inline bool operator op(const vtkNew<T>& l, const vtkSmartPointer<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer()); \
} \
template <class T, class U> \
inline bool operator op(const vtkSmartPointer<T>& l, const vtkNew<U>& r) \
{ \
return (l.GetPointer() op r.GetPointer); \
}
vtkNew
Allocate and hold a VTK object.
Definition: vtkNew.h:60
vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkSmartPointer.h:41

Definition at line 321 of file vtkSmartPointer.h.

## Function Documentation

## ◆ operator<<()

template<class T >

ostream& operator<< | ( | ostream & | os,
|  | const vtkSmartPointer< T > & | p
| ) |  |
| inline

Streaming operator to print smart pointer like regular pointers.

Definition at line 389 of file vtkSmartPointer.h.