VTK  9.7.1
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 "vtkObject.h"
24 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkDataSet;
28 class vtkCellArray;
29 class vtkIdList;
30 
31 class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO 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  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 
138 
146  virtual void SelectCells(vtkIdType minMaxDegree[2], unsigned char* cellSelection) = 0;
148 
150 
153  vtkGetMacro(BuildTime, vtkMTimeType);
155 
157 
160  bool UsesGarbageCollector() const override { return true; }
162 protected:
164  ~vtkAbstractCellLinks() override;
165 
167  int Type; // derived classes set this instance variable when constructed
168 
169  vtkTimeStamp BuildTime; // time at which links were built
170 
171  void ReportReferences(vtkGarbageCollector*) override;
172 
173 private:
175  void operator=(const vtkAbstractCellLinks&) = delete;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
record modification and/or execution time
Definition: vtkTimeStamp.h:24
int vtkIdType
Definition: vtkType.h:363
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void ReportReferences(vtkGarbageCollector *)
list of point or cell ids
Definition: vtkIdList.h:25
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
object to represent cell connectivity
Definition: vtkCellArray.h:177
#define VTK_MARSHALAUTO