vtkSMArrayListDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMArrayListDomain.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 =========================================================================*/
70 #ifndef vtkSMArrayListDomain_h
71 #define vtkSMArrayListDomain_h
72 
73 #include "vtkRemotingServerManagerModule.h" //needed for exports
74 #include "vtkSMStringListDomain.h"
75 
78 class vtkSMProxyProperty;
79 class vtkSMSourceProxy;
81 
82 class vtkSMArrayListDomainInternals;
83 
85 {
86 public:
87  static vtkSMArrayListDomain* New();
89  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
97  void Update(vtkSMProperty* prop) override;
98 
103  int IsArrayPartial(unsigned int idx);
104 
112  int GetFieldAssociation(unsigned int idx);
113 
131  int GetDomainAssociation(unsigned int idx);
132 
134 
138  vtkGetMacro(AttributeType, int);
140 
151  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
152 
153  // This enum represents the possible strategies associated
154  // with a given InformationKey :
155  // NEED_KEY means that if the array will be in the domain only if
156  // it does contains the given information key in its information.
157  // REJECT_KEY means that if the array will be in the domain only if
158  // it does NOT contains the given information key in its information.
160  {
162  REJECT_KEY
163  };
164 
166 
172  virtual unsigned int AddInformationKey(const char* location, const char* name, int strategy);
173  virtual unsigned int AddInformationKey(const char* location, const char* name)
174  {
175  return this->AddInformationKey(location, name, vtkSMArrayListDomain::NEED_KEY);
176  }
178 
182  unsigned int RemoveInformationKey(const char* location, const char* name);
183 
187  unsigned int GetNumberOfInformationKeys();
188 
192  void RemoveAllInformationKeys();
193 
195 
198  const char* GetInformationKeyLocation(unsigned int);
199  const char* GetInformationKeyName(unsigned int);
200  int GetInformationKeyStrategy(unsigned int);
202 
207  static std::string CreateMangledName(vtkPVArrayInformation* arrayInfo, int component);
208 
210 
214  static std::string ArrayNameFromMangledName(const char* name);
215  static int ComponentIndexFromMangledName(vtkPVArrayInformation* info, const char* name);
217 
218 protected:
220  ~vtkSMArrayListDomain() override;
221 
226  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
227 
233  virtual vtkPVDataInformation* GetExtraDataInformation() { return nullptr; }
234 
240  virtual bool IsFilteredArray(vtkPVDataInformation* info, int association, const char* arrayName);
241 
243 
246  vtkSetMacro(AttributeType, int);
247  int AttributeType;
249 
251 
255  vtkGetStringMacro(InputDomainName);
256  vtkSetStringMacro(InputDomainName);
258 
259  char* InputDomainName;
260 
261  // Currently, used by vtkSMRepresentedArrayListDomain to avoid picking just an
262  // arbitrary array for scalar coloring. Need to rethink how this should be
263  // done cleanly.
265 
266 private:
268  void operator=(const vtkSMArrayListDomain&) = delete;
269 
270  friend class vtkSMArrayListDomainInternals;
271  vtkSMArrayListDomainInternals* ALDInternals;
272 };
273 
274 #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.