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 
146 
159  vtkPVDataInformation* GetSubsetDataInformation(
160  unsigned int outputIdx, const char* selector, const char* assemblyName = nullptr);
162 
167  vtkPVDataInformation* GetSubsetDataInformation(
168  unsigned int outputIdx, unsigned int compositeIndex);
169 
171 
175  {
176  return this->GetRankDataInformation(0u, rank);
177  }
178  vtkPVDataInformation* GetRankDataInformation(unsigned int outputIdx, int rank);
180 
185  virtual void CreateSelectionProxies();
186 
192  void SetSelectionInput(unsigned int portIndex, vtkSMSourceProxy* input, unsigned int outputPort);
193 
195 
198  vtkSMSourceProxy* GetSelectionInput(unsigned int portIndex);
199  unsigned int GetSelectionInputPort(unsigned int portIndex);
201 
205  void CleanSelectionInputs(unsigned int portIndex);
206 
211  vtkSMSourceProxy* GetSelectionOutput(unsigned int portIndex);
212 
214 
223  vtkGetMacro(ProcessSupport, int);
225 
227 
232  vtkGetMacro(MPIRequired, bool);
234 
238  unsigned int GetNumberOfAlgorithmOutputPorts();
239 
244  virtual unsigned int GetNumberOfAlgorithmRequiredInputPorts();
245 
249  vtkTypeUInt32 GetGlobalID() override;
250 
252  {
255  BOTH
256  };
257 
261  void MarkDirty(vtkSMProxy* modifiedProxy) override;
262 
263 protected:
265  ~vtkSMSourceProxy() override;
266 
267  friend class vtkSMInputProperty;
268  friend class vtkSMOutputPort;
269 
271 
274 
278  virtual void InvalidateDataInformation();
279 
284  void CreateVTKObjects() override;
285 
287  vtkSetStringMacro(ExecutiveName);
288 
292  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
293 
295 
300  void SetOutputPort(
301  unsigned int index, const char* name, vtkSMOutputPort* port, vtkSMDocumentation* doc);
302  void RemoveAllOutputPorts();
303  void SetExtractSelectionProxy(unsigned int index, vtkSMSourceProxy* proxy);
304  void RemoveAllExtractSelectionProxies();
306 
310  void PostUpdateData(bool) override;
311 
315  void SetLogNameInternal(
316  const char* name, bool propagate_to_subproxies, bool propagate_to_proxylistdomains) override;
317 
318  // flag used to avoid creation of extract selection proxies for this source
319  // proxy.
322 
323 private:
324  vtkSMSourceProxyInternals* PInternals;
325 
326  // used by GetNumberOfAlgorithmOutputPorts to cache the value to avoid
327  // unnecessary information gathers.
328  unsigned int NumberOfAlgorithmOutputPorts;
329  unsigned int NumberOfAlgorithmRequiredInputPorts;
330 
331  vtkSMSourceProxy(const vtkSMSourceProxy&) = delete;
332  void operator=(const vtkSMSourceProxy&) = delete;
333 };
334 
335 #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:699
provides meta data about a vtkDataObject subclass.
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
vtkPVDataInformation * GetRankDataInformation(int rank)
Get rank-specific data information.
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
provides meta data about arrays.
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