VTK  9.4.20251203
vtkCompositeDataSet.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
24#ifndef vtkCompositeDataSet_h
25#define vtkCompositeDataSet_h
26
27#include "vtkCommonDataModelModule.h" // For export macro
28#include "vtkDataObject.h"
29#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_3_0
30#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31
32#include <vector> // For GetDataSets
33
34VTK_ABI_NAMESPACE_BEGIN
36class vtkCompositeDataSetInternals;
37class vtkDataSet;
38class vtkInformation;
41
42class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkCompositeDataSet : public vtkDataObject
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
52
57 int GetDataObjectType() override { return VTK_COMPOSITE_DATA_SET; }
58
64 virtual void CopyStructure(vtkCompositeDataSet* input);
65
72 virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
73
81
90 virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
91
96 unsigned long GetActualMemorySize() override;
97
99
105
109 void Initialize() override;
110
119
123 VTK_DEPRECATED_IN_9_3_0("Use ShallowCopy instead.")
124 virtual void RecursiveShallowCopy(vtkDataObject* src);
125
131 virtual vtkIdType GetNumberOfPoints();
132
138 virtual vtkIdType GetNumberOfCells();
139
143 vtkIdType GetNumberOfElements(int type) override;
144
154 void GetBounds(double bounds[6]);
155
160
168 static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
169
180 template <class DataSetT = vtkDataSet>
181 static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
182
186 bool SupportsGhostArray(int type) override;
187
188protected:
191
192private:
194 void operator=(const vtkCompositeDataSet&) = delete;
195};
196
197VTK_ABI_NAMESPACE_END
198#include "vtkCompositeDataSet.txx" // for template implementations
199
200#endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
virtual void CompositeShallowCopy(vtkCompositeDataSet *src)
The goal of the method is to copy the data up to the dataset pointers only.
static vtkCompositeDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the position pointed by the iterator.
void Initialize() override
Restore data object to initial state,.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
a simple class to control print indentation
Definition vtkIndent.h:29
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315
#define VTK_COMPOSITE_DATA_SET
Definition vtkType.h:76
#define VTK_MARSHALAUTO
#define VTK_NEWINSTANCE