Go to the documentation of this file.
32 #ifndef vtkTestDataArray_h
33 #define vtkTestDataArray_h
35 #include "vtkCommonCoreModule.h"
39 template <
class ArrayT>
41 typename ArrayT::ValueType>
61 {
return this->Array->GetValue(valueIdx); }
63 { this->Array->SetValue(valueIdx,
value); }
66 { this->Array->SetTypedTuple(tupleIdx,tuple); }
68 { this->Array->SetTypedTuple(tupleIdx,tuple); }
71 {
return this->Array->GetTypedComponent(tupleIdx,compIdx); }
73 { this->Array->SetTypedComponent(tupleIdx,compIdx,
value); }
76 {
return this->Array->GetVoidPointer(valueIdx); }
83 {
return this->Array->Allocate(numTuples) != 0; }
85 {
return this->Array->Allocate(numTuples) != 0; }
void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value)
bool ReallocateTuples(vtkIdType numTuples)
void GetTypedTuple(vtkIdType tupleIdx, ValueType *tuple) const
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Base interface for all typed vtkDataArray subclasses.
ValueType GetValue(vtkIdType valueIdx) const
An implementation of vtkGenericDataArray for testing fallback algorithms.
vtkGenericDataArray< vtkTestDataArray< ArrayT >, ValueType > GenericDataArrayType
~vtkTestDataArray() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
void * GetVoidPointer(vtkIdType valueIdx) override
Return a void pointer.
bool AllocateTuples(vtkIdType numTuples)
void SetTypedTuple(vtkIdType tupleIdx, const ValueType *tuple)
#define vtkAOSArrayNewInstanceMacro(thisClass)
vtkTestDataArray< ArrayT > SelfType
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractTemplateTypeMacro(SelfType, GenericDataArrayType) vtkAOSArrayNewInstanceMacro(SelfType) static vtkTestDataArray< ArrayType > *New()
#define VTK_STANDARD_NEW_BODY(thisClass)
ArrayType::ValueType ValueType
ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const
void SetValue(vtkIdType valueIdx, ValueType value)