VTK  9.7.1
vtkPartitionedDataSetCollection.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
18 #ifndef vtkPartitionedDataSetCollection_h
19 #define vtkPartitionedDataSetCollection_h
20 
21 #include "vtkCommonDataModelModule.h" // For export macro
22 #include "vtkDataObjectTree.h"
23 #include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
24 
25 VTK_ABI_NAMESPACE_BEGIN
27 class vtkDataAssembly;
28 class vtkDataSet;
29 
30 class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALMANUAL vtkPartitionedDataSetCollection
31  : public vtkDataObjectTree
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
42  int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_PARTITIONED_DATA_SET_COLLECTION; }
43 
49  void SetNumberOfPartitionedDataSets(unsigned int numDataSets);
50 
54  unsigned int GetNumberOfPartitionedDataSets() const;
55 
60  vtkPartitionedDataSet* GetPartitionedDataSet(unsigned int idx) const;
61 
68  void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet* dataset);
69 
73  void RemovePartitionedDataSet(unsigned int idx);
74 
76 
79  virtual void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject* object);
80  virtual vtkDataSet* GetPartition(unsigned int idx, unsigned int partition);
81  vtkDataObject* GetPartitionAsDataObject(unsigned int idx, unsigned int partition);
83 
87  unsigned int GetNumberOfPartitions(unsigned int idx) const;
88 
93  void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions);
94 
98  vtkTypeBool HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
99 
105  vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
106 
108 
113  vtkGetObjectMacro(DataAssembly, vtkDataAssembly);
114  void SetDataAssembly(vtkDataAssembly* assembly);
116 
118 
123  unsigned int GetCompositeIndex(unsigned int idx) const;
124  unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const;
126 
128 
134 
139  {
140  return this->Superclass::GetMetaData(iter);
141  }
142 
147  {
148  return this->Superclass::HasMetaData(iter);
149  }
150 
154  vtkMTimeType GetMTime() override;
155 
157 
160  void CompositeShallowCopy(vtkCompositeDataSet* src) override;
161  void ShallowCopy(vtkDataObject* src) override;
162  void DeepCopy(vtkDataObject* src) override;
163  void CopyStructure(vtkCompositeDataSet* input) override;
164  void Initialize() override;
166 protected:
169 
176 
177 private:
179  void operator=(const vtkPartitionedDataSetCollection&) = delete;
180 
181  vtkDataAssembly* DataAssembly;
182 };
183 
184 VTK_ABI_NAMESPACE_END
185 #endif
void Initialize() override
Restore data object to initial state,.
composite dataset to encapsulates a dataset consisting of partitions.
static vtkDataObject * New()
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void CopyStructure(vtkCompositeDataSet *input) override
Copies the tree structure from the input.
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the block.
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
superclass for composite data iterators
int vtkTypeBool
Definition: vtkABI.h:64
void ShallowCopy(vtkDataObject *src) override
CompositeShallow, Shallow and Deep copy.
abstract superclass for composite (multi-block or AMR) datasets
#define VTK_MARSHALMANUAL
void CompositeShallowCopy(vtkCompositeDataSet *src) override
CompositeShallow, Shallow and Deep copy.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other)
When copying structure from another vtkDataObjectTree, this method gets called for create a new non-l...
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.
void DeepCopy(vtkDataObject *src) override
CompositeShallow, Shallow and Deep copy.
hierarchical representation to use with vtkPartitionedDataSetCollection
vtkMTimeType GetMTime() override
Data objects are composite objects and need to check each part for MTime.
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
general representation of visualization data
Definition: vtkDataObject.h:55
vtkTypeBool HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given block.
Composite dataset that groups datasets as a collection.