VTK-m  1.5
Public Member Functions | Private Types | List of all members
vtkm::cont::VariantArrayHandleCommon Class Reference

VariantArrayHandle superclass holding common operations. More...

#include <VariantArrayHandle.h>

Inheritance diagram for vtkm::cont::VariantArrayHandleCommon:
vtkm::cont::UnknownArrayHandle

Public Member Functions

VTKM_CONT VariantArrayHandleCommon ()=default
 
VTKM_CONT VariantArrayHandleCommon (const vtkm::cont::UnknownArrayHandle &array)
 
template<typename ArrayHandleType >
VTKM_CONT ArrayHandleType Cast () const
 Returns this array cast to the given ArrayHandle type. More...
 
template<typename TypeList , typename StorageList , typename Functor , typename... Args>
VTKM_CONT void CastAndCall (Functor &&functor, Args &&... args) const
 Call a functor using the underlying array type. More...
 
- Public Member Functions inherited from vtkm::cont::UnknownArrayHandle
VTKM_CONT UnknownArrayHandle ()=default
 
 UnknownArrayHandle (const UnknownArrayHandle &)=default
 
template<typename T , typename S >
VTKM_CONT UnknownArrayHandle (const vtkm::cont::ArrayHandle< T, S > &array)
 
UnknownArrayHandleoperator= (const vtkm::cont::UnknownArrayHandle &)=default
 
VTKM_CONT UnknownArrayHandle NewInstance () const
 Create a new array of the same type as this array. More...
 
template<typename ValueType >
VTKM_CONT bool IsValueType () const
 Returns true if this array matches the ValueType template argument. More...
 
template<typename StorageType >
VTKM_CONT bool IsStorageType () const
 Returns true if this array matches the StorageType template argument. More...
 
template<typename ArrayHandleType >
VTKM_CONT bool IsType () const
 Returns true if this array matches the ArrayHandleType template argument. More...
 
template<typename NewValueTypeList , typename NewStorageTypeList >
VTKM_CONT vtkm::cont::UncertainArrayHandle< NewValueTypeList, NewStorageTypeList > ResetTypes (NewValueTypeList=NewValueTypeList{}, NewStorageTypeList=NewStorageTypeList{}) const
 Assigns potential value and storage types. More...
 
VTKM_CONT vtkm::Id GetNumberOfValues () const
 Returns the number of values in the array. More...
 
VTKM_CONT vtkm::IdComponent GetNumberOfComponents () const
 Returns the number of components for each value in the array. More...
 
template<typename ArrayHandleType >
VTKM_CONT bool CanConvert () const
 Determine if the contained array can be passed to the given array type. More...
 
template<typename TypeList , typename StorageList , typename Functor , typename... Args>
VTKM_CONT void CastAndCallForTypes (Functor &&functor, Args &&... args) const
 Call a functor using the underlying array type. More...
 
VTKM_CONT void ReleaseResourcesExecution () const
 Releases any resources being used in the execution environment (that are not being shared by the control environment). More...
 
VTKM_CONT void ReleaseResources () const
 Releases all resources in both the control and execution environments. More...
 
VTKM_CONT void PrintSummary (std::ostream &out, bool full=false) const
 
template<typename T , typename... Ss>
void AsArrayHandle (vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagMultiplexer< Ss... >> &array) const
 
template<typename T , typename S >
VTKM_CONT void AsArrayHandle (vtkm::cont::ArrayHandle< T, S > &array) const
 
template<typename T , typename... Ss>
VTKM_CONT void AsArrayHandle (vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagMultiplexer< Ss... >> &array) const
 
template<typename TargetT , typename SourceT , typename SourceS >
VTKM_CONT void AsArrayHandle (vtkm::cont::ArrayHandle< TargetT, vtkm::cont::StorageTagCast< SourceT, SourceS >> &array) const
 
template<typename ArrayType >
VTKM_CONT ArrayType AsArrayHandle () const
 

Private Types

using Superclass = vtkm::cont::UnknownArrayHandle
 

Detailed Description

VariantArrayHandle superclass holding common operations.

VariantArrayHandleCommon is a superclass to all VariantArrayHandleBase and VariantArrayHandle classes. It contains all operations that are independent of the type lists defined for these templated class or has versions of methods that allow you to specify type lists.

See the documentation of VariantArrayHandleBase for more information.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ VariantArrayHandleCommon() [1/2]

VTKM_CONT vtkm::cont::VariantArrayHandleCommon::VariantArrayHandleCommon ( )
default

◆ VariantArrayHandleCommon() [2/2]

VTKM_CONT vtkm::cont::VariantArrayHandleCommon::VariantArrayHandleCommon ( const vtkm::cont::UnknownArrayHandle array)
inline

Member Function Documentation

◆ Cast()

template<typename ArrayHandleType >
VTKM_CONT ArrayHandleType vtkm::cont::VariantArrayHandleCommon::Cast ( ) const
inline

Returns this array cast to the given ArrayHandle type.

Throws ErrorBadType if the cast does not work. Use IsType to check if the cast can happen.

◆ CastAndCall()

template<typename TypeList , typename StorageList , typename Functor , typename... Args>
VTKM_CONT void vtkm::cont::VariantArrayHandleCommon::CastAndCall ( Functor &&  functor,
Args &&...  args 
) const
inline

Call a functor using the underlying array type.

CastAndCall attempts to cast the held array to a specific value type, and then calls the given functor with the cast array. You must specify the TypeList and StorageList as template arguments. (Note that this calling differs from that of the CastAndCall methods of subclasses.)


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