36#ifndef vtkTypedDataArray_h
37#define vtkTypedDataArray_h
41#include "vtkCommonCoreModule.h"
44template <
class Scalar>
47template <
class Scalar>
189template <
class Scalar>
195template <
class Scalar>
201#include "vtkTypedDataArray.txx"
Abstract superclass for all arrays.
Base interface for all typed vtkDataArray subclasses.
STL-style random access iterator for vtkTypedDataArrays.
Extend vtkDataArray with abstract type-specific API.
vtkTypeBool Allocate(vtkIdType size, vtkIdType ext=1000) override=0
Allocate memory for this array.
Iterator Begin()
Return an iterator initialized to the first element of the data.
virtual void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType v)
virtual bool ReallocateTuples(vtkIdType numTuples)
Needed for vtkGenericDataArray API, but just aborts.
static vtkTypedDataArray< Scalar > * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkTypedDataArray.
int GetDataTypeSize() const override
Return the size of the element type in bytes.
virtual bool AllocateTuples(vtkIdType numTuples)
Needed for vtkGenericDataArray API, but just aborts.
virtual ValueType & GetValueReference(vtkIdType idx)=0
Get a reference to the scalar value at a particular index.
virtual ValueType GetTypedComponent(vtkIdType tupleIdx, int comp) const
Superclass::ValueType ValueType
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
virtual vtkIdType InsertNextTypedTuple(const ValueType *t)=0
Insert (memory allocation performed) the tuple onto the end of the array.
Iterator End()
Return an iterator initialized to first element past the end of the data.
vtkTypedDataArrayIterator< ValueType > Iterator
Typedef to a suitable iterator class.
virtual vtkIdType InsertNextValue(ValueType v)=0
Insert data at the end of the array.
virtual void InsertTypedTuple(vtkIdType i, const ValueType *t)=0
Insert (memory allocation performed) the tuple into the ith location in the array.
vtkTemplateTypeMacro(vtkTypedDataArray< Scalar >, GenericDataArrayType)
virtual ValueType GetValue(vtkIdType idx) const =0
Get the data at a particular index.
~vtkTypedDataArray() override
virtual void SetValue(vtkIdType idx, ValueType value)=0
Set the data at a particular index.
vtkTypeBool Resize(vtkIdType numTuples) override=0
Resize the array to the requested number of tuples and preserve data.
virtual void SetTypedTuple(vtkIdType i, const ValueType *t)=0
Set the tuple value at the ith location in the array.
virtual void GetTypedTuple(vtkIdType idx, ValueType *t) const =0
Copy the tuple value into a user-provided array.
virtual void InsertValue(vtkIdType idx, ValueType v)=0
Insert data at a specified position in the array.
int GetDataType() const override
Return the VTK data type held by this array.
Template defining traits of native types used by VTK.
#define vtkArrayDownCast_TemplateFastCastMacro(ArrayT)
Same as vtkArrayDownCast_FastCastMacro, but treats ArrayT as a single-parameter template (the paramet...
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)