 |
VTK
9.0.1
|
Go to the documentation of this file.
35 #ifndef vtkMappedDataArray_h
36 #define vtkMappedDataArray_h
40 template <
class Scalar>
111 vtkErrorMacro(<<
"WriteVoidPointer: Method not implemented.");
139 size_t TemporaryScalarPointerSize;
146 #include "vtkMappedDataArray.txx"
152 #define vtkMappedDataArrayNewInstanceMacro(thisClass) \
154 vtkObjectBase* NewInstanceInternal() const override \
156 if (vtkDataArray* da = vtkDataArray::CreateDataArray(thisClass::VTK_DATA_TYPE)) \
160 return thisClass::New(); \
167 #define vtkMappedDataArrayTypeMacro(thisClass, superClass) \
168 vtkAbstractTypeMacroWithNewInstanceType(thisClass, superClass, vtkDataArray); \
169 vtkMappedDataArrayNewInstanceMacro(thisClass)
171 #endif // vtkMappedDataArray_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVariant GetVariantValue(vtkIdType idx) override=0
Retrieve value from the array as a variant.
Extend vtkDataArray with abstract type-specific API.
~vtkMappedDataArray() override
void * GetVoidPointer(vtkIdType id) override
Print an error and create an internal, long-lived temporary array.
static vtkMappedDataArray< Scalar > * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkMappedDataArray.
void * WriteVoidPointer(vtkIdType, vtkIdType) override
Not implemented.
abstract superclass for arrays of numeric data
Map non-contiguous data structures into the vtkDataArray API.
vtkArrayDownCast_TemplateFastCastMacro(vtkMappedDataArray)
void ExportToVoidPointer(void *ptr) override
Copy the internal data to the void pointer.
vtkTemplateTypeMacro(vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar >)
a simple class to control print indentation
A atomic type representing the union of many types.
list of point or cell ids
void DataChanged() override
Read the data from the internal temporary array (created by GetVoidPointer) back into the mapped arra...
void SetVariantValue(vtkIdType idx, vtkVariant value) override=0
Set a value in the array from a variant.
Abstract superclass for all arrays.
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override=0
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
Superclass::ValueType ValueType
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
bool HasStandardMemoryLayout() const override
Returns true if this array uses the standard memory layout defined in the VTK user guide,...
void SetVoidArray(void *, vtkIdType, int) override
These methods don't make sense for mapped data array.
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) override=0
Given a list of tuple ids, return an array of tuples.
void Modified() override
Invalidate the internal temporary array and call superclass method.
void DeepCopy(vtkAbstractArray *aa) override=0
Deep copy of data.