Diffpack Documentation


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

DpListBin_Type.h

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

Copyright © 2003 inuTech GmbH. All rights reserved.