VTK
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

 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); \
}

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

vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:32
vtkNew
Allocate and hold a VTK object.
Definition: vtkMeta.h:30