ParaView
vtkSMSourceProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMSourceProxy.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
33 #ifndef vtkSMSourceProxy_h
34 #define vtkSMSourceProxy_h
35 
36 #include "vtkPVServerManagerCoreModule.h" //needed for exports
37 #include "vtkSMProxy.h"
38 
42 
43 struct vtkSMSourceProxyInternals;
44 
45 class vtkSMOutputPort;
46 class vtkSMProperty;
48 
49 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMSourceProxy : public vtkSMProxy
50 {
51 public:
52  static vtkSMSourceProxy* New();
53  vtkTypeMacro(vtkSMSourceProxy, vtkSMProxy);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
59  virtual void UpdatePipelineInformation();
60 
65  virtual void UpdatePipeline();
66 
71  virtual void UpdatePipeline(double time);
72 
74 
77  vtkGetMacro(OutputPortsCreated, int);
79 
83  virtual unsigned int GetNumberOfOutputPorts();
84 
88  virtual vtkSMOutputPort* GetOutputPort(unsigned int idx);
89 
96  virtual vtkSMOutputPort* GetOutputPort(const char* portname);
97 
106  virtual unsigned int GetOutputPortIndex(const char* portname);
107 
114  virtual const char* GetOutputPortName(unsigned int index);
115 
117 
123  vtkSMDocumentation* GetOutputPortDocumentation(unsigned int index);
124  vtkSMDocumentation* GetOutputPortDocumentation(const char* portname);
126 
132  virtual void CreateOutputPorts();
133 
135 
142  vtkPVDataInformation* GetDataInformation(unsigned int outputIdx);
144 
149  virtual void CreateSelectionProxies();
150 
156  void SetSelectionInput(unsigned int portIndex, vtkSMSourceProxy* input, unsigned int outputPort);
157 
159 
162  vtkSMSourceProxy* GetSelectionInput(unsigned int portIndex);
163  unsigned int GetSelectionInputPort(unsigned int portIndex);
165 
169  void CleanSelectionInputs(unsigned int portIndex);
170 
175  vtkSMSourceProxy* GetSelectionOutput(unsigned int portIndex);
176 
178 
187  vtkGetMacro(ProcessSupport, int);
189 
191 
196  vtkGetMacro(MPIRequired, bool);
198 
202  unsigned int GetNumberOfAlgorithmOutputPorts();
203 
208  virtual unsigned int GetNumberOfAlgorithmRequiredInputPorts();
209 
213  virtual vtkTypeUInt32 GetGlobalID();
214 
216  {
219  BOTH
220  };
221 
225  virtual void MarkDirty(vtkSMProxy* modifiedProxy);
226 
227 protected:
229  ~vtkSMSourceProxy();
230 
231  friend class vtkSMInputProperty;
232  friend class vtkSMOutputPort;
233 
235 
238 
242  virtual void InvalidateDataInformation();
243 
248  virtual void CreateVTKObjects();
249 
251  vtkSetStringMacro(ExecutiveName);
252 
257 
261  void CreateOutputPortsInternal(vtkSMProxy* op);
262 
264 
269  void SetOutputPort(
270  unsigned int index, const char* name, vtkSMOutputPort* port, vtkSMDocumentation* doc);
271  void RemoveAllOutputPorts();
272  void SetExtractSelectionProxy(unsigned int index, vtkSMSourceProxy* proxy);
273  void RemoveAllExtractSelectionProxies();
275 
279  virtual void PostUpdateData();
280 
281  // flag used to avoid creation of extract selection proxies for this source
282  // proxy.
285 
286 private:
287  vtkSMSourceProxyInternals* PInternals;
288 
289  // used by GetNumberOfAlgorithmOutputPorts to cache the value to avoid
290  // unnecessary information gathers.
291  unsigned int NumberOfAlgorithmOutputPorts;
292  unsigned int NumberOfAlgorithmRequiredInputPorts;
293 
294  vtkSMSourceProxy(const vtkSMSourceProxy&) VTK_DELETE_FUNCTION;
295  void operator=(const vtkSMSourceProxy&) VTK_DELETE_FUNCTION;
296 };
297 
298 #endif
virtual void UpdatePipelineInformation()
This method simply iterates over subproxies and calls UpdatePipelineInformation() on them...
friend class vtkSMSourceProxy
These classes have been declared as friends to minimize the public interface exposed by vtkSMProxy...
Definition: vtkSMProxy.h:650
Light object for holding data information.
virtual int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element)
Read attributes from an XML element.
virtual void PostUpdateData()
This method is called after the algorithm(s) (if any) associated with this proxy execute.
superclass for all SM properties
virtual void InvalidateDataInformation()
Mark data information as invalid.
virtual void MarkDirty(vtkSMProxy *modifiedProxy)
Dirty means this algorithm will execute during next update.
proxy for a VTK source on a server
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
vtkPVDataInformation * GetDataInformation()
DataInformation is used by the source proxy to obtain information on the output(s) from the server...
void PrintSelf(ostream &os, vtkIndent indent)
static vtkSMProxy * New()
virtual void CreateVTKObjects()
Given a class name (by setting VTKClassName) and server ids (by setting ServerIDs), this methods instantiates the objects on the server(s)
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
Data array information like type.
reference for an output port of a vtkAlgorithm.
class providing access to the documentation for a vtkSMProxy.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
virtual vtkTypeUInt32 GetGlobalID()
Get the global unique id for this object.
proxy representing inputs to a filter