|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   50 #include <type_traits>  
   69   template <
typename U = T>
 
   70   static void CheckTypes() noexcept
 
   73       "vtkNew<T>'s T type has not been defined. Missing include?");
 
   75       "Cannot store an object with undefined type in " 
   76       "vtkNew. Missing include?");
 
   78       "Argument type is not compatible with vtkNew<T>'s " 
   81       "vtkNew can only be used with subclasses of vtkObjectBase.");
 
   99   vtkNew(
vtkNew&& o) noexcept : Object(o.Object) { o.Object = 
nullptr; }
 
  101   template <
typename U>
 
  104     vtkNew::CheckTypes<U>();
 
  118     T* obj = this->Object;
 
  121       this->Object = 
nullptr;
 
  141   T* 
Get() const noexcept { 
return this->Object; }
 
  142   operator T*() 
const noexcept { 
return static_cast<T*
>(this->Object); }
 
  150   T& 
operator*() const noexcept { 
return *
static_cast<T*
>(this->Object); }
 
  
vtkNew(vtkNew< U > &&o) noexcept
Move the object into the constructed vtkNew wrapper, stealing its reference.
~vtkNew()
Deletes reference to instance of T.
Hold a reference to a vtkObjectBase instance.
vtkWeakPointer & operator=(const vtkWeakPointer &r)
Assign object to reference.
void Reset()
Move the object into the constructed vtkNew wrapper, stealing its reference.
vtkNew()
Create a new T on construction.
T & operator*() const noexcept
Dereference the pointer and return a reference to the contained object.
abstract base class for most VTK objects
T * GetPointer() const noexcept
Get a raw pointer to the contained object.
Allocate and hold a VTK object.
T * operator->() const noexcept
Enable pointer-like dereference syntax.
a weak reference to a vtkObject.
T * Get() const noexcept
Move the object into the constructed vtkNew wrapper, stealing its reference.
vtkNew(vtkNew &&o) noexcept
Move the object into the constructed vtkNew wrapper, stealing its reference.