vtkSMDataAssemblyDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
86 #ifndef vtkSMDataAssemblyDomain_h
87 #define vtkSMDataAssemblyDomain_h
88 
89 #include "vtkRemotingServerManagerModule.h" // needed for exports
90 #include "vtkSMDomain.h"
91 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
92 
93 #include <string> // for std::string
94 
95 class vtkDataAssembly;
97 {
98 public:
99  static vtkSMDataAssemblyDomain* New();
101  void PrintSelf(ostream& os, vtkIndent indent) override;
102 
106  const char* GetDataAssemblyName() const
107  {
108  return this->Name.empty() ? nullptr : this->Name.c_str();
109  }
110 
114  vtkDataAssembly* GetDataAssembly() const;
115 
116  void Update(vtkSMProperty* requestingProperty) override;
117 
118  int SetDefaultValues(vtkSMProperty* prop, bool use_unchecked_values) override;
119 
120 protected:
122  ~vtkSMDataAssemblyDomain() override;
123 
124 private:
126  void operator=(const vtkSMDataAssemblyDomain&) = delete;
127 
128  void ChooseAssembly(const std::string& name, vtkDataAssembly* assembly);
129  void FetchAssembly(int tag);
130 
136  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
137 
138  int LastTag = 0;
139 
141  std::string Name;
142  int EntityType = -1;
143 };
144 
145 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
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:91
name
represents the possible values a property can have
Definition: vtkSMDomain.h:37
void PrintSelf(ostream &os, vtkIndent indent) override
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
const char * GetDataAssemblyName() const
Returns the name for the chosen assembly, if any.
a domain that uses vtkDataAssembly
static vtkSMDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.