33#include "vtkCommonCoreModule.h"
115 void Reset() {this->NumberOfIds = 0;};
120 void Squeeze() {this->Resize(this->NumberOfIds);};
152 this->IntersectWith(&otherIds); };
164 void operator=(const
vtkIdList&) VTK_DELETE_FUNCTION;
174 this->Ids[i] = vtkid;
175 if (i >= this->NumberOfIds)
177 this->NumberOfIds = i + 1;
184 if ( this->NumberOfIds >= this->Size )
186 if (!this->Resize(2*this->NumberOfIds+1))
188 return this->NumberOfIds-1;
191 this->Ids[this->NumberOfIds++] = vtkid;
192 return this->NumberOfIds-1;
198 for (ptr=this->Ids, i=0; i<this->NumberOfIds; i++, ptr++)
list of point or cell ids
void DeleteId(vtkIdType vtkid)
Delete specified id from list.
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
void IntersectWith(vtkIdList *otherIds)
Intersect this list with another vtkIdList.
vtkIdType * Resize(const vtkIdType sz)
Adjust the size of the id list while maintaining its content (except when being truncated).
vtkIdType InsertNextId(const vtkIdType vtkid)
Add the id specified to the end of the list.
vtkIdType InsertUniqueId(const vtkIdType vtkid)
If id is not already in list, insert it and return location in list.
void Squeeze()
Free any unused memory.
int Allocate(const vtkIdType sz, const int strategy=0)
Allocate a capacity for sz ids in the list and set the number of stored ids in the list to 0.
void SetArray(vtkIdType *array, vtkIdType size)
Specify an array of vtkIdType to use as the id list.
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
vtkIdType IsId(vtkIdType vtkid)
Return -1 if id specified is not contained in the list; otherwise return the position in the list.
void Reset()
Reset to an empty state.
vtkIdType * WritePointer(const vtkIdType i, const vtkIdType number)
Get a pointer to a particular data index.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
void SetNumberOfIds(const vtkIdType number)
Specify the number of ids for this object to hold.
void IntersectWith(vtkIdList &otherIds)
void DeepCopy(vtkIdList *ids)
Copy an id list by explicitly copying the internal array.
a simple class to control print indentation
abstract base class for most VTK objects