vtkSIProxyProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSIProxyProperty.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 =========================================================================*/
25 #ifndef vtkSIProxyProperty_h
26 #define vtkSIProxyProperty_h
27 
28 #include "vtkRemotingServerManagerModule.h" //needed for exports
29 #include "vtkSIProperty.h"
30 
32 {
33 public:
34  static vtkSIProxyProperty* New();
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
44  vtkGetStringMacro(CleanCommand);
46 
48 
54  vtkGetStringMacro(RemoveCommand);
56 
57  // When set to true, the property will push a NULL i.e. 0 when there are no
58  // proxies in the property. Not used when CleanCommand or RemoveCommand is
59  // set. Default is false.
60  vtkGetMacro(NullOnEmpty, bool);
61 
62 protected:
64  ~vtkSIProxyProperty() override;
65 
69  bool Push(vtkSMMessage*, int) override;
70 
74  bool ReadXMLAttributes(vtkSIProxy* proxyhelper, vtkPVXMLElement* element) override;
75 
77 
82  vtkSetStringMacro(CleanCommand);
83  char* CleanCommand;
85 
87 
93  vtkSetStringMacro(RemoveCommand);
94  char* RemoveCommand;
96 
97  // When set to true, the property will push a NULL i.e. 0 when there are no
98  // proxies in the property. Not used when CleanCommand or RemoveCommand is
99  // set. Default is false.
100  vtkSetMacro(NullOnEmpty, bool);
101  bool NullOnEmpty;
102 
103  enum TypeArg
104  {
107  SIProxy
108  };
109 
110  // Proxy type: VTK (default), SMProxy, Kernel,
111  // In the XML we expect argument_type="VTK" (default value if not set)
112  // argument_type="SMProxy"
113  // argument_type="SIProxy"
115 
116  // Base on the ArgumentType will return either the VTK object or the SMProxy object
117  vtkObjectBase* GetObjectBase(vtkTypeUInt32 globalId);
118 
119  // Allow to detect if a null argument is really meant to be null
120  bool IsValidNull(vtkTypeUInt32 globalId);
121 
122 private:
123  vtkSIProxyProperty(const vtkSIProxyProperty&) = delete;
124  void operator=(const vtkSIProxyProperty&) = delete;
125  class InternalCache;
126  InternalCache* Cache;
127 
128  class vtkObjectCache;
129  vtkObjectCache* ObjectCache;
130 };
131 
132 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSIProperty * New()
#define VTKREMOTINGSERVERMANAGER_EXPORT
ServerSide Property use to set Object array as method argument.
virtual bool Push(vtkSMMessage *, int)
Push a new state to the underneath implementation.
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...
char * RemoveCommand
Remove command is the command called to remove the VTK object on the server-side. ...
virtual bool ReadXMLAttributes(vtkSIProxy *proxyhelper, vtkPVXMLElement *element)
Parse the xml for the property.
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.
char * CleanCommand
Command that can be used to remove inputs.