VTK  9.4.20241121
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_3_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 VTK_DEPRECATED_IN_9_3_0("Use SetDataSet() and BuildLinks() instead.")
54 void BuildLinks(vtkDataSet* data);
55
59 virtual void BuildLinks() = 0;
60
64 virtual void Initialize() = 0;
65
69 virtual void Squeeze() = 0;
70
74 virtual void Reset() = 0;
75
84 virtual unsigned long GetActualMemorySize() = 0;
85
91 virtual void DeepCopy(vtkAbstractCellLinks* src) = 0;
92
98 virtual void ShallowCopy(vtkAbstractCellLinks* src) = 0;
99
100 // Enums for cell links type. Note that the specialized type is
101 // set when users do not use ComputeType() and roll their own type.
103 {
104 LINKS_NOT_DEFINED = 0,
105 CELL_LINKS = 1,
106 STATIC_CELL_LINKS_USHORT = 2,
107 STATIC_CELL_LINKS_UINT = 3,
108 STATIC_CELL_LINKS_IDTYPE = 4,
109 STATIC_CELL_LINKS_SPECIALIZED = 5
110 };
111
123 static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkCellArray* ca);
124 static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkIdType connectivitySize);
125
129 vtkGetMacro(Type, int);
130
145
152 virtual void SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection) = 0;
154
156
164 vtkSetMacro(SequentialProcessing, bool);
165 vtkGetMacro(SequentialProcessing, bool);
166 vtkBooleanMacro(SequentialProcessing, bool);
168
170
173 vtkGetMacro(BuildTime, vtkMTimeType);
175
177
180 bool UsesGarbageCollector() const override { return true; }
182protected:
185
187 bool SequentialProcessing; // control whether to thread or not
188 int Type; // derived classes set this instance variable when constructed
189
190 vtkTimeStamp BuildTime; // time at which links were built
191
193
194private:
196 void operator=(const vtkAbstractCellLinks&) = delete;
197};
198
199VTK_ABI_NAMESPACE_END
200#endif
object to represent cell connectivity
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
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
record modification and/or execution time
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270