vtkSMCompoundSourceProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMCompoundSourceProxy.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 =========================================================================*/
34 #ifndef vtkSMCompoundSourceProxy_h
35 #define vtkSMCompoundSourceProxy_h
36 
37 #include "vtkRemotingServerManagerModule.h" //needed for exports
38 #include "vtkSMSourceProxy.h"
39 
40 class vtkSMProxyLocator;
41 class vtkPVXMLElement;
42 class vtkSMProxyManager;
43 
45 {
46 public:
47  static vtkSMCompoundSourceProxy* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
56  void AddProxy(const char* name, vtkSMProxy* proxy);
57 
64  void ExposeProperty(const char* proxyName, const char* propertyName, const char* exposedName);
65 
72  void ExposeOutputPort(const char* proxyName, const char* portName, const char* exposedName);
73 
80  void ExposeOutputPort(const char* proxyName, unsigned int portIndex, const char* exposedName);
81 
85  unsigned int GetNumberOfProxies() { return this->GetNumberOfSubProxies(); }
86 
90  vtkSMProxy* GetProxy(unsigned int cc) { return this->GetSubProxy(cc); }
91 
95  vtkSMProxy* GetProxy(const char* name) { return this->GetSubProxy(name); }
96 
101  const char* GetProxyName(unsigned int index) { return this->GetSubProxyName(index); }
102 
108  void CreateOutputPorts() override;
109 
114  void CreateSelectionProxies() override;
115 
121  void UpdateVTKObjects() override;
122 
131  vtkPVXMLElement* SaveDefinition(vtkPVXMLElement* root);
132 
133 protected:
135  ~vtkSMCompoundSourceProxy() override;
136 
140  int ReadXMLAttributes(vtkSMSessionProxyManager* pm, vtkPVXMLElement* element) override;
141 
146  void CreateVTKObjects() override;
147 
148  // returns 1 if the value element should be written.
149  // proxy property values that point to "outside" proxies
150  // are not written
151  int ShouldWriteValue(vtkPVXMLElement* valueElem);
152  void TraverseForProperties(vtkPVXMLElement* root);
153  void StripValues(vtkPVXMLElement* propertyElem);
154 
155 private:
157  void operator=(const vtkSMCompoundSourceProxy&) = delete;
158 
159  class vtkInternals;
160  vtkInternals* CSInternals;
161 };
162 
163 #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:152
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()