ParaView
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 =========================================================================*/
34 #ifndef vtkSMDomain_h
35 #define vtkSMDomain_h
36 
37 #include "vtkClientServerID.h" // needed for saving animation in batch script
38 #include "vtkPVServerManagerCoreModule.h" //needed for exports
39 #include "vtkSMSessionObject.h"
40 
42 class vtkPVXMLElement;
43 class vtkSMProperty;
44 class vtkSMProxyLocator;
45 
46 struct vtkSMDomainInternals;
47 
48 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMDomain : public vtkSMSessionObject
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
58  virtual int IsInDomain(vtkSMProperty* property) = 0;
59 
65  virtual void Update(vtkSMProperty* requestingProperty) { (void)requestingProperty; }
66 
70  virtual void SetAnimationValue(vtkSMProperty*, int vtkNotUsed(index), double vtkNotUsed(value)) {}
71 
85  virtual int SetDefaultValues(vtkSMProperty*, bool vtkNotUsed(use_unchecked_values)) { return 0; };
86 
88 
93  vtkGetStringMacro(XMLName);
95 
97 
103  vtkGetMacro(IsOptional, bool);
105 
109  vtkSMProperty* GetProperty();
110 
111 protected:
112  vtkSMDomain();
113  ~vtkSMDomain();
114 
116 
123  void SaveState(vtkPVXMLElement* parent, const char* uid);
124  virtual void ChildSaveState(vtkPVXMLElement* domainElement);
126 
139  virtual int LoadState(
140  vtkPVXMLElement* vtkNotUsed(domainElement), vtkSMProxyLocator* vtkNotUsed(loader))
141  {
142  return 1;
143  }
144 
149  virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem);
150 
151  friend class vtkSMProperty;
152 
158  vtkSMProperty* GetRequiredProperty(const char* function);
159 
163  void RemoveRequiredProperty(vtkSMProperty* prop);
164 
173  void AddRequiredProperty(vtkSMProperty* prop, const char* function);
174 
179  virtual vtkPVDataInformation* GetInputDataInformation(const char* function, int index = 0);
180 
182 
188  vtkSetMacro(IsOptional, bool);
190 
192 
197  vtkSetStringMacro(XMLName);
199 
204  void DomainModified();
205  void InvokeModified() { this->DomainModified(); }
206 
210  unsigned int GetNumberOfRequiredProperties();
211 
216  void SetProperty(vtkSMProperty*);
217 
218  char* XMLName;
220  vtkSMDomainInternals* Internals;
221 
222 private:
223  vtkSMDomain(const vtkSMDomain&) VTK_DELETE_FUNCTION;
224  void operator=(const vtkSMDomain&) VTK_DELETE_FUNCTION;
225 };
226 
227 #endif
superclass for any server manager classes that are related to a session
bool IsOptional
Definition: vtkSMDomain.h:219
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:70
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
Definition: vtkSMDomain.h:65
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:85
void InvokeModified()
Definition: vtkSMDomain.h:205
represents the possible values a property can have
Definition: vtkSMDomain.h:48
vtkSMDomainInternals * Internals
Definition: vtkSMDomain.h:220
void PrintSelf(ostream &os, vtkIndent indent)
is used to locate proxies referred to in state xmls while loading state files.
char * XMLName
Definition: vtkSMDomain.h:218
#define vtkSMDomain
virtual int LoadState(vtkPVXMLElement *vtkNotUsed(domainElement), vtkSMProxyLocator *vtkNotUsed(loader))
Load the state of the domain from the XML.
Definition: vtkSMDomain.h:139
This is used by vtkPVXMLParser to represent an XML document starting at the root element.