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 =========================================================================*/
23 #ifndef vtkGenericAttributeCollection_h
24 #define vtkGenericAttributeCollection_h
25 
26 #include "vtkCommonDataModelModule.h" // For export macro
27 #include "vtkObject.h"
28 
29 class vtkGenericAttributeInternalVector;
30 class vtkIntInternalVector;
32 
33 class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttributeCollection : public vtkObject
34 {
35 public:
40 
42 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
54  int GetNumberOfAttributes();
55 
61  int GetNumberOfComponents();
62 
68  int GetNumberOfPointCenteredComponents();
69 
75  int GetMaxNumberOfComponents();
76 
82  unsigned long GetActualMemorySize();
83 
88  int IsEmpty();
89 
96  vtkGenericAttribute *GetAttribute(int i);
97 
104  int FindAttribute(const char *name);
105 
112  int GetAttributeIndex(int i);
113 
120  void InsertNextAttribute(vtkGenericAttribute *a);
121 
130  void InsertAttribute(int i, vtkGenericAttribute *a);
131 
138  void RemoveAttribute(int i);
139 
144  void Reset();
145 
152  void DeepCopy(vtkGenericAttributeCollection *other);
153 
160  void ShallowCopy(vtkGenericAttributeCollection *other);
161 
166  vtkMTimeType GetMTime() override;
167 
168  // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the
169  // new pipeline update mechanism is checked in.
170  // *** BEGIN
171 
173 
178  vtkGetMacro(ActiveAttribute, int);
180 
182 
188  vtkGetMacro(ActiveComponent, int);
190 
200  void SetActiveAttribute(int attribute, int component = 0);
201 
203 
208  vtkGetMacro(NumberOfAttributesToInterpolate, int);
210 
216  int *GetAttributesToInterpolate();
217 
223  int HasAttribute(int size, int *attributes, int attribute);
224 
226 
236  void SetAttributesToInterpolate(int size, int *attributes);
237  void SetAttributesToInterpolateToAll();
239 
240 protected:
245 
249  ~vtkGenericAttributeCollection() override;
250 
254  vtkGenericAttributeInternalVector* AttributeInternalVector;
258  vtkIntInternalVector *AttributeIndices;
259 
263  int AttributesToInterpolate[10];
264 
265  int NumberOfComponents; // cache
267  int MaxNumberOfComponents; // cache
268  unsigned long ActualMemorySize; // cache
269  vtkTimeStamp ComputeTime; // cache time stamp
270 
275  void ComputeNumbers();
276 
277 private:
279  void operator=(const vtkGenericAttributeCollection &) = delete;
280 };
281 #endif
vtkGenericAttributeInternalVector * AttributeInternalVector
STL vector for storing attributes.
abstract base class for most VTK objects
Definition: vtkObject.h:53
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
record modification and/or execution time
Definition: vtkTimeStamp.h:32
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:33
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...