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

vtkObjectHashMap.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * $Id: vtkObjectHashMap.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $
00004  *
00005  * Copyright (c) 2005 Sean McInerney
00006  * All rights reserved.
00007  *
00008  * See Copyright.txt or http://vtkcontainers.sourceforge.net/Copyright.html
00009  * for details.
00010  *
00011  *    This software is distributed WITHOUT ANY WARRANTY; without even 
00012  *    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013  *    PURPOSE.  See the above copyright notice for more information.
00014  *
00015  */
00016 #ifndef VTK_OBJECT_HASH_MAP_H_
00017 #  define VTK_OBJECT_HASH_MAP_H_
00018 #  include "vtkObjectBaseHashMap.h"
00019 #  include "vtkObjectHashMapIterator.h" // Covarient return type.
00020 
00031 class VTK_CONTAINERS_EXPORT vtkObjectHashMap
00032   : public vtkObjectBaseHashMap
00033 {
00034 public:
00035   static vtkObjectHashMap* New (void);
00036   vtkTypeRevisionMacro (vtkObjectHashMap, vtkObjectBaseHashMap);
00037   void PrintSelf (ostream&, vtkIndent);
00038 
00043   virtual int           Swap (vtkObjectHashMap* container)
00044     { return this->Superclass::Swap(container); }
00045 
00050   virtual int           Copy (vtkObjectHashMap* container)
00051     { return this->Superclass::Copy(container); }
00052 
00060   vtkObject*      Find (const char*               key) const
00061     { return static_cast<vtkObject*>(this->Superclass::Find(key)); }
00062 
00071   virtual int           Insert (const char*       key,
00072                                 vtkObject*        item)
00073     { return this->Superclass::Insert(key, item); }
00074 
00081   vtkObject*            Front (void) const
00082     { return static_cast<vtkObject*>(this->Superclass::Front()); }
00083 
00088   virtual int           Front (const char* &      key,
00089                                vtkObject*  &      item) const;
00090 
00095   vtkObject*            Back (void) const
00096     { return static_cast<vtkObject*>(this->Superclass::Back()); }
00097 
00102   virtual int           Back (const char* &       key,
00103                               vtkObject*  &       item) const;
00107   vtkObjectHashMapIterator* CreateIterator (void);
00108 
00109 protected:
00110   vtkObjectHashMap (void);
00111   ~vtkObjectHashMap();
00112 
00113 private:
00114   //BTX
00117   int Swap (vtkObjectBaseHashMap* map)
00118     { return this->Superclass::Swap(map); }
00119   int Copy (vtkObjectBaseHashMap* map)
00120     { return this->Superclass::Copy(map); }
00121   int Insert (const char* key, vtkObjectBase* object)
00122     { return this->Superclass::Insert(key, object); }
00123   int Front (const char* & key, vtkObjectBase* & object) const
00124     { return this->Superclass::Front(key, object); }
00125   int Back (const char* & key, vtkObjectBase* & object) const
00126     { return this->Superclass::Back(key, object); }
00128   //ETX
00129 
00130 private:
00136   vtkObjectHashMap (const vtkObjectHashMap&);
00137   void operator= (const vtkObjectHashMap&);
00139 };
00140 
00141 // ----------------------------------------------------------------------------
00142 inline int
00143 vtkObjectHashMap::Front (const char* &       aKey,
00144                          vtkObject*  &       aObject) const
00145 {
00146   vtkObjectBase* object = (vtkObjectBase *) 0;
00147   int            result = this->Superclass::Front(aKey, object);
00148   aObject = static_cast<vtkObject*>(object);
00149   return result;
00150 }
00151 
00152 inline int
00153 vtkObjectHashMap::Back (const char* &        aKey,
00154                         vtkObject*  &        aObject) const
00155 {
00156   vtkObjectBase* object = (vtkObjectBase *) 0;
00157   int            result = this->Superclass::Back(aKey, object);
00158   aObject = static_cast<vtkObject*>(object);
00159   return result;
00160 }
00161 
00162 #endif /* VTK_OBJECT_HASH_MAP_H_ */
00163 /*
00164  * End of: $Id: vtkObjectHashMap.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $
00165  *
00166  */

Generated on Thu Jul 14 14:39:39 2005 for vtkContainers by doxygen 1.3.6