12 template <
typename ValueT>
36 std::copy(tuple, tuple + this->NumberOfComponents, this->
Buffer->
GetBuffer() + valueIdx);
52 if (this->Buffer->Reallocate(numTuples * this->GetNumberOfComponents()))
54 this->
Capacity = this->Buffer->GetSize();
This class is used in some unit tests to setup a mock data array which derives vtkGenericDataArray.
vtkNew< vtkBuffer< ValueT > > Buffer
void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value)
ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const
void * GetVoidPointer(vtkIdType idx) override
Return a void pointer.
Base interface for all typed vtkDataArray subclasses.
void GetTypedTuple(vtkIdType tupleIdx, ValueType *tuple) const
ScalarType * GetBuffer()
Access the buffer as a scalar pointer.
bool ReallocateTuples(vtkIdType numTuples)
#define VTK_STANDARD_NEW_BODY(thisClass)
void SetValue(vtkIdType valueIdx, ValueType value)
vtkTemplateTypeMacro(MockDataArray< ValueT >, GenericDataArrayType)
typename Superclass::ValueType ValueType
Allocate and hold a VTK object.
void SetTypedTuple(vtkIdType tupleIdx, const ValueType *tuple)
static MockDataArray * New()
ValueType GetValue(vtkIdType valueIdx) const