VTK
vtkGenericAttributeCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericAttributeCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
26 #ifndef vtkGenericAttributeCollection_h
27 #define vtkGenericAttributeCollection_h
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkObject.h"
31 
32 class vtkGenericAttributeInternalVector;
33 class vtkIntInternalVector;
35 
36 class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttributeCollection : public vtkObject
37 {
38 public:
43 
45 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
57  int GetNumberOfAttributes();
58 
64  int GetNumberOfComponents();
65 
71  int GetNumberOfPointCenteredComponents();
72 
78  int GetMaxNumberOfComponents();
79 
85  unsigned long GetActualMemorySize();
86 
91  int IsEmpty();
92 
99  vtkGenericAttribute *GetAttribute(int i);
100 
107  int FindAttribute(const char *name);
108 
115  int GetAttributeIndex(int i);
116 
123  void InsertNextAttribute(vtkGenericAttribute *a);
124 
133  void InsertAttribute(int i, vtkGenericAttribute *a);
134 
141  void RemoveAttribute(int i);
142 
147  void Reset();
148 
155  void DeepCopy(vtkGenericAttributeCollection *other);
156 
163  void ShallowCopy(vtkGenericAttributeCollection *other);
164 
169  vtkMTimeType GetMTime() override;
170 
171  // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the
172  // new pipeline update mechanism is checked in.
173  // *** BEGIN
174 
176 
181  vtkGetMacro(ActiveAttribute, int);
183 
185 
191  vtkGetMacro(ActiveComponent, int);
193 
203  void SetActiveAttribute(int attribute, int component = 0);
204 
206 
211  vtkGetMacro(NumberOfAttributesToInterpolate, int);
213 
219  int *GetAttributesToInterpolate();
220 
226  int HasAttribute(int size, int *attributes, int attribute);
227 
229 
239  void SetAttributesToInterpolate(int size, int *attributes);
240  void SetAttributesToInterpolateToAll();
242 
243 protected:
248 
252  ~vtkGenericAttributeCollection() override;
253 
257  vtkGenericAttributeInternalVector* AttributeInternalVector;
261  vtkIntInternalVector *AttributeIndices;
262 
266  int AttributesToInterpolate[10];
267 
268  int NumberOfComponents; // cache
270  int MaxNumberOfComponents; // cache
271  unsigned long ActualMemorySize; // cache
272  vtkTimeStamp ComputeTime; // cache time stamp
273 
278  void ComputeNumbers();
279 
280 private:
282  void operator=(const vtkGenericAttributeCollection &) = delete;
283 };
284 #endif
vtkGenericAttributeInternalVector * AttributeInternalVector
STL vector for storing attributes.
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkIntInternalVector * AttributeIndices
STL vector for storing index of point centered attributes.
abstract class defined API for attribute data
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...