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

The type of a table of audio data. More...

#include <sigtype.hh>

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

Public Member Functions

 TableType (const Type &t)
 construct a TableType with a content of a type t More...
 
 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 More...
 
 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 vectorability More...
 
Type content () const
 return the type of data store in the table More...
 
virtual ostream & print (ostream &dst) const
 print a TableType 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

const Type fContent
 type of that data stored in the table More...
 
- 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 table of audio data.

Beside a computability and a variability, TableTypes have a "content" indicating the type of the data stored in the table.

Definition at line 288 of file sigtype.hh.

Constructor & Destructor Documentation

TableType::TableType ( const Type t)
inline

construct a TableType with a content of a type t

Definition at line 294 of file sigtype.hh.

TableType::TableType ( const Type t,
int  n,
int  v,
int  c,
int  vec,
int  b,
const interval i 
)
inline

construct a TableType with a content of a type t, promoting nature, variability, computability, vectorability and booleanity

Definition at line 311 of file sigtype.hh.

TableType::TableType ( const Type t,
int  n,
int  v,
int  c,
int  vec 
)
inline

construct a TableType with a content of a type t, promoting nature, variability, computability and vectorability

Definition at line 315 of file sigtype.hh.

Member Function Documentation

Type TableType::content ( ) const
inline

return the type of data store in the table

Definition at line 320 of file sigtype.hh.

Referenced by codeTableType(), infereReadTableType(), infereWriteTableType(), operator==(), and operator|().

Here is the caller graph for this function:

bool TableType::isMaximal ( ) const
virtual

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

Implements AudioType.

Definition at line 93 of file sigtype.cpp.

References AudioType::fComputability, AudioType::fNature, AudioType::fVariability, kExec, kReal, and kSamp.

94 {
95  return (fNature==kReal)
96  && (fVariability==kSamp)
97  && (fComputability==kExec);
98 }
int fVariability
how fast values change
Definition: sigtype.hh:88
int fNature
the kind of data represented
Definition: sigtype.hh:87
int fComputability
when are values available
Definition: sigtype.hh:89
Definition: sigtype.hh:54
Definition: sigtype.hh:56
Definition: sigtype.hh:57
ostream & TableType::print ( ostream &  dst) const
virtual

print a TableType

Print the content of a table type on a stream.

Implements AudioType.

Definition at line 79 of file sigtype.cpp.

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

Referenced by operator<<().

80 {
81  dst << "KB?S"[variability()]
82  << "CI?E"[computability()]
83  << " " << fInterval
84  << ":Table(";
85  fContent->print(dst);
86  return dst << ')';
87 }
int variability() const
returns how fast values change (constant, by blocks, by samples)
Definition: sigtype.hh:105
const Type fContent
type of that data stored in the table
Definition: sigtype.hh:291
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* TableType::promoteBoolean ( int  b)
inlinevirtual

promote the booleanity of a type

Implements AudioType.

Definition at line 327 of file sigtype.hh.

References makeTableType().

Here is the call graph for this function:

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

promote the computability of a type

Implements AudioType.

Definition at line 325 of file sigtype.hh.

References makeTableType().

Here is the call graph for this function:

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

promote the nature of a type

Implements AudioType.

Definition at line 323 of file sigtype.hh.

References makeTableType().

Here is the call graph for this function:

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

promote the variability of a type

Implements AudioType.

Definition at line 324 of file sigtype.hh.

References makeTableType().

Here is the call graph for this function:

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

promote the vectorability of a type

Implements AudioType.

Definition at line 326 of file sigtype.hh.

References makeTableType().

Here is the call graph for this function:

Member Data Documentation

const Type TableType::fContent
protected

type of that data stored in the table

Definition at line 291 of file sigtype.hh.

Referenced by print().


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