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