VTK  9.5.20251201
vtkMultiBlockDataSet.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
141
142#ifndef vtkMultiBlockDataSet_h
143#define vtkMultiBlockDataSet_h
144
145#include "vtkCommonDataModelModule.h" // For export macro
146#include "vtkDataObjectTree.h"
147#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
148
149VTK_ABI_NAMESPACE_BEGIN
150class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALMANUAL vtkMultiBlockDataSet : public vtkDataObjectTree
151{
152public:
155 void PrintSelf(ostream& os, vtkIndent indent) override;
156
161 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_MULTIBLOCK_DATA_SET; }
162
168 void SetNumberOfBlocks(unsigned int numBlocks);
169
173 unsigned int GetNumberOfBlocks();
174
179 vtkDataObject* GetBlock(unsigned int blockno);
180
190 void SetBlock(unsigned int blockno, vtkDataObject* block);
191
195 void RemoveBlock(unsigned int blockno);
196
200 vtkTypeBool HasMetaData(unsigned int blockno)
201 {
202 return this->Superclass::HasChildMetaData(blockno);
203 }
204
210 vtkInformation* GetMetaData(unsigned int blockno)
211 {
212 return this->Superclass::GetChildMetaData(blockno);
213 }
214
216
222
227 {
228 return this->Superclass::GetMetaData(iter);
229 }
230
235 {
236 return this->Superclass::HasMetaData(iter);
237 }
238
239protected:
242
249
250private:
252 void operator=(const vtkMultiBlockDataSet&) = delete;
253};
254
255VTK_ABI_NAMESPACE_END
256#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.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
vtkInformation * GetMetaData(unsigned int blockno)
Returns the meta-data for the block.
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
static vtkMultiBlockDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void SetNumberOfBlocks(unsigned int numBlocks)
Set the number of blocks.
void RemoveBlock(unsigned int blockno)
Remove the given block from the dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool HasMetaData(unsigned int blockno)
Returns true if meta-data is available for a given block.
~vtkMultiBlockDataSet() override
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other) override
Overridden to create a vtkMultiPieceDataSet whenever a vtkPartitionedDataSet is encountered.
void SetBlock(unsigned int blockno, vtkDataObject *block)
Sets the data object as the given block.
unsigned int GetNumberOfBlocks()
Returns the number of blocks.
static vtkMultiBlockDataSet * New()
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
static vtkMultiBlockDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkDataObject * GetBlock(unsigned int blockno)
Returns the block at the given index.
int vtkTypeBool
Definition vtkABI.h:64
@ VTK_MULTIBLOCK_DATA_SET
Definition vtkType.h:123
#define VTK_MARSHALMANUAL