CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Standard
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
37
EInterpolation
() :
Enum
(
ValueTable
(),
eLinear
) {}
38
EInterpolation
(
tValue
v) :
Enum
(
ValueTable
(), v) {};
39
EInterpolation
(std::string s) :
Enum
(
ValueTable
(), s) {};
40
virtual
Component
*
Species
()
const
{
return
new
EInterpolation
; }
41
42
typedef
enum
{
43
eStep
,
44
eRound
,
45
eLinear
,
46
eSpline
,
47
ePolynomial2
,
48
ePolynomial3
,
49
ePolynomial4
,
50
ePolynomial5
,
51
ePolynomialn
52
}
tEnum
;
53
54
static
tEnumValue
*
ValueTable
()
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
81
EScale
() :
Enum
(
ValueTable
(),
eLinear
) {}
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
{
87
eLinear
,
88
eLog
89
};
90
91
static
tEnumValue
*
ValueTable
()
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
108
EWindowType
() :
Enum
(
ValueTable
(),
eHamming
) {}
109
EWindowType
(
tValue
v) :
Enum
(
ValueTable
(), v) {};
110
EWindowType
(std::string s) :
Enum
(
ValueTable
(), s) {};
111
virtual
~EWindowType
();
112
virtual
Component
*
Species
()
const
{
return
new
EWindowType
(
eHamming
); }
113
114
enum
{
115
eNone
,
116
eKaiserBessel17
,
117
eKaiserBessel18
,
118
eKaiserBessel19
,
119
eKaiserBessel20
,
120
eKaiserBessel25
,
121
eKaiserBessel30
,
122
eKaiserBessel35
,
123
eBlackmanHarris74
,
124
eBlackmanHarris62
,
125
eBlackmanHarris70
,
126
eBlackmanHarris92
,
127
eHamming
,
128
eTriangular
,
129
eBlackmanHarris92TransMainLobe
,
130
eGaussian
,
131
eBlackmanHarrisLike
,
132
eSine
,
133
eSquare
134
};
135
136
static
tEnumValue
*
ValueTable
()
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
Generated by
1.8.1