00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkHierarchicalDataSet.h,v $ 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 =========================================================================*/ 00035 #ifndef __vtkHierarchicalDataSet_h 00036 #define __vtkHierarchicalDataSet_h 00037 00038 #include "vtkCompositeDataSet.h" 00039 00040 //BTX 00041 struct vtkHierarchicalDataSetInternal; 00042 //ETX 00043 class vtkDataObject; 00044 class vtkHDSNode; 00045 00046 class VTK_FILTERING_EXPORT vtkHierarchicalDataSet : public vtkCompositeDataSet 00047 { 00048 public: 00049 vtkTypeRevisionMacro(vtkHierarchicalDataSet,vtkCompositeDataSet); 00050 virtual void PrintSelf(ostream& os, vtkIndent indent); 00051 00054 virtual vtkCompositeDataIterator* NewIterator(); 00055 00058 virtual int GetDataObjectType() {return VTK_HIERARCHICAL_DATA_SET;} 00059 00061 virtual void Initialize(); 00062 00065 void SetNumberOfLevels(unsigned int numLevels); 00066 00068 unsigned int GetNumberOfLevels(); 00069 00073 void SetNumberOfDataSets(unsigned int level, unsigned int numDataSets); 00074 00076 unsigned int GetNumberOfDataSets(unsigned int level); 00077 00080 void InitializeNode(unsigned int level, unsigned int id); 00081 00086 int IsNodePresent(unsigned int level, unsigned int id); 00087 00091 void SetDataSet(unsigned int level, unsigned int id, vtkDataObject* dataSet); 00092 00094 vtkDataObject* GetDataSet(unsigned int level, unsigned int id); 00095 00097 00098 virtual void ShallowCopy(vtkDataObject *src); 00099 virtual void DeepCopy(vtkDataObject *src); 00101 00102 //BTX 00103 friend class vtkHierarchicalDataIterator; 00104 //ETX 00105 00106 protected: 00107 vtkHierarchicalDataSet(); 00108 ~vtkHierarchicalDataSet(); 00109 00110 vtkHierarchicalDataSetInternal* Internal; 00111 00112 void InitializeDataSets(); 00113 00114 virtual vtkHDSNode* NewNode(); 00115 00116 private: 00117 vtkHierarchicalDataSet(const vtkHierarchicalDataSet&); // Not implemented. 00118 void operator=(const vtkHierarchicalDataSet&); // Not implemented. 00119 }; 00120 00121 #endif 00122