55 #ifndef vtkAbstractArray_h
56 #define vtkAbstractArray_h
58 #include "vtkCommonCoreModule.h"
63 VTK_ABI_NAMESPACE_BEGIN
94 virtual void Initialize() = 0;
100 virtual int GetDataType()
const = 0;
108 virtual int GetDataTypeSize()
const = 0;
109 static int GetDataTypeSize(
int type);
119 virtual int GetElementComponentSize()
const = 0;
126 vtkSetClampMacro(NumberOfComponents,
int, 1,
VTK_INT_MAX);
144 bool HasAComponentName()
const;
159 virtual void SetNumberOfTuples(
vtkIdType numTuples) = 0;
167 virtual bool SetNumberOfValues(
vtkIdType numValues);
195 virtual void InsertTuple(
210 virtual void InsertTuplesStartingAt(
218 virtual void InsertTuples(
248 virtual bool HasStandardMemoryLayout()
const;
257 virtual void* GetVoidPointer(
vtkIdType valueIdx) = 0;
276 virtual void InterpolateTuple(
295 virtual void Squeeze() = 0;
334 VTK_DATA_ARRAY_USER_DEFINED
355 virtual void SetVoidArray(
359 this->SetVoidArray(array, size, save);
369 virtual void SetArrayFreeFunction(
void (*callback)(
void*)) = 0;
376 virtual void ExportToVoidPointer(
void* out_ptr);
386 virtual unsigned long GetActualMemorySize()
const = 0;
392 vtkSetStringMacro(Name);
393 vtkGetStringMacro(Name);
401 return vtkImageScalarTypeNameMacro(this->GetDataType());
420 virtual int IsNumeric()
const = 0;
437 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
456 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues());
470 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues()) = 0;
480 virtual void DataChanged() = 0;
487 virtual void ClearLookup() = 0;
541 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
542 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
633 MAX_DISCRETE_VALUES = 32
641 vtkGetMacro(MaxDiscreteValues,
unsigned int);
642 vtkSetMacro(MaxDiscreteValues,
unsigned int);
656 DataArrayTemplate = AoSDataArrayTemplate
668 const char* GetArrayTypeAsString()
const;
693 virtual void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
708 class vtkInternalComponentNames;
722 template <
typename ArrayT>
746 template <
typename ArrayT>
754 VTK_ABI_NAMESPACE_END
761 #define vtkArrayDownCast_FastCastMacro(ArrayT) \
763 struct vtkArrayDownCast_impl<ArrayT> \
765 inline ArrayT* operator()(vtkAbstractArray* array) { return ArrayT::FastDownCast(array); } \
776 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \
777 template <typename ValueT> \
778 struct vtkArrayDownCast_impl<ArrayT<ValueT>> \
780 inline ArrayT<ValueT>* operator()(vtkAbstractArray* array) \
782 return ArrayT<ValueT>::FastDownCast(array); \
virtual const char * GetDataTypeAsString() const
Get the name of a data type as a string.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
An array holding vtkVariants.
int GetNumberOfComponents() const
Set/Get the dimension (n) of the components.
Abstract superclass for all arrays.
Implementation of vtkArrayDownCast.
dynamic, self-adjusting array of vtkIdType
A type representing the union of many types.
virtual void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod))
This method lets the user specify data to be held by the array.
vtkInformation * Information
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
virtual vtkIdType GetDataSize() const
Returns the size of the data in DataTypeSize units.
a simple class to control print indentation
list of point or cell ids
ArrayT * operator()(vtkAbstractArray *array)
abstract superclass for arrays of numeric data
bool HasInformation() const
Inquire if this array has an instance of vtkInformation already associated with it.
void save(Archiver &ar, const std::string &str, const unsigned int vtkNotUsed(version))
virtual void Modified()
Update the modification time for this object.
Abstract superclass to iterate over elements in an vtkAbstractArray.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
void Reset()
Reset to an empty state, without freeing any memory.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual int GetArrayType() const
Method for type-checking in FastDownCast implementations.
vtkInternalComponentNames * ComponentNames
vtkIdType GetSize() const
Return the size of the data.
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
unsigned int MaxDiscreteValues
vtkSmartPointer< vtkDataArray > CreateArray(const Ioss::Field &field)
Create an array for the given field.
vtkIdType GetMaxId() const
What is the maximum id currently in the array.