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 =========================================================================*/
25 #ifndef vtkGenericAttributeCollection_h
26 #define vtkGenericAttributeCollection_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
29 #include "vtkObject.h"
30 
31 class vtkGenericAttributeInternalVector;
32 class vtkIntInternalVector;
34 
36 {
37 public:
40 
42 
44  virtual void PrintSelf(ostream& os, vtkIndent indent);
46 
50  int GetNumberOfAttributes();
51 
54  int GetNumberOfComponents();
55 
59  int GetNumberOfPointCenteredComponents();
60 
64  int GetMaxNumberOfComponents();
65 
69  unsigned long GetActualMemorySize();
70 
73  int IsEmpty();
74 
78  vtkGenericAttribute *GetAttribute(int i);
79 
84  int FindAttribute(const char *name);
85 
90  int GetAttributeIndex(int i);
91 
96  void InsertNextAttribute(vtkGenericAttribute *a);
97 
102  void InsertAttribute(int i, vtkGenericAttribute *a);
103 
107  void RemoveAttribute(int i);
108 
110  void Reset();
111 
116 
120  void ShallowCopy(vtkGenericAttributeCollection *other);
121 
124  virtual unsigned long int GetMTime();
125 
126  // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the
127  // new pipeline update mechanism is checked in.
128  // *** BEGIN
129 
131 
134  vtkGetMacro(ActiveAttribute, int);
136 
138 
142  vtkGetMacro(ActiveComponent, int);
144 
151  void SetActiveAttribute(int attribute, int component = 0);
152 
154 
156  vtkGetMacro(NumberOfAttributesToInterpolate, int);
158 
159  //BTX
161 
163  int *GetAttributesToInterpolate();
164  //ETX
166 
170  int HasAttribute(int size, int *attributes, int attribute);
171 
173 
179  void SetAttributesToInterpolate(int size, int *attributes);
180  void SetAttributesToInterpolateToAll();
182 
183 protected:
186 
189 
191  vtkGenericAttributeInternalVector* AttributeInternalVector;
193  vtkIntInternalVector *AttributeIndices;
194 
198  int AttributesToInterpolate[10];
199 
200  int NumberOfComponents; // cache
202  int MaxNumberOfComponents; // cache
203  unsigned long ActualMemorySize; // cache
204  vtkTimeStamp ComputeTime; // cache time stamp
205 
208  void ComputeNumbers();
209 
210 private:
212  void operator=(const vtkGenericAttributeCollection &); // Not implemented.
213 };
214 #endif
vtkGenericAttributeInternalVector * AttributeInternalVector
abstract base class for most VTK objects
Definition: vtkObject.h:61
record modification and/or execution time
Definition: vtkTimeStamp.h:34
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
abstract class defined API for attribute data
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkObject * New()
#define VTKCOMMONDATAMODEL_EXPORT