00001 /*========================================================================= 00002 00003 Program: ParaView 00004 Module: $RCSfile: vtkSMSourceProxy.h,v $ 00005 00006 Copyright (c) Kitware, Inc. 00007 All rights reserved. 00008 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/ 00031 #ifndef __vtkSMSourceProxy_h 00032 #define __vtkSMSourceProxy_h 00033 00034 #include "vtkSMProxy.h" 00035 #include "vtkClientServerID.h" // Needed for ClientServerID 00036 00037 class vtkPVArrayInformation; 00038 class vtkPVDataInformation; 00039 class vtkPVDataSetAttributesInformation; 00040 //BTX 00041 struct vtkSMSourceProxyInternals; 00042 //ETX 00043 class vtkSMPart; 00044 class vtkSMProperty; 00045 00046 class VTK_EXPORT vtkSMSourceProxy : public vtkSMProxy 00047 { 00048 public: 00049 static vtkSMSourceProxy* New(); 00050 vtkTypeRevisionMacro(vtkSMSourceProxy, vtkSMProxy); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 virtual void UpdateInformation(); 00055 00058 void UpdatePipeline(); 00059 00061 00071 void AddInput(vtkSMSourceProxy* input, 00072 const char* method, 00073 int hasMultipleInputs); 00075 00078 void CleanInputs(const char* method); 00079 00081 virtual void UpdateSelfAndAllInputs(); 00082 00085 void UpdateDataInformation(); 00086 00088 unsigned int GetNumberOfParts(); 00089 00091 vtkSMPart* GetPart(unsigned int idx); 00092 00095 virtual void CreateParts(); 00096 00102 vtkPVDataInformation* GetDataInformation(); 00103 00106 virtual void MarkConsumersAsModified(); 00107 00109 00111 vtkSMProperty* GetProperty(const char* name) 00112 { 00113 return this->Superclass::GetProperty(name); 00114 } 00116 00117 protected: 00118 vtkSMSourceProxy(); 00119 ~vtkSMSourceProxy(); 00120 00121 //BTX 00122 friend class vtkSMInputProperty; 00123 //ETX 00124 00126 00128 void ConvertDataInformationToProperty( 00129 vtkPVDataInformation* info, vtkSMProperty* prop); 00130 void ConvertFieldDataInformationToProperty( 00131 vtkPVDataSetAttributesInformation* info, vtkSMProperty* prop); 00132 void ConvertArrayInformationToProperty( 00133 vtkPVArrayInformation* info, vtkSMProperty* prop); 00135 00136 00137 int PartsCreated; 00138 00139 00142 void GatherDataInformation(); 00143 00145 void InvalidateDataInformation(); 00146 00149 virtual vtkSMProperty* GetProperty(const char* name, int selfOnly); 00150 00151 vtkPVDataInformation *DataInformation; 00152 int DataInformationValid; 00153 00156 virtual void CreateVTKObjects(int numObjects); 00157 00158 char *ExecutiveName; 00159 vtkSetStringMacro(ExecutiveName); 00160 00162 virtual int ReadXMLAttributes(vtkSMProxyManager* pm, vtkPVXMLElement* element); 00163 00165 void CreatePartsInternal(vtkSMProxy* op); 00166 00167 private: 00168 vtkSMSourceProxyInternals* PInternals; 00169 00170 vtkSMSourceProxy(const vtkSMSourceProxy&); // Not implemented 00171 void operator=(const vtkSMSourceProxy&); // Not implemented 00172 }; 00173 00174 #endif