vtkSMOutputPort.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkSMOutputPort_h
19 #define vtkSMOutputPort_h
20 
21 #include "vtkPVInformation.h"
22 #include "vtkRemotingServerManagerModule.h" //needed for exports
23 #include "vtkSMProxy.h"
24 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
25 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
26 
27 #include <map> // needed for std::map
28 
29 class vtkCollection;
35 class vtkSMSourceProxy;
36 
38 {
39 public:
40  static vtkSMOutputPort* New();
41  vtkTypeMacro(vtkSMOutputPort, vtkSMProxy);
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
50  virtual vtkPVDataInformation* GetDataInformation();
51 
58  vtkPVDataInformation* GetDataSetInformation();
59 
63  vtkPVDataInformation* GetRankDataInformation(int rank);
64 
66 
77  vtkPVDataInformation* GetSubsetDataInformation(
78  const char* selector, const char* assemblyName = nullptr);
80 
85  vtkPVDataInformation* GetSubsetDataInformation(unsigned int compositeIndex);
86 
92  virtual vtkPVTemporalDataInformation* GetTemporalDataInformation();
93 
95 
102  vtkPVTemporalDataInformation* GetTemporalSubsetDataInformation(
103  const char* selector, const char* assemblyName = nullptr);
105 
109  virtual const char* GetDataClassName();
110 
114  virtual vtkPVClassNameInformation* GetClassNameInformation();
115 
119  virtual void InvalidateDataInformation();
120 
122 
125  vtkGetMacro(PortIndex, int);
127 
131  vtkSMSourceProxy* GetSourceProxy();
132 
134 
136  vtkSMSession* GetSession() override;
139 protected:
140  vtkSMOutputPort();
141  ~vtkSMOutputPort() override;
142 
146  virtual void GatherClassNameInformation();
147 
152  virtual void GatherDataInformation();
153 
157  virtual void GatherTemporalDataInformation();
158 
159  void SetSourceProxy(vtkSMSourceProxy* src);
160 
161  // When set to non-nullptr, GetSourceProxy() returns this rather than the real
162  // source-proxy set using SetSourceProxy(). This provides a mechanism for
163  // vtkSMCompoundSourceProxy to take ownership of ports that don't really
164  // belong to it.
165  void SetCompoundSourceProxy(vtkSMCompoundSourceProxy* src);
166 
170  virtual void UpdatePipelineInternal(double time, bool doTime);
171 
172  // The index of the port the output is obtained from.
173  vtkSetMacro(PortIndex, int);
174  int PortIndex = 0;
175 
178 
180  bool ClassNameInformationValid = false;
181 
183  bool DataInformationValid = false;
184  bool DataSetInformationValid = false;
185 
187  bool TemporalDataInformationValid = false;
188 
189  std::map<std::string, std::map<int, vtkSmartPointer<vtkPVDataInformation>>>
191  std::map<std::string, std::map<int, vtkSmartPointer<vtkPVTemporalDataInformation>>>
193  std::map<int, vtkSmartPointer<vtkPVDataInformation>> RankDataInformations;
194 
195 private:
196  vtkSMOutputPort(const vtkSMOutputPort&) = delete;
197  void operator=(const vtkSMOutputPort&) = delete;
198 
199  friend class vtkSMSourceProxy;
201  void UpdatePipeline();
202 
203  // Update Pipeline with the given timestep request.
204  void UpdatePipeline(double time);
205 
210 };
211 
212 #endif
provides meta data about a vtkDataObject subclass.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkNew< vtkPVDataInformation > DataInformation
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
vtkNew< vtkPVTemporalDataInformation > TemporalDataInformation
virtual vtkSMSessionProxyManager * GetSessionProxyManager()
Return the corresponding ProxyManager if any.
fetches vtkDataAssembly from a vtkObject subclass
std::map< int, vtkSmartPointer< vtkPVDataInformation > > RankDataInformations
virtual void UpdatePipeline()
Calls Update() on all sources.
proxy for a VTK source on a server
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
static vtkSMProxy * New()
a proxy excapsulation a pipeline of proxies.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
reference for an output port of a vtkAlgorithm.
std::map< std::string, std::map< int, vtkSmartPointer< vtkPVTemporalDataInformation > > > TemporalSubsetDataInformations
std::map< std::string, std::map< int, vtkSmartPointer< vtkPVDataInformation > > > SubsetDataInformations
vtkNew< vtkPVClassNameInformation > ClassNameInformation
bool GatherInformation(vtkPVInformation *information)
Gathers information about this proxy.
void operator=(const vtkSMProxy &)=delete
virtual vtkSMSession * GetSession()
Get/Set the session on wihch this object exists.
vtkWeakPointer< vtkSMSourceProxy > SourceProxy
vtkWeakPointer< vtkSMCompoundSourceProxy > CompoundSourceProxy
extends vtkPVDataInformation to gather information across timesteps.