VTK
dox/Common/DataModel/vtkDataObjectTree.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDataObjectTree.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00032 #ifndef __vtkDataObjectTree_h
00033 #define __vtkDataObjectTree_h
00034 
00035 #include "vtkCommonDataModelModule.h" // For export macro
00036 #include "vtkCompositeDataSet.h"
00037 
00038 class vtkCompositeDataIterator;
00039 class vtkDataObjectTreeIterator;
00040 class vtkDataObjectTreeInternals;
00041 class vtkInformation;
00042 class vtkInformationStringKey;
00043 class vtkDataObject;
00044 
00045 class VTKCOMMONDATAMODEL_EXPORT vtkDataObjectTree : public vtkCompositeDataSet
00046 {
00047 public:
00048   vtkTypeMacro(vtkDataObjectTree, vtkCompositeDataSet);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052   virtual vtkDataObjectTreeIterator* NewTreeIterator();
00053 
00058   virtual vtkCompositeDataIterator* NewIterator();
00059 
00063   virtual void CopyStructure(vtkCompositeDataSet* input);
00064 
00069   virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj);
00070 
00072   void SetDataSetFrom(vtkDataObjectTreeIterator* iter, vtkDataObject* dataObj);
00073 
00078   virtual vtkDataObject* GetDataSet(vtkCompositeDataIterator* iter);
00079 
00086   virtual vtkInformation* GetMetaData(vtkCompositeDataIterator* iter);
00087 
00092   virtual int HasMetaData(vtkCompositeDataIterator* iter);
00093 
00096   virtual unsigned long GetActualMemorySize();
00097 
00099   virtual void Initialize();
00100 
00102 
00103   virtual void ShallowCopy(vtkDataObject *src);
00104   virtual void DeepCopy(vtkDataObject *src);
00106 
00110   virtual vtkIdType GetNumberOfPoints();
00111 
00112   //BTX
00114 
00115   static vtkDataObjectTree* GetData(vtkInformation* info);
00116   static vtkDataObjectTree* GetData(vtkInformationVector* v, int i=0);
00117   //ETX
00119 
00120 //BTX
00121 protected:
00122   vtkDataObjectTree();
00123   ~vtkDataObjectTree();
00124 
00126   void SetNumberOfChildren(unsigned int num);
00127 
00129   unsigned int GetNumberOfChildren();
00130 
00133   void SetChild(unsigned int index, vtkDataObject*);
00134 
00136   void RemoveChild(unsigned int index);
00137 
00139   vtkDataObject* GetChild(unsigned int num);
00140 
00144   vtkInformation* GetChildMetaData(unsigned int index);
00145 
00147   void SetChildMetaData(unsigned int index, vtkInformation* info);
00148 
00151   int HasChildMetaData(unsigned int index);
00152 
00153   // The internal datastructure. Subclasses need not access this directly.
00154   vtkDataObjectTreeInternals* Internals;
00155 
00156   friend class vtkDataObjectTreeIterator;
00157 
00158 private:
00159   vtkDataObjectTree(const vtkDataObjectTree&); // Not implemented.
00160   void operator=(const vtkDataObjectTree&); // Not implemented.
00161 //ETX
00162 };
00163 
00164 #endif