vtkSIProperty.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkSIProperty_h
12 #define vtkSIProperty_h
13 
14 #include "vtkObject.h"
15 #include "vtkRemotingServerManagerModule.h" //needed for exports
16 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
17 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
18 
20 class vtkSIObject;
21 class vtkSIProxy;
22 class vtkPVXMLElement;
23 
25 {
26 public:
27  static vtkSIProperty* New();
28  vtkTypeMacro(vtkSIProperty, vtkObject);
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
36  vtkGetStringMacro(XMLName);
38 
40 
44  vtkGetStringMacro(Command);
46 
48 
52  vtkGetMacro(InformationOnly, bool);
54 
56 
61  vtkGetMacro(Repeatable, bool);
63 
65 
70  vtkSetMacro(IsInternal, bool);
71  vtkGetMacro(IsInternal, bool);
73 
74 protected:
75  vtkSIProperty();
76  ~vtkSIProperty() override;
77 
78  friend class vtkSIProxy;
79 
83  vtkSIObject* GetSIObject(vtkTypeUInt32 globalid);
84 
88  virtual bool Push(vtkSMMessage*, int);
89 
93  virtual bool Pull(vtkSMMessage*);
94 
98  virtual bool ReadXMLAttributes(vtkSIProxy* proxyhelper, vtkPVXMLElement* element);
99 
101 
104  bool ProcessMessage(vtkClientServerStream& stream);
105  const vtkClientServerStream& GetLastResult();
108 
109  vtkSetStringMacro(Command);
110  vtkSetStringMacro(XMLName);
111 
112  char* XMLName;
113  char* Command;
117 
119 
120  // Allow subclass to save the property value as a state part
121  void SaveValueToCache(vtkSMMessage* proxyStateUpdate, int offset);
122 
123 private:
124  vtkSIProperty(const vtkSIProperty&) = delete;
125  void operator=(const vtkSIProperty&) = delete;
126 
127  class vtkInternals;
128  vtkInternals* Internals;
129 };
130 
131 #endif
virtual bool ReadXMLAttributes(vtkPVXMLElement *element)
Parses the XML to create property/subproxy helpers.
void Pull(vtkSMMessage *msg) override
Pull the current state of the underneath implementation.
#define VTKREMOTINGSERVERMANAGER_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkSIObject * GetSIObject(vtkTypeUInt32 globalid) const
Convenience method to obtain a vtkSIObject subclass given its global id.
Store messages for the interpreter.
vtkWeakPointer< vtkSIProxy > SIProxyObject
vtkSIProxy is the server-implementation for a vtkSMProxy that helps the vtkSMProxy with managing/upda...
Definition: vtkSIProxy.h:22
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
vtkObjectBase * GetVTKObject()
Returns access to the VTKObject pointer, if any.
Object that is managed by vtkPVSessionCore which wrap concrete class such as the vtk ones...
Definition: vtkSIObject.h:21
void Push(vtkSMMessage *msg) override
Push a new state to the underneath implementation.
Basic ServerImplementation property used to call a method with no argument on a VTK object...
Definition: vtkSIProperty.h:24
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
void operator=(const vtkObjectBase &)
char * XMLName
Definition: vtkSIProxy.h:208