FAUST compiler  0.9.9.6b8
Public Member Functions | List of all members
SimpleType Class Reference

The type of a simple numeric audio signal. More...

#include <sigtype.hh>

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

Public Member Functions

 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 More...
 
virtual ostream & print (ostream &dst) const
 print a SimpleType 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...
 

Additional Inherited Members

- Static Public Attributes inherited from AudioType
static int gAllocationCount = 0
 
- Protected Member Functions inherited from AudioType
void setInterval (const interval &r)
 
- 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...
 

Detailed Description

The type of a simple numeric audio signal.

Beside a computability and a variability, SimpleTypes have a "nature" indicating if they represent an integer or floating point audio signals.

Definition at line 237 of file sigtype.hh.

Constructor & Destructor Documentation

SimpleType::SimpleType ( int  n,
int  v,
int  c,
int  vec,
int  b,
const interval i 
)
inline

constructs a SimpleType from a nature a variability and a computability

Definition at line 241 of file sigtype.hh.

Member Function Documentation

bool SimpleType::isMaximal ( ) const
virtual

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

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

Implements AudioType.

Definition at line 30 of file sigtype.cpp.

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

31 {
32  return (fNature==kReal)
33  && (fVariability==kSamp)
34  && (fComputability==kExec);
35 
36 }
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 & SimpleType::print ( ostream &  dst) const
virtual

print a SimpleType

Print the content of a simple type on a stream.

Implements AudioType.

Definition at line 65 of file sigtype.cpp.

References AudioType::boolean(), AudioType::computability(), AudioType::fInterval, AudioType::nature(), AudioType::variability(), and AudioType::vectorability().

Referenced by operator<<().

66 {
67  return dst << "NR"[nature()]
68  << "KB?S"[variability()]
69  << "CI?E"[computability()]
70  << "VS?TS"[vectorability()]
71  << "N?B"[boolean()]
72  << " " << fInterval;
73 }
int variability() const
returns how fast values change (constant, by blocks, by samples)
Definition: sigtype.hh:105
int boolean() const
returns when a signal stands for a boolean value
Definition: sigtype.hh:108
interval fInterval
Minimal and maximal values the signal can take.
Definition: sigtype.hh:93
int nature() const
returns the kind of values (integre or floating point)
Definition: sigtype.hh:104
int computability() const
returns when values are available (compilation, initialisation, execution)
Definition: sigtype.hh:106
int vectorability() const
returns when a signal can be vectorized
Definition: sigtype.hh:107

Here is the call graph for this function:

Here is the caller graph for this function:

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

promote the booleanity of a type

Implements AudioType.

Definition at line 253 of file sigtype.hh.

References makeSimpleType().

Here is the call graph for this function:

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

promote the computability of a type

Implements AudioType.

Definition at line 251 of file sigtype.hh.

References makeSimpleType().

Here is the call graph for this function:

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

promote the nature of a type

Implements AudioType.

Definition at line 249 of file sigtype.hh.

References makeSimpleType().

Here is the call graph for this function:

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

promote the variability of a type

Implements AudioType.

Definition at line 250 of file sigtype.hh.

References makeSimpleType().

Here is the call graph for this function:

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

promote the vectorability of a type

Implements AudioType.

Definition at line 252 of file sigtype.hh.

References makeSimpleType().

Here is the call graph for this function:


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