vtkSMProxyListDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMProxyListDomain.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 =========================================================================*/
37 #ifndef vtkSMProxyListDomain_h
38 #define vtkSMProxyListDomain_h
39 
40 #include "vtkRemotingServerManagerModule.h" //needed for exports
41 #include "vtkSMDomain.h"
42 
43 #include <string> // for std::string
44 #include <utility> // for std::pair
45 #include <vector> // for std::vector
46 
47 class vtkSMProperty;
48 class vtkSMProxy;
49 class vtkSMProxyListDomainInternals;
51 
53 {
54 public:
55  static vtkSMProxyListDomain* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  struct ProxyType
63  {
64  std::string GroupName;
65  std::string ProxyName;
66  ProxyType() {}
67  ProxyType(const std::string& group, const std::string& name)
68  : GroupName(group)
69  , ProxyName(name)
70  {
71  }
72  };
73 
77  const std::vector<ProxyType>& GetProxyTypes() const;
78 
82  unsigned int GetNumberOfProxyTypes();
83 
87  const char* GetProxyGroup(unsigned int index);
88 
92  const char* GetProxyName(unsigned int index);
93 
98  const char* GetProxyName(vtkSMProxy* proxy);
99 
103  vtkSMProxy* GetProxyWithName(const char* pname);
104 
108  int IsInDomain(vtkSMProperty* property) override;
109 
113  void AddProxy(vtkSMProxy*);
114 
118  bool HasProxy(vtkSMProxy*);
119 
123  unsigned int GetNumberOfProxies();
124 
128  vtkSMProxy* GetProxy(unsigned int index);
129 
133  vtkSMProxy* FindProxy(const char* xmlgroup, const char* xmlname);
134 
139  int RemoveProxy(vtkSMProxy* proxy);
140 
145  int RemoveProxy(unsigned int index);
146 
152  void CreateProxies(vtkSMSessionProxyManager* pxm);
153 
163  int SetDefaultValues(vtkSMProperty* prop, bool use_unchecked_values) override;
164 
169  void SetLogName(const char* prefix);
170 
171 protected:
173  ~vtkSMProxyListDomain() override;
174 
179  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
180 
184  void AddProxy(const char* group, const char* name);
185 
189  void ChildSaveState(vtkPVXMLElement* propertyElement) override;
190 
191  // Load the state of the domain from the XML.
192  int LoadState(vtkPVXMLElement* domainElement, vtkSMProxyLocator* loader) override;
193 
194  friend class vtkSMProxyProperty;
195  void SetProxies(vtkSMProxy** proxies, unsigned int count);
196 
197 private:
199  void operator=(const vtkSMProxyListDomain&) = delete;
200 
201  vtkSMProxyListDomainInternals* Internals;
202 };
203 
204 #endif
virtual void SetProxies(unsigned int numElements, vtkSMProxy *proxies[])
Sets the value of the property to the list of proxies specified.
property representing pointer(s) to vtkObject(s)
#define VTKREMOTINGSERVERMANAGER_EXPORT
superclass for all SM properties
name
represents the possible values a property can have
Definition: vtkSMDomain.h:49
void PrintSelf(ostream &os, vtkIndent indent) override
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
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.
union of proxies.
ProxyType(const std::string &group, const std::string &name)
static vtkSMDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
index
Used to identify a proxy type.