38 #ifndef vtkAlgorithm_h
39 #define vtkAlgorithm_h
41 #include "vtkCommonExecutionModelModule.h"
45 class vtkAlgorithmInternals;
149 int requestFromOutputPort,
188 int GetNumberOfInputPorts();
193 int GetNumberOfOutputPorts();
209 vtkGetMacro(AbortExecute,
int);
217 vtkSetClampMacro(Progress,
double,0.0,1.0);
218 vtkGetMacro(Progress,
double);
226 void UpdateProgress(
double amount);
236 void SetProgressText(
const char* ptext);
245 vtkGetMacro( ErrorCode,
unsigned long );
315 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
316 int fieldAssociation,
318 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
319 int fieldAssociation,
320 int fieldAttributeType);
347 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
348 const char* fieldAssociation,
349 const char* attributeTypeorName);
363 void RemoveAllInputs();
424 virtual void RemoveInputConnection(
int port,
int idx);
429 virtual void RemoveAllInputConnections(
int port);
441 { this->SetInputDataObject(0,
data); }
450 { this->AddInputDataObject(0,
data); }
460 return this->GetOutputPort(0); }
465 int GetNumberOfInputConnections(
int port);
470 int GetTotalNumberOfInputConnections();
493 return this->GetInputAlgorithm(0, 0);
507 return this->GetInputExecutive(0, 0);
525 return this->GetInputInformation(0, 0);
582 virtual int UpdatePiece(
583 int piece,
int numPieces,
int ghostLevels,
const int extents[6]=0);
590 virtual int UpdateExtent(
const int extents[6]);
598 virtual int UpdateTimeStep(
double time,
599 int piece=-1,
int numPieces=1,
int ghostLevels=0,
const int extents[6]=0);
604 virtual void UpdateInformation();
609 virtual void UpdateDataObject();
614 virtual void PropagateUpdateExtent();
619 virtual void UpdateWholeExtent();
625 void ConvertTotalInputToPortConnection(
int ind,
int&
port,
int& conn);
637 virtual void SetReleaseDataFlag(
int);
638 virtual int GetReleaseDataFlag();
639 void ReleaseDataFlagOn();
640 void ReleaseDataFlagOff();
660 static void SetDefaultExecutivePrototype(
vtkExecutive* proto);
667 VTK_LEGACY(
int SetUpdateExtentToWholeExtent(
int port));
674 VTK_LEGACY(
int SetUpdateExtentToWholeExtent());
679 VTK_LEGACY(
void SetUpdateExtent(
int port,
680 int piece,
int numPieces,
int ghostLevel));
686 VTK_LEGACY(
void SetUpdateExtent(
687 int piece,
int numPieces,
int ghostLevel));
692 VTK_LEGACY(
void SetUpdateExtent(
int port,
int extent[6]));
697 VTK_LEGACY(
void SetUpdateExtent(
int extent[6]));
707 return this->GetUpdateExtent(0);
709 int* GetUpdateExtent(
int port);
713 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
715 void GetUpdateExtent(
int port,
716 int& x0,
int& x1,
int& y0,
int& y1,
720 this->GetUpdateExtent(0,
extent);
722 void GetUpdateExtent(
int port,
int extent[6]);
733 return this->GetUpdatePiece(0);
735 int GetUpdatePiece(
int port);
738 return this->GetUpdateNumberOfPieces(0);
740 int GetUpdateNumberOfPieces(
int port);
743 return this->GetUpdateGhostLevel(0);
745 int GetUpdateGhostLevel(
int port);
790 virtual
void SetNumberOfInputPorts(
int n);
795 virtual
void SetNumberOfOutputPorts(
int n);
798 int InputPortIndexInRange(
int index, const
char* action);
799 int OutputPortIndexInRange(
int index, const
char* action);
816 int GetInputArrayAssociation(
int idx,
int connection,
917 unsigned long ErrorCode;
935 virtual
void SetNthInputConnection(
int port,
int index,
944 virtual
void SetNumberOfInputConnections(
int port,
int n);
955 { this->SetInputDataObject(
port, input); }
957 { this->AddInputDataObject(
port, input); }
965 vtkAlgorithmInternals* AlgorithmInternal;
966 static void ConnectionAdd(
vtkAlgorithm* producer,
int producerPort,
968 static void ConnectionRemove(
vtkAlgorithm* producer,
int producerPort,
975 void operator=(
const vtkAlgorithm&) VTK_DELETE_FUNCTION;