VTK-m  2.2
Public Member Functions | Private Types | List of all members
vtkm::cont::UncertainCellSet< CellSetList > Class Template Reference

A CellSet of an uncertain type. More...

#include <UncertainCellSet.h>

Inheritance diagram for vtkm::cont::UncertainCellSet< CellSetList >:
vtkm::cont::UnknownCellSet

Public Member Functions

 UncertainCellSet ()=default
 
template<typename CellSetType >
 UncertainCellSet (const CellSetType &cellSet)
 
 UncertainCellSet (const vtkm::cont::UnknownCellSet &src)
 
template<typename OtherCellSetList >
 UncertainCellSet (const UncertainCellSet< OtherCellSetList > &src)
 
Thisclass NewInstance () const
 Create a new cell set of the same type as this. More...
 
template<typename Functor , typename... Args>
void CastAndCall (Functor &&functor, Args &&... args) const
 Call a functor using the underlying cell set type. More...
 
- Public Member Functions inherited from vtkm::cont::UnknownCellSet
 UnknownCellSet ()=default
 
template<typename CellSetType >
 UnknownCellSet (const CellSetType &cellSet)
 
bool IsValid () const
 Returns whether a cell set is stored in this UnknownCellSet. More...
 
vtkm::cont::CellSetGetCellSetBase ()
 Returns a pointer to the CellSet base class. More...
 
const vtkm::cont::CellSetGetCellSetBase () const
 
UnknownCellSet NewInstance () const
 Create a new cell set of the same type as this cell set. More...
 
std::string GetCellSetName () const
 Returns the name of the cell set type stored in this class. More...
 
template<typename CellSetType >
bool IsType () const
 Returns true if this cell set matches the CellSetType template argument. More...
 
vtkm::Id GetNumberOfCells () const
 
vtkm::Id GetNumberOfFaces () const
 
vtkm::Id GetNumberOfEdges () const
 
vtkm::Id GetNumberOfPoints () const
 
vtkm::UInt8 GetCellShape (vtkm::Id id) const
 
vtkm::IdComponent GetNumberOfPointsInCell (vtkm::Id id) const
 
void GetCellPointIds (vtkm::Id id, vtkm::Id *ptids) const
 
void DeepCopyFrom (const CellSet *src)
 
void PrintSummary (std::ostream &os) const
 
void ReleaseResourcesExecution ()
 
template<typename CellSetType >
bool CanConvert () const
 Returns true if this cell set can be retrieved as the given type. More...
 
template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList > ResetCellSetList (CellSetList) const
 Assigns potential cell set types. More...
 
template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList > ResetCellSetList () const
 
template<typename CellSetList , typename Functor , typename... Args>
void CastAndCallForTypes (Functor &&functor, Args &&... args) const
 Call a functor using the underlying cell set type. More...
 
template<typename NewCellSetList >
vtkm::cont::UncertainCellSet< NewCellSetList > ResetCellSetList (NewCellSetList) const
 
template<typename NewCellSetList >
vtkm::cont::UncertainCellSet< NewCellSetList > ResetCellSetList () const
 
template<typename CellSetType >
void AsCellSet (CellSetType &cellSet) const
 Get the cell set as a known type. More...
 
template<typename CellSetType >
CellSetType AsCellSet () const
 Get the cell set as a known type. More...
 

Private Types

using Superclass = UnknownCellSet
 
using Thisclass = UncertainCellSet< CellSetList >
 

Detailed Description

template<typename CellSetList>
class vtkm::cont::UncertainCellSet< CellSetList >

A CellSet of an uncertain type.

UncertainCellSet holds a CellSet object using runtime polymorphism to manage different types. It behaves like its superclass, UnknownCellSet, except that it also contains a template parameter that provides a vtkm::List of potential cell set types.

These potental types come into play when the CastAndCall method is called (or the UncertainCellSet is used in the vtkm::cont::CastAndCall function). In this case, the CastAndCall will search for CellSets of types that match this list.

Both UncertainCellSet and UnknownCellSet have a method named ResetCellSetList that redefines the list of potential cell sets by returning a new UncertainCellSet containing the same CellSet but with the new cell set type list.

Member Typedef Documentation

◆ Superclass

template<typename CellSetList >
using vtkm::cont::UncertainCellSet< CellSetList >::Superclass = UnknownCellSet
private

◆ Thisclass

template<typename CellSetList >
using vtkm::cont::UncertainCellSet< CellSetList >::Thisclass = UncertainCellSet<CellSetList>
private

Constructor & Destructor Documentation

◆ UncertainCellSet() [1/4]

template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList >::UncertainCellSet ( )
default

◆ UncertainCellSet() [2/4]

template<typename CellSetList >
template<typename CellSetType >
vtkm::cont::UncertainCellSet< CellSetList >::UncertainCellSet ( const CellSetType &  cellSet)
inline

◆ UncertainCellSet() [3/4]

template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList >::UncertainCellSet ( const vtkm::cont::UnknownCellSet src)
inlineexplicit

◆ UncertainCellSet() [4/4]

template<typename CellSetList >
template<typename OtherCellSetList >
vtkm::cont::UncertainCellSet< CellSetList >::UncertainCellSet ( const UncertainCellSet< OtherCellSetList > &  src)
inlineexplicit

Member Function Documentation

◆ CastAndCall()

template<typename CellSetList >
template<typename Functor , typename... Args>
void vtkm::cont::UncertainCellSet< CellSetList >::CastAndCall ( Functor &&  functor,
Args &&...  args 
) const
inline

Call a functor using the underlying cell set type.

CastAndCall attempts to cast the held cell set to a specific type, and then calls the given functor with the cast cell set.

◆ NewInstance()

template<typename CellSetList >
Thisclass vtkm::cont::UncertainCellSet< CellSetList >::NewInstance ( ) const
inline

Create a new cell set of the same type as this.

This method creates a new cell set that is the same type as this one and returns a new UncertainCellSet for it.


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