vtkSMArrayListDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
65 #ifndef vtkSMArrayListDomain_h
66 #define vtkSMArrayListDomain_h
67 
68 #include "vtkRemotingServerManagerModule.h" //needed for exports
69 #include "vtkSMStringListDomain.h"
70 
73 class vtkSMProxyProperty;
74 class vtkSMSourceProxy;
76 
77 class vtkSMArrayListDomainInternals;
78 
80 {
81 public:
82  static vtkSMArrayListDomain* New();
84  void PrintSelf(ostream& os, vtkIndent indent) override;
85 
92  void Update(vtkSMProperty* prop) override;
93 
98  int IsArrayPartial(unsigned int idx);
99 
107  int GetFieldAssociation(unsigned int idx);
108 
126  int GetDomainAssociation(unsigned int idx);
127 
129 
133  vtkGetMacro(AttributeType, int);
135 
146  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
147 
148  // This enum represents the possible strategies associated
149  // with a given InformationKey :
150  // NEED_KEY means that if the array will be in the domain only if
151  // it does contains the given information key in its information.
152  // REJECT_KEY means that if the array will be in the domain only if
153  // it does NOT contains the given information key in its information.
155  {
157  REJECT_KEY
158  };
159 
161 
167  virtual unsigned int AddInformationKey(const char* location, const char* name, int strategy);
168  virtual unsigned int AddInformationKey(const char* location, const char* name)
169  {
170  return this->AddInformationKey(location, name, vtkSMArrayListDomain::NEED_KEY);
171  }
173 
177  unsigned int RemoveInformationKey(const char* location, const char* name);
178 
182  unsigned int GetNumberOfInformationKeys();
183 
187  void RemoveAllInformationKeys();
188 
190 
193  const char* GetInformationKeyLocation(unsigned int);
194  const char* GetInformationKeyName(unsigned int);
195  int GetInformationKeyStrategy(unsigned int);
197 
202  static std::string CreateMangledName(vtkPVArrayInformation* arrayInfo, int component);
203 
205 
209  static std::string ArrayNameFromMangledName(const char* name);
210  static int ComponentIndexFromMangledName(vtkPVArrayInformation* info, const char* name);
212 
213 protected:
215  ~vtkSMArrayListDomain() override;
216 
221  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
222 
228  virtual vtkPVDataInformation* GetExtraDataInformation() { return nullptr; }
229 
235  virtual bool IsFilteredArray(vtkPVDataInformation* info, int association, const char* arrayName);
236 
238 
241  vtkSetMacro(AttributeType, int);
242  int AttributeType;
244 
246 
250  vtkGetStringMacro(InputDomainName);
251  vtkSetStringMacro(InputDomainName);
253 
254  char* InputDomainName;
255 
256  // Currently, used by vtkSMRepresentedArrayListDomain to avoid picking just an
257  // arbitrary array for scalar coloring. Need to rethink how this should be
258  // done cleanly.
260 
261 private:
263  void operator=(const vtkSMArrayListDomain&) = delete;
264 
265  friend class vtkSMArrayListDomainInternals;
266  vtkSMArrayListDomainInternals* ALDInternals;
267 };
268 
269 #endif
location
component
property representing pointer(s) to vtkObject(s)
virtual vtkPVDataInformation * GetExtraDataInformation()
HACK: Provides a temporary mechanism for subclasses to provide an "additional" vtkPVDataInformation i...
provides meta data about a vtkDataObject subclass.
#define VTKREMOTINGSERVERMANAGER_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
info
superclass for all SM properties
int AttributeType
Set to an attribute type defined in vtkDataSetAttributes.
domain to ensure that input has required types of arrays.
name
int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *element) override
Set the appropriate ivars from the xml element.
virtual unsigned int AddInformationKey(const char *location, const char *name)
Adds a new InformationKey to the domain.
void Update(vtkSMProperty *) override
Update self checking the "unchecked" values of all required properties.
proxy for a VTK source on a server
provides meta data about arrays.
static vtkSMStringListDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
list of arrays obtained from input
int SetDefaultValues(vtkSMProperty *, bool use_unchecked_values) override
A vtkSMProperty is often defined with a default value in the XML itself.