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

BoolParameter.hpp

00001 #ifndef __BoolParameter__
00002 #define __BoolParameter__
00003 
00004 
00005 
00024 #include <stdio.h>
00025 
00026 #include "AbsParameter.hpp"
00027 
00028 
00029 class BoolParameter : public AbsParameter
00030 {
00031 private:
00032 
00033 bool                    currentValue;
00034 bool                    defaultValue;
00035 
00036 public:
00037         
00038 BoolParameter(char* aname,  bool avalue)
00039         :AbsParameter(aname, Bool, 1, false )
00040         {
00041         currentValue= avalue;
00042         defaultValue= avalue;
00043         }
00044 
00045 virtual ~BoolParameter(){}
00046 
00047 virtual int                             getCurrentCardinality(){ return 1; }
00048 
00049 // as bool
00050 virtual bool                    getBool(){return currentValue;}
00051 virtual bool                    getDefaultBool(){return defaultValue;}
00052 
00053 virtual void                    setBool(bool val){ currentValue= val; }
00054 virtual void                    setDefaultBool(bool val){ defaultValue= val; }
00055 
00056 // as integer
00057 virtual int                             getInteger(){return -1;}
00058 virtual int                             getDefaultInteger(){return -1;}
00059 virtual int                             getMinInteger(){return -1;}
00060 virtual int                             getMaxInteger(){return -1;}
00061 virtual int                             getInteger(int index){return -1;}
00062 
00063 virtual void                    setInteger(int val){}
00064 virtual void                    setDefaultInteger(int val){}
00065 virtual void                    setRangeInteger(int low, int high){}
00066 virtual void                    setInteger(int index, int val){}
00067 
00068 // as real
00069 virtual double                  getReal(){return -1.0;}
00070 virtual double                  getDefaultReal(){return -1.0;}
00071 virtual double                  getMinReal(){return -1.0;}
00072 virtual double                  getMaxReal(){return -1.0;}
00073 virtual double                  getReal(int index){return -1.0;}
00074 
00075 virtual void                    setReal(double val){}
00076 virtual void                    setDefaultReal(double val){}
00077 virtual void                    setRangeReal(int low, double high){}
00078 virtual void                    setReal(int index, double val){}
00079 
00080 // as real
00081 virtual char*                   getString(){return 0;}
00082 virtual char*                   getDefaultString(){return 0;}
00083 virtual char*                   getString(int index){return 0;}
00084 
00085 virtual void                    setString(char* val){}
00086 virtual void                    setDefaultString(char* val){}
00087 virtual void                    setString(int index, char* val){}
00088 
00089 virtual char*                   shortDescription();
00090 virtual char*                   description();
00091 
00092 virtual void                    report(FILE* file){}
00093 };
00094 
00095 
00096 #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