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 
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
virtual void CreateOutputPorts()
Creates the output port proxies for this filter.
vtkSMProxy * GetSubProxy(const char *name)
Returns a sub-proxy.
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual void CreateSelectionProxies()
Creates extract selection proxies for each output port if not already created.
singleton/facade to vtkSMSessionProxyManager
vtkSMProxy * GetProxy(const char *name)
Returns the subproxy with the given name.
virtual void UpdateVTKObjects()
Update the VTK object on the server by pushing the values of all modified properties (un-modified pro...
void CreateVTKObjects() override
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
const char * GetProxyName(unsigned int index)
Returns the name used to store sub-proxy.
proxy for a VTK source on a server
friend class vtkSMCompoundSourceProxy
These classes have been declared as friends to minimize the public interface exposed by vtkSMProxy...
Definition: vtkSMProxy.h:684
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
const char * GetSubProxyName(unsigned int index)
Returns the name used to store sub-proxy.
a proxy excapsulation a pipeline of proxies.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
is used to locate proxies referred to in state xmls while loading state files.
unsigned int GetNumberOfProxies()
Returns the number of sub-proxies.
vtkSMProxy * GetProxy(unsigned int cc)
Returns the sub proxy at a given index.
int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element) override
Read attributes from an XML element.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
unsigned int GetNumberOfSubProxies()
Returns the number of sub-proxies.
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSMSourceProxy * New()