vtkSIProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSIProperty.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 =========================================================================*/
23 #ifndef vtkSIProperty_h
24 #define vtkSIProperty_h
25 
26 #include "vtkObject.h"
27 #include "vtkRemotingServerManagerModule.h" //needed for exports
28 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
29 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
30 
32 class vtkSIObject;
33 class vtkSIProxy;
34 class vtkPVXMLElement;
35 
37 {
38 public:
39  static vtkSIProperty* New();
40  vtkTypeMacro(vtkSIProperty, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
48  vtkGetStringMacro(XMLName);
50 
52 
56  vtkGetStringMacro(Command);
58 
60 
64  vtkGetMacro(InformationOnly, bool);
66 
68 
73  vtkGetMacro(Repeatable, bool);
75 
77 
82  vtkSetMacro(IsInternal, bool);
83  vtkGetMacro(IsInternal, bool);
85 
86 protected:
87  vtkSIProperty();
88  ~vtkSIProperty() override;
89 
90  friend class vtkSIProxy;
91 
95  vtkSIObject* GetSIObject(vtkTypeUInt32 globalid);
96 
100  virtual bool Push(vtkSMMessage*, int);
101 
105  virtual bool Pull(vtkSMMessage*);
106 
110  virtual bool ReadXMLAttributes(vtkSIProxy* proxyhelper, vtkPVXMLElement* element);
111 
113 
116  bool ProcessMessage(vtkClientServerStream& stream);
117  const vtkClientServerStream& GetLastResult();
120 
121  vtkSetStringMacro(Command);
122  vtkSetStringMacro(XMLName);
123 
124  char* XMLName;
125  char* Command;
129 
131 
132  // Allow subclass to save the property value as a state part
133  void SaveValueToCache(vtkSMMessage* proxyStateUpdate, int offset);
134 
135 private:
136  vtkSIProperty(const vtkSIProperty&) = delete;
137  void operator=(const vtkSIProperty&) = delete;
138 
139  class vtkInternals;
140  vtkInternals* Internals;
141 };
142 
143 #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:34
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:33
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:36
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:220