VTK  9.7.20260828
vtkPartitionedDataSet.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
32
33#ifndef vtkPartitionedDataSet_h
34#define vtkPartitionedDataSet_h
35
36#include "vtkCommonDataModelModule.h" // For export macro
37#include "vtkDataObjectTree.h"
38#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkDataSet;
42class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALMANUAL vtkPartitionedDataSet : public vtkDataObjectTree
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_PARTITIONED_DATA_SET; }
54
60 void SetNumberOfPartitions(unsigned int numPartitions);
61
65 unsigned int GetNumberOfPartitions();
66
68
71 vtkDataSet* GetPartition(unsigned int idx);
74
79 void SetPartition(unsigned int idx, vtkDataObject* partition);
80
84 vtkTypeBool HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
85
91 vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
92
94
100
105 {
106 return this->Superclass::GetMetaData(iter);
107 }
108
113 {
114 return this->Superclass::HasMetaData(iter);
115 }
116
122
123protected:
126
132
133private:
135 void operator=(const vtkPartitionedDataSet&) = delete;
136};
137
138VTK_ABI_NAMESPACE_END
139#endif
superclass for composite data iterators
vtkTypeBool HasChildMetaData(unsigned int index)
Returns if meta-data information is available for the given child index.
virtual vtkInformation * GetMetaData(vtkCompositeDataIterator *iter)
Returns the meta-data associated with the position pointed by the iterator.
virtual vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter)
Returns if any meta-data associated with the position pointed by the iterator.
vtkInformation * GetChildMetaData(unsigned int index)
Returns the meta-data at a given index.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *) override
vtkPartitionedDataSet cannot contain non-leaf children.
vtkTypeBool HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given partition.
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPartitionedDataSet() override
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the partition.
static vtkPartitionedDataSet * New()
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
static vtkPartitionedDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void RemoveNullPartitions()
Removes all partitions that have null datasets and resizes the dataset.
static vtkPartitionedDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitions.
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.
int vtkTypeBool
Definition vtkABI.h:64
@ VTK_PARTITIONED_DATA_SET
Definition vtkType.h:146
#define VTK_MARSHALMANUAL