FAUST compiler  0.9.9.6b8
sigtype.hh
Go to the documentation of this file.
1 /************************************************************************
2  ************************************************************************
3  FAUST compiler
4  Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
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., 675 Mass Ave, Cambridge, MA 02139, USA.
19  ************************************************************************
20  ************************************************************************/
21 
22 
23 
24 #ifndef _SigType_
25 #define _SigType_
26 
27 #include <vector>
28 #include <string>
29 #include <iostream>
30 #include "tree.hh"
31 #include "smartpointer.hh"
32 #include "interval.hh"
33 
34 
35 /*********************************************************************
36 *
37 * Type System for FAUST
38 *
39 * <type> ::= <simpletype> || table(<type>)
40 * || <type>|<type> || <type>*<type>
41 * <simpletype> ::= <nature><variability><computability><vectorability>||<boolean>
42 * <nature> ::= TINT || TREAL
43 * <variability> ::= TKONST || TBLOCK || TSAMP
44 * <computability> ::= TCOMP || TINIT || TEXEC
45 * <vectorability> ::= KVECT || KSCAL || KTRUESCAL
46 * <boolean> ::= KNUM || KBOOL
47 *
48 **********************************************************************/
49 
50 
51 //--------------------------------------------------
52 // qualite des types simples
53 
54 enum { kInt = 0, kReal = 1 };
55 enum { kNum = 0 , kBool = 1};
56 enum { kKonst = 0, kBlock = 1, kSamp = 3 };
57 enum { kComp = 0, kInit = 1, kExec = 3 };
58 enum { kVect = 0, kScal = 1, kTrueScal = 3/*, kIndex = 4*/};
59 
60 /*---------------------------------------------------------------------
61 
62  AbstractType :
63  The root class for SimpleType, TableType and TupletType
64 
65  Type :
66  A smartPointer to type
67 
68 ----------------------------------------------------------------------*/
69 
70 using namespace std;
71 
72 class AudioType;
73 
74 typedef P<AudioType> Type;
75 
82 class AudioType
83 {
84  public:
85  static int gAllocationCount;
86  protected:
87  int fNature;
91  int fBoolean;
92 
95 
96 
97  public :
98  AudioType(int n, int v, int c, int vec = kVect, int b = kNum, interval i=interval())
99  : fNature(n), fVariability(v), fComputability(c),
100  fVectorability(vec), fBoolean(b),
101  fInterval(i), fCode(0) {}
102  virtual ~AudioType() {}
103 
104  int nature() const { return fNature; }
105  int variability() const { return fVariability; }
106  int computability() const { return fComputability;}
107  int vectorability() const { return fVectorability;}
108  int boolean() const { return fBoolean; }
109 
110  interval getInterval() const { return fInterval; }
111 
112  void setCode(Tree code) { fCode = code; }
113  Tree getCode() { return fCode; }
114 
115 
116  virtual AudioType* promoteNature(int n) = 0;
117  virtual AudioType* promoteVariability(int n) = 0;
118  virtual AudioType* promoteComputability(int n) = 0;
119  virtual AudioType* promoteVectorability(int n) = 0;
120  virtual AudioType* promoteBoolean(int n) = 0;
121  //virtual AudioType* promoteInterval(const interval& i) = 0; ///< promote the interval of a type
122 
123 
124  virtual ostream& print(ostream& dst) const = 0;
125  virtual bool isMaximal() const = 0;
126 
127  protected:
128  void setInterval(const interval& r) { fInterval = r;}
129 
130 };
131 
132 //printing
133 inline ostream& operator << (ostream& s, const AudioType& n) { return n.print(s); }
134 
135 
139 inline int mergenature(const vector<Type>& v)
140 {
141  int r = 0;
142  for (unsigned int i = 0; i < v.size(); i++) r |= v[i]->nature();
143  return r;
144 }
145 
146 
147 
151 inline int mergevariability(const vector<Type>& v)
152 {
153  int r = 0;
154  for (unsigned int i = 0; i < v.size(); i++) r |= v[i]->variability();
155  return r;
156 }
157 
158 
159 
163 inline int mergecomputability(const vector<Type>& v)
164 {
165  int r = 0;
166  for (unsigned int i = 0; i < v.size(); i++) r |= v[i]->computability();
167  return r;
168 }
169 
170 
171 
175 inline int mergevectorability(const vector<Type>& v)
176 {
177  int r = 0;
178  for (unsigned int i = 0; i < v.size(); i++) r |= v[i]->vectorability();
179  return r;
180 }
181 
182 
183 
187 inline int mergeboolean(const vector<Type>& v)
188 {
189  int r = 0;
190  for (unsigned int i = 0; i < v.size(); i++) r |= v[i]->boolean();
191  return r;
192 }
193 
194 
195 
199 inline interval mergeinterval(const vector<Type>& v)
200 {
201  if (v.size()==0) {
202  return interval();
203  } else {
204  double lo=0, hi=0;
205  for (unsigned int i = 0; i < v.size(); i++) {
206  interval r = v[i]->getInterval();
207  if (!r.valid) return r;
208  if (i==0) {
209  lo = r.lo;
210  hi = r.hi;
211  } else {
212  lo = min(lo,r.lo);
213  hi = max(hi,r.hi);
214  }
215  }
216  return interval(lo, hi);
217  }
218 }
219 
220 
221 AudioType* makeSimpleType(int n, int v, int c, int vec, int b, const interval& i);
222 
223 AudioType* makeTableType(const Type& ct);
224 AudioType* makeTableType(const Type& ct, int n, int v, int c, int vec);
225 AudioType* makeTableType(const Type& ct, int n, int v, int c, int vec, int b, const interval& i);
226 
227 
228 AudioType* makeTupletType(const vector<Type>& vt);
229 AudioType* makeTupletType(const vector<Type>& vt, int n, int v, int c, int vec, int b, const interval& i);
230 
237 class SimpleType : public AudioType
238 {
239  public :
240 
241  SimpleType(int n, int v, int c, int vec, int b, const interval& i) : AudioType(n,v,c,vec,b,i) {
242  //cerr << "new simple type " << i << " -> " << *this << endl;
243  }
244 
245  virtual ostream& print(ostream& dst) const;
246 
247 
248 
249  virtual AudioType* promoteNature(int n) { return makeSimpleType(n|fNature, fVariability, fComputability, fVectorability, fBoolean, fInterval); }
250  virtual AudioType* promoteVariability(int v) { return makeSimpleType(fNature, v|fVariability, fComputability, fVectorability, fBoolean, fInterval); }
251  virtual AudioType* promoteComputability(int c) { return makeSimpleType(fNature, fVariability, c|fComputability, fVectorability, fBoolean, fInterval); }
252  virtual AudioType* promoteVectorability(int vec) { return makeSimpleType(fNature, fVariability, fComputability, vec|fVectorability, fBoolean, fInterval); }
253  virtual AudioType* promoteBoolean(int b) { return makeSimpleType(fNature, fVariability, fComputability, fVectorability, b|fBoolean, fInterval); }
254 // virtual AudioType* promoteInterval(const interval& i) {
255 // cerr << "promote to Interval " << i << endl;
256 // cerr << "for type : " << *this << endl;
257 // Type t = makeSimpleType(fNature, fVariability, fComputability, fVectorability, fBoolean, i); ///< promote the interval of a type
258 // cerr << "gives type " << *t << endl;
259 // return t;
260 // }
261 
262 
263  virtual bool isMaximal() const;
264 
265 
266 
267 };
268 
269 inline Type intCast (Type t) { return makeSimpleType(kInt, t->variability(), t->computability(), t->vectorability(), t->boolean(), t->getInterval()); }
270 inline Type floatCast (Type t) { return makeSimpleType(kReal, t->variability(), t->computability(), t->vectorability(), t->boolean(), t->getInterval()); }
271 inline Type sampCast (Type t) { return makeSimpleType(t->nature(), kSamp, t->computability(), t->vectorability(), t->boolean(), t->getInterval()); }
272 inline Type boolCast (Type t) { return makeSimpleType(kInt, t->variability(), t->computability(), t->vectorability(), kBool, t->getInterval()); }
273 inline Type numCast (Type t) { return makeSimpleType(t->nature(), t->variability(), t->computability(), t->vectorability(), kNum, t->getInterval()); }
274 inline Type vecCast (Type t) { return makeSimpleType(t->nature(), t->variability(), t->computability(), kVect, t->boolean(), t->getInterval()); }
275 inline Type scalCast (Type t) { return makeSimpleType(t->nature(), t->variability(), t->computability(), kScal, t->boolean(), t->getInterval()); }
276 inline Type truescalCast (Type t){ return makeSimpleType(t->nature(), t->variability(), t->computability(), kTrueScal, t->boolean(), t->getInterval()); }
277 
278 inline Type castInterval (Type t, const interval& i)
279 {
280  return makeSimpleType(t->nature(), t->variability(), t->computability(), t->vectorability(), t->boolean(), i);
281 }
282 
288 class TableType : public AudioType
289 {
290  protected :
291  const Type fContent;
292 
293  public :
294  TableType(const Type& t) :
295  AudioType(t->nature(), t->variability(), t->computability(), t->vectorability(), t->boolean()),
296  fContent(t) {}
297 #if 0
298  TableType(const Type& t, int v, int c) :
299  AudioType(t->nature(), t->variability()|v, t->computability()|c, t->vectorability(), t->boolean()),
300  fContent(t) {}
301 
302  TableType(const Type& t, int n, int v, int c) :
303  AudioType(t->nature()|n, t->variability()|v, t->computability()|c, t->vectorability(), t->boolean()),
304  fContent(t) {}
305 
306  TableType(const Type& t, int n, int v, int c, int vec, int b) :
307  AudioType(t->nature()|n, t->variability()|v, t->computability()|c, t->vectorability()|vec, t->boolean()|b),
308  fContent(t) {}
309 #endif
310 
311  TableType(const Type& t, int n, int v, int c, int vec, int b, const interval& i) :
312  AudioType(t->nature()|n, t->variability()|v, t->computability()|c, t->vectorability()|vec, t->boolean()|b, i),
313  fContent(t) {}
314 
315  TableType(const Type& t, int n, int v, int c, int vec) :
316  AudioType(t->nature()|n, t->variability()|v, t->computability()|c, t->vectorability()|vec, t->boolean()),
317  fContent(t) {}
318 
319 
320  Type content() const { return fContent; }
321  virtual ostream& print(ostream& dst) const;
322 
323  virtual AudioType* promoteNature(int n) { return makeTableType(fContent, n|fNature, fVariability, fComputability, fVectorability, fBoolean, fInterval); }
324  virtual AudioType* promoteVariability(int v) { return makeTableType(fContent, fNature, v|fVariability, fComputability, fVectorability, fBoolean, fInterval); }
325  virtual AudioType* promoteComputability(int c) { return makeTableType(fContent, fNature, fVariability, c|fComputability, fVectorability, fBoolean, fInterval); }
326  virtual AudioType* promoteVectorability(int vec) { return makeTableType(fContent, fNature, fVariability, fComputability, vec|fVectorability, fBoolean, fInterval);}
327  virtual AudioType* promoteBoolean(int b) { return makeTableType(fContent, fNature, fVariability, fComputability, fVectorability, b|fBoolean, fInterval); }
328  //virtual AudioType* promoteInterval(const interval& i) { return makeTableType(fContent, fNature, fVariability, fComputability, fVectorability, fBoolean, i); } ///< promote the interval of a type
329 
330  virtual bool isMaximal() const;
331 };
332 
333 
334 
340 class TupletType : public AudioType
341 {
342  protected:
343  vector<Type> fComponents;
344 
345  public:
347  AudioType(0,0,0)
348  {}
349 
350  TupletType(const vector<Type>& vt) :
352  fComponents(vt) {}
353 
354  TupletType(const vector<Type>& vt, int n, int v, int c, int vec, int b, const interval& i) :
356  fComponents(vt) {}
357 
358  int arity() const { return (int)fComponents.size(); }
359  Type operator[](unsigned int i) const { return fComponents[i]; }
360  virtual ostream& print(ostream& dst) const;
361 
362  virtual AudioType* promoteNature(int n) { return new TupletType(fComponents, n|fNature, fVariability, fComputability, fVectorability, fBoolean, fInterval); }
363  virtual AudioType* promoteVariability(int v) { return new TupletType(fComponents, fNature, v|fVariability, fComputability, fVectorability, fBoolean, fInterval); }
364  virtual AudioType* promoteComputability(int c) { return new TupletType(fComponents, fNature, fVariability, c|fComputability, fVectorability, fBoolean, fInterval); }
365  virtual AudioType* promoteVectorability(int vec) { return new TupletType(fComponents, fNature, fVariability, fComputability, vec|fVectorability, fBoolean, fInterval);}
366  virtual AudioType* promoteBoolean(int b) { return new TupletType(fComponents, fNature, fVariability, fComputability, fVectorability, b|fBoolean, fInterval); }
367  //virtual AudioType* promoteInterval(const interval& i) { return new TupletType(fComponents, fNature, fVariability, fComputability, fVectorability, fBoolean, i); } ///< promote the interval of a type
368 
369  virtual bool isMaximal() const;
370 
371 };
372 
373 
374 
375 
376 //-------------------------------------------------
377 //-------------------------------------------------
378 // operations sur les types
379 //-------------------------------------------------
380 //-------------------------------------------------
381 
382 
383 
384 //--------------------------------------------------
385 // liste de types predefinis
386 
387 extern Type TINT;
388 extern Type TREAL;
389 
390 extern Type TKONST;
391 extern Type TBLOCK;
392 extern Type TSAMP;
393 
394 extern Type TCOMP;
395 extern Type TINIT;
396 extern Type TEXEC;
397 
398 extern Type TINPUT;
399 extern Type TGUI;
400 extern Type TGUI01;
401 extern Type INT_TGUI;
402 extern Type TREC;
403 
404 
405 //--------------------------------------------------
406 // creation de types
407 
408 Type table (const Type& t);
409 Type operator| (const Type& t1, const Type& t2);
410 Type operator* (const Type& t1, const Type& t2);
411 
412 
413 //--------------------------------------------------
414 // comparaison de types
415 
416 bool operator==(const Type& t1, const Type& t2);
417 bool operator<=(const Type& t1, const Type& t2);
418 
419 inline bool operator!=(const Type& t1, const Type& t2) { return !(t1==t2); }
420 inline bool operator< (const Type& t1, const Type& t2) { return t1<=t2 && t1!=t2; }
421 inline bool operator> (const Type& t1, const Type& t2) { return t2<t1; }
422 inline bool operator>=(const Type& t1, const Type& t2) { return t2<=t1; }
423 
424 
425 //--------------------------------------------------
426 // predicats-conversion de types
427 
431 
432 
433 //--------------------------------------------------
434 // impressions de types
435 
436 ostream& operator<<(ostream& dst, const SimpleType& t);
437 ostream& operator<<(ostream& dst, const Type& t);
438 ostream& operator<<(ostream& dst, const TableType& t);
439 ostream& operator<<(ostream& dst, const TupletType& t);
440 
441 
442 //--------------------------------------------------
443 // verification de type
444 
445 Type checkInt(Type t);
446 Type checkKonst(Type t);
447 Type checkInit(Type t);
448 
450 
451 Type checkWRTbl(Type tbl, Type wr);
452 
453 int checkDelayInterval(Type t);
454 
455 
456 //--------------------------------------------------
457 // conversion de type
458 
459 string cType (Type t);
460 
462 
463 
464 #endif
TupletType()
Definition: sigtype.hh:346
A tree library with hashconsing and maximal sharing capabilities.
Type checkInit(Type t)
verifie que t est connu a l'initialisation
Definition: sigtype.cpp:297
int fBoolean
when a signal stands for a boolean value
Definition: sigtype.hh:91
int checkDelayInterval(Type t)
Check if the interval of t is appropriate for a delay.
Definition: sigtype.cpp:327
bool valid
true if it is a valid interval
Definition: interval.hh:38
int fVariability
how fast values change
Definition: sigtype.hh:88
TableType(const Type &t, int n, int v, int c, int vec)
construct a TableType with a content of a type t, promoting nature, variability, computability and ve...
Definition: sigtype.hh:315
Type TGUI01
Definition: sigtype.cpp:157
virtual AudioType * promoteVariability(int v)
promote the variability of a type
Definition: sigtype.hh:324
double lo
minimal value
Definition: interval.hh:39
Type TBLOCK
Definition: sigtype.cpp:146
Definition: sigtype.hh:58
int variability() const
returns how fast values change (constant, by blocks, by samples)
Definition: sigtype.hh:105
int fNature
the kind of data represented
Definition: sigtype.hh:87
virtual AudioType * promoteVectorability(int vec)
promote the vectorability of a type
Definition: sigtype.hh:326
static int gAllocationCount
Definition: sigtype.hh:85
Definition: sigtype.hh:58
bool operator>=(const Type &t1, const Type &t2)
Definition: sigtype.hh:422
Type TREC
Definition: sigtype.cpp:163
Type TSAMP
Definition: sigtype.cpp:147
interval getInterval() const
returns the interval (min dn max values) of a signal
Definition: sigtype.hh:110
vector< Type > fComponents
Definition: sigtype.hh:343
The type of a tuplet of data.
Definition: sigtype.hh:340
const Type fContent
type of that data stored in the table
Definition: sigtype.hh:291
Definition: sigtype.hh:57
Type content() const
return the type of data store in the table
Definition: sigtype.hh:320
int fComputability
when are values available
Definition: sigtype.hh:89
AudioType * makeTupletType(const vector< Type > &vt)
Definition: sigtype.cpp:513
Definition: sigtype.hh:54
int boolean() const
returns when a signal stands for a boolean value
Definition: sigtype.hh:108
Type TKONST
Definition: sigtype.cpp:145
Tree getCode()
returns the interval (min dn max values) of a signal
Definition: sigtype.hh:113
Type scalCast(Type t)
Definition: sigtype.hh:275
virtual AudioType * promoteComputability(int c)
promote the computability of a type
Definition: sigtype.hh:364
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
int arity() const
Definition: sigtype.hh:358
Type TGUI
Definition: sigtype.cpp:156
Type intCast(Type t)
Definition: sigtype.hh:269
virtual AudioType * promoteBoolean(int b)
promote the booleanity of a type
Definition: sigtype.hh:253
TableType(const Type &t)
construct a TableType with a content of a type t
Definition: sigtype.hh:294
void setInterval(const interval &r)
Definition: sigtype.hh:128
TableType * isTableType(AudioType *t)
Definition: sigtype.cpp:268
AudioType * makeSimpleType(int n, int v, int c, int vec, int b, const interval &i)
Definition: sigtype.cpp:421
Type TINPUT
Definition: sigtype.cpp:155
Definition: sigtype.hh:57
Tree codeAudioType(AudioType *t)
Code an audio type as a tree (memoization)
Definition: sigtype.cpp:374
int mergeboolean(const vector< Type > &v)
Return the booleanity of a vector of types.
Definition: sigtype.hh:187
virtual AudioType * promoteNature(int n)
promote the nature of a type
Definition: sigtype.hh:323
Definition: sigtype.hh:55
int mergevectorability(const vector< Type > &v)
Return the vectorability of a vector of types.
Definition: sigtype.hh:175
Type boolCast(Type t)
Definition: sigtype.hh:272
The type of a table of audio data.
Definition: sigtype.hh:288
double max(double x, double y)
Definition: interval.hh:60
TupletType * isTupletType(AudioType *t)
Definition: sigtype.cpp:269
TupletType(const vector< Type > &vt)
Definition: sigtype.hh:350
Tree fCode
Tree representation (for memoization purposes)
Definition: sigtype.hh:94
Type operator[](unsigned int i) const
Definition: sigtype.hh:359
virtual AudioType * promoteVectorability(int vec)
promote the vectorability of a type
Definition: sigtype.hh:365
bool operator<=(const Type &t1, const Type &t2)
Definition: sigtype.cpp:234
int mergenature(const vector< Type > &v)
Return the nature of a vector of types.
Definition: sigtype.hh:139
Type numCast(Type t)
Definition: sigtype.hh:273
Type TREAL
Definition: sigtype.cpp:143
AudioType * makeTableType(const Type &ct)
Definition: sigtype.cpp:448
Type checkIntParam(Type t)
verifie que t est connu a l'initialisation, constant et entier
Definition: sigtype.cpp:307
virtual AudioType * promoteComputability(int c)
promote the computability of a type
Definition: sigtype.hh:251
virtual AudioType * promoteBoolean(int b)
promote the booleanity of a type
Definition: sigtype.hh:366
void setCode(Tree code)
returns the interval (min dn max values) of a signal
Definition: sigtype.hh:112
virtual ~AudioType()
not really useful here, but make compiler happier
Definition: sigtype.hh:102
virtual ostream & print(ostream &dst) const =0
print nicely a type
Type checkKonst(Type t)
verifie que t est constant
Definition: sigtype.cpp:287
Type floatCast(Type t)
Definition: sigtype.hh:270
Definition: sigtype.hh:55
virtual AudioType * promoteComputability(int c)
promote the computability of a type
Definition: sigtype.hh:325
Type TEXEC
Definition: sigtype.cpp:151
TableType(const Type &t, int n, int v, int c, int vec, int b, const interval &i)
construct a TableType with a content of a type t, promoting nature, variability, computability, vectorability and booleanity
Definition: sigtype.hh:311
The type of a simple numeric audio signal.
Definition: sigtype.hh:237
Type INT_TGUI
Definition: sigtype.cpp:158
Definition: sigtype.hh:54
Type vecCast(Type t)
Definition: sigtype.hh:274
TupletType(const vector< Type > &vt, int n, int v, int c, int vec, int b, const interval &i)
Definition: sigtype.hh:354
Type operator|(const Type &t1, const Type &t2)
Definition: sigtype.cpp:166
Definition: sigtype.hh:56
interval fInterval
Minimal and maximal values the signal can take.
Definition: sigtype.hh:93
int mergevariability(const vector< Type > &v)
Return the variability of a vector of types.
Definition: sigtype.hh:151
AudioType(int n, int v, int c, int vec=kVect, int b=kNum, interval i=interval())
constructs an abstract audio type
Definition: sigtype.hh:98
Type sampCast(Type t)
Definition: sigtype.hh:271
bool operator>(const Type &t1, const Type &t2)
Definition: sigtype.hh:421
virtual AudioType * promoteVariability(int v)
promote the variability of a type
Definition: sigtype.hh:250
bool operator==(const Type &t1, const Type &t2)
Definition: sigtype.cpp:201
int nature() const
returns the kind of values (integre or floating point)
Definition: sigtype.hh:104
bool operator!=(const Type &t1, const Type &t2)
Definition: sigtype.hh:419
Type TINIT
Definition: sigtype.cpp:150
int computability() const
returns when values are available (compilation, initialisation, execution)
Definition: sigtype.hh:106
Type checkWRTbl(Type tbl, Type wr)
verifie que wr est compatible avec le contenu de tbl
Definition: sigtype.cpp:312
virtual AudioType * promoteVariability(int v)
promote the variability of a type
Definition: sigtype.hh:363
virtual AudioType * promoteNature(int n)
promote the nature of a type
Definition: sigtype.hh:362
interval mergeinterval(const vector< Type > &v)
Return the interval of a vector of types.
Definition: sigtype.hh:199
ostream & operator<<(ostream &s, const AudioType &n)
Definition: sigtype.hh:133
Type truescalCast(Type t)
Definition: sigtype.hh:276
P< AudioType > Type
Definition: sigtype.hh:72
int fVectorability
when a signal can be vectorized
Definition: sigtype.hh:90
Type castInterval(Type t, const interval &i)
Definition: sigtype.hh:278
Type table(const Type &t)
bool operator<(const Type &t1, const Type &t2)
Definition: sigtype.hh:420
virtual AudioType * promoteNature(int n)
promote the nature of a type
Definition: sigtype.hh:249
double min(double x, double y)
Definition: interval.hh:59
Definition: sigtype.hh:57
Type TINT
Definition: sigtype.cpp:142
Type operator*(const Type &t1, const Type &t2)
Definition: sigtype.cpp:241
string cType(Type t)
Definition: sigtype.cpp:340
SimpleType * isSimpleType(AudioType *t)
Definition: sigtype.cpp:267
Type checkInt(Type t)
verifie que t est entier
Definition: sigtype.cpp:276
int mergecomputability(const vector< Type > &v)
Return the computability of a vector of types.
Definition: sigtype.hh:163
virtual AudioType * promoteBoolean(int b)
promote the booleanity of a type
Definition: sigtype.hh:327
double hi
maximal value
Definition: interval.hh:40
The Root class for all audio data types.
Definition: sigtype.hh:82
Type TCOMP
Definition: sigtype.cpp:149
int vectorability() const
returns when a signal can be vectorized
Definition: sigtype.hh:107
SimpleType(int n, int v, int c, int vec, int b, const interval &i)
constructs a SimpleType from a nature a variability and a computability
Definition: sigtype.hh:241
void print(Tree t, FILE *out)
Definition: list.cpp:154
virtual AudioType * promoteVectorability(int vec)
promote the vectorability of a type
Definition: sigtype.hh:252