VTK  9.5.2
vtkGenericAttributeCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
13
14#ifndef vtkGenericAttributeCollection_h
15#define vtkGenericAttributeCollection_h
16
17#include "vtkCommonDataModelModule.h" // For export macro
18#include "vtkObject.h"
19
20VTK_ABI_NAMESPACE_BEGIN
21class vtkGenericAttributeInternalVector;
22class vtkIntInternalVector;
24
25class VTKCOMMONDATAMODEL_EXPORT vtkGenericAttributeCollection : public vtkObject
26{
27public:
32
34
38 void PrintSelf(ostream& os, vtkIndent indent) override;
40
47
54
61
68
74 unsigned long GetActualMemorySize();
75
80 int IsEmpty();
81
89
96 int FindAttribute(const char* name);
97
104 int GetAttributeIndex(int i);
105
112 void InsertNextAttribute(vtkGenericAttribute* a);
113
123
130 void RemoveAttribute(int i);
131
136 void Reset();
137
145
153
159
160 // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the
161 // new pipeline update mechanism is checked in.
162 // *** BEGIN
163
165
170 vtkGetMacro(ActiveAttribute, int);
172
174
180 vtkGetMacro(ActiveComponent, int);
182
192 void SetActiveAttribute(int attribute, int component = 0);
193
195
202
209
215 vtkTypeBool HasAttribute(int size, int* attributes, int attribute) VTK_SIZEHINT(attributes, size);
216
218
228 void SetAttributesToInterpolate(int size, int* attributes) VTK_SIZEHINT(attributes, size);
231
232protected:
237
242
246 vtkGenericAttributeInternalVector* AttributeInternalVector;
250 vtkIntInternalVector* AttributeIndices;
251
256
257 int NumberOfComponents; // cache
260 unsigned long ActualMemorySize; // cache
261 vtkTimeStamp ComputeTime; // cache time stamp
262
268
269private:
271 void operator=(const vtkGenericAttributeCollection&) = delete;
272};
273VTK_ABI_NAMESPACE_END
274#endif
void ShallowCopy(vtkGenericAttributeCollection *other)
Copy, via reference counting, the other attribute array.
int NumberOfComponents
STL vector for storing attributes.
int AttributesToInterpolate[10]
STL vector for storing attributes.
vtkTimeStamp ComputeTime
STL vector for storing attributes.
static vtkGenericAttributeCollection * New()
Create an empty collection.
void SetAttributesToInterpolateToAll()
STL vector for storing attributes.
vtkGenericAttributeCollection()
Default constructor: empty collection.
int NumberOfPointCenteredComponents
STL vector for storing attributes.
int ActiveAttribute
STL vector for storing attributes.
unsigned long ActualMemorySize
STL vector for storing attributes.
int ActiveComponent
STL vector for storing attributes.
int GetNumberOfPointCenteredComponents()
Return the number of components.
vtkGenericAttributeInternalVector * AttributeInternalVector
STL vector for storing attributes.
int GetNumberOfComponents()
Return the number of components.
int * GetAttributesToInterpolate()
Indices of attributes to interpolate.
int IsEmpty()
Indicate whether the collection contains any attributes.
int NumberOfAttributesToInterpolate
STL vector for storing attributes.
void SetAttributesToInterpolate(int size, int *attributes)
Does the array attributes' of size size' have `attribute'?
void DeepCopy(vtkGenericAttributeCollection *other)
Copy, without reference counting, the other attribute array.
vtkGenericAttribute * GetAttribute(int i)
Return a pointer to the ith instance of vtkGenericAttribute.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type definition and print methods for a VTK class.
void SetActiveAttribute(int attribute, int component=0)
Set the scalar attribute to be processed.
virtual int GetNumberOfAttributesToInterpolate()
Number of attributes to interpolate.
void ComputeNumbers()
Compute number of components, max number of components and actual memory size.
vtkMTimeType GetMTime() override
vtkAttributeCollection is a composite object and needs to check each member of its collection for mod...
unsigned long GetActualMemorySize()
Actual size of the data in kibibytes (1024 bytes); only valid after the pipeline has updated.
int GetNumberOfAttributes()
Return the number of attributes (e.g., instances of vtkGenericAttribute) in the collection.
void Reset()
Remove the attribute at `i'.
int MaxNumberOfComponents
STL vector for storing attributes.
int GetMaxNumberOfComponents()
Maximum number of components encountered among all attributes.
vtkIntInternalVector * AttributeIndices
STL vector for storing index of point centered attributes.
void InsertAttribute(int i, vtkGenericAttribute *a)
Return the index of the attribute named `name'.
abstract class defined API for attribute data
a simple class to control print indentation
Definition vtkIndent.h:29
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_SIZEHINT(...)