This file is indexed.

/usr/include/paraview/vtkSMInputArrayDomain.h is in paraview-dev 5.0.1+dfsg1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*=========================================================================

  Program:   ParaView
  Module:    vtkSMInputArrayDomain.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.

=========================================================================*/
// .NAME vtkSMInputArrayDomain - domain to ensure that input has required types
// of arrays.
// .SECTION Description
// vtkSMInputArrayDomain is a domain that can be used on a vtkSMInputProperty to
// check if the pipeline input provides attribute arrays of the required types
// e.g. if a filter can only work if the input data set has cell data arrays,
// then one can use this domain.
//
// vtkSMInputArrayDomain also provides a mechanism to check if the attribute
// arrays have a certain number of components.
//
// When enabled, ParaView supports automatic array conversion i.e. extracting
// components or converting cell data to point data and vice-versa is done
// implicitly. In that case, vtkSMInputArrayDomain's behavior also changes as
// appropriate.
//
// Supported XML attributes:
// \li \c attribute_type : (optional) value can be 'point', 'cell', 'field',
//                         'vertex', 'edge', 'row', 'none', 'any-except-field', 'any'.
//                         If not specified, 'any-except-field' is assumed. This
//                         indicates the attribute type for acceptable arrays.
// \li \c number_of_components : (optional) 0 by default. If non-zero, indicates
//                         the component count for acceptable arrays.
//
// This domain doesn't support any required properties (to help clean old
// code, we print a warning if any required properties are specified).
//
// .SECTION Note on change in behaviour
// Prior to ParaView 5.0, attribute_type="any" meant all attributes excepting
// field data. For being consistent with general understanding of "any", this
// has been changed to include field data arrays since 5.0. Use
// "any-except-field" for cases where the intention is to match any attribute arrays except
// field data arrays.
#ifndef vtkSMInputArrayDomain_h
#define vtkSMInputArrayDomain_h

#include "vtkPVServerManagerCoreModule.h" //needed for exports
#include "vtkSMDomain.h"
#include "vtkDataObject.h" // needed for vtkDataObject::AttributeTypes

// Needed to get around some header defining ANY as a macro
#ifdef ANY
# undef ANY
#endif

class vtkPVArrayInformation;
class vtkPVDataSetAttributesInformation;
class vtkSMSourceProxy;

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

  // Description:
  // Returns true if the value of the propery is in the domain.
  // The propery has to be a vtkSMProxyProperty which points
  // to a vtkSMSourceProxy. The input has to have one or more
  // arrays that match the requirements.
  virtual int IsInDomain(vtkSMProperty* property);

  // Description:
  // Returns true if input has one or more arrays that match the
  // requirements on  the given output port.
  int IsInDomain(vtkSMSourceProxy* proxy, unsigned int outputport=0);

  // Description:
  // Get the attribute type. Valid values are defined in AttributeTypes which
  // map to vtkDataObject::AttributeTypes. 
  vtkGetMacro(AttributeType, int);
  const char* GetAttributeTypeAsString();

  // Description:
  // Get the required number of components. Set to 0 for no check.
  vtkGetMacro(NumberOfComponents, int);

  /// Get/Set the application wide setting for automatic conversion of properties.
  /// Automatic conversion of properties allows conversion between cell and point
  /// based properties, and the extraction of vector components as scalar properties
  static void SetAutomaticPropertyConversion(bool);
  static bool GetAutomaticPropertyConversion();

  enum AttributeTypes
    {
    POINT = vtkDataObject::POINT,
    CELL = vtkDataObject::CELL,
    FIELD = vtkDataObject::FIELD,
    ANY_EXCEPT_FIELD = vtkDataObject::POINT_THEN_CELL,
    VERTEX = vtkDataObject::VERTEX,
    EDGE = vtkDataObject::EDGE,
    ROW = vtkDataObject::ROW,
    ANY = vtkDataObject::NUMBER_OF_ATTRIBUTE_TYPES,
    NUMBER_OF_ATTRIBUTE_TYPES = ANY+1,
    };

  // Description:
  // Method to check if a particular attribute-type (\c attribute_type) will
  // be accepted by this domain with a required attribute type (\c required_type).
  // This takes into consideration the state of AutomaticePropertyConversion flag.
  // If a particular attribute_type is acceptable only because
  // AutomaticPropertyConversion is true, \c acceptable_as_type value will be set
  // to the attribute type that the particular attribute was automatically converted
  // to. e.g. is required_type = POINT and attribute_type is CELL and
  // AutomaticPropertyConversion is true, this method will return true and
  // acceptable_as_type will be set to POINT. In other cases, acceptable_as_type
  // is simply set to attribute_type.
  static bool IsAttributeTypeAcceptable(int required_type, int attribute_type,
    int *acceptable_as_type=NULL);

  // Description:
  // Method to check if a particular array is acceptable to a domain with the
  // specified required number of components (\c required_number_of_components).
  // This takes into consideration the state of AutomaticePropertyConversion flag.
  // If AutomaticePropertyConversion, required_numer_of_components == 1 and
  // the actual number of components in the array are >= 1, then this method
  // will return true. This method will return true if
  // required_number_of_components == 0 (i.e. no restriction of num. of components
  // is specified) or if required_number_of_components == num. of components
  // in the array.
  static bool IsArrayAcceptable(
    int required_number_of_components, vtkPVArrayInformation* arrayInfo);
  
protected:
  vtkSMInputArrayDomain();
  ~vtkSMInputArrayDomain();

  vtkSetMacro(NumberOfComponents, int);
  vtkSetMacro(AttributeType, int);
  void SetAttributeType(const char* type);

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

  // Description:
  // Returns true if based on this->AttributeType, the specified \c
  // attributeType is acceptable to this domain.
  bool IsAttributeTypeAcceptable(int attributeType);

  // Description:
  // Returns true if based on this->AutomaticPropertyConversion and
  // this->NumberOfComponents, an acceptable array can be found in the attrInfo.
  bool HasAcceptableArray(vtkPVDataSetAttributesInformation* attrInfo);

  int AttributeType;
  int NumberOfComponents;
private:
  static bool AutomaticPropertyConversion;
  vtkSMInputArrayDomain(const vtkSMInputArrayDomain&); // Not implemented
  void operator=(const vtkSMInputArrayDomain&); // Not implemented
};

#endif