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 "vtkRemotingServerManagerModule.h" //needed for exports
37 #include "vtkSMProxy.h"
38 
42 
43 struct vtkSMSourceProxyInternals;
44 
45 class vtkSMOutputPort;
46 class vtkSMProperty;
48 
50 {
51 public:
52  static vtkSMSourceProxy* New();
53  vtkTypeMacro(vtkSMSourceProxy, vtkSMProxy);
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
59  void UpdatePipelineInformation() override;
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  vtkTypeUInt32 GetGlobalID() override;
214 
216  {
219  BOTH
220  };
221 
225  void MarkDirty(vtkSMProxy* modifiedProxy) override;
226 
227 protected:
229  ~vtkSMSourceProxy() override;
230 
231  friend class vtkSMInputProperty;
232  friend class vtkSMOutputPort;
233 
235 
238 
242  virtual void InvalidateDataInformation();
243 
248  void CreateVTKObjects() override;
249 
251  vtkSetStringMacro(ExecutiveName);
252 
256  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
257 
259 
264  void SetOutputPort(
265  unsigned int index, const char* name, vtkSMOutputPort* port, vtkSMDocumentation* doc);
266  void RemoveAllOutputPorts();
267  void SetExtractSelectionProxy(unsigned int index, vtkSMSourceProxy* proxy);
268  void RemoveAllExtractSelectionProxies();
270 
274  void PostUpdateData(bool) override;
275 
279  void SetLogNameInternal(
280  const char* name, bool propagate_to_subproxies, bool propagate_to_proxylistdomains) override;
281 
282  // flag used to avoid creation of extract selection proxies for this source
283  // proxy.
286 
287 private:
288  vtkSMSourceProxyInternals* PInternals;
289 
290  // used by GetNumberOfAlgorithmOutputPorts to cache the value to avoid
291  // unnecessary information gathers.
292  unsigned int NumberOfAlgorithmOutputPorts;
293  unsigned int NumberOfAlgorithmRequiredInputPorts;
294 
295  vtkSMSourceProxy(const vtkSMSourceProxy&) = delete;
296  void operator=(const vtkSMSourceProxy&) = delete;
297 };
298 
299 #endif
virtual void PostUpdateData(bool using_cache)
This method is called after the algorithm(s) (if any) associated with this proxy execute.
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:696
Light object for holding data information.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element)
Read attributes from an XML element.
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.
virtual void SetLogNameInternal(const char *name, bool propagate_to_subproxies, bool propagate_to_proxylistdomains)
Internal method used by SetLogName
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...
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.
void operator=(const vtkSMProxy &)=delete
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