VTK  9.1.0
vtkArrayData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArrayData.h
5 
6 -------------------------------------------------------------------------
7  Copyright 2008 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9  the U.S. Government retains certain rights in this software.
10 -------------------------------------------------------------------------
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20 =========================================================================*/
21 
40 #ifndef vtkArrayData_h
41 #define vtkArrayData_h
42 
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkDataObject.h"
45 
46 class vtkArray;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkArrayData : public vtkDataObject
49 {
50 public:
51  static vtkArrayData* New();
52  vtkTypeMacro(vtkArrayData, vtkDataObject);
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56  static vtkArrayData* GetData(vtkInformationVector* v, int i = 0);
57 
62 
66  void ClearArrays();
67 
72 
77 
81  vtkArray* GetArrayByName(const char* name);
82 
86  int GetDataObjectType() override { return VTK_ARRAY_DATA; }
87 
88  void ShallowCopy(vtkDataObject* other) override;
89  void DeepCopy(vtkDataObject* other) override;
90 
91 protected:
93  ~vtkArrayData() override;
94 
95 private:
96  vtkArrayData(const vtkArrayData&) = delete;
97  void operator=(const vtkArrayData&) = delete;
98 
99  class implementation;
100  implementation* const Implementation;
101 };
102 
103 #endif
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:49
void DeepCopy(vtkDataObject *other) override
Shallow and Deep copy.
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
Shallow and Deep copy.
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:86
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:65
general representation of visualization data
Definition: vtkDataObject.h:60
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:382
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332
#define VTK_ARRAY_DATA
Definition: vtkType.h:104