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

vtkAssociativeContainer.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: vtkAssociativeContainer.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_ASSOCIATIVE_CONTAINER_H_
00017 #  define VTK_ASSOCIATIVE_CONTAINER_H_
00018 #  include "vtkContainer.h"
00019 #  include "vtkAssociativeIterator.h" // Covariant return type.
00020 
00037 class VTK_CONTAINERS_EXPORT vtkAssociativeContainer
00038   : public vtkContainer
00039 {
00040 public:
00041   vtkTypeRevisionMacro (vtkAssociativeContainer, vtkContainer);
00042   void PrintSelf (ostream&, vtkIndent);
00043 
00048   virtual int           Swap (vtkAssociativeContainer* container) = 0;
00049 
00054   virtual int           Copy (vtkAssociativeContainer* container) = 0;
00055 
00060   virtual vtkIdType             GetCapacity (void) const;
00061 
00064   virtual int                   GetCheckUnique (void) const;
00065   virtual void                  SetCheckUnique (int a);
00066   vtkBooleanMacro (CheckUnique, int);
00071   virtual int                   GetCheckCase (void) const;
00072   virtual void                  SetCheckCase (int a);
00073   vtkBooleanMacro (CheckCase, int);
00085   virtual vtkObjectBase*        Find (const char*       key) const;
00086 
00095   virtual int                   Insert (const char*     key,
00096                                         vtkObjectBase*  item) = 0;
00097 
00108   virtual int                   Erase (const char*      key) = 0;
00109 
00114   virtual const char*           FindKey (const vtkObjectBase* item) = 0;
00115 
00122   virtual const char*           FindNextKey (void) = 0;
00123 
00130   virtual int                   Front (const char*    & key,
00131                                        vtkObjectBase* & item) const;
00132 
00137   virtual int                   Back (const char*    &  key,
00138                                       vtkObjectBase* &  item) const;
00142   virtual vtkAssociativeIterator* CreateIterator (void) = 0;
00143 
00144 protected:
00145   vtkAssociativeContainer (void);
00146   ~vtkAssociativeContainer();
00147 
00148 private:
00149   //BTX
00152   int Swap (vtkContainer* a)
00153     { return this->Swap(static_cast<vtkAssociativeContainer*>(a)); }
00154   int Copy (vtkContainer* a)
00155     { return this->Copy(static_cast<vtkAssociativeContainer*>(a)); }
00157   //ETX
00158 
00159 private:
00165   vtkAssociativeContainer (const vtkAssociativeContainer&);
00166   void operator= (const vtkAssociativeContainer&);
00168 };
00169 
00170 #endif /* VTK_ASSOCIATIVE_CONTAINER_H_ */
00171 /* 
00172  * End of: $Id: vtkAssociativeContainer.h,v 1.3 2005/06/24 23:17:16 xpxqx Exp $.
00173  * 
00174  */

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