00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkDemandDrivenPipeline_h
00027 #define __vtkDemandDrivenPipeline_h
00028
00029 #include "vtkExecutive.h"
00030
00031 class vtkDataArray;
00032 class vtkDataSetAttributes;
00033 class vtkDemandDrivenPipelineInternals;
00034 class vtkFieldData;
00035 class vtkInformation;
00036 class vtkInformationIntegerKey;
00037 class vtkInformationVector;
00038 class vtkInformationKeyVectorKey;
00039 class vtkInformationUnsignedLongKey;
00040
00041 class VTK_FILTERING_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
00042 {
00043 public:
00044 static vtkDemandDrivenPipeline* New();
00045 vtkTypeRevisionMacro(vtkDemandDrivenPipeline,vtkExecutive);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00049
00051 virtual int ProcessRequest(vtkInformation* request,
00052 vtkInformationVector** inInfo,
00053 vtkInformationVector* outInfo);
00055
00057
00058 virtual int
00059 ComputePipelineMTime(vtkInformation* request,
00060 vtkInformationVector** inInfoVec,
00061 vtkInformationVector* outInfoVec,
00062 int requestFromOutputPort,
00063 unsigned long* mtime);
00065
00067
00069 virtual int Update();
00070 virtual int Update(int port);
00072
00074
00075 vtkGetMacro(PipelineMTime, unsigned long);
00077
00080 virtual int SetReleaseDataFlag(int port, int n);
00081
00083 virtual int GetReleaseDataFlag(int port);
00084
00086 virtual int UpdatePipelineMTime();
00087
00091 virtual int UpdateDataObject();
00092
00094 virtual int UpdateInformation();
00095
00099 virtual int UpdateData(int outputPort);
00100
00102 static vtkInformationRequestKey* REQUEST_DATA_OBJECT();
00103
00106 static vtkInformationRequestKey* REQUEST_INFORMATION();
00107
00109 static vtkInformationRequestKey* REQUEST_DATA();
00110
00113 static vtkInformationRequestKey* REQUEST_DATA_NOT_GENERATED();
00114
00117 static vtkInformationIntegerKey* RELEASE_DATA();
00118
00122 static vtkInformationIntegerKey* DATA_NOT_GENERATED();
00123
00125 static vtkDataObject* NewDataObject(const char* type);
00126
00127 protected:
00128 vtkDemandDrivenPipeline();
00129 ~vtkDemandDrivenPipeline();
00130
00131
00132 virtual int ExecuteDataObject(vtkInformation* request,
00133 vtkInformationVector** inInfo,
00134 vtkInformationVector* outInfo);
00135 virtual int ExecuteInformation(vtkInformation* request,
00136 vtkInformationVector** inInfo,
00137 vtkInformationVector* outInfo);
00138 virtual int ExecuteData(vtkInformation* request,
00139 vtkInformationVector** inInfo,
00140 vtkInformationVector* outInfo);
00141
00142
00143
00144 virtual void ResetPipelineInformation(int port, vtkInformation*);
00145
00146
00147
00148 virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
00149
00150
00151
00152 int InputCountIsValid(vtkInformationVector **);
00153 int InputCountIsValid(int port,vtkInformationVector **);
00154 int InputTypeIsValid(vtkInformationVector **);
00155 int InputTypeIsValid(int port,vtkInformationVector **);
00156 int InputTypeIsValid(int port, int index,vtkInformationVector **);
00157 int InputFieldsAreValid(vtkInformationVector **);
00158 int InputFieldsAreValid(int port,vtkInformationVector **);
00159 int InputFieldsAreValid(int port, int index,vtkInformationVector **);
00160
00161
00162 int DataSetAttributeExists(vtkDataSetAttributes* dsa, vtkInformation* field);
00163 int FieldArrayExists(vtkFieldData* data, vtkInformation* field);
00164 int ArrayIsValid(vtkDataArray* array, vtkInformation* field);
00165
00166
00167 int InputIsOptional(int port);
00168 int InputIsRepeatable(int port);
00169
00170
00171 virtual int NeedToExecuteData(int outputPort,
00172 vtkInformationVector** inInfoVec,
00173 vtkInformationVector* outInfoVec);
00174
00175
00176 virtual void ExecuteDataStart(vtkInformation* request,
00177 vtkInformationVector** inInfoVec,
00178 vtkInformationVector* outInfoVec);
00179 virtual void ExecuteDataEnd(vtkInformation* request,
00180 vtkInformationVector** inInfoVec,
00181 vtkInformationVector* outInfoVec);
00182 virtual void MarkOutputsGenerated(vtkInformation* request,
00183 vtkInformationVector** inInfoVec,
00184 vtkInformationVector* outInfoVec);
00185
00186
00187
00188 unsigned long PipelineMTime;
00189
00190
00191 vtkTimeStamp DataObjectTime;
00192 vtkTimeStamp InformationTime;
00193 vtkTimeStamp DataTime;
00194
00195
00196 friend class vtkCompositeDataPipeline;
00197
00198
00199
00200 vtkInformation *InfoRequest;
00201 vtkInformation *DataObjectRequest;
00202 vtkInformation *DataRequest;
00203
00204 private:
00205 vtkDemandDrivenPipeline(const vtkDemandDrivenPipeline&);
00206 void operator=(const vtkDemandDrivenPipeline&);
00207 };
00208
00209 #endif