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

An ArrayHandle that can behave like several other handles. More...

#include <ArrayHandleMultiplexer.h>

Inheritance diagram for vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >:
vtkm::cont::ArrayHandle< detail::ArrayHandleMultiplexerTraits< ArrayHandleTypes... >::ValueType, detail::ArrayHandleMultiplexerTraits< ArrayHandleTypes... >::StorageTag >

Public Types

using Thisclass = typename vtkm::cont::detail::GetTypeInParentheses< void(ArrayHandleMultiplexer< ArrayHandleTypes... >) >::type
 
using Superclass = typename vtkm::cont::detail::GetTypeInParentheses< void(vtkm::cont::ArrayHandle< typename Traits::ValueType, typename Traits::StorageTag >) >::type
 
using ValueType = typename Superclass::ValueType
 
using StorageTag = typename Superclass::StorageTag
 
using StorageType = typename Superclass::StorageType
 
using ReadPortalType = typename Superclass::ReadPortalType
 
using WritePortalType = typename Superclass::WritePortalType
 

Public Member Functions

 ArrayHandleMultiplexer ()
 
VTKM_CONT ArrayHandleMultiplexer (const Thisclass &src)
 
VTKM_CONT ArrayHandleMultiplexer (Thisclass &&src) noexcept
 
VTKM_CONT ArrayHandleMultiplexer (const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &src)
 
VTKM_CONT ArrayHandleMultiplexer (vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&src) noexcept
 
VTKM_CONT ArrayHandleMultiplexer (const std::vector< vtkm::cont::internal::Buffer > &buffers)
 
VTKM_CONT ArrayHandleMultiplexer (std::vector< vtkm::cont::internal::Buffer > &&buffers) noexcept
 
VTKM_CONT Thisclassoperator= (const Thisclass &src)
 
VTKM_CONT Thisclassoperator= (Thisclass &&src) noexcept
 
template<typename RealStorageTag >
 ArrayHandleMultiplexer (const vtkm::cont::ArrayHandle< ValueType, RealStorageTag > &src)
 
bool IsValid () const
 
template<typename S >
void SetArray (const vtkm::cont::ArrayHandle< ValueType, S > &src)
 
auto GetArrayHandleVariant () const -> decltype(StorageType::GetArrayHandleVariant(this->GetBuffers()))
 

Private Types

using Traits = detail::ArrayHandleMultiplexerTraits< ArrayHandleTypes... >
 

Detailed Description

template<typename... ArrayHandleTypes>
class vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >

An ArrayHandle that can behave like several other handles.

An ArrayHandleMultiplexer simply redirects its calls to another ArrayHandle. However the type of that ArrayHandle does not need to be (completely) known at runtime. Rather, ArrayHandleMultiplexer is defined over a set of possible ArrayHandle types. Any one of these ArrayHandles may be assigned to the ArrayHandleMultiplexer.

When a value is retreived from the ArrayHandleMultiplexer, the multiplexer checks to see which type of array is currently stored in it. It then redirects to the ArrayHandle of the appropriate type.

The ArrayHandleMultiplexer template parameters are all the ArrayHandle types it should support.

If only one template parameter is given, it is assumed to be the ValueType of the array. A default list of supported arrays is supported (see vtkm::cont::internal::ArrayHandleMultiplexerDefaultArrays.) If multiple template parameters are given, they are all considered possible ArrayHandle types.

Member Typedef Documentation

◆ ReadPortalType

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ReadPortalType = typename Superclass::ReadPortalType

◆ StorageTag

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::StorageTag = typename Superclass::StorageTag

◆ StorageType

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::StorageType = typename Superclass::StorageType

◆ Superclass

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (vtkm::cont::ArrayHandle<typename Traits::ValueType, typename Traits::StorageTag>) >::type

◆ Thisclass

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleMultiplexer<ArrayHandleTypes...>) >::type

◆ Traits

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::Traits = detail::ArrayHandleMultiplexerTraits<ArrayHandleTypes...>
private

◆ ValueType

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ValueType = typename Superclass::ValueType

◆ WritePortalType

template<typename... ArrayHandleTypes>
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::WritePortalType = typename Superclass::WritePortalType

Constructor & Destructor Documentation

◆ ArrayHandleMultiplexer() [1/8]

template<typename... ArrayHandleTypes>
vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( )
inline

◆ ArrayHandleMultiplexer() [2/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( const Thisclass src)
inline

◆ ArrayHandleMultiplexer() [3/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( Thisclass &&  src)
inlinenoexcept

◆ ArrayHandleMultiplexer() [4/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( const vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &  src)
inline

◆ ArrayHandleMultiplexer() [5/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( vtkm::cont::ArrayHandle< typename Superclass::ValueType, typename Superclass::StorageTag > &&  src)
inlinenoexcept

◆ ArrayHandleMultiplexer() [6/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( const std::vector< vtkm::cont::internal::Buffer > &  buffers)
inlineexplicit

◆ ArrayHandleMultiplexer() [7/8]

template<typename... ArrayHandleTypes>
VTKM_CONT vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( std::vector< vtkm::cont::internal::Buffer > &&  buffers)
inlineexplicitnoexcept

◆ ArrayHandleMultiplexer() [8/8]

template<typename... ArrayHandleTypes>
template<typename RealStorageTag >
vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ArrayHandleMultiplexer ( const vtkm::cont::ArrayHandle< ValueType, RealStorageTag > &  src)
inline

Member Function Documentation

◆ GetArrayHandleVariant()

template<typename... ArrayHandleTypes>
auto vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::GetArrayHandleVariant ( ) const -> decltype(StorageType::GetArrayHandleVariant(this->GetBuffers()))
inline

◆ IsValid()

template<typename... ArrayHandleTypes>
bool vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::IsValid ( ) const
inline

◆ operator=() [1/2]

template<typename... ArrayHandleTypes>
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::operator= ( const Thisclass src)
inline

◆ operator=() [2/2]

template<typename... ArrayHandleTypes>
VTKM_CONT Thisclass& vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::operator= ( Thisclass &&  src)
inlinenoexcept

◆ SetArray()

template<typename... ArrayHandleTypes>
template<typename S >
void vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::SetArray ( const vtkm::cont::ArrayHandle< ValueType, S > &  src)
inline

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