VTK  9.3.1
vtkArrayData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 
26 #ifndef vtkArrayData_h
27 #define vtkArrayData_h
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkDataObject.h"
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkArray;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkArrayData : public vtkDataObject
36 {
37 public:
38  static vtkArrayData* New();
39  vtkTypeMacro(vtkArrayData, vtkDataObject);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43  static vtkArrayData* GetData(vtkInformationVector* v, int i = 0);
44 
48  void AddArray(vtkArray*);
49 
53  void ClearArrays();
54 
58  vtkIdType GetNumberOfArrays();
59 
63  vtkArray* GetArray(vtkIdType index);
64 
68  vtkArray* GetArrayByName(const char* name);
69 
73  int GetDataObjectType() override { return VTK_ARRAY_DATA; }
74 
75  void ShallowCopy(vtkDataObject* other) override;
76  void DeepCopy(vtkDataObject* other) override;
77 
78 protected:
79  vtkArrayData();
80  ~vtkArrayData() override;
81 
82 private:
83  vtkArrayData(const vtkArrayData&) = delete;
84  void operator=(const vtkArrayData&) = delete;
85 
86  class implementation;
87  implementation* const Implementation;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkDataObject * New()
Store vtkAlgorithm input/output information.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:51
int GetDataObjectType() override
Return class name of data type (VTK_ARRAY_DATA).
Definition: vtkArrayData.h:73
#define VTK_ARRAY_DATA
Definition: vtkType.h:92
int vtkIdType
Definition: vtkType.h:315
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:35
a simple class to control print indentation
Definition: vtkIndent.h:28
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:54
virtual void DeepCopy(vtkDataObject *src)
The goal of the method is to copy the complete data from src into this object.
virtual void ShallowCopy(vtkDataObject *src)
The goal of the method is to copy the data up to the array pointers only.