vtkSMFieldDataDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
49 #ifndef vtkSMFieldDataDomain_h
50 #define vtkSMFieldDataDomain_h
51 
52 #include "vtkRemotingServerManagerModule.h" //needed for exports
53 #include "vtkSMEnumerationDomain.h"
54 
56 
57 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMFieldDataDomain : public vtkSMEnumerationDomain
58 {
59 public:
60  static vtkSMFieldDataDomain* New();
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
68  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
69 
71 
75  static std::string GetAttributeTypeAsString(vtkPVDataInformation* dataInfo, int attrType);
76  static const char* GetAttributeTypeAsString(int attrType);
78 
80 
84  static std::string GetElementTypeAsString(vtkPVDataInformation* dataInfo, int attrType);
85  static const char* GetElementTypeAsString(int attrType);
87 
92  void Update(vtkSMProperty* property) override;
93 
94 protected:
96  ~vtkSMFieldDataDomain() override;
97 
102  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem) override;
103 
104  // When true, "Field Data" option is added to the domain.
106 
107  // When true, "Side Data" option is added to the domain.
108  bool EnableSideDataSelection = false;
109 
111 
112 private:
114  void operator=(const vtkSMFieldDataDomain&) = delete;
115 
122  int ComputeDefaultValue(int originalDefaultValue);
123 };
124 
125 #endif
int SetDefaultValues(vtkSMProperty *, bool use_unchecked_values) override
Overridden to ensure that the property's default value is valid for the enumeration, if not it will be set to the first enumeration value.
void PrintSelf(ostream &os, vtkIndent indent) override
provides meta data about a vtkDataObject subclass.
superclass for all SM properties
list of integers with associated strings
enumeration domain to select array association or attribute type.
int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *element) override
Set the appropriate ivars from the xml element.
static vtkSMEnumerationDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void Update(vtkSMProperty *property) override
Update self based on the "unchecked" values of all required properties.