VTK
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  virtual vtkDataObjectTreeIterator* NewTreeIterator();
56 
65 
71  void CopyStructure(vtkCompositeDataSet* input) override;
72 
80  vtkDataObject* dataObj) override;
81 
85  void SetDataSetFrom(vtkDataObjectTreeIterator* iter, vtkDataObject* dataObj);
86 
94 
103  virtual vtkInformation* GetMetaData(vtkCompositeDataIterator* iter);
104 
111  virtual int HasMetaData(vtkCompositeDataIterator* iter);
112 
117  unsigned long GetActualMemorySize() override;
118 
122  void Initialize() override;
123 
125 
128  void ShallowCopy(vtkDataObject *src) override;
129  void DeepCopy(vtkDataObject *src) override;
131 
137  vtkIdType GetNumberOfPoints() override;
138 
144  vtkIdType GetNumberOfCells() override;
145 
147 
151  static vtkDataObjectTree* GetData(vtkInformationVector* v, int i=0);
153 
154 protected:
156  ~vtkDataObjectTree() override;
157 
161  void SetNumberOfChildren(unsigned int num);
162 
166  unsigned int GetNumberOfChildren();
167 
172  void SetChild(unsigned int index, vtkDataObject*);
173 
177  void RemoveChild(unsigned int index);
178 
182  vtkDataObject* GetChild(unsigned int num);
183 
189  vtkInformation* GetChildMetaData(unsigned int index);
190 
194  void SetChildMetaData(unsigned int index, vtkInformation* info);
195 
200  int HasChildMetaData(unsigned int index);
201 
202  // The internal datastructure. Subclasses need not access this directly.
204 
206 
207 private:
208  vtkDataObjectTree(const vtkDataObjectTree&) = delete;
209  void operator=(const vtkDataObjectTree&) = delete;
210 
211 };
212 
213 #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:347
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:39
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:64
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).