Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Common/KWCommon/vtkHashMapIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkHashMapIterator.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00018 #ifndef __vtkHashMapIterator_h
00019 #define __vtkHashMapIterator_h
00020 
00021 #include "vtkAbstractIterator.h"
00022 
00023 template <class DataType> class vtkVectorIterator;
00024 template <class KeyType, class DataType> class vtkHashMap;
00025 template <class KeyType, class DataType> class vtkAbstractMapItem;
00026 
00027 template <class KeyType,class DataType>
00028 class vtkHashMapIterator : public vtkAbstractIterator<KeyType,DataType>
00029 {
00030   friend class vtkHashMap<KeyType,DataType>;
00031   virtual const char* GetClassNameInternal() const { return "vtkHashMapIterator"; }
00032 
00033 public:
00034 
00037   int GetKey(KeyType&);
00038   
00041   int GetData(DataType&);
00042   
00045   int GetKeyAndData(KeyType&, DataType&);
00046   
00049   int SetData(const DataType&);
00050   
00053   void InitTraversal();
00054   
00057   int IsDoneWithTraversal();
00058   
00060   void GoToNextItem();
00061   
00063   void GoToPreviousItem();
00064   
00066   void GoToFirstItem();
00067   
00069   void GoToLastItem();
00070   
00071 protected:
00072   static vtkHashMapIterator<KeyType,DataType> *New(); 
00073   
00074   vtkHashMapIterator();
00075   virtual ~vtkHashMapIterator();
00076   
00077   void ScanForward();
00078   void ScanBackward();
00079   
00080   typedef vtkAbstractMapItem<KeyType,DataType> ItemType;
00081   typedef vtkVectorIterator<ItemType> BucketIterator;
00082   
00083   vtkIdType Bucket;
00084   BucketIterator* Iterator;
00085   
00086 private:
00087   vtkHashMapIterator(const vtkHashMapIterator<KeyType,DataType>&); // Not implemented
00088   void operator=(const vtkHashMapIterator<KeyType,DataType>&); // Not implemented
00089 };
00090 
00091 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
00092 #include "vtkHashMapIterator.txx"
00093 #endif 
00094 
00095 #endif
00096 
00097 
00098 

Generated on Tue May 30 12:31:37 2006 for ParaView by doxygen 1.3.5