1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkCachedStreamingDemandDrivenPipeline.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 =========================================================================*/
15 /**
16  * @class   vtkCachedStreamingDemandDrivenPipeline
17  *
18  * vtkCachedStreamingDemandDrivenPipeline
19  */
20 
21 #ifndef vtkCachedStreamingDemandDrivenPipeline_h
22 #define vtkCachedStreamingDemandDrivenPipeline_h
23 
24 #include "vtkCommonExecutionModelModule.h" // For export macro
25 #include "vtkStreamingDemandDrivenPipeline.h"
26 
27 class vtkInformationIntegerKey;
28 class vtkInformationIntegerVectorKey;
29 
30 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCachedStreamingDemandDrivenPipeline
31   : public vtkStreamingDemandDrivenPipeline
32 {
33 public:
34   static vtkCachedStreamingDemandDrivenPipeline* New();
35   vtkTypeMacro(vtkCachedStreamingDemandDrivenPipeline, vtkStreamingDemandDrivenPipeline);
36   void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38   ///@{
39   /**
40    * This is the maximum number of images that can be retained in memory.
41    * it defaults to 10.
42    */
43   void SetCacheSize(int size);
44   vtkGetMacro(CacheSize, int);
45   ///@}
46 
47 protected:
48   vtkCachedStreamingDemandDrivenPipeline();
49   ~vtkCachedStreamingDemandDrivenPipeline() override;
50 
51   int NeedToExecuteData(
52     int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
53   int ExecuteData(vtkInformation* request, vtkInformationVector** inInfoVec,
54     vtkInformationVector* outInfoVec) override;
55 
56   int CacheSize;
57 
58   vtkDataObject** Data;
59   vtkMTimeType* Times;
60 
61 private:
62   vtkCachedStreamingDemandDrivenPipeline(const vtkCachedStreamingDemandDrivenPipeline&) = delete;
63   void operator=(const vtkCachedStreamingDemandDrivenPipeline&) = delete;
64 };
65 
66 #endif
67