Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

FloatVectorList.hpp

00001 #ifndef __FloatVectorList__
00002 #define __FloatVectorList__
00003 
00004 
00005 
00024 #include <stdio.h>
00025 #include "FloatVector.hpp"
00026 
00027 class FloatVectorList
00028 {
00029 protected:
00030 
00031 int                     n, nmax;
00032 FloatVector**   v;
00033 
00034 public:
00035 FloatVectorList(int Nmax=5);
00036 virtual ~FloatVectorList(){delete[] v;}
00037 
00038 int numberOfItems(){ return n; }
00039 int maxItems(){ return nmax; }
00040 
00041 bool isEmpty(){ return n == 0 ? true : false; }
00042 bool isFull(){ return n == nmax ? true : false; }
00043 
00044 FloatVector*    get0(int i){return v[i];}
00045 void                    set0(int i, FloatVector* vnew){ v[i]= vnew; }
00046 
00047 FloatVector*    get(int i){return v[i-1];}
00048 void                    set(int i, FloatVector* vnew){ v[i-1]= vnew; }
00049 
00050 bool                    add(FloatVector* vnew);
00051 FloatVector*    removeFirst();
00052 FloatVector*    removeLast();
00053 
00054 void    clearAll()
00055         { 
00056         for(int i=0; i<n; i++) 
00057                 {delete v[i]; v[i]=0;} 
00058         n=0;
00059         }
00060 
00061 virtual void output();
00062 };
00063 
00064 
00065 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com