vtkSMDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMDomain.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 =========================================================================*/
35 #ifndef vtkSMDomain_h
36 #define vtkSMDomain_h
37 
38 #include "vtkClientServerID.h" // needed for saving animation in batch script
39 #include "vtkRemotingServerManagerModule.h" //needed for exports
40 #include "vtkSMSessionObject.h"
41 
43 class vtkPVXMLElement;
44 class vtkSMProperty;
45 class vtkSMProxyLocator;
46 
47 struct vtkSMDomainInternals;
48 
49 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMDomain : public vtkSMSessionObject
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
59  virtual int IsInDomain(vtkSMProperty* property) = 0;
60 
66  virtual void Update(vtkSMProperty* requestingProperty) { (void)requestingProperty; }
67 
71  virtual void SetAnimationValue(vtkSMProperty*, int vtkNotUsed(index), double vtkNotUsed(value)) {}
72 
86  virtual int SetDefaultValues(vtkSMProperty*, bool vtkNotUsed(use_unchecked_values)) { return 0; };
87 
89 
94  vtkGetStringMacro(XMLName);
96 
98 
104  vtkGetMacro(IsOptional, bool);
106 
110  vtkSMProperty* GetProperty();
111 
116  virtual vtkPVDataInformation* GetInputDataInformation(
117  const char* function, unsigned int index = 0);
118 
124  virtual unsigned int GetNumberOfInputConnections(const char* function);
125 
126 protected:
127  vtkSMDomain();
128  ~vtkSMDomain() override;
129 
131 
138  void SaveState(vtkPVXMLElement* parent, const char* uid);
139  virtual void ChildSaveState(vtkPVXMLElement* domainElement);
141 
154  virtual int LoadState(
155  vtkPVXMLElement* vtkNotUsed(domainElement), vtkSMProxyLocator* vtkNotUsed(loader))
156  {
157  return 1;
158  }
159 
164  virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem);
165 
166  friend class vtkSMProperty;
167 
173  vtkSMProperty* GetRequiredProperty(const char* function);
174 
178  void RemoveRequiredProperty(vtkSMProperty* prop);
179 
188  void AddRequiredProperty(vtkSMProperty* prop, const char* function);
189 
191 
197  vtkSetMacro(IsOptional, bool);
199 
201 
206  vtkSetStringMacro(XMLName);
208 
213  void DomainModified();
214  void InvokeModified() { this->DomainModified(); }
215 
219  unsigned int GetNumberOfRequiredProperties();
220 
225  void SetProperty(vtkSMProperty*);
226 
253  class VTKREMOTINGSERVERMANAGER_EXPORT DeferDomainModifiedEvents
254  {
255  vtkSMDomain* Self;
256 
257  public:
260  };
261 
262  char* XMLName;
264  vtkSMDomainInternals* Internals;
265 
266 private:
267  vtkSMDomain(const vtkSMDomain&) = delete;
268  void operator=(const vtkSMDomain&) = delete;
269 
271  unsigned int DeferDomainModifiedEventsCount;
272  bool PendingDomainModifiedEvents;
273 };
274 
275 #endif
superclass for any server manager classes that are related to a session
bool IsOptional
Definition: vtkSMDomain.h:263
Light object for holding data information.
virtual void SetAnimationValue(vtkSMProperty *, int vtkNotUsed(index), double vtkNotUsed(value))
Set the value of an element of a property from the animation editor.
Definition: vtkSMDomain.h:71
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
Definition: vtkSMDomain.h:66
superclass for all SM properties
virtual int SetDefaultValues(vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
A vtkSMProperty is often defined with a default value in the XML itself.
Definition: vtkSMDomain.h:86
void InvokeModified()
Definition: vtkSMDomain.h:214
represents the possible values a property can have
Definition: vtkSMDomain.h:49
vtkSMDomainInternals * Internals
Definition: vtkSMDomain.h:264
helper to defer firing of vtkCommand::DomainModifiedEvent.
Definition: vtkSMDomain.h:253
is used to locate proxies referred to in state xmls while loading state files.
void PrintSelf(ostream &os, vtkIndent indent) override
char * XMLName
Definition: vtkSMDomain.h:262
#define vtkSMDomain
virtual int LoadState(vtkPVXMLElement *vtkNotUsed(domainElement), vtkSMProxyLocator *vtkNotUsed(loader))
Load the state of the domain from the XML.
Definition: vtkSMDomain.h:154
This is used by vtkPVXMLParser to represent an XML document starting at the root element.