00001 //--------------------------------------------------------------------------- 00002 // Copyright (c) 1995-2005 Ohio Board of Regents and the University of 00003 // Cincinnati. All Rights Reserved. 00004 00005 // You may modify, distribute, and use the software contained in this package 00006 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2, 00007 // June 1991. A copy of this license agreement can be found in the file 00008 // "LGPL", distributed with this archive. 00009 00010 //--------------------------------------------------------------------------- 00011 00012 #ifndef BLOCK_HH 00013 #define BLOCK_HH 00014 00015 #include <vector> 00016 using std::vector; 00017 00020 class Block { 00021 public: 00022 Block(){} 00023 Block( const int initSize ); 00024 ~Block(){} 00025 00026 void *getElement(const int index); 00027 void *operator[](const int index); 00028 void addElement(void *newElement); 00029 void removeElement(const int index); 00030 int getNumberOfElements() const; 00031 void reset(); 00032 Block &operator=(const Block &); 00033 00034 private: 00036 vector<void *> expandableArray; 00037 00038 void *find(void *); 00039 }; 00040 00041 #endif 00042 00043
1.4.6