00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "Enum.hxx"
00023
00024 #ifndef _GlobalEnums_
00025 #define _GlobalEnums_
00026
00027 namespace CLAM {
00028
00029
00033 class EInterpolation: public Enum
00034 {
00035 public:
00036
00037 EInterpolation() : Enum(ValueTable(), eLinear) {}
00038 EInterpolation(tValue v) : Enum(ValueTable(), v) {};
00039 EInterpolation(std::string s) : Enum(ValueTable(), s) {};
00040 virtual Component* Species() const { return new EInterpolation; }
00041
00042 typedef enum {
00043 eStep,
00044 eRound,
00045 eLinear,
00046 eSpline,
00047 ePolynomial2,
00048 ePolynomial3,
00049 ePolynomial4,
00050 ePolynomial5,
00051 ePolynomialn
00052 } tEnum;
00053
00054 static tEnumValue * ValueTable()
00055 {
00056 static tEnumValue sValueTable[] =
00057 {
00058 {eStep,"Step"},
00059 {eRound,"Round"},
00060 {eLinear,"Linear"},
00061 {eSpline,"Spline"},
00062 {ePolynomial2,"2ond_order_Polynomial"},
00063 {ePolynomial3,"3rd_order_Polynomial"},
00064 {ePolynomial4,"4th_order_Polynomial"},
00065 {ePolynomial5,"5th_order_Polynomial"},
00066 {ePolynomialn,"nth_order_Polynomial"},
00067 {0,NULL}
00068 };
00069 return sValueTable;
00070 }
00071 };
00072
00076
00077 class EScale : public Enum
00078 {
00079 public:
00080
00081 EScale() : Enum(ValueTable(), eLinear) {}
00082 EScale(tValue v) : Enum(ValueTable(), v) {};
00083 EScale(std::string s) : Enum(ValueTable(), s) {};
00084 virtual Component* Species() const { return new EScale; };
00085
00086 enum {
00087 eLinear,
00088 eLog
00089 };
00090
00091 static tEnumValue * ValueTable()
00092 {
00093 static tEnumValue sValueTable[] =
00094 {
00095 {EScale::eLinear,"Linear"},
00096 {EScale::eLog,"Log"},
00097 {0,NULL}
00098 };
00099 return sValueTable;
00100 }
00101 };
00102
00103
00104 class EWindowType : public Enum
00105 {
00106 public:
00107
00108 EWindowType() : Enum(ValueTable(), eHamming) {}
00109 EWindowType(tValue v) : Enum(ValueTable(), v) {};
00110 EWindowType(std::string s) : Enum(ValueTable(), s) {};
00111 virtual ~EWindowType();
00112 virtual Component* Species() const { return new EWindowType(eHamming); }
00113
00114 enum {
00115 eNone,
00116 eKaiserBessel17,
00117 eKaiserBessel18,
00118 eKaiserBessel19,
00119 eKaiserBessel20,
00120 eKaiserBessel25,
00121 eKaiserBessel30,
00122 eKaiserBessel35,
00123 eBlackmanHarris74,
00124 eBlackmanHarris62,
00125 eBlackmanHarris70,
00126 eBlackmanHarris92,
00127 eHamming,
00128 eTriangular,
00129 eBlackmanHarris92TransMainLobe,
00130 eGaussian,
00131 eBlackmanHarrisLike,
00132 eSine,
00133 eSquare
00134 };
00135
00136 static tEnumValue * ValueTable()
00137 {
00138 static tEnumValue sValueTable[] =
00139 {
00140 {eNone,"None"},
00141 {eKaiserBessel17,"KaiserBessel17"},
00142 {eKaiserBessel18,"KaiserBessel18"},
00143 {eKaiserBessel19,"KaiserBessel19"},
00144 {eKaiserBessel20,"KaiserBessel20"},
00145 {eKaiserBessel25,"KaiserBessel25"},
00146 {eKaiserBessel30,"KaiserBessel30"},
00147 {eKaiserBessel35,"KaiserBessel35"},
00148 {eBlackmanHarris74,"BlackmanHarris74"},
00149 {eBlackmanHarris62,"BlackmanHarris62"},
00150 {eBlackmanHarris70,"BlackmanHarris70"},
00151 {eBlackmanHarris92,"BlackmanHarris92"},
00152 {eHamming,"Hamming"},
00153 {eTriangular,"Triangular"},
00154 {eBlackmanHarris92TransMainLobe,"BlackmanHarris92 MainLobe"},
00155 {eGaussian,"Gaussian"},
00156 {eBlackmanHarrisLike,"BlackmanHarrisLike"},
00157 {eSine,"Sine"},
00158 {eSquare,"Square"},
00159 {0,NULL}
00160 };
00161 return sValueTable;
00162 }
00163 };
00164
00165
00166
00167 }
00168
00169 #endif //_GlobalEnums_
00170