VTK  9.3.0
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
42 #ifndef vtkMultiBlockDataSet_h
43 #define vtkMultiBlockDataSet_h
44 
45 #include "vtkCommonDataModelModule.h" // For export macro
46 #include "vtkDataObjectTree.h"
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class VTKCOMMONDATAMODEL_EXPORT vtkMultiBlockDataSet : public vtkDataObjectTree
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  int GetDataObjectType() override { return VTK_MULTIBLOCK_DATA_SET; }
61 
67  void SetNumberOfBlocks(unsigned int numBlocks);
68 
72  unsigned int GetNumberOfBlocks();
73 
78  vtkDataObject* GetBlock(unsigned int blockno);
79 
89  void SetBlock(unsigned int blockno, vtkDataObject* block);
90 
94  void RemoveBlock(unsigned int blockno);
95 
99  vtkTypeBool HasMetaData(unsigned int blockno)
100  {
101  return this->Superclass::HasChildMetaData(blockno);
102  }
103 
109  vtkInformation* GetMetaData(unsigned int blockno)
110  {
111  return this->Superclass::GetChildMetaData(blockno);
112  }
113 
115 
121 
126  {
127  return this->Superclass::GetMetaData(iter);
128  }
129 
134  {
135  return this->Superclass::HasMetaData(iter);
136  }
137 
138 protected:
141 
148 
149 private:
151  void operator=(const vtkMultiBlockDataSet&) = delete;
152 };
153 
154 VTK_ABI_NAMESPACE_END
155 #endif
superclass for composite data iterators
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
Definition: vtkDataObject.h:64
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
void SetNumberOfBlocks(unsigned int numBlocks)
Set the number of blocks.
void RemoveBlock(unsigned int blockno)
Remove the given block from the dataset.
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.
vtkTypeBool HasMetaData(unsigned int blockno)
Returns true if meta-data is available for a given block.
~vtkMultiBlockDataSet() override
vtkInformation * GetMetaData(unsigned int blockno)
Returns the meta-data for the block.
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.
void SetBlock(unsigned int blockno, vtkDataObject *block)
Sets the data object as the given block.
unsigned int GetNumberOfBlocks()
Returns the number of blocks.
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other) override
Overridden to create a vtkMultiPieceDataSet whenever a vtkPartitionedDataSet is encountered.
static vtkMultiBlockDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkMultiBlockDataSet * New()
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
@ info
Definition: vtkX3D.h:376
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_MULTIBLOCK_DATA_SET
Definition: vtkType.h:78