Go to the documentation of this file.
31 #include "vtkCommonCoreModule.h"
34 class vtkBitArrayLookup;
223 {
return this->Array +
id/8; }
234 return this->WritePointer(
id, number);
239 return static_cast<void *>(this->GetPointer(
id));
262 void SetArray(
unsigned char* array,
vtkIdType size,
int save,
int deleteMethod=VTK_DATA_ARRAY_DELETE);
266 this->SetArray(static_cast<unsigned char *>(array),
size,
save);
270 this->SetArray(static_cast<unsigned char *>(array),
size,
save, deleteMethod);
319 unsigned char *ResizeAndExtend(
vtkIdType sz);
325 void (*DeleteFunction)(
void*);
335 vtkBitArrayLookup* Lookup;
343 this->
MaxId = number - 1;
351 this->
Array[
id/8] = static_cast<unsigned char>(
352 this->
Array[
id/8] | (0x80 >>
id%8));
356 this->
Array[
id/8] = static_cast<unsigned char>(
357 this->
Array[
id/8] & (~(0x80 >>
id%8)));
364 if (
id >= this->
Size )
373 this->
Array[
id/8] = static_cast<unsigned char>(
374 this->
Array[
id/8] | (0x80 >>
id%8));
378 this->
Array[
id/8] = static_cast<unsigned char>(
379 this->
Array[
id/8] & (~(0x80 >>
id%8)));
381 if (
id > this->
MaxId )
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...
virtual void Initialize()=0
Release storage and reset array to initial state.
virtual vtkIdType LookupValue(vtkVariant value)=0
Return the value indices where a specific value appears.
void SetVoidArray(void *array, vtkIdType size, int save) override
virtual void Squeeze()=0
Free any unnecessary memory.
virtual vtkArrayIterator * NewIterator()=0
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
void Squeeze() override
Free any unneeded memory.
void SetNumberOfValues(vtkIdType number) override
Fast method based setting of values without memory checks.
virtual void RemoveLastTuple()
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
abstract superclass for arrays of numeric data
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
unsigned char * GetPointer(vtkIdType id)
Direct manipulation of the underlying data.
virtual double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
virtual vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000)=0
Allocate memory for this array.
virtual void InsertVariantValue(vtkIdType valueIdx, vtkVariant value)=0
Insert a value into the array from a variant.
int GetDataTypeSize() override
Return the size of the underlying data type.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual void InsertComponent(vtkIdType tupleIdx, int compIdx, double value)
Insert value at the location specified by tupleIdx and compIdx.
void InsertValue(vtkIdType id, int i)
Inserts values and checks to make sure there is enough memory.
void DataChanged() override
Tell the array explicitly that the data has changed.
int GetDataType() override
Return the underlying data type.
void SetValue(vtkIdType id, int value)
Set the data at a particular index.
void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array.
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
Inserts values from a variant and checks to ensure there is enough memory.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
void * GetVoidPointer(vtkIdType id) override
Return a void pointer.
A atomic type representing the union of many types.
list of point or cell ids
virtual void SetComponent(vtkIdType tupleIdx, int compIdx, double value)
Set the data component at the location specified by tupleIdx and compIdx to value.
void * WriteVoidPointer(vtkIdType id, vtkIdType number) override
Get the address of a particular data index.
vtkIdType InsertNextValue(int i)
unsigned char * ResizeAndExtend(vtkIdType sz)
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, int deleteMethod) override
Abstract superclass for all arrays.
int ToInt(bool *valid) const
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override
Allocate memory for this array.
virtual void DeepCopy(vtkAbstractArray *da)
Deep copy of data.
Abstract superclass to iterate over elements in an vtkAbstractArray.
virtual void RemoveFirstTuple()
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple from srcTupleIdx in the source array at the end of this array.
dynamic, self-adjusting array of bits
virtual void ClearLookup()=0
Delete the associated fast lookup data structure on this array, if it exists.
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
virtual void DataChanged()=0
Tell the array explicitly that the data has changed.
virtual void RemoveTuple(vtkIdType tupleIdx)=0
These methods remove tuples from the data array.
virtual vtkTypeBool Resize(vtkIdType numTuples)=0
Resize the array to the requested number of tuples and preserve data.
void SetVariantValue(vtkIdType idx, vtkVariant value) override
Set a value in the array from a variant.
virtual void SetNumberOfValues(vtkIdType numValues)
Specify the number of values (tuples * components) for this object to hold.