VTK  9.4.20250303
vtkAbstractCellLinks.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
19#ifndef vtkAbstractCellLinks_h
20#define vtkAbstractCellLinks_h
21
22#include "vtkCommonDataModelModule.h" // For export macro
23#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_5_0
24#include "vtkObject.h"
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkDataSet;
28class vtkCellArray;
29class vtkIdList;
30
31class VTKCOMMONDATAMODEL_EXPORT vtkAbstractCellLinks : public vtkObject
32{
33public:
35
39 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
46 virtual void SetDataSet(vtkDataSet*);
47 vtkGetObjectMacro(DataSet, vtkDataSet);
49
53 virtual void BuildLinks() = 0;
54
58 virtual void Initialize() = 0;
59
63 virtual void Squeeze() = 0;
64
68 virtual void Reset() = 0;
69
78 virtual unsigned long GetActualMemorySize() = 0;
79
85 virtual void DeepCopy(vtkAbstractCellLinks* src) = 0;
86
92 virtual void ShallowCopy(vtkAbstractCellLinks* src) = 0;
93
94 // Enums for cell links type. Note that the specialized type is
95 // set when users do not use ComputeType() and roll their own type.
97 {
98 LINKS_NOT_DEFINED = 0,
99 CELL_LINKS = 1,
100 STATIC_CELL_LINKS_USHORT = 2,
101 STATIC_CELL_LINKS_UINT = 3,
102 STATIC_CELL_LINKS_IDTYPE = 4,
103 STATIC_CELL_LINKS_SPECIALIZED = 5
104 };
105
117 static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkCellArray* ca);
118 static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkIdType connectivitySize);
119
123 vtkGetMacro(Type, int);
124
139
146 virtual void SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection) = 0;
148
150
158 VTK_DEPRECATED_IN_9_5_0("No longer used.")
159 vtkSetMacro(SequentialProcessing, bool);
160 VTK_DEPRECATED_IN_9_5_0("No longer used.")
161 vtkGetMacro(SequentialProcessing, bool);
162 VTK_DEPRECATED_IN_9_5_0("No longer used.")
163 virtual void SequentialProcessingOn()
164 {
165 if (!this->SequentialProcessing)
166 {
167 this->SequentialProcessing = true;
168 this->Modified();
169 }
170 }
171 VTK_DEPRECATED_IN_9_5_0("No longer used.")
172 virtual void SequentialProcessingOff()
173 {
174 if (this->SequentialProcessing)
175 {
176 this->SequentialProcessing = false;
177 this->Modified();
178 }
179 }
181
183
186 vtkGetMacro(BuildTime, vtkMTimeType);
188
190
193 bool UsesGarbageCollector() const override { return true; }
195protected:
198
200 // VTK_DEPRECATED_IN_9_5_0("No longer used.")
201 bool SequentialProcessing; // control whether to thread or not
202 int Type; // derived classes set this instance variable when constructed
203
204 vtkTimeStamp BuildTime; // time at which links were built
205
207
208private:
210 void operator=(const vtkAbstractCellLinks&) = delete;
211};
212
213VTK_ABI_NAMESPACE_END
214#endif
object to represent cell connectivity
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
Detect and break reference loops.
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
virtual void Modified()
Update the modification time for this object.
record modification and/or execution time
#define VTK_DEPRECATED_IN_9_5_0(reason)
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287