VTK  9.3.20240831
vtkMultiPieceDataSet.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 vtkMultiPieceDataSet_h
25#define vtkMultiPieceDataSet_h
26
28
29#include "vtkCommonDataModelModule.h" // For export macro
30#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkDataSet;
34class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkMultiPieceDataSet : public vtkPartitionedDataSet
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
45 int GetDataObjectType() override { return VTK_MULTIPIECE_DATA_SET; }
46
52 void SetNumberOfPieces(unsigned int numpieces) { this->SetNumberOfPartitions(numpieces); }
53
57 unsigned int GetNumberOfPieces() { return this->GetNumberOfPartitions(); }
58
60
63 vtkDataSet* GetPiece(unsigned int pieceno) { return this->GetPartition(pieceno); }
64 vtkDataObject* GetPieceAsDataObject(unsigned int pieceno)
65 {
66 return this->GetPartitionAsDataObject(pieceno);
67 }
69
74 void SetPiece(unsigned int pieceno, vtkDataObject* piece) { this->SetPartition(pieceno, piece); }
75
77
83
84protected:
87
88private:
90 void operator=(const vtkMultiPieceDataSet&) = delete;
91};
92
93VTK_ABI_NAMESPACE_END
94#endif
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
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 pieces of dataset.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
static vtkMultiPieceDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
static vtkMultiPieceDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkMultiPieceDataSet * New()
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
~vtkMultiPieceDataSet() override
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
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.
#define VTK_MULTIPIECE_DATA_SET
Definition vtkType.h:90
#define VTK_MARSHALAUTO