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 "vtkRemotingServerManagerModule.h" //needed for exports
22 #include "vtkSMProxy.h"
23 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
24 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
25 
26 #include <map> // needed for std::map
27 
28 class vtkCollection;
34 class vtkSMSourceProxy;
35 
37 {
38 public:
39  static vtkSMOutputPort* New();
40  vtkTypeMacro(vtkSMOutputPort, vtkSMProxy);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
49  virtual vtkPVDataInformation* GetDataInformation();
50 
54  vtkPVDataInformation* GetRankDataInformation(int rank);
55 
57 
68  vtkPVDataInformation* GetSubsetDataInformation(
69  const char* selector, const char* assemblyName = nullptr);
71 
76  vtkPVDataInformation* GetSubsetDataInformation(unsigned int compositeIndex);
77 
83  virtual vtkPVTemporalDataInformation* GetTemporalDataInformation();
84 
86 
93  vtkPVTemporalDataInformation* GetTemporalSubsetDataInformation(
94  const char* selector, const char* assemblyName = nullptr);
96 
100  virtual const char* GetDataClassName();
101 
105  virtual vtkPVClassNameInformation* GetClassNameInformation();
106 
110  virtual void InvalidateDataInformation();
111 
113 
116  vtkGetMacro(PortIndex, int);
118 
122  vtkSMSourceProxy* GetSourceProxy();
123 
125 
127  vtkSMSession* GetSession() override;
130 protected:
131  vtkSMOutputPort();
132  ~vtkSMOutputPort() override;
133 
137  virtual void GatherClassNameInformation();
138 
143  virtual void GatherDataInformation();
144 
148  virtual void GatherTemporalDataInformation();
149 
150  void SetSourceProxy(vtkSMSourceProxy* src);
151 
152  // When set to non-nullptr, GetSourceProxy() returns this rather than the real
153  // source-proxy set using SetSourceProxy(). This provides a mechanism for
154  // vtkSMCompoundSourceProxy to take ownership of ports that don't really
155  // belong to it.
156  void SetCompoundSourceProxy(vtkSMCompoundSourceProxy* src);
157 
161  virtual void UpdatePipelineInternal(double time, bool doTime);
162 
163  // The index of the port the output is obtained from.
164  vtkSetMacro(PortIndex, int);
165  int PortIndex;
166 
169 
172 
175 
178 
179  std::map<std::string, std::map<int, vtkSmartPointer<vtkPVDataInformation>>>
181  std::map<std::string, std::map<int, vtkSmartPointer<vtkPVTemporalDataInformation>>>
183  std::map<int, vtkSmartPointer<vtkPVDataInformation>> RankDataInformations;
184 
185 private:
186  vtkSMOutputPort(const vtkSMOutputPort&) = delete;
187  void operator=(const vtkSMOutputPort&) = delete;
188 
189  friend class vtkSMSourceProxy;
191  void UpdatePipeline();
192 
193  // Update Pipeline with the given timestep request.
194  void UpdatePipeline(double time);
195 };
196 
197 #endif
vtkPVTemporalDataInformation * TemporalDataInformation
bool TemporalDataInformationValid
vtkPVClassNameInformation * ClassNameInformation
provides meta data about a vtkDataObject subclass.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
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
vtkPVDataInformation * DataInformation
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
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.