vtkSMCompoundSourceProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkSMCompoundSourceProxy_h
23 #define vtkSMCompoundSourceProxy_h
24 
25 #include "vtkRemotingServerManagerModule.h" //needed for exports
26 #include "vtkSMSourceProxy.h"
27 
28 class vtkSMProxyLocator;
29 class vtkPVXMLElement;
30 class vtkSMProxyManager;
31 
32 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMCompoundSourceProxy : public vtkSMSourceProxy
33 {
34 public:
35  static vtkSMCompoundSourceProxy* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
44  void AddProxy(const char* name, vtkSMProxy* proxy);
45 
52  void ExposeProperty(const char* proxyName, const char* propertyName, const char* exposedName);
53 
60  void ExposeOutputPort(const char* proxyName, const char* portName, const char* exposedName);
61 
68  void ExposeOutputPort(const char* proxyName, unsigned int portIndex, const char* exposedName);
69 
73  unsigned int GetNumberOfProxies() { return this->GetNumberOfSubProxies(); }
74 
78  vtkSMProxy* GetProxy(unsigned int cc) { return this->GetSubProxy(cc); }
79 
83  vtkSMProxy* GetProxy(const char* name) { return this->GetSubProxy(name); }
84 
89  const char* GetProxyName(unsigned int index) { return this->GetSubProxyName(index); }
90 
96  void CreateOutputPorts() override;
97 
102  void CreateSelectionProxies() override;
103 
109  void UpdateVTKObjects() override;
110 
119  vtkPVXMLElement* SaveDefinition(vtkPVXMLElement* root);
120 
121 protected:
123  ~vtkSMCompoundSourceProxy() override;
124 
128  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
129 
134  void CreateVTKObjects() override;
135 
136  // returns 1 if the value element should be written.
137  // proxy property values that point to "outside" proxies
138  // are not written
139  int ShouldWriteValue(vtkPVXMLElement* valueElem);
140  void TraverseForProperties(vtkPVXMLElement* root);
141  void StripValues(vtkPVXMLElement* propertyElem);
142 
143 private:
145  void operator=(const vtkSMCompoundSourceProxy&) = delete;
146 
147  class vtkInternals;
148  vtkInternals* CSInternals;
149 };
150 
151 #endif
vtkSMSessionProxyManager
Definition: vtkSMSessionProxyManager.h:135
vtkSMCompoundSourceProxy::GetProxy
vtkSMProxy * GetProxy(const char *name)
Returns the subproxy with the given name.
Definition: vtkSMCompoundSourceProxy.h:83
vtkSMSourceProxy::CreateOutputPorts
virtual void CreateOutputPorts()
Creates the output port proxies for this filter.
vtkSMCompoundSourceProxy::GetProxyName
const char * GetProxyName(unsigned int index)
Returns the name used to store sub-proxy.
Definition: vtkSMCompoundSourceProxy.h:89
vtkSMProxy::UpdateVTKObjects
virtual void UpdateVTKObjects()
Update the VTK object on the server by pushing the values of all modified properties (un-modified pro...
vtkSMSourceProxy.h
vtkSMProxyManager
singleton/facade to vtkSMSessionProxyManager
Definition: vtkSMProxyManager.h:35
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkSMSourceProxy::CreateVTKObjects
void CreateVTKObjects() override
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
vtkSMSourceProxy
proxy for a VTK source on a server
Definition: vtkSMSourceProxy.h:37
vtkSMCompoundSourceProxy::GetNumberOfProxies
unsigned int GetNumberOfProxies()
Returns the number of sub-proxies.
Definition: vtkSMCompoundSourceProxy.h:73
vtkIndent
vtkSMProxy::GetNumberOfSubProxies
unsigned int GetNumberOfSubProxies()
Returns the number of sub-proxies.
vtkSMSourceProxy::New
static vtkSMSourceProxy * New()
vtkSMCompoundSourceProxy
a proxy excapsulation a pipeline of proxies.
Definition: vtkSMCompoundSourceProxy.h:32
vtkPVXMLElement
Definition: vtkPVXMLElement.h:23
vtkSMSourceProxy::ReadXMLAttributes
int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element) override
Read attributes from an XML element.
vtkSMProxyLocator
is used to locate proxies referred to in state xmls while loading state files.
Definition: vtkSMProxyLocator.h:24
vtkSMProxy::GetSubProxy
vtkSMProxy * GetSubProxy(const char *name)
Returns a sub-proxy.
vtkSMProxy::GetSubProxyName
const char * GetSubProxyName(unsigned int index)
Returns the name used to store sub-proxy.
vtkSMSourceProxy::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMProxy::vtkSMCompoundSourceProxy
friend class vtkSMCompoundSourceProxy
These classes have been declared as friends to minimize the public interface exposed by vtkSMProxy.
Definition: vtkSMProxy.h:674
vtkSMSourceProxy::CreateSelectionProxies
virtual void CreateSelectionProxies()
Creates extract selection proxies for each output port if not already created.
vtkSMCompoundSourceProxy::GetProxy
vtkSMProxy * GetProxy(unsigned int cc)
Returns the sub proxy at a given index.
Definition: vtkSMCompoundSourceProxy.h:78