VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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;
33 class vtkGenericAttribute;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttributeCollection : public vtkObject
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 
115  void DeepCopy(vtkGenericAttributeCollection *other);
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 
164  int *GetAttributesToInterpolate();
165  //ETX
167 
171  int HasAttribute(int size, int *attributes, int attribute);
172 
174 
180  void SetAttributesToInterpolate(int size, int *attributes);
181  void SetAttributesToInterpolateToAll();
183 
184 protected:
187 
190 
192  vtkGenericAttributeInternalVector* AttributeInternalVector;
194  vtkIntInternalVector *AttributeIndices;
195 
199  int AttributesToInterpolate[10];
200 
201  int NumberOfComponents; // cache
203  int MaxNumberOfComponents; // cache
204  unsigned long ActualMemorySize; // cache
205  vtkTimeStamp ComputeTime; // cache time stamp
206 
209  void ComputeNumbers();
210 
211 private:
213  void operator=(const vtkGenericAttributeCollection &); // Not implemented.
214 };
215 #endif
vtkGenericAttributeInternalVector * AttributeInternalVector
abstract base class for most VTK objects
Definition: vtkObject.h:61
record modification and/or execution time
Definition: vtkTimeStamp.h:34
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()