FAUST compiler  0.9.9.6b8
Public Member Functions | Protected Attributes
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]

List of all members.

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 AudioTypepromoteNature (int n)
 promote the nature of a type
virtual AudioTypepromoteVariability (int v)
 promote the variability of a type
virtual AudioTypepromoteComputability (int c)
 promote the computability of a type
virtual AudioTypepromoteVectorability (int vec)
 promote the vectorability of a type
virtual AudioTypepromoteBoolean (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< TypefComponents

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.

                 :
          AudioType(0,0,0)
          {}
TupletType::TupletType ( const vector< Type > &  vt) [inline]
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.


Member Function Documentation

int TupletType::arity ( ) const [inline]

Definition at line 358 of file sigtype.hh.

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

{ return fComponents.size(); }

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.

{
    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; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual AudioType* TupletType::promoteBoolean ( int  b) [inline, virtual]

promote the booleanity of a type

Implements AudioType.

Definition at line 366 of file sigtype.hh.

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]

promote the nature of a type

Implements AudioType.

Definition at line 362 of file sigtype.hh.

virtual AudioType* TupletType::promoteVariability ( int  v) [inline, virtual]

promote the variability of a type

Implements AudioType.

Definition at line 363 of file sigtype.hh.

virtual AudioType* TupletType::promoteVectorability ( int  vec) [inline, virtual]

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: