VTK-m
2.2
|
An ArrayHandle that can behave like several other handles. More...
#include <ArrayHandleMultiplexer.h>
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 Thisclass & | operator= (const Thisclass &src) |
VTKM_CONT Thisclass & | operator= (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... > |
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.
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ReadPortalType = typename Superclass::ReadPortalType |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::StorageTag = typename Superclass::StorageTag |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::StorageType = typename Superclass::StorageType |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::Superclass = typename vtkm::cont::detail::GetTypeInParentheses<void (vtkm::cont::ArrayHandle<typename Traits::ValueType, typename Traits::StorageTag>) >::type |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::Thisclass = typename vtkm::cont::detail::GetTypeInParentheses<void (ArrayHandleMultiplexer<ArrayHandleTypes...>) >::type |
|
private |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::ValueType = typename Superclass::ValueType |
using vtkm::cont::ArrayHandleMultiplexer< ArrayHandleTypes >::WritePortalType = typename Superclass::WritePortalType |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlineexplicit |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |