CLAM-Development  1.4.0
GlobalEnums.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
3  * UNIVERSITAT POMPEU FABRA
4  *
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */
21 
22 #include "Enum.hxx"
23 
24 #ifndef _GlobalEnums_
25 #define _GlobalEnums_
26 
27 namespace CLAM {
28 
29 
33 class EInterpolation: public Enum
34 {
35 public:
36 
39  EInterpolation(std::string s) : Enum(ValueTable(), s) {};
40  virtual Component* Species() const { return new EInterpolation; }
41 
42  typedef enum {
52  } tEnum;
53 
55  {
56  static tEnumValue sValueTable[] =
57  {
58  {eStep,"Step"},
59  {eRound,"Round"},
60  {eLinear,"Linear"},
61  {eSpline,"Spline"},
62  {ePolynomial2,"2ond_order_Polynomial"},
63  {ePolynomial3,"3rd_order_Polynomial"},
64  {ePolynomial4,"4th_order_Polynomial"},
65  {ePolynomial5,"5th_order_Polynomial"},
66  {ePolynomialn,"nth_order_Polynomial"},
67  {0,NULL}
68  };
69  return sValueTable;
70  }
71 };
72 
76 //TODO (may include different types of logarithmic scales??
77 class EScale : public Enum
78 {
79 public:
80 
82  EScale(tValue v) : Enum(ValueTable(), v) {};
83  EScale(std::string s) : Enum(ValueTable(), s) {};
84  virtual Component* Species() const { return new EScale; };
85 
86  enum {
89  };
90 
92  {
93  static tEnumValue sValueTable[] =
94  {
95  {EScale::eLinear,"Linear"},
96  {EScale::eLog,"Log"},
97  {0,NULL}
98  };
99  return sValueTable;
100  }
101 };
102 
103 
104 class EWindowType : public Enum
105 {
106 public:
107 
110  EWindowType(std::string s) : Enum(ValueTable(), s) {};
111  virtual ~EWindowType();
112  virtual Component* Species() const { return new EWindowType(eHamming); }
113 
114  enum {
134  };
135 
137  {
138  static tEnumValue sValueTable[] =
139  {
140  {eNone,"None"},
141  {eKaiserBessel17,"KaiserBessel17"},
142  {eKaiserBessel18,"KaiserBessel18"},
143  {eKaiserBessel19,"KaiserBessel19"},
144  {eKaiserBessel20,"KaiserBessel20"},
145  {eKaiserBessel25,"KaiserBessel25"},
146  {eKaiserBessel30,"KaiserBessel30"},
147  {eKaiserBessel35,"KaiserBessel35"},
148  {eBlackmanHarris74,"BlackmanHarris74"},
149  {eBlackmanHarris62,"BlackmanHarris62"},
150  {eBlackmanHarris70,"BlackmanHarris70"},
151  {eBlackmanHarris92,"BlackmanHarris92"},
152  {eHamming,"Hamming"},
153  {eTriangular,"Triangular"},
154  {eBlackmanHarris92TransMainLobe,"BlackmanHarris92 MainLobe"},
155  {eGaussian,"Gaussian"},
156  {eBlackmanHarrisLike,"BlackmanHarrisLike"},
157  {eSine,"Sine"},
158  {eSquare,"Square"},
159  {0,NULL}
160  };
161  return sValueTable;
162  }
163 };
164 
165 
166 
167 }
168 
169 #endif //_GlobalEnums_
170