FAUST compiler  0.9.9.6b8
Public Member Functions | Protected Attributes | List of all members
TupletType Class Reference

The type of a tuplet of data. More...

#include <sigtype.hh>

Inheritance diagram for TupletType:
Inheritance graph
[legend]
Collaboration diagram for TupletType:
Collaboration graph
[legend]

Public Member Functions

 TupletType ()
 
 TupletType (const vector< Type > &vt)
 
 TupletType (const vector< Type > &vt, int n, int v, int c, int vec, int b, const interval &i)
 
int arity () const
 
Type operator[] (unsigned int i) const
 
virtual ostream & print (ostream &dst) const
 Print the content of a tuplet of types on a stream. More...
 
virtual AudioTypepromoteNature (int n)
 promote the nature of a type More...
 
virtual AudioTypepromoteVariability (int v)
 promote the variability of a type More...
 
virtual AudioTypepromoteComputability (int c)
 promote the computability of a type More...
 
virtual AudioTypepromoteVectorability (int vec)
 promote the vectorability of a type More...
 
virtual AudioTypepromoteBoolean (int b)
 promote the booleanity of a type More...
 
virtual bool isMaximal () const
 true when type is maximal (and therefore can't change depending of hypothesis) More...
 
- Public Member Functions inherited from AudioType
 AudioType (int n, int v, int c, int vec=kVect, int b=kNum, interval i=interval())
 constructs an abstract audio type More...
 
virtual ~AudioType ()
 not really useful here, but make compiler happier More...
 
int nature () const
 returns the kind of values (integre or floating point) More...
 
int variability () const
 returns how fast values change (constant, by blocks, by samples) More...
 
int computability () const
 returns when values are available (compilation, initialisation, execution) More...
 
int vectorability () const
 returns when a signal can be vectorized More...
 
int boolean () const
 returns when a signal stands for a boolean value More...
 
interval getInterval () const
 returns the interval (min dn max values) of a signal More...
 
void setCode (Tree code)
 returns the interval (min dn max values) of a signal More...
 
Tree getCode ()
 returns the interval (min dn max values) of a signal More...
 

Protected Attributes

vector< TypefComponents
 
- Protected Attributes inherited from AudioType
int fNature
 the kind of data represented More...
 
int fVariability
 how fast values change More...
 
int fComputability
 when are values available More...
 
int fVectorability
 when a signal can be vectorized More...
 
int fBoolean
 when a signal stands for a boolean value More...
 
interval fInterval
 Minimal and maximal values the signal can take. More...
 
Tree fCode
 Tree representation (for memoization purposes) More...
 

Additional Inherited Members

- Static Public Attributes inherited from AudioType
static int gAllocationCount = 0
 
- Protected Member Functions inherited from AudioType
void setInterval (const interval &r)
 

Detailed Description

The type of a tuplet of data.

Beside a computability and a variability, TupletTypes have a set of components.

Definition at line 340 of file sigtype.hh.

Constructor & Destructor Documentation

TupletType::TupletType ( )
inline

Definition at line 346 of file sigtype.hh.

346  :
347  AudioType(0,0,0)
348  {}
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
TupletType::TupletType ( const vector< Type > &  vt)
inline

Definition at line 350 of file sigtype.hh.

350  :
352  fComponents(vt) {}
vector< Type > fComponents
Definition: sigtype.hh:343
int mergeboolean(const vector< Type > &v)
Return the booleanity of a vector of types.
Definition: sigtype.hh:187
int mergevectorability(const vector< Type > &v)
Return the vectorability of a vector of types.
Definition: sigtype.hh:175
int mergenature(const vector< Type > &v)
Return the nature of a vector of types.
Definition: sigtype.hh:139
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
interval mergeinterval(const vector< Type > &v)
Return the interval of a vector of types.
Definition: sigtype.hh:199
int mergecomputability(const vector< Type > &v)
Return the computability of a vector of types.
Definition: sigtype.hh:163
TupletType::TupletType ( const vector< Type > &  vt,
int  n,
int  v,
int  c,
int  vec,
int  b,
const interval i 
)
inline

Definition at line 354 of file sigtype.hh.

354  :
356  fComponents(vt) {}
vector< Type > fComponents
Definition: sigtype.hh:343
int mergeboolean(const vector< Type > &v)
Return the booleanity of a vector of types.
Definition: sigtype.hh:187
int mergevectorability(const vector< Type > &v)
Return the vectorability of a vector of types.
Definition: sigtype.hh:175
int mergenature(const vector< Type > &v)
Return the nature of a vector of types.
Definition: sigtype.hh:139
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
int mergecomputability(const vector< Type > &v)
Return the computability of a vector of types.
Definition: sigtype.hh:163

Member Function Documentation

int TupletType::arity ( ) const
inline

Definition at line 358 of file sigtype.hh.

Referenced by codeTupletType(), operator*(), operator==(), and operator|().

358 { return (int)fComponents.size(); }
vector< Type > fComponents
Definition: sigtype.hh:343

Here is the caller graph for this function:

bool TupletType::isMaximal ( ) const
virtual

true when type is maximal (and therefore can't change depending of hypothesis)

Implements AudioType.

Definition at line 124 of file sigtype.cpp.

References fComponents.

125 {
126  for (unsigned int i = 0; i < fComponents.size(); i++) {
127  if (! fComponents[i]->isMaximal()) return false;
128  }
129  return true;
130 }
virtual bool isMaximal() const
true when type is maximal (and therefore can't change depending of hypothesis)
Definition: sigtype.cpp:124
vector< Type > fComponents
Definition: sigtype.hh:343
Type TupletType::operator[] ( unsigned int  i) const
inline

Definition at line 359 of file sigtype.hh.

359 { return fComponents[i]; }
vector< Type > fComponents
Definition: sigtype.hh:343
ostream & TupletType::print ( ostream &  dst) const
virtual

Print the content of a tuplet of types on a stream.

Implements AudioType.

Definition at line 105 of file sigtype.cpp.

References AudioType::computability(), fComponents, AudioType::fInterval, and AudioType::variability().

Referenced by operator<<().

106 {
107  dst << "KB?S"[variability()]
108  << "CI?E"[computability()]
109  << " " << fInterval
110  << " : {";
111  string sep = "";
112  for (unsigned int i = 0; i < fComponents.size(); i++, sep="*") {
113  dst << sep;
114  fComponents[i]->print(dst);
115  }
116  dst << '}';
117  return dst;
118 }
int variability() const
returns how fast values change (constant, by blocks, by samples)
Definition: sigtype.hh:105
vector< Type > fComponents
Definition: sigtype.hh:343
interval fInterval
Minimal and maximal values the signal can take.
Definition: sigtype.hh:93
int computability() const
returns when values are available (compilation, initialisation, execution)
Definition: sigtype.hh:106

Here is the call graph for this function:

Here is the caller graph for this function:

virtual AudioType* TupletType::promoteBoolean ( int  b)
inlinevirtual

promote the booleanity of a type

Implements AudioType.

Definition at line 366 of file sigtype.hh.

virtual AudioType* TupletType::promoteComputability ( int  c)
inlinevirtual

promote the computability of a type

Implements AudioType.

Definition at line 364 of file sigtype.hh.

virtual AudioType* TupletType::promoteNature ( int  n)
inlinevirtual

promote the nature of a type

Implements AudioType.

Definition at line 362 of file sigtype.hh.

virtual AudioType* TupletType::promoteVariability ( int  v)
inlinevirtual

promote the variability of a type

Implements AudioType.

Definition at line 363 of file sigtype.hh.

virtual AudioType* TupletType::promoteVectorability ( int  vec)
inlinevirtual

promote the vectorability of a type

Implements AudioType.

Definition at line 365 of file sigtype.hh.

Member Data Documentation

vector<Type> TupletType::fComponents
protected

Definition at line 343 of file sigtype.hh.

Referenced by isMaximal(), and print().


The documentation for this class was generated from the following files: