Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

DpListBinH_Type.h

Go to the documentation of this file.
00001 
00005 class DpListBinH(Type) 
00006 
00007 {
00008 
00009 private:
00010 
00011   Handle(Type)* arr;
00012   Handle(Type) last_return;
00013   int noInList, lengthOfArr, *prevId, *prevIndex;
00014   int getIndex(const int id) const;
00015   int getIndexBefore(const int id) const;
00016 
00017 public:
00018 
00019   DpListBinH(Type) (;)
00020   DpListBinH(Type)(const DpListBinH(Type)& list_);
00021   ~DpListBinH(Type) (;)
00022 
00023   const DpListBinH(Type)& operator= (const DpListBinH(Type)& list_);
00024 
00025   void      add (const Type* item);
00026   Type*  remove (const int id);
00027   Type*  remove (const Type* item)     { return remove(item->getId()); }
00028   int      size () const               { return noInList; }
00029 
00030   Type* getItem (const int id) const   { return arr[getIndex(id)].getPtr(); }
00031   Type* getItemBefore (const int id) const
00032     { return arr[getIndexBefore(id)].getPtr(); }
00033   Type* operator[] (const int i) const { return arr[i+1].getPtr(); }
00034 
00035   void  unbindLastReturn()             { last_return.rebind(NULL); }
00036 
00037 };
00038 
00039 

Copyright © 2003 inuTech GmbH. All rights reserved.