VTK  9.3.0
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 
90  virtual void DeepCopy(vtkAbstractCellLinks* src) = 0;
91 
92  // Enums for cell links type. Note that the specialized type is
93  // set when users do not use ComputeType() and roll their own type.
95  {
96  LINKS_NOT_DEFINED = 0,
97  CELL_LINKS = 1,
98  STATIC_CELL_LINKS_USHORT = 2,
99  STATIC_CELL_LINKS_UINT = 3,
100  STATIC_CELL_LINKS_IDTYPE = 4,
101  STATIC_CELL_LINKS_SPECIALIZED = 5
102  };
103 
115  static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkCellArray* ca);
116  static int ComputeType(vtkIdType maxPtId, vtkIdType maxCellId, vtkIdType connectivitySize);
117 
121  vtkGetMacro(Type, int);
122 
137 
144  virtual void SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection) = 0;
146 
148 
156  vtkSetMacro(SequentialProcessing, bool);
157  vtkGetMacro(SequentialProcessing, bool);
158  vtkBooleanMacro(SequentialProcessing, bool);
160 
162 
165  vtkGetMacro(BuildTime, vtkMTimeType);
167 
169 
172  bool UsesGarbageCollector() const override { return true; }
174 protected:
177 
179  bool SequentialProcessing; // control whether to thread or not
180  int Type; // derived classes set this instance variable when constructed
181 
182  vtkTimeStamp BuildTime; // time at which links were built
183 
185 
186 private:
188  void operator=(const vtkAbstractCellLinks&) = delete;
189 };
190 
191 VTK_ABI_NAMESPACE_END
192 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:185
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Detect and break reference loops.
list of point or cell ids
Definition: vtkIdList.h:32
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
record modification and/or execution time
Definition: vtkTimeStamp.h:34
@ 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