VTK  9.2.6
vtkPartitionedDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPartitionedDataSet.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef vtkPartitionedDataSet_h
43 #define vtkPartitionedDataSet_h
44 
45 #include "vtkCommonDataModelModule.h" // For export macro
46 #include "vtkDataObjectTree.h"
47 
48 class vtkDataSet;
49 class VTKCOMMONDATAMODEL_EXPORT vtkPartitionedDataSet : public vtkDataObjectTree
50 {
51 public:
52  static vtkPartitionedDataSet* New();
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  int GetDataObjectType() override { return VTK_PARTITIONED_DATA_SET; }
61 
67  void SetNumberOfPartitions(unsigned int numPartitions);
68 
72  unsigned int GetNumberOfPartitions();
73 
75 
78  vtkDataSet* GetPartition(unsigned int idx);
79  vtkDataObject* GetPartitionAsDataObject(unsigned int idx);
81 
86  void SetPartition(unsigned int idx, vtkDataObject* partition);
87 
91  int HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
92 
98  vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
99 
101 
105  static vtkPartitionedDataSet* GetData(vtkInformationVector* v, int i = 0);
107 
112  {
113  return this->Superclass::GetMetaData(iter);
114  }
115 
120  {
121  return this->Superclass::HasMetaData(iter);
122  }
123 
128  void RemoveNullPartitions();
129 
130 protected:
132  ~vtkPartitionedDataSet() override;
133 
139 
140 private:
142  void operator=(const vtkPartitionedDataSet&) = delete;
143 };
144 
145 #endif
composite dataset to encapsulates a dataset consisting of partitions.
static vtkDataObject * New()
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *) override
vtkPartitionedDataSet cannot contain non-leaf children.
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
int HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given partition.
#define VTK_PARTITIONED_DATA_SET
Definition: vtkType.h:114
superclass for composite data iterators
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the partition.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
static vtkDataObjectTree * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
general representation of visualization data
Definition: vtkDataObject.h:65