VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTemporalDataSetCache.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 =========================================================================*/ 00033 #ifndef __vtkTemporalDataSetCache_h 00034 #define __vtkTemporalDataSetCache_h 00035 00036 #include "vtkTemporalDataSetAlgorithm.h" 00037 00038 #include <map> // used for the cache 00039 00040 class VTK_HYBRID_EXPORT vtkTemporalDataSetCache : public vtkTemporalDataSetAlgorithm 00041 { 00042 public: 00043 static vtkTemporalDataSetCache *New(); 00044 vtkTypeMacro(vtkTemporalDataSetCache, vtkTemporalDataSetAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00050 void SetCacheSize(int size); 00051 vtkGetMacro(CacheSize,int); 00053 00054 protected: 00055 vtkTemporalDataSetCache(); 00056 ~vtkTemporalDataSetCache(); 00057 00058 int CacheSize; 00059 00060 //BTX 00061 typedef std::map<double,std::pair<unsigned long,vtkDataObject *> > 00062 CacheType; 00063 CacheType Cache; 00064 //ETX 00065 00066 virtual int FillInputPortInformation(int port, vtkInformation* info); 00067 00068 virtual int RequestUpdateExtent (vtkInformation *, 00069 vtkInformationVector **, 00070 vtkInformationVector *); 00071 00072 virtual int RequestData(vtkInformation *, 00073 vtkInformationVector **, 00074 vtkInformationVector *); 00075 00076 private: 00077 vtkTemporalDataSetCache(const vtkTemporalDataSetCache&); // Not implemented. 00078 void operator=(const vtkTemporalDataSetCache&); // Not implemented. 00079 }; 00080 00081 00082 00083 #endif 00084 00085 00086