VTK  9.7.1
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 
27 #include "vtkPartitionedDataSet.h"
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataSet;
34 class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkMultiPieceDataSet : public vtkPartitionedDataSet
35 {
36 public:
37  static vtkMultiPieceDataSet* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  int GetDataObjectType() VTK_FUTURE_CONST 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 
81  static vtkMultiPieceDataSet* GetData(vtkInformationVector* v, int i = 0);
83 
84 protected:
86  ~vtkMultiPieceDataSet() override;
87 
88 private:
90  void operator=(const vtkMultiPieceDataSet&) = delete;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
static vtkPartitionedDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
static vtkPartitionedDataSet * New()
a simple class to control print indentation
Definition: vtkIndent.h:28
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
composite dataset to encapsulates pieces of dataset.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitions.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
Definition: vtkDataObject.h:55
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.