VTK  9.1.0
Classes | Namespaces | Macros | Functions
vtkSmartPointer.h File Reference
#include "vtkSmartPointerBase.h"
#include "vtkMeta.h"
#include "vtkNew.h"
#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...
 

Namespaces

namespace  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.
 
template<typename T >
vtkSmartPointer< T > vtk::TakeSmartPointer (T *obj)
 Construct a vtkSmartPointer<T> containing obj.
 
template<class T >
ostream & operator<< (ostream &os, const vtkSmartPointer< T > &p)
 Streaming operator to print smart pointer like regular pointers.
 

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

Definition at line 404 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 468 of file vtkSmartPointer.h.