22 #include "vtkCommonCoreModule.h"
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkBitArrayLookup;
258 return this->WritePointer(
id, number);
283 unsigned char* array,
vtkIdType size,
int save,
int deleteMethod = VTK_DATA_ARRAY_DELETE);
287 this->SetArray(static_cast<unsigned char*>(array), size, save);
291 this->SetArray(static_cast<unsigned char*>(array), size, save, deleteMethod);
350 virtual void InitializeUnusedBitsInLastByte();
353 unsigned char* ResizeAndExtend(
vtkIdType sz);
359 void (*DeleteFunction)(
void*);
368 vtkBitArrayLookup* Lookup;
374 this->
Array[
id / 8] =
375 static_cast<unsigned char>((value != 0) ? (this->
Array[
id / 8] | (0x80 >>
id % 8))
376 : (this->
Array[
id / 8] & (~(0x80 >>
id % 8))));
382 if (
id >= this->
Size)
389 this->
Array[
id / 8] =
390 static_cast<unsigned char>((i != 0) ? (this->
Array[
id / 8] | (0x80 >>
id % 8))
391 : (this->
Array[
id / 8] & (~(0x80 >>
id % 8))));
392 if (
id > this->
MaxId)
421 VTK_ABI_NAMESPACE_END
int GetDataType() const override
Return the underlying data type.
int GetDataTypeSize() const override
Return the size of the underlying data type.
void Squeeze() override
Free any unneeded memory.
virtual void DataChanged()=0
Tell the array explicitly that the data has changed.
virtual void DeepCopy(vtkAbstractArray *da)
Deep copy of data.
void SetVariantValue(vtkIdType idx, vtkVariant value) override
Set a value in the array from a variant.
Abstract superclass for all arrays.
virtual vtkIdType LookupValue(vtkVariant value)=0
Return the value indices where a specific value appears.
virtual double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
void InsertValue(vtkIdType id, int i)
Inserts values and checks to make sure there is enough memory.
virtual void Initialize()=0
Release storage and reset array to initial state.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void RemoveLastTuple()
These methods remove tuples from the data array.
A type representing the union of many types.
void SetValue(vtkIdType id, int value)
Set the data at a particular index.
int ToInt(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
void * GetVoidPointer(vtkIdType id) override
Return a void pointer.
virtual void SetComponent(vtkIdType tupleIdx, int compIdx, double value)
Set the data component at the location specified by tupleIdx and compIdx to value.
unsigned char * GetPointer(vtkIdType id)
Direct manipulation of the underlying data.
virtual void ClearLookup()=0
Delete the associated fast lookup data structure on this array, if it exists.
a simple class to control print indentation
list of point or cell ids
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
Inserts values from a variant and checks to ensure there is enough memory.
abstract superclass for arrays of numeric data
virtual vtkArrayIterator * NewIterator()=0
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void InsertTuplesStartingAt(vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
See documentation from parent class.
void DataChanged() override
Tell the array explicitly that the data has changed.
void save(Archiver &ar, const std::string &str, const unsigned int vtkNotUsed(version))
void SetVoidArray(void *array, vtkIdType size, int save, int deleteMethod) override
This method lets the user specify data to be held by the array.
virtual void InsertVariantValue(vtkIdType valueIdx, vtkVariant value)=0
Insert a value into the array from a variant.
Abstract superclass to iterate over elements in an vtkAbstractArray.
virtual void InsertComponent(vtkIdType tupleIdx, int compIdx, double value)
Insert value at the location specified by tupleIdx and compIdx.
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
unsigned char * ResizeAndExtend(vtkIdType sz)
virtual void InitializeUnusedBitsInLastByte()
This method should be called whenever MaxId needs to be changed, as this method fills the unused bits...
virtual vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000)=0
Allocate memory for this array.
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
virtual vtkTypeBool Resize(vtkIdType numTuples)=0
Resize the array to the requested number of tuples and preserve data.
dynamic, self-adjusting array of bits
virtual void SetArrayFreeFunction(void(*callback)(void *))=0
This method allows the user to specify a custom free function to be called when the array is dealloca...
void * WriteVoidPointer(vtkIdType id, vtkIdType number) override
Get the address of a particular data index.
vtkIdType InsertNextValue(int i)
virtual void RemoveTuple(vtkIdType tupleIdx)=0
These methods remove tuples from the data array.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
See documentation from parent class.
virtual bool SetNumberOfValues(vtkIdType numValues)
Specify the number of values (tuples * components) for this object to hold.
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
virtual void Squeeze()=0
Free any unnecessary memory.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void SetVariantValue(vtkIdType valueIdx, vtkVariant value)=0
Set a value in the array from a variant.
void SetVoidArray(void *array, vtkIdType size, int save) override
This method lets the user specify data to be held by the array.
virtual void RemoveFirstTuple()
These methods remove tuples from the data array.