/usr/include/vtk-6.3/vtkGenericAttributeCollection.h is in libvtk6-dev 6.3.0+dfsg1-5.
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkGenericAttributeCollection.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm 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 vtkGenericAttributeCollection - a collection of attributes
// .SECTION Description
// vtkGenericAttributeCollection is a class that collects attributes
// (represented by vtkGenericAttribute).
#ifndef vtkGenericAttributeCollection_h
#define vtkGenericAttributeCollection_h
#include "vtkCommonDataModelModule.h" // For export macro
#include "vtkObject.h"
class vtkGenericAttributeInternalVector;
class vtkIntInternalVector;
class vtkGenericAttribute;
class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttributeCollection : public vtkObject
{
public:
// Description:
// Create an empty collection.
static vtkGenericAttributeCollection *New();
// Description:
// Standard type definition and print methods for a VTK class.
vtkTypeMacro(vtkGenericAttributeCollection,vtkObject);
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Return the number of attributes (e.g., instances of vtkGenericAttribute)
// in the collection.
// \post positive_result: result>=0
int GetNumberOfAttributes();
// Description:
// Return the number of components. This is the sum of all components
// found in all attributes.
// \post positive_result: result>=0
int GetNumberOfComponents();
// Description:
// Return the number of components. This is the sum of all components
// found in all point centered attributes.
// \post positive_result: result>=0
int GetNumberOfPointCenteredComponents();
// Description:
// Maximum number of components encountered among all attributes.
// \post positive_result: result>=0
// \post valid_result: result<=GetNumberOfComponents()
int GetMaxNumberOfComponents();
// Description:
// Actual size of the data in kibibytes (1024 bytes); only valid after the pipeline has
// updated. It is guaranteed to be greater than or equal to the memory
// required to represent the data.
unsigned long GetActualMemorySize();
// Description:
// Indicate whether the collection contains any attributes.
// \post definition: result==(GetNumberOfAttributes()==0)
int IsEmpty();
// Description:
// Return a pointer to the ith instance of vtkGenericAttribute.
// \pre not_empty: !IsEmpty()
// \pre valid_i: i>=0 && i<GetNumberOfAttributes()
// \post result_exists: result!=0
vtkGenericAttribute *GetAttribute(int i);
// Description:
// Return the index of the attribute named `name'. Return the non-negative
// index if found. Return -1 otherwise.
// \pre name_exists: name!=0
// \post valid_result: (result==-1) || (result>=0) && (result<=GetNumberOfAttributes())
int FindAttribute(const char *name);
// Description:
// Return the index of the first component of attribute `i' in an array of
// format attrib0comp0 attrib0comp1 ... attrib4comp0 ...
// \pre valid_i: i>=0 && i<GetNumberOfAttributes()
// \pre is_point_centered: GetAttribute(i)->GetCentering()==vtkPointCentered
int GetAttributeIndex(int i);
// Description:
// Add the attribute `a' to the end of the collection.
// \pre a_exists: a!=0
// \post more_items: GetNumberOfAttributes()==old GetNumberOfAttributes()+1
// \post a_is_set: GetAttribute(GetNumberOfAttributes()-1)==a
void InsertNextAttribute(vtkGenericAttribute *a);
// Description:
// Replace the attribute at index `i' by `a'.
// \pre not_empty: !IsEmpty()
// \pre a_exists: a!=0
// \pre valid_i: i>=0 && i<GetNumberOfAttributes()
// \post same_size: GetNumberOfAttributes()==old GetNumberOfAttributes()
// \post item_is_set: GetAttribute(i)==a
void InsertAttribute(int i, vtkGenericAttribute *a);
// Description:
// Remove the attribute at `i'.
// \pre not_empty: !IsEmpty()
// \pre valid_i: i>=0 && i<GetNumberOfAttributes()
// \post fewer_items: GetNumberOfAttributes()==old GetNumberOfAttributes()-1
void RemoveAttribute(int i);
// Description:
// Remove all attributes.
// \post is_empty: GetNumberOfAttributes()==0
void Reset();
// Description:
// Copy, without reference counting, the other attribute array.
// \pre other_exists: other!=0
// \pre not_self: other!=this
// \post same_size: GetNumberOfAttributes()==other->GetNumberOfAttributes()
void DeepCopy(vtkGenericAttributeCollection *other);
// Description:
// Copy, via reference counting, the other attribute array.
// \pre other_exists: other!=0
// \pre not_self: other!=this
// \post same_size: GetNumberOfAttributes()==other->GetNumberOfAttributes()
void ShallowCopy(vtkGenericAttributeCollection *other);
// Description:
// vtkAttributeCollection is a composite object and needs to check each
// member of its collection for modified time.
virtual unsigned long int GetMTime();
// *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the
// new pipeline update mechanism is checked in.
// *** BEGIN
// Description:
// Index of the attribute to be processed (not necessarily scalar).
// \pre not_empty: !IsEmpty()
// \post valid_result: result>=0 && result<GetNumberOfAttributes()
vtkGetMacro(ActiveAttribute, int);
// Description:
// Component of the active attribute to be processed. -1 means module.
// \pre not_empty: GetNumberOfAttributes()>0
// \post valid_result: result>=-1 &&
// result<GetAttribute(GetActiveAttribute())->GetNumberOfComponents()
vtkGetMacro(ActiveComponent, int);
// Description:
// Set the scalar attribute to be processed. -1 means module.
// \pre not_empty: !IsEmpty()
// \pre valid_attribute: attribute>=0 && attribute<GetNumberOfAttributes()
// \pre valid_component: component>=-1 &&
// component<GetAttribute(attribute)->GetNumberOfComponents()
// \post is_set: GetActiveAttribute()==attribute &&
// GetActiveComponent()==component
void SetActiveAttribute(int attribute, int component = 0);
// Description:
// Number of attributes to interpolate.
// \pre not_empty: !IsEmpty()
// \post positive_result: result>=0
vtkGetMacro(NumberOfAttributesToInterpolate, int);
//BTX
// Description:
// Indices of attributes to interpolate.
// \pre not_empty: !IsEmpty()
// \post valid_result: GetNumberOfAttributesToInterpolate()>0
int *GetAttributesToInterpolate();
//ETX
// Description
// Does the array `attributes' of size `size' have `attribute'?
// \pre positive_size: size>=0
// \pre valid_attributes: size>0 implies attributes!=0
int HasAttribute(int size, int *attributes, int attribute);
// Description:
// Set the attributes to interpolate.
// \pre not_empty: !IsEmpty()
// \pre positive_size: size>=0
// \pre valid_attributes: size>0 implies attributes!=0
// \pre valid_attributes_contents: attributes!=0 implies
// !HasAttributes(size,attributes,GetActiveAttribute())
// \post is_set: (GetNumberOfAttributesToInterpolate()==size)&&
// (GetAttributesToInterpolate()==attributes)
void SetAttributesToInterpolate(int size, int *attributes);
void SetAttributesToInterpolateToAll();
protected:
// Description:
// Default constructor: empty collection.
vtkGenericAttributeCollection();
// Description:
// Destructor.
virtual ~vtkGenericAttributeCollection();
// Description:
// STL vector for storing attributes
vtkGenericAttributeInternalVector* AttributeInternalVector;
// Description:
// STL vector for storing index of point centered attributes
vtkIntInternalVector *AttributeIndices;
int ActiveAttribute;
int ActiveComponent;
int NumberOfAttributesToInterpolate;
int AttributesToInterpolate[10];
int NumberOfComponents; // cache
int NumberOfPointCenteredComponents; // cache
int MaxNumberOfComponents; // cache
unsigned long ActualMemorySize; // cache
vtkTimeStamp ComputeTime; // cache time stamp
// Description:
// Compute number of components, max number of components and actual
// memory size.
void ComputeNumbers();
private:
vtkGenericAttributeCollection(const vtkGenericAttributeCollection &); // Not implemented.
void operator=(const vtkGenericAttributeCollection &); // Not implemented.
};
#endif
|