VTK
vtkAMRDataSetCache.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRDataSetCache.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
24 #ifndef VTKAMRDATASETCACHE_H_
25 #define VTKAMRDATASETCACHE_H_
26 
27 #include "vtkIOAMRModule.h" // For export macro
28 #include "vtkObject.h"
29 #include <map> // For STL map used as the data-structure for the cache.
30 
31 class vtkUniformGrid;
32 class vtkDataArray;
33 
35 {
36 public:
37  static vtkAMRDataSetCache* New();
38  vtkTypeMacro( vtkAMRDataSetCache, vtkObject );
39  void PrintSelf(ostream &os, vtkIndent indent );
40 
42  void InsertAMRBlock(int compositeIdx,vtkUniformGrid *amrGrid);
43 
45 
47  void InsertAMRBlockPointData(
48  int compositeIdx, vtkDataArray *dataArray );
50 
52 
54  void InsertAMRBlockCellData(
55  int compositeIdx, vtkDataArray *dataArray );
57 
59 
62  vtkDataArray* GetAMRBlockCellData(
63  int compositeIdx, const char *dataName );
65 
67 
70  vtkDataArray* GetAMRBlockPointData(
71  int compositeIdx, const char *dataName );
73 
76  vtkUniformGrid* GetAMRBlock(int compositeIdx );
77 
80  bool HasAMRBlockCellData(int compositeIdx, const char *name);
81 
84  bool HasAMRBlockPointData(int compositeIdx, const char *name);
85 
88  bool HasAMRBlock( const int compositeIdx );
89 
90 protected:
92  virtual ~vtkAMRDataSetCache();
93 
94 //BTX
95  typedef std::map< int, vtkUniformGrid* > AMRCacheType;
96  AMRCacheType Cache;
97 //ETX
98 
99 private:
100  vtkAMRDataSetCache( const vtkAMRDataSetCache& ); // Not implemented
101  void operator=( const vtkAMRDataSetCache& ); // Not implemented
102 };
103 
104 #endif /* VTKAMRDATASETCACHE_H_ */
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKIOAMR_EXPORT
std::map< int, vtkUniformGrid * > AMRCacheType
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
image data with blanking
static vtkObject * New()