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 "vtkFiltersHybridModule.h" // For export macro 00037 00038 #include "vtkAlgorithm.h" 00039 #include <map> // used for the cache 00040 00041 class VTKFILTERSHYBRID_EXPORT vtkTemporalDataSetCache : public vtkAlgorithm 00042 { 00043 public: 00044 static vtkTemporalDataSetCache *New(); 00045 vtkTypeMacro(vtkTemporalDataSetCache, vtkAlgorithm); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00051 void SetCacheSize(int size); 00052 vtkGetMacro(CacheSize,int); 00054 00055 protected: 00056 vtkTemporalDataSetCache(); 00057 ~vtkTemporalDataSetCache(); 00058 00059 int CacheSize; 00060 00061 //BTX 00062 typedef std::map<double,std::pair<unsigned long,vtkDataObject *> > 00063 CacheType; 00064 CacheType Cache; 00065 //ETX 00066 00067 00069 00070 virtual int ProcessRequest(vtkInformation* request, 00071 vtkInformationVector** inputVector, 00072 vtkInformationVector* outputVector); 00074 00075 virtual int FillInputPortInformation(int port, vtkInformation* info); 00076 virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info); 00077 virtual int RequestDataObject( vtkInformation*, 00078 vtkInformationVector** inputVector , 00079 vtkInformationVector* outputVector); 00080 00081 virtual int RequestUpdateExtent (vtkInformation *, 00082 vtkInformationVector **, 00083 vtkInformationVector *); 00084 00085 virtual int RequestData(vtkInformation *, 00086 vtkInformationVector **, 00087 vtkInformationVector *); 00088 00089 private: 00090 vtkTemporalDataSetCache(const vtkTemporalDataSetCache&); // Not implemented. 00091 void operator=(const vtkTemporalDataSetCache&); // Not implemented. 00092 }; 00093 00094 00095 00096 #endif 00097 00098 00099