VTK  9.3.20240327
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 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkDataSet;
28 class vtkCellArray;
29 class vtkIdList;
30 
31 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractCellLinks : public vtkObject
32 {
33 public:
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; }
182 protected:
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 
194 private:
196  void operator=(const vtkAbstractCellLinks&) = delete;
197 };
198 
199 VTK_ABI_NAMESPACE_END
200 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:285
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
Detect and break reference loops.
list of point or cell ids
Definition: vtkIdList.h:132
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
record modification and/or execution time
Definition: vtkTimeStamp.h:44
@ data
Definition: vtkX3D.h:315
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition: vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270