VTK  9.0.1
vtkDataObjectTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectTree.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 =========================================================================*/
33 #ifndef vtkDataObjectTree_h
34 #define vtkDataObjectTree_h
35 
36 #include "vtkCommonDataModelModule.h" // For export macro
37 #include "vtkCompositeDataSet.h"
38 
42 class vtkInformation;
44 class vtkDataObject;
45 
46 class VTKCOMMONDATAMODEL_EXPORT vtkDataObjectTree : public vtkCompositeDataSet
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
55  VTK_NEWINSTANCE virtual vtkDataObjectTreeIterator* NewTreeIterator();
56 
65 
71  void CopyStructure(vtkCompositeDataSet* input) override;
72 
79  void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) override;
80 
84  void SetDataSetFrom(vtkDataObjectTreeIterator* iter, vtkDataObject* dataObj);
85 
93 
102  virtual vtkInformation* GetMetaData(vtkCompositeDataIterator* iter);
103 
110  virtual int HasMetaData(vtkCompositeDataIterator* iter);
111 
116  unsigned long GetActualMemorySize() override;
117 
121  void Initialize() override;
122 
124 
127  void ShallowCopy(vtkDataObject* src) override;
128  void DeepCopy(vtkDataObject* src) override;
130 
136  vtkIdType GetNumberOfPoints() override;
137 
143  vtkIdType GetNumberOfCells() override;
144 
146 
150  static vtkDataObjectTree* GetData(vtkInformationVector* v, int i = 0);
152 
153 protected:
155  ~vtkDataObjectTree() override;
156 
160  void SetNumberOfChildren(unsigned int num);
161 
165  unsigned int GetNumberOfChildren();
166 
171  void SetChild(unsigned int index, vtkDataObject*);
172 
176  void RemoveChild(unsigned int index);
177 
181  vtkDataObject* GetChild(unsigned int num);
182 
188  vtkInformation* GetChildMetaData(unsigned int index);
189 
193  void SetChildMetaData(unsigned int index, vtkInformation* info);
194 
199  int HasChildMetaData(unsigned int index);
200 
201  // The internal datastructure. Subclasses need not access this directly.
203 
205 
206 private:
207  vtkDataObjectTree(const vtkDataObjectTree&) = delete;
208  void operator=(const vtkDataObjectTree&) = delete;
209 };
210 
211 #endif
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
virtual vtkIdType GetNumberOfPoints()
Returns the total number of points of all blocks.
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
vtkDataObjectTreeInternals * Internals
int vtkIdType
Definition: vtkType.h:338
virtual vtkIdType GetNumberOfCells()
Returns the total number of cells of all blocks.
Key for string values in vtkInformation.
superclass for composite data iterators
void Initialize() override
Restore data object to initial state,.
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:33
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
#define VTK_NEWINSTANCE
virtual void CopyStructure(vtkCompositeDataSet *input)=0
Copies the tree structure from the input.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the positiong pointed by the iterator.
Store zero or more vtkInformation instances.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
superclass for composite data iterators
general representation of visualization data
Definition: vtkDataObject.h:59
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).