28 #include "vtkCommonCoreModule.h" 31 class vtkBitArrayLookup;
49 void Initialize() VTK_OVERRIDE;
52 int GetDataType() VTK_OVERRIDE {
return VTK_BIT;}
144 void RemoveLastTuple() VTK_OVERRIDE;
153 void SetComponent(
vtkIdType i,
int j,
double c) VTK_OVERRIDE;
158 void Squeeze() VTK_OVERRIDE;
163 int Resize(
vtkIdType numTuples) VTK_OVERRIDE;
177 void SetNumberOfValues(
vtkIdType number) VTK_OVERRIDE;
206 void InsertComponent(
vtkIdType i,
int j,
double c) VTK_OVERRIDE;
212 {
return this->Array +
id/8; }
223 return this->WritePointer(
id, number);
228 return static_cast<void *
>(this->GetPointer(
id));
253 this->SetArray(static_cast<unsigned char *>(array),
size,
save);
256 int vtkNotUsed(deleteMethod)) VTK_OVERRIDE
258 this->SetArray(static_cast<unsigned char *>(array),
size,
save);
285 void DataChanged() VTK_OVERRIDE;
292 void ClearLookup() VTK_OVERRIDE;
298 unsigned char *Array;
299 unsigned char *ResizeAndExtend(
vtkIdType sz);
313 void operator=(
const vtkBitArray&) VTK_DELETE_FUNCTION;
315 vtkBitArrayLookup* Lookup;
323 this->
MaxId = number - 1;
331 this->
Array[
id/8] =
static_cast<unsigned char>(
332 this->
Array[
id/8] | (0x80 >>
id%8));
336 this->
Array[
id/8] =
static_cast<unsigned char>(
337 this->
Array[
id/8] & (~(0x80 >>
id%8)));
344 if (
id >= this->
Size )
353 this->
Array[
id/8] =
static_cast<unsigned char>(
354 this->
Array[
id/8] | (0x80 >>
id%8));
358 this->
Array[
id/8] =
static_cast<unsigned char>(
359 this->
Array[
id/8] & (~(0x80 >>
id%8)));
361 if (
id > this->
MaxId )
void Squeeze() override
Free any unneeded memory.
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 double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
int Allocate(vtkIdType sz, vtkIdType ext=1000) override
Allocate memory for this array.
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 InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
void SetNumberOfValues(vtkIdType number) override
Fast method based setting of values without memory checks.
int ToInt(bool *valid) const
Convert the variant to a numeric type: If it holds a numeric, cast to the appropriate type...
void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod)) override
This method lets the user specify data to be held by the array.
int GetDataTypeSize() override
Return the size of the underlying data type.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A atomic type representing the union of many types.
void SetValue(vtkIdType id, int value)
Set the data at a particular index.
void * GetVoidPointer(vtkIdType id) override
Return a void pointer.
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
void DataChanged() override
Tell the array explicitly that the data has changed.
virtual VTK_NEWINSTANCE vtkArrayIterator * NewIterator()=0
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
Abstract superclass to iterate over elements in an vtkAbstractArray.
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple from srcTupleIdx in the source array at the end of this array.
virtual int Allocate(vtkIdType numValues, vtkIdType ext=1000)=0
Allocate memory for this array.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
unsigned char * ResizeAndExtend(vtkIdType sz)
boost::graph_traits< vtkGraph *>::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
dynamic, self-adjusting array of bits
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
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
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.