00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkExecutive_h
00027 #define __vtkExecutive_h
00028
00029 #include "vtkObject.h"
00030
00031 class vtkAlgorithm;
00032 class vtkAlgorithmOutput;
00033 class vtkAlgorithmToExecutiveFriendship;
00034 class vtkDataObject;
00035 class vtkExecutiveInternals;
00036 class vtkInformation;
00037 class vtkInformationExecutivePortKey;
00038 class vtkInformationExecutivePortVectorKey;
00039 class vtkInformationIntegerKey;
00040 class vtkInformationRequestKey;
00041 class vtkInformationKeyVectorKey;
00042 class vtkInformationVector;
00043
00044 class VTK_FILTERING_EXPORT vtkExecutive : public vtkObject
00045 {
00046 public:
00047 vtkTypeRevisionMacro(vtkExecutive,vtkObject);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049
00051 vtkAlgorithm* GetAlgorithm();
00052
00054
00056 virtual int ProcessRequest(vtkInformation* request,
00057 vtkInformationVector** inInfo,
00058 vtkInformationVector* outInfo);
00060
00062
00071 virtual int
00072 ComputePipelineMTime(vtkInformation* request,
00073 vtkInformationVector** inInfoVec,
00074 vtkInformationVector* outInfoVec,
00075 int requestFromOutputPort,
00076 unsigned long* mtime);
00078
00080
00082 virtual int Update();
00083 virtual int Update(int port);
00085
00087
00089 int GetNumberOfInputPorts();
00090 int GetNumberOfOutputPorts();
00092
00094 int GetNumberOfInputConnections(int port);
00095
00097 virtual vtkInformation* GetOutputInformation(int port);
00098
00100 vtkInformationVector* GetOutputInformation();
00101
00103 vtkInformation* GetInputInformation(int port, int connection);
00104
00106 vtkInformationVector* GetInputInformation(int port);
00107
00109 vtkInformationVector** GetInputInformation();
00110
00112 vtkExecutive* GetInputExecutive(int port, int connection);
00113
00115
00116 virtual vtkDataObject* GetOutputData(int port);
00117 virtual void SetOutputData(int port, vtkDataObject*, vtkInformation *info);
00118 virtual void SetOutputData(int port, vtkDataObject*);
00120
00122
00123 virtual vtkDataObject* GetInputData(int port, int connection);
00124 virtual vtkDataObject* GetInputData(int port, int connection,
00125 vtkInformationVector **inInfoVec);
00127
00129 virtual vtkAlgorithmOutput* GetProducerPort(vtkDataObject*);
00130
00132
00138 void SetSharedInputInformation(vtkInformationVector** inInfoVec);
00139 void SetSharedOutputInformation(vtkInformationVector* outInfoVec);
00141
00143
00144 virtual void Register(vtkObjectBase* o);
00145 virtual void UnRegister(vtkObjectBase* o);
00147
00150 static vtkInformationExecutivePortKey* PRODUCER();
00151
00154 static vtkInformationExecutivePortVectorKey* CONSUMERS();
00155
00158 static vtkInformationIntegerKey* FROM_OUTPUT_PORT();
00159
00161
00163 static vtkInformationIntegerKey* ALGORITHM_BEFORE_FORWARD();
00164 static vtkInformationIntegerKey* ALGORITHM_AFTER_FORWARD();
00165 static vtkInformationIntegerKey* ALGORITHM_DIRECTION();
00166 static vtkInformationIntegerKey* FORWARD_DIRECTION();
00167 static vtkInformationKeyVectorKey* KEYS_TO_COPY();
00168
00169 enum { RequestUpstream, RequestDownstream };
00170 enum { BeforeForward, AfterForward };
00171
00173
00175
00177 virtual int CallAlgorithm(vtkInformation* request, int direction,
00178 vtkInformationVector** inInfo,
00179 vtkInformationVector* outInfo);
00181
00182 protected:
00183 vtkExecutive();
00184 ~vtkExecutive();
00185
00186
00187 int InputPortIndexInRange(int port, const char* action);
00188 int OutputPortIndexInRange(int port, const char* action);
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 int CheckAlgorithm(const char* method, vtkInformation* request);
00200
00201 virtual int ForwardDownstream(vtkInformation* request);
00202 virtual int ForwardUpstream(vtkInformation* request);
00203 virtual void CopyDefaultInformation(vtkInformation* request, int direction,
00204 vtkInformationVector** inInfo,
00205 vtkInformationVector* outInfo);
00206
00207
00208 virtual void ResetPipelineInformation(int port, vtkInformation*)=0;
00209
00210
00211 virtual int UpdateDataObject()=0;
00212
00213
00214 virtual void ReportReferences(vtkGarbageCollector*);
00215
00216 virtual void SetAlgorithm(vtkAlgorithm* algorithm);
00217
00218
00219 vtkAlgorithm* Algorithm;
00220
00221
00222 int InAlgorithm;
00223
00224
00225
00226
00227 vtkInformationVector** SharedInputInformation;
00228 vtkInformationVector* SharedOutputInformation;
00229
00230 private:
00231
00232 vtkInformationVector* OutputInformation;
00233
00234
00235 vtkExecutiveInternals* ExecutiveInternal;
00236
00237
00238 friend class vtkAlgorithmToExecutiveFriendship;
00239
00240 private:
00241 vtkExecutive(const vtkExecutive&);
00242 void operator=(const vtkExecutive&);
00243 };
00244
00245 #endif