|
FAUST compiler
0.9.9.6b8
|
The type of a tuplet of data. More...
#include <sigtype.hh>


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. | |
| virtual AudioType * | promoteNature (int n) |
| promote the nature of a type | |
| virtual AudioType * | promoteVariability (int v) |
| promote the variability of a type | |
| virtual AudioType * | promoteComputability (int c) |
| promote the computability of a type | |
| virtual AudioType * | promoteVectorability (int vec) |
| promote the vectorability of a type | |
| virtual AudioType * | promoteBoolean (int b) |
| promote the booleanity of a type | |
| virtual bool | isMaximal () const |
| true when type is maximal (and therefore can't change depending of hypothesis) | |
Protected Attributes | |
| vector< Type > | fComponents |
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.
| TupletType::TupletType | ( | ) | [inline] |
Definition at line 346 of file sigtype.hh.
:
AudioType(0,0,0)
{}
| TupletType::TupletType | ( | const vector< Type > & | vt | ) | [inline] |
Definition at line 350 of file sigtype.hh.
:
AudioType(mergenature(vt),mergevariability(vt),mergecomputability(vt),mergevectorability(vt),mergeboolean(vt), mergeinterval(vt)),
fComponents(vt) {}
| 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.
:
AudioType(n|mergenature(vt), v|mergevariability(vt), c|mergecomputability(vt), vec|mergevectorability(vt), b|mergeboolean(vt), i),
fComponents(vt) {}
| int TupletType::arity | ( | ) | const [inline] |
Definition at line 358 of file sigtype.hh.
Referenced by codeTupletType(), operator*(), operator==(), and operator|().
{ return fComponents.size(); }

| 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.
{
for (unsigned int i = 0; i < fComponents.size(); i++) {
if (! fComponents[i]->isMaximal()) return false;
}
return true;
}
| Type TupletType::operator[] | ( | unsigned int | i | ) | const [inline] |
Definition at line 359 of file sigtype.hh.
{ return fComponents[i]; }
| 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<<().
{
dst << "KB?S"[variability()]
<< "CI?E"[computability()]
<< " " << fInterval
<< " : {";
string sep = "";
for (unsigned int i = 0; i < fComponents.size(); i++, sep="*") {
dst << sep;
fComponents[i]->print(dst);
}
dst << '}';
return dst;
}


| virtual AudioType* TupletType::promoteBoolean | ( | int | b | ) | [inline, virtual] |
| virtual AudioType* TupletType::promoteComputability | ( | int | c | ) | [inline, virtual] |
promote the computability of a type
Implements AudioType.
Definition at line 364 of file sigtype.hh.
| virtual AudioType* TupletType::promoteNature | ( | int | n | ) | [inline, virtual] |
| virtual AudioType* TupletType::promoteVariability | ( | int | v | ) | [inline, virtual] |
| virtual AudioType* TupletType::promoteVectorability | ( | int | vec | ) | [inline, virtual] |
promote the vectorability of a type
Implements AudioType.
Definition at line 365 of file sigtype.hh.
vector<Type> TupletType::fComponents [protected] |
Definition at line 343 of file sigtype.hh.
Referenced by isMaximal(), and print().
1.8.0