3#ifndef vtkStridedImplicitBackend_h
4#define vtkStridedImplicitBackend_h
20#include "vtkCommonCoreModule.h"
24VTK_ABI_NAMESPACE_BEGIN
26template <
typename ValueType>
71 const ValueType*
GetBuffer()
const {
return this->Buffer; }
84 const ValueType* Buffer =
nullptr;
87 int NumberOfComponents = 1;
93#if defined(VTK_STRIDED_BACKEND_INSTANTIATING)
95#define VTK_INSTANTIATE_STRIDED_BACKEND(ValueType) \
96 VTK_ABI_NAMESPACE_BEGIN \
97 template class VTKCOMMONCORE_EXPORT vtkStridedImplicitBackend<ValueType>; \
100#elif defined(VTK_USE_EXTERN_TEMPLATE)
102#ifndef VTK_STRIDED_BACKEND_TEMPLATE_EXTERN
103#define VTK_STRIDED_BACKEND_TEMPLATE_EXTERN
106#pragma warning(disable : 4910)
108VTK_ABI_NAMESPACE_BEGIN
list of point or cell ids
A backend for the vtkImplicitArray framework to give a strided view on a buffer.
vtkStridedImplicitBackend(const ValueType *buffer, vtkIdType stride, int components, vtkIdType offset)
Constructors.
ValueType mapComponent(vtkIdType tupleIdx, int compIdx) const
Return the specified component value.
const ValueType * GetBuffer() const
Return the memory size of the buffer in bytes.
void mapTuple(vtkIdType tupleIdx, ValueType *tuple) const
Fill tuple with the content of the tupleIdx of the array.
vtkIdType GetStride() const
Return the stride of the buffer in number of values.
ValueType operator()(vtkIdType idx) const
Return the value at the given flat idx.
vtkIdType GetOffset() const
Return the offset of the buffer in number of values.
vtkStridedImplicitBackend(const ValueType *buffer, vtkIdType stride, int components)
Constructors.
vtkStridedImplicitBackend(const ValueType *buffer, vtkIdType stride)
Constructors.
~vtkStridedImplicitBackend()
#define vtkExternTemplateMacro(decl)
A macro to declare extern templates for all numerical types.