VTK  9.3.1
vtkAMRDataSetCache.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
13 #ifndef vtkAMRDataSetCache_h
14 #define vtkAMRDataSetCache_h
15 
16 #include "vtkIOAMRModule.h" // For export macro
17 #include "vtkObject.h"
18 #include <map> // For STL map used as the data-structure for the cache.
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkUniformGrid;
22 class vtkDataArray;
23 
24 class VTKIOAMR_EXPORT vtkAMRDataSetCache : public vtkObject
25 {
26 public:
27  static vtkAMRDataSetCache* New();
28  vtkTypeMacro(vtkAMRDataSetCache, vtkObject);
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
34  void InsertAMRBlock(int compositeIdx, vtkUniformGrid* amrGrid);
35 
40  void InsertAMRBlockPointData(int compositeIdx, vtkDataArray* dataArray);
41 
46  void InsertAMRBlockCellData(int compositeIdx, vtkDataArray* dataArray);
47 
53  vtkDataArray* GetAMRBlockCellData(int compositeIdx, const char* dataName);
54 
60  vtkDataArray* GetAMRBlockPointData(int compositeIdx, const char* dataName);
61 
66  vtkUniformGrid* GetAMRBlock(int compositeIdx);
67 
72  bool HasAMRBlockCellData(int compositeIdx, const char* name);
73 
78  bool HasAMRBlockPointData(int compositeIdx, const char* name);
79 
83  bool HasAMRBlock(int compositeIdx);
84 
85 protected:
87  ~vtkAMRDataSetCache() override;
88 
89  typedef std::map<int, vtkUniformGrid*> AMRCacheType;
90  AMRCacheType Cache;
91 
92 private:
93  vtkAMRDataSetCache(const vtkAMRDataSetCache&) = delete;
94  void operator=(const vtkAMRDataSetCache&) = delete;
95 };
96 
97 VTK_ABI_NAMESPACE_END
98 #endif /* vtkAMRDataSetCache_h */
std::map< int, vtkUniformGrid * > AMRCacheType
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A concrete implementation of vtkObject that provides functionality for caching AMR blocks...
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
image data with blanking
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...