Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkIndexedContainerInterface.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkIndexedContainerInterface.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/01/15 18:57:01 $
00007   Version:   $Revision: 1.22 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkIndexedContainerInterface_h
00018 #define __itkIndexedContainerInterface_h
00019 
00020 #include "itkObject.h"
00021 
00022 namespace itk
00023 {
00024 
00053 template <typename TElementIdentifier, typename TElement>
00054 class IndexedContainerInterface: public Object
00055 {
00056 public:
00058   typedef IndexedContainerInterface      Self;
00059   typedef Object  Superclass;
00060   typedef SmartPointer<Self>  Pointer;
00061   typedef SmartPointer<const Self>  ConstPointer;
00062   
00064   itkTypeMacro(IndexedContainerInterface, Object);
00065 
00067   typedef TElementIdentifier  ElementIdentifier;
00068   typedef TElement            Element;
00069   
00076   Element& ElementAt(ElementIdentifier);
00077 
00084   Element& CreateElementAt(ElementIdentifier);
00085   
00087   Element GetElement(ElementIdentifier) const ;
00088   
00092   void SetElement(ElementIdentifier, Element);
00093   
00097   void InsertElement(ElementIdentifier, Element);
00098   
00101   bool IndexExists(ElementIdentifier) const ;
00102 
00108   bool GetElementIfIndexExists(ElementIdentifier, Element*) const ;
00109   
00114   void CreateIndex(ElementIdentifier);
00115 
00122   void DeleteIndex(ElementIdentifier);
00123   
00129   class Iterator {}; 
00130 
00136   class ConstIterator {}; 
00137   
00139   Iterator Begin();
00140   
00142   Iterator End();
00143 
00145   ConstIterator Begin() const ;
00146   
00148   ConstIterator End() const ;
00149 
00151   unsigned long Size(void) const ;
00152 
00157   void Reserve(ElementIdentifier);
00158   
00162   void Squeeze(void);
00163   
00166   void Initialize(void);
00167 
00168 };
00169 
00170 } // end namespace itk
00171   
00172 #endif

Generated at Wed Mar 12 01:13:03 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000