vtkSMPropertyLink.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkSMPropertyLink_h
12 #define vtkSMPropertyLink_h
13 
14 #include "vtkRemotingServerManagerModule.h" //needed for exports
15 #include "vtkSMLink.h"
16 
17 class vtkSMProperty;
18 class vtkSMPropertyLinkInternals;
19 class vtkSMPropertyLinkObserver;
20 
22 {
23 public:
24  static vtkSMPropertyLink* New();
25  vtkTypeMacro(vtkSMPropertyLink, vtkSMLink);
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
38  void AddLinkedProperty(vtkSMProxy* proxy, const char* propertyname, int updateDir);
39  void RemoveLinkedProperty(vtkSMProxy* proxy, const char* propertyname);
41 
43 
46  unsigned int GetNumberOfLinkedObjects() override;
47  unsigned int GetNumberOfLinkedProperties();
49 
53  vtkSMProxy* GetLinkedProxy(int index) override;
54 
58  const char* GetLinkedPropertyName(int index);
59 
61 
65  int GetLinkedObjectDirection(int index) override;
66  int GetLinkedPropertyDirection(int index);
68 
72  void RemoveAllLinks() override;
73 
81  void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator) override;
82 
83 protected:
85  ~vtkSMPropertyLink() override;
86 
90  void Synchronize();
91 
92  friend class vtkSMPropertyLinkInternals;
93  friend class vtkSMPropertyLinkObserver;
94 
98  int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator) override;
99 
103  void SaveXMLState(const char* linkname, vtkPVXMLElement* parent) override;
104 
105  void UpdateVTKObjects(vtkSMProxy* caller) override;
106  void PropertyModified(vtkSMProxy* caller, const char* pname) override;
107  void UpdateProperty(vtkSMProxy* caller, const char* pname) override;
108 
112  void UpdateState() override;
113 
114 private:
115  vtkSMPropertyLinkInternals* Internals;
116  bool ModifyingProperty;
117 
118  vtkSMPropertyLink(const vtkSMPropertyLink&) = delete;
119  void operator=(const vtkSMPropertyLink&) = delete;
120 };
121 
122 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
superclass for all SM properties
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
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.
static vtkSMSessionObject * New()