VTK-m  1.8
Public Member Functions | Private Types | Private Member Functions | 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

VTKM_CONT UncertainCellSet ()=default
 
template<typename CellSetType >
VTKM_CONT UncertainCellSet (const CellSetType &cellSet)
 
VTKM_CONT UncertainCellSet (const vtkm::cont::UnknownCellSet &src)
 
template<typename OtherCellSetList >
VTKM_CONT UncertainCellSet (const UncertainCellSet< OtherCellSetList > &src)
 
VTKM_CONT Thisclass NewInstance () const
 Create a new cell set of the same type as this. More...
 
template<typename Functor , typename... Args>
VTKM_CONT 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
VTKM_CONT UnknownCellSet ()=default
 
template<typename CellSetType >
VTKM_CONT UnknownCellSet (const CellSetType &cellSet)
 
VTKM_CONT bool IsValid () const
 Returns whether a cell set is stored in this UnknownCellSet. More...
 
VTKM_CONT vtkm::cont::CellSetGetCellSetBase ()
 Returns a pointer to the CellSet base class. More...
 
const VTKM_CONT vtkm::cont::CellSetGetCellSetBase () const
 
VTKM_CONT UnknownCellSet NewInstance () const
 Create a new cell set of the same type as this cell set. More...
 
VTKM_CONT std::string GetCellSetName () const
 Returns the name of the cell set type stored in this class. More...
 
template<typename CellSetType >
VTKM_CONT bool IsType () const
 Returns true if this cell set matches the CellSetType template argument. More...
 
VTKM_CONT vtkm::Id GetNumberOfCells () const
 
VTKM_CONT vtkm::Id GetNumberOfFaces () const
 
VTKM_CONT vtkm::Id GetNumberOfEdges () const
 
VTKM_CONT vtkm::Id GetNumberOfPoints () const
 
VTKM_CONT vtkm::UInt8 GetCellShape (vtkm::Id id) const
 
VTKM_CONT vtkm::IdComponent GetNumberOfPointsInCell (vtkm::Id id) const
 
VTKM_CONT void GetCellPointIds (vtkm::Id id, vtkm::Id *ptids) const
 
VTKM_CONT void DeepCopyFrom (const CellSet *src)
 
VTKM_CONT void PrintSummary (std::ostream &os) const
 
VTKM_CONT void ReleaseResourcesExecution ()
 
template<typename CellSetType >
VTKM_CONT bool CanConvert () const
 Returns true if this cell set can be retrieved as the given type. More...
 
template<typename CellSetList >
VTKM_CONT vtkm::cont::UncertainCellSet< CellSetList > ResetCellSetList (CellSetList) const
 Assigns potential cell set types. More...
 
template<typename CellSetList >
VTKM_CONT vtkm::cont::UncertainCellSet< CellSetList > ResetCellSetList () const
 
template<typename CellSetList , typename Functor , typename... Args>
VTKM_CONT void CastAndCallForTypes (Functor &&functor, Args &&... args) const
 Call a functor using the underlying cell set type. More...
 
template<typename CellSetType >
 VTKM_DEPRECATED (1.8, "Use CanConvert<decltype(cellset)>() (or IsType).") VTKM_CONT bool IsSameType(const CellSetType &) const
 
template<typename CellSetType >
VTKM_CONT CellSetType & Cast () const
 
template<typename CellSetType >
VTKM_CONT void CopyTo (CellSetType &cellSet) const
 
template<typename Functor , typename... Args>
 VTKM_DEPRECATED (1.8, "Use the vtkm::cont::CastAndCall free function4 or use CastAndCallForTypes or " "use ResetCellList and then CastAndCall.") VTKM_CONT void CastAndCall(Functor &&f
 
template<typename NewCellSetList >
VTKM_CONT vtkm::cont::UncertainCellSet< NewCellSetList > ResetCellSetList (NewCellSetList) const
 
template<typename NewCellSetList >
VTKM_CONT vtkm::cont::UncertainCellSet< NewCellSetList > ResetCellSetList () const
 
template<typename CellSetType >
VTKM_CONT void AsCellSet (CellSetType &cellSet) const
 Get the cell set as a known type. More...
 
template<typename CellSetType >
VTKM_CONT CellSetType AsCellSet () const
 Get the cell set as a known type. More...
 

Private Types

using Superclass = UnknownCellSet
 
using Thisclass = UncertainCellSet< CellSetList >
 

Private Member Functions

 VTKM_IS_LIST (CellSetList)
 
 VTKM_STATIC_ASSERT_MSG ((!std::is_same< CellSetList, vtkm::ListUniversal >::value), "Cannot use vtkm::ListUniversal with UncertainCellSet.")
 

Additional Inherited Members

- Public Attributes inherited from vtkm::cont::UnknownCellSet
Args &&const args
 

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 vtkm::cont::UncertainCellSet< CellSetList >::UncertainCellSet ( )
default

◆ UncertainCellSet() [2/4]

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

◆ UncertainCellSet() [3/4]

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

◆ UncertainCellSet() [4/4]

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

Member Function Documentation

◆ CastAndCall()

template<typename CellSetList >
template<typename Functor , typename... Args>
VTKM_CONT 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 >
VTKM_CONT 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.

◆ VTKM_IS_LIST()

template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList >::VTKM_IS_LIST ( CellSetList  )
private

◆ VTKM_STATIC_ASSERT_MSG()

template<typename CellSetList >
vtkm::cont::UncertainCellSet< CellSetList >::VTKM_STATIC_ASSERT_MSG ( (!std::is_same< CellSetList, vtkm::ListUniversal >::value)  ,
"Cannot use vtkm::ListUniversal with UncertainCellSet< CellSetList >."   
)
private

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