File: vtkSMFieldDataDomain.h

package info (click to toggle)
paraview 5.4.1%2Bdfsg4-3.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 218,616 kB
  • sloc: cpp: 2,331,508; ansic: 322,365; python: 111,051; xml: 79,203; tcl: 47,013; yacc: 4,877; java: 4,438; perl: 3,238; sh: 2,920; lex: 1,908; f90: 748; makefile: 273; pascal: 228; objc: 83; fortran: 31
file content (105 lines) | stat: -rw-r--r-- 3,710 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*=========================================================================

  Program:   ParaView
  Module:    vtkSMFieldDataDomain.h

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/**
 * @class   vtkSMFieldDataDomain
 * @brief   enumeration with point and cell data entries
 *
 * vtkSMFieldDataDomain is a sub-class vtkSMEnumerationDomain that looks at
 * the input in Update() and populates the entry list based on whether
 * there are valid arrays in point/cell/vertex/edge/row data.
 * At most it consists of two
 * entries: ("Point Data", vtkDataObject::FIELD_ASSOCIATION_POINTS) and
 * ("Cell Data",  vtkDataObject::FIELD_ASSOCIATION_CELLS) in case of vtkDataSet
 * subclasses
 * OR
 * ("Vertex Data", vtkDataObject::FIELD_ASSOCIATION_VERTICES) and
 * ("Edge Data", vtkDataObject::FIELD_ASSOCIATION_EDGES) in case of vtkGraph and
 * subclasses
 * OR
 * ("Row Data", vtkDataObject::FIELD_ASSOCIATION_ROWS) in case of vtkTable and
 * subclasses.
 * It requires Input (vtkSMProxyProperty) property.
 * If attribute "disable_update_domain_entries" is set to true (false by
 * default),
 * then the domain values will not changed based on input field availability.
 * Only the default value setting will be affected by that.
 * @sa
 * vtkSMEnumerationDomain vtkSMProxyProperty
*/

#ifndef vtkSMFieldDataDomain_h
#define vtkSMFieldDataDomain_h

#include "vtkPVServerManagerCoreModule.h" //needed for exports
#include "vtkSMEnumerationDomain.h"

class vtkPVDataInformation;

class VTKPVSERVERMANAGERCORE_EXPORT vtkSMFieldDataDomain : public vtkSMEnumerationDomain
{
public:
  static vtkSMFieldDataDomain* New();
  vtkTypeMacro(vtkSMFieldDataDomain, vtkSMEnumerationDomain);
  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;

  /**
   * Check the input and appropriate fields (point data or cell data)
   * to the enumeration. This uses the Input property with a
   * vtkSMInputArrayDomain.
   */
  virtual void Update(vtkSMProperty* prop) VTK_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.
   */
  virtual int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) VTK_OVERRIDE;

protected:
  vtkSMFieldDataDomain();
  ~vtkSMFieldDataDomain();

  /**
   * Set the appropriate ivars from the xml element. Should
   * be overwritten by subclass if adding ivars.
   */
  virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem) VTK_OVERRIDE;

  // When true, "Field Data" option is added to the domain.
  bool EnableFieldDataSelection;

  // When true, we don't update the available list of attributes based on what's
  // actually available in the input (false by default).
  bool DisableUpdateDomainEntries;

  // When true, "Point Data" and "Cell Data" is included to the domain even
  // if they don't have any properties. This is used by the spreadsheet
  // view.( false by default )
  bool ForcePointAndCellDataSelection;

private:
  // Used by SetDefaultValues.
  int DefaultValue;

  /**
   * Utility functions called by Update()
   */
  void UpdateDomainEntries(int acceptable_association, vtkPVDataInformation* dataInfo);

  vtkSMFieldDataDomain(const vtkSMFieldDataDomain&) VTK_DELETE_FUNCTION;
  void operator=(const vtkSMFieldDataDomain&) VTK_DELETE_FUNCTION;
};

#endif