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 "vtkRemotingServerManagerModule.h" //needed for exports
33 #include "vtkSMDomain.h"
34 #include <vector> // needed for vector.
35 class vtkStdString;
36 
37 struct vtkSMStringListDomainInternals;
38 
39 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMStringListDomain : public vtkSMDomain
40 {
41 public:
42  static vtkSMStringListDomain* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
52  int IsInDomain(vtkSMProperty* property) override;
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  void Update(vtkSMProperty*) override;
75 
79  void SetAnimationValue(vtkSMProperty*, int, double) override;
80 
82 
92  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
93 
94 protected:
96  ~vtkSMStringListDomain() override;
98 
103  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
104 
105  void ChildSaveState(vtkPVXMLElement* domainElement) override;
106 
108 
112  virtual void SetStrings(const std::vector<vtkStdString>& strings);
113  const std::vector<vtkStdString>& GetStrings();
115 
116 private:
118  void operator=(const vtkSMStringListDomain&) = delete;
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:71
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
Definition: vtkSMDomain.h:66
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:86
represents the possible values a property can have
Definition: vtkSMDomain.h:49
void PrintSelf(ostream &os, vtkIndent indent) override
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.
static vtkSMSessionObject * New()