67 #ifndef vtkAbstractArray_h
68 #define vtkAbstractArray_h
70 #include "vtkCommonCoreModule.h"
105 virtual void Initialize() = 0;
111 virtual int GetDataType()
const = 0;
119 virtual int GetDataTypeSize()
const = 0;
120 static int GetDataTypeSize(
int type);
130 virtual int GetElementComponentSize()
const = 0;
137 vtkSetClampMacro(NumberOfComponents,
int, 1,
VTK_INT_MAX);
155 bool HasAComponentName()
const;
170 virtual void SetNumberOfTuples(
vtkIdType numTuples) = 0;
178 virtual bool SetNumberOfValues(
vtkIdType numValues);
206 virtual void InsertTuple(
221 virtual void InsertTuplesStartingAt(
229 virtual void InsertTuples(
259 virtual bool HasStandardMemoryLayout()
const;
268 virtual void* GetVoidPointer(
vtkIdType valueIdx) = 0;
287 virtual void InterpolateTuple(
306 virtual void Squeeze() = 0;
345 VTK_DATA_ARRAY_USER_DEFINED
366 virtual void SetVoidArray(
370 this->SetVoidArray(array, size, save);
380 virtual void SetArrayFreeFunction(
void (*callback)(
void*)) = 0;
387 virtual void ExportToVoidPointer(
void* out_ptr);
397 virtual unsigned long GetActualMemorySize()
const = 0;
403 vtkSetStringMacro(Name);
404 vtkGetStringMacro(Name);
412 return vtkImageScalarTypeNameMacro(this->GetDataType());
431 virtual int IsNumeric()
const = 0;
448 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
467 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues());
481 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues()) = 0;
491 virtual void DataChanged() = 0;
498 virtual void ClearLookup() = 0;
552 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
553 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
584 virtual int CopyInformation(
vtkInformation* infoFrom,
int deep = 1);
644 MAX_DISCRETE_VALUES = 32
652 vtkGetMacro(MaxDiscreteValues,
unsigned int);
653 vtkSetMacro(MaxDiscreteValues,
unsigned int);
666 DataArrayTemplate = AoSDataArrayTemplate
678 const char* GetArrayTypeAsString()
const;
703 virtual void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
718 class vtkInternalComponentNames;
732 template <
typename ArrayT>
756 template <
typename ArrayT>
769 #define vtkArrayDownCast_FastCastMacro(ArrayT) \
771 struct vtkArrayDownCast_impl<ArrayT> \
773 inline ArrayT* operator()(vtkAbstractArray* array) { return ArrayT::FastDownCast(array); } \
784 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \
785 template <typename ValueT> \
786 struct vtkArrayDownCast_impl<ArrayT<ValueT>> \
788 inline ArrayT<ValueT>* operator()(vtkAbstractArray* array) \
790 return ArrayT<ValueT>::FastDownCast(array); \
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
virtual const char * GetDataTypeAsString(void) const
Get the name of a data type as a string.
A atomic 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.