vtkSMProxyLink.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkSMProxyLink_h
15 #define vtkSMProxyLink_h
16 
17 #include "vtkParaViewDeprecation.h"
18 #include "vtkRemotingServerManagerModule.h" //needed for exports
19 #include "vtkSMLink.h"
20 
21 #include <memory> // for unique_ptr
22 
23 struct vtkSMProxyLinkInternals;
24 
26 {
27 public:
28  static vtkSMProxyLink* New();
29  vtkTypeMacro(vtkSMProxyLink, vtkSMLink);
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33  {
34  BLACKLIST = 0,
35  WHITELIST
36  };
37 
45  virtual void AddLinkedProxy(vtkSMProxy* proxy, int updateDir);
46 
51  virtual void LinkProxies(vtkSMProxy* proxy1, vtkSMProxy* proxy2);
52 
56  virtual void LinkProxyPropertyProxies(vtkSMProxy* proxy1, vtkSMProxy* proxy2, const char* pname);
57 
61  virtual void RemoveLinkedProxy(vtkSMProxy* proxy);
62 
64 
67  unsigned int GetNumberOfLinkedObjects() override;
69  "GetNumerOfLinkedProxies is deprectated, please use GetNumberOfLinkedObjects instead.")
70  unsigned int GetNumberOfLinkedProxies();
72 
76  vtkSMProxy* GetLinkedProxy(int index) override;
77 
79 
83  int GetLinkedObjectDirection(int index) override;
84  int GetLinkedProxyDirection(int index);
86 
88 
97  void AddException(const char* propertyname);
98  void RemoveException(const char* propertyname);
99  void ClearExceptions();
101 
105  void RemoveAllLinks() override;
106 
114  void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator) override;
115 
117 
124  vtkSetMacro(ExceptionBehavior, int);
125  vtkGetMacro(ExceptionBehavior, int);
126  void SetExceptionBehaviorToBlacklist() { this->SetExceptionBehavior(BLACKLIST); }
127  void SetExceptionBehaviorToWhitelist() { this->SetExceptionBehavior(WHITELIST); }
129 
130 protected:
131  vtkSMProxyLink();
132  ~vtkSMProxyLink() override;
133 
138  void UpdateVTKObjects(vtkSMProxy* proxy) override;
139 
145  void PropertyModified(vtkSMProxy* proxy, const char* pname) override;
146 
152  void UpdateProperty(vtkSMProxy* caller, const char* pname) override;
153 
159  virtual std::string GetXMLTagName() { return "ProxyLink"; }
160 
164  void SaveXMLState(const char* linkname, vtkPVXMLElement* parent) override;
165 
169  int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator) override;
170 
174  void UpdateState() override;
175 
176 private:
177  vtkSMProxyLink(const vtkSMProxyLink&) = delete;
178  void operator=(const vtkSMProxyLink&) = delete;
179 
184  bool isPropertyLinked(const char* pname);
185 
186  std::unique_ptr<vtkSMProxyLinkInternals> Internals;
187  int ExceptionBehavior = BLACKLIST;
188 };
189 
190 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
#define PARAVIEW_DEPRECATED_IN_6_1_0(reason)
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.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
#define const
Definition: zconf.h:238
static vtkSMSessionObject * New()