ParaView
vtkSMStringListDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMStringListDomain.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 =========================================================================*/
29 #ifndef vtkSMStringListDomain_h
30 #define vtkSMStringListDomain_h
31 
32 #include "vtkPVServerManagerCoreModule.h" //needed for exports
33 #include "vtkSMDomain.h"
34 #include <vector> // needed for vector.
35 class vtkStdString;
36 
37 struct vtkSMStringListDomainInternals;
38 
39 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMStringListDomain : public vtkSMDomain
40 {
41 public:
42  static vtkSMStringListDomain* New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
52  virtual int IsInDomain(vtkSMProperty* property);
53 
57  int IsInDomain(const char* string, unsigned int& idx);
58 
63  const char* GetString(unsigned int idx);
64 
68  unsigned int GetNumberOfStrings();
69 
74  virtual void Update(vtkSMProperty*);
75 
79  virtual void SetAnimationValue(vtkSMProperty*, int, double);
80 
82 
92  virtual int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values);
93 
94 protected:
98 
103  virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element);
104 
105  virtual void ChildSaveState(vtkPVXMLElement* domainElement);
106 
108 
112  virtual void SetStrings(const std::vector<vtkStdString>& strings);
113  const std::vector<vtkStdString>& GetStrings();
115 
116 private:
117  vtkSMStringListDomain(const vtkSMStringListDomain&) VTK_DELETE_FUNCTION;
118  void operator=(const vtkSMStringListDomain&) VTK_DELETE_FUNCTION;
119 
120  vtkSMStringListDomainInternals* SLInternals;
121 };
122 
123 #endif
virtual void ChildSaveState(vtkPVXMLElement *domainElement)
Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attribut...
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
virtual int IsInDomain(vtkSMProperty *property)=0
Is the (unchecked) value of the property in the domain? Overwritten by sub-classes.
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
represents the possible values a property can have
Definition: vtkSMDomain.h:48
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkSMSessionObject * New()