VTK  9.3.0
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 
35 #ifndef vtkArrayData_h
36 #define vtkArrayData_h
37 
38 #include "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkDataObject.h"
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkArray;
43 
44 class VTKCOMMONDATAMODEL_EXPORT vtkArrayData : public vtkDataObject
45 {
46 public:
47  static vtkArrayData* New();
48  vtkTypeMacro(vtkArrayData, vtkDataObject);
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52  static vtkArrayData* GetData(vtkInformationVector* v, int i = 0);
53 
58 
62  void ClearArrays();
63 
68 
73 
77  vtkArray* GetArrayByName(const char* name);
78 
82  int GetDataObjectType() override { return VTK_ARRAY_DATA; }
83 
84  void ShallowCopy(vtkDataObject* other) override;
85  void DeepCopy(vtkDataObject* other) override;
86 
87 protected:
89  ~vtkArrayData() override;
90 
91 private:
92  vtkArrayData(const vtkArrayData&) = delete;
93  void operator=(const vtkArrayData&) = delete;
94 
95  class implementation;
96  implementation* const Implementation;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #endif
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:45
void DeepCopy(vtkDataObject *other) override
The goal of the method is to copy the complete data from src into this object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkArray * GetArrayByName(const char *name)
Returns the array having called name from the collection.
void ClearArrays()
Clears the contents of the collection.
void AddArray(vtkArray *)
Adds a vtkArray to the collection.
void ShallowCopy(vtkDataObject *other) override
The goal of the method is to copy the data up to the array pointers only.
static vtkArrayData * New()
~vtkArrayData() override
vtkIdType GetNumberOfArrays()
Returns the number of vtkArray instances in the collection.
static vtkArrayData * GetData(vtkInformation *info)
int GetDataObjectType() override
Return class name of data type (VTK_ARRAY_DATA).
Definition: vtkArrayData.h:82
vtkArray * GetArray(vtkIdType index)
Returns the n-th vtkArray in the collection.
static vtkArrayData * GetData(vtkInformationVector *v, int i=0)
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:52
general representation of visualization data
Definition: vtkDataObject.h:64
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:376
@ name
Definition: vtkX3D.h:219
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315
#define VTK_ARRAY_DATA
Definition: vtkType.h:92