20 #include "vtkCommonCoreModule.h"
24 VTK_ABI_NAMESPACE_BEGIN
76 vtkIdType GetNumberOfIds() const noexcept {
return this->NumberOfIds; }
83 return this->Buffer->GetBuffer()[i];
91 for (
int i = 0; i < this->NumberOfIds; i++)
93 if (this->Buffer->GetBuffer()[i] == id)
115 this->Buffer->GetBuffer()[i] = id;
186 void Reset() { this->NumberOfIds = 0; }
249 vtkIdType*
end() {
return this->Buffer->GetBuffer() + this->NumberOfIds; }
251 const vtkIdType*
end()
const {
return this->Buffer->GetBuffer() + this->NumberOfIds; }
266 void InitializeMemory();
274 void operator=(const
vtkIdList&) = delete;
280 if (i >= this->GetCapacity())
282 this->Reserve(i + 1);
284 this->Buffer->GetBuffer()[i] = id;
285 if (i >= this->NumberOfIds)
287 this->NumberOfIds = i + 1;
294 if (this->NumberOfIds >= this->GetCapacity())
296 if (!this->Reserve(this->NumberOfIds + 1))
298 return this->NumberOfIds - 1;
301 this->Buffer->GetBuffer()[this->NumberOfIds++] = id;
302 return this->NumberOfIds - 1;
307 for (
vtkIdType i = 0; i < this->NumberOfIds; ++i)
309 if (this->Buffer->GetBuffer()[i] == id)
317 VTK_ABI_NAMESPACE_END
vtkIdType InsertNextId(vtkIdType id)
Add the id specified to the end of the list.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType IsId(vtkIdType id) VTK_FUTURE_CONST
Return -1 if id specified is not contained in the list; otherwise return the position in the list...
void Sort(RandomIt bitr, RandomIt eitr, BackToFront< T > &me)
vtkIdType GetId(vtkIdType i)
Return the id at location i.
void SetId(vtkIdType i, vtkIdType id)
Set the id at location i.
internal storage class used by vtkSOADataArrayTemplate, vtkAOSDataArrayTemplate, and others...
a simple class to control print indentation
void save(Archiver &ar, const std::string &str, const unsigned int version)
list of point or cell ids
vtkIdType GetCapacity() const
Get the capacity of the id list.
const vtkIdType * end() const
To support range-based for loops.
const vtkIdType * begin() const
To support range-based for loops.
vtkIdType * end()
To support range-based for loops.
vtkIdType FindIdLocation(const vtkIdType id)
Find the location i of the provided id.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkIdType * begin()
To support range-based for loops.
#define VTK_DEPRECATED_IN_9_7_0(reason)
vtkIdType * GetPointer(vtkIdType i)
Get a pointer to a particular data index.