VTK  9.3.20240424
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType > Class Template Reference

A reference proxy into a vtkCompositeDataSet, obtained by dereferencing an iterator from the vtk::Range(vtkCompositeDataSet*) overloads. More...

#include <vtkCompositeDataSetNodeReference.h>

Inheritance diagram for vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >:
[legend]
Collaboration diagram for vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >:
[legend]

Public Member Functions

 CompositeDataSetNodeReference ()=delete
 
 CompositeDataSetNodeReference (const CompositeDataSetNodeReference &src)=default
 
 CompositeDataSetNodeReference (CompositeDataSetNodeReference &&) noexcept=default
 
 ~CompositeDataSetNodeReference ()=default
 
CompositeDataSetNodeReferenceoperator= (const CompositeDataSetNodeReference &src)
 
vtkDataObjectGetDataObject () const
 
vtkDataObjectGetDataObject (vtkCompositeDataSet *other)
 
 operator bool () const
 
 operator vtkDataObject * () const
 
vtkDataObjectoperator-> () const
 
void SetDataObject (vtkDataObject *obj)
 
void SetDataObject (vtkCompositeDataSet *other, vtkDataObject *dObj)
 
CompositeDataSetNodeReferenceoperator= (vtkDataObject *obj)
 
unsigned int GetFlatIndex () const
 
bool HasMetaData () const
 
vtkInformationGetMetaData () const
 

Public Attributes

friend OwnerType
 

Protected Member Functions

 CompositeDataSetNodeReference (IteratorType *iterator)
 

Friends

bool operator== (const CompositeDataSetNodeReference &lhs, const CompositeDataSetNodeReference &rhs)
 
bool operator!= (const CompositeDataSetNodeReference &lhs, const CompositeDataSetNodeReference &rhs)
 

Detailed Description

template<typename IteratorType, typename OwnerType>
class vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >

A reference proxy into a vtkCompositeDataSet, obtained by dereferencing an iterator from the vtk::Range(vtkCompositeDataSet*) overloads.

This proxy may be used as a pointer, in which case it will forward the currently pointed-to vtkDataObject*. This means that the following code is legal:

for (auto node : vtk::Range(cds))
{ // decltype(node) == CompositeDataSetNodeReference
if (node) // same as: if (node.GetDataObject() != nullptr)
{
assert(node->IsA("vtkDataObject")); // node.GetDataObject()->IsA(...)
node = nullptr; // node.SetDataObject(nullptr)
}
}
for (vtkDataObject *dObj : vtk::Range(cds))
{
// Work with dObj
}
general representation of visualization data
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
Definition vtkRange.h:74

This allows for simple access to the objects in the composite dataset. If more advanced operations are required, the CompositeDataSetNodeReference can:

Assigning one reference to another assigns the vtkDataObject* pointer to the target reference. Assigning to non-leaf nodes invalidates all iterators / references.

Equality testing compares each reference's DataObject and FlatIndex.

Warning
The NodeReference shares state with the OwnerType iterator that generates it. Incrementing or destroying the parent iterator will invalidate the reference. In debugging builds, these misuses will be caught via runtime assertions.

Definition at line 137 of file vtkCompositeDataSetNodeReference.h.

Constructor & Destructor Documentation

◆ CompositeDataSetNodeReference() [1/4]

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::CompositeDataSetNodeReference ( IteratorType *  iterator)
inlineexplicitprotected

Definition at line 161 of file vtkCompositeDataSetNodeReference.h.

◆ CompositeDataSetNodeReference() [2/4]

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::CompositeDataSetNodeReference ( )
delete

◆ CompositeDataSetNodeReference() [3/4]

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::CompositeDataSetNodeReference ( const CompositeDataSetNodeReference< IteratorType, OwnerType > &  src)
default

◆ CompositeDataSetNodeReference() [4/4]

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::CompositeDataSetNodeReference ( CompositeDataSetNodeReference< IteratorType, OwnerType > &&  )
defaultnoexcept

◆ ~CompositeDataSetNodeReference()

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::~CompositeDataSetNodeReference ( )
default

Member Function Documentation

◆ operator=() [1/2]

template<typename IteratorType , typename OwnerType >
CompositeDataSetNodeReference & vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::operator= ( const CompositeDataSetNodeReference< IteratorType, OwnerType > &  src)
inline

Definition at line 176 of file vtkCompositeDataSetNodeReference.h.

◆ GetDataObject() [1/2]

template<typename IteratorType , typename OwnerType >
vtkDataObject * vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::GetDataObject ( ) const
inline

Definition at line 196 of file vtkCompositeDataSetNodeReference.h.

◆ GetDataObject() [2/2]

template<typename IteratorType , typename OwnerType >
vtkDataObject * vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::GetDataObject ( vtkCompositeDataSet other)
inline

Definition at line 209 of file vtkCompositeDataSetNodeReference.h.

◆ operator bool()

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::operator bool ( ) const
inline

Definition at line 215 of file vtkCompositeDataSetNodeReference.h.

◆ operator vtkDataObject *()

template<typename IteratorType , typename OwnerType >
vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::operator vtkDataObject * ( ) const
inline

Definition at line 217 of file vtkCompositeDataSetNodeReference.h.

◆ operator->()

template<typename IteratorType , typename OwnerType >
vtkDataObject * vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::operator-> ( ) const
inline

Definition at line 219 of file vtkCompositeDataSetNodeReference.h.

◆ SetDataObject() [1/2]

template<typename IteratorType , typename OwnerType >
void vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::SetDataObject ( vtkDataObject obj)
inline

Definition at line 221 of file vtkCompositeDataSetNodeReference.h.

◆ SetDataObject() [2/2]

template<typename IteratorType , typename OwnerType >
void vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::SetDataObject ( vtkCompositeDataSet other,
vtkDataObject dObj 
)
inline

Definition at line 228 of file vtkCompositeDataSetNodeReference.h.

◆ operator=() [2/2]

template<typename IteratorType , typename OwnerType >
CompositeDataSetNodeReference & vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::operator= ( vtkDataObject obj)
inline

Definition at line 234 of file vtkCompositeDataSetNodeReference.h.

◆ GetFlatIndex()

template<typename IteratorType , typename OwnerType >
unsigned int vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::GetFlatIndex ( ) const
inline

Definition at line 240 of file vtkCompositeDataSetNodeReference.h.

◆ HasMetaData()

template<typename IteratorType , typename OwnerType >
bool vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::HasMetaData ( ) const
inline

Definition at line 246 of file vtkCompositeDataSetNodeReference.h.

◆ GetMetaData()

template<typename IteratorType , typename OwnerType >
vtkInformation * vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::GetMetaData ( ) const
inline

Definition at line 252 of file vtkCompositeDataSetNodeReference.h.

Friends And Related Symbol Documentation

◆ operator==

template<typename IteratorType , typename OwnerType >
bool operator== ( const CompositeDataSetNodeReference< IteratorType, OwnerType > &  lhs,
const CompositeDataSetNodeReference< IteratorType, OwnerType > &  rhs 
)
friend

Definition at line 183 of file vtkCompositeDataSetNodeReference.h.

◆ operator!=

template<typename IteratorType , typename OwnerType >
bool operator!= ( const CompositeDataSetNodeReference< IteratorType, OwnerType > &  lhs,
const CompositeDataSetNodeReference< IteratorType, OwnerType > &  rhs 
)
friend

Definition at line 190 of file vtkCompositeDataSetNodeReference.h.

Member Data Documentation

◆ OwnerType

template<typename IteratorType , typename OwnerType >
friend vtk::CompositeDataSetNodeReference< IteratorType, OwnerType >::OwnerType

Definition at line 168 of file vtkCompositeDataSetNodeReference.h.


The documentation for this class was generated from the following file: