FAUST compiler  0.9.9.6b8
Functions
sigorderrules.hh File Reference
#include "signals.hh"
Include dependency graph for sigorderrules.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int getSigOrder (Tree sig)
 retrieve the order annotation (between 0 and 3) of a signal. More...
 

Function Documentation

int getSigOrder ( Tree  sig)

retrieve the order annotation (between 0 and 3) of a signal.

(compute the order the first time). Orders have the following meanings 0 : numbers 1 : constants 2 : user interface values 3 : audio values

Parameters
sigthe signal we want to know the order
Returns
the order number

Definition at line 62 of file sigorderrules.cpp.

References getProperty(), infereSigOrder(), setProperty(), tree(), and tree2int().

Referenced by mterm::complexity(), aterm::normalizedTree(), mterm::normalizedTree(), and normalizeFixedDelayTerm().

63 {
64  Tree tt;
65  if (getProperty(sig, ORDERPROP, tt)) {
66  return tree2int(tt);
67  } else {
68  int order = infereSigOrder(sig);
69  setProperty(sig, ORDERPROP, tree(order));
70  return order;
71  }
72 }
int tree2int(Tree t)
if t has a node of type int, return it otherwise error
Definition: tree.cpp:230
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
static int infereSigOrder(Tree sig)
Infere the order of a term according to its components.
Tree ORDERPROP
Tree tree(const Node &n)
Definition: tree.hh:186
void setProperty(Tree t, Tree key, Tree val)
Definition: list.cpp:418
bool getProperty(Tree t, Tree key, Tree &val)
Definition: list.cpp:423

Here is the call graph for this function:

Here is the caller graph for this function: