00001 /*========================================================================= 00002 00003 Program: F.R.E.E. - flexible registration evaluation engine 00004 Version: v.1.0.0 00005 Date: $Date: 2006/09/01 12:00:00 $ 00006 Module: $RCSfile: freSmartCollectionBase.h,v $ 00007 Language: C++ 00008 00009 00010 00011 Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics, 00012 Institute for Medical Biometry and Informatics, University of Heidelberg, 00013 Germany). All rights reserved. 00014 See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm 00015 for details. 00016 00017 This software is distributed WITHOUT ANY WARRANTY; without even 00018 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00019 PURPOSE. See the above copyright notices for more information. 00020 00021 =========================================================================*/ 00022 00023 #ifndef __freSmartCollectionBase_h 00024 #define __freSmartCollectionBase_h 00025 00026 #include "freCollectionBase.h" 00027 00028 #include "itkSmartPointer.h" 00029 00030 namespace FREE 00031 { 00032 00041 template <class TElement> 00042 class SmartCollectionBase: public CollectionBase<TElement, itk::SmartPointer<TElement> > 00043 { 00044 public: 00045 typedef CollectionBase<TElement, itk::SmartPointer<TElement> > Superclass; 00046 typedef typename Superclass::ElementType ElementType; 00047 typedef typename Superclass::StorageType StorageType; 00048 typedef typename Superclass::ElementVectorType ElementVectorType; 00049 typedef typename Superclass::ElementsCountType ElementsCountType; 00050 00051 virtual const char *GetNameOfClass() const 00052 {return "SmartCollectionBase";}; 00053 00055 SmartCollectionBase() 00056 {}; 00057 00059 SmartCollectionBase( const SmartCollectionBase<TElement>& rCollection ) 00060 { 00061 *this = rCollection; 00062 }; 00063 00066 virtual SmartCollectionBase& operator = (const SmartCollectionBase& rCollection); 00067 00069 virtual SmartCollectionBase& operator + (const SmartCollectionBase& collection); 00070 00075 virtual ElementType* GetElement(const ElementsCountType& index) const; 00076 00082 virtual ElementsCountType AddElement(ElementType* pElement); 00083 00087 virtual ElementsCountType AddElement(const ElementType& element); 00088 }; 00089 00090 }//end of namespace FREE 00091 00092 00093 #ifndef ITK_MANUAL_INSTANTIATION 00094 #include "freSmartCollectionBase.txx" 00095 #endif 00096 00097 #endif
1.5.3 written by Dimitri van Heesch,
© 1997-2000