VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/AMR/vtkAMRDataSetCache.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   Visualization Toolkit
00004  Module:    vtkAMRDataSetCache.h
00005 
00006  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007  All rights reserved.
00008  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010  This software is distributed WITHOUT ANY WARRANTY; without even
00011  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012  PURPOSE.  See the above copyright notice for more information.
00013 
00014  =========================================================================*/
00024 #ifndef VTKAMRDATASETCACHE_H_
00025 #define VTKAMRDATASETCACHE_H_
00026 
00027 #include "vtkIOAMRModule.h" // For export macro
00028 #include "vtkObject.h"
00029 #include <map> // For STL map used as the data-structure for the cache.
00030 
00031 class vtkUniformGrid;
00032 class vtkDataArray;
00033 
00034 class VTKIOAMR_EXPORT vtkAMRDataSetCache : public vtkObject
00035 {
00036 public:
00037   static vtkAMRDataSetCache* New();
00038   vtkTypeMacro( vtkAMRDataSetCache, vtkObject );
00039   void PrintSelf(ostream &os, vtkIndent indent );
00040 
00042   void InsertAMRBlock(int compositeIdx,vtkUniformGrid *amrGrid);
00043 
00045 
00047   void InsertAMRBlockPointData(
00048       int compositeIdx, vtkDataArray *dataArray );
00050 
00052 
00054   void InsertAMRBlockCellData(
00055       int compositeIdx, vtkDataArray *dataArray );
00057 
00059 
00062   vtkDataArray* GetAMRBlockCellData(
00063       int compositeIdx, const char *dataName );
00065 
00067 
00070   vtkDataArray* GetAMRBlockPointData(
00071       int compositeIdx, const char *dataName );
00073 
00076   vtkUniformGrid* GetAMRBlock(int compositeIdx );
00077 
00080   bool HasAMRBlockCellData(int compositeIdx, const char *name);
00081 
00084   bool HasAMRBlockPointData(int compositeIdx, const char *name);
00085 
00088   bool HasAMRBlock( const int compositeIdx );
00089 
00090 protected:
00091   vtkAMRDataSetCache();
00092   virtual ~vtkAMRDataSetCache();
00093 
00094 //BTX
00095   typedef std::map< int, vtkUniformGrid* > AMRCacheType;
00096   AMRCacheType Cache;
00097 //ETX
00098 
00099 private:
00100   vtkAMRDataSetCache( const vtkAMRDataSetCache& ); // Not implemented
00101   void operator=( const vtkAMRDataSetCache& ); // Not implemented
00102 };
00103 
00104 #endif /* VTKAMRDATASETCACHE_H_ */