18 Tree c, sel, x, y, z, u, v, var, le, label, id, ff, largs, type,
name, file;
21 return sig->
arity(); }
22 else if (
isSigInt(sig, &i) ) {
return 0; }
23 else if (
isSigReal(sig, &r) ) {
return 0; }
29 else if (
isSigOutput(sig, &i, x) ) { vsigs.push_back(x);
return 1; }
31 else if (
isSigDelay1(sig, x) ) { vsigs.push_back(x);
return 1; }
33 else if (
isSigFixDelay(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
34 else if (
isSigPrefix(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
35 else if (
isSigIota(sig, x) ) { vsigs.push_back(x);
return 1; }
37 else if (
isSigBinOp(sig, &i, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
38 else if (
isSigFFun(sig, ff, largs) ) {
int n = 0;
while (!
isNil(largs)) { vsigs.push_back(
hd(largs)); largs =
tl(largs); n++; }
return n; }
39 else if (
isSigFConst(sig, type, name, file) ) {
return 0; }
40 else if (
isSigFVar(sig, type, name, file) ) {
return 0; }
42 else if (
isSigTable(sig,
id, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
43 else if (
isSigWRTbl(sig,
id, x, y, z) ) { vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(z);
return 3; }
44 else if (
isSigRDTbl(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
46 else if (
isSigDocConstantTbl(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
47 else if (
isSigDocWriteTbl(sig, x, y, u, v) ) { vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(u); vsigs.push_back(v);
return 4; }
48 else if (
isSigDocAccessTbl(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
51 else if (
isSigSelect2(sig, sel, x, y) ) { vsigs.push_back(sel); vsigs.push_back(x); vsigs.push_back(y);
return 3; }
52 else if (
isSigSelect3(sig, sel, x, y, z) ) { vsigs.push_back(sel); vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(z);
return 4; }
54 else if (
isSigGen(sig, x) ) {
if (visitgen) { vsigs.push_back(x);
return 1;}
else {
return 0; } }
56 else if (
isProj(sig, &i, x) ) { vsigs.push_back(x);
return 1; }
57 else if (
isRec(sig, var, le) ) { vsigs.push_back(le);
return 1; }
59 else if (
isSigIntCast(sig, x) ) { vsigs.push_back(x);
return 1; }
60 else if (
isSigFloatCast(sig, x) ) { vsigs.push_back(x);
return 1; }
64 else if (
isSigVSlider(sig, label,c,x,y,z) ) {
return 0; }
65 else if (
isSigHSlider(sig, label,c,x,y,z) ) {
return 0; }
68 else if (
isSigVBargraph(sig, label,x,y,z) ) { vsigs.push_back(z);
return 1; }
69 else if (
isSigHBargraph(sig, label,x,y,z) ) { vsigs.push_back(z);
return 1; }
70 else if (
isSigAttach(sig, x, y) ) { vsigs.push_back(x); vsigs.push_back(y);
return 2; }
71 else if (
isList(sig) ) { vsigs.push_back(
hd(sig)); vsigs.push_back(
tl(sig));
return 2; }
72 else if (
isNil(sig) ) {
return 0; }
75 cerr <<
"ERROR, getSubSignals unrecognized signal : " << *sig << endl;
bool isSigHSlider(Tree s)
bool isSigRDTbl(Tree s, Tree &t, Tree &i)
bool isSigPrefix(Tree t, Tree &t0, Tree &t1)
bool isSigCheckbox(Tree s)
bool isSigFFun(Tree s, Tree &ff, Tree &largs)
bool isSigNumEntry(Tree s)
bool isSigSelect2(Tree t, Tree &selector, Tree &s1, Tree &s2)
bool isSigIota(Tree t, Tree &t0)
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
bool isSigInput(Tree t, int *i)
bool isSigFixDelay(Tree t, Tree &t0, Tree &t1)
bool isSigVBargraph(Tree s)
bool isSigSelect3(Tree t, Tree &selector, Tree &s1, Tree &s2, Tree &s3)
bool isSigVSlider(Tree s)
bool isSigGen(Tree t, Tree &x)
bool isSigReal(Tree t, double *r)
bool isSigHBargraph(Tree s)
bool isSigDocConstantTbl(Tree t, Tree &n, Tree &sig)
int getSubSignals(Tree sig, vector< Tree > &vsigs, bool visitgen)
Extract the sub signals of a signal expression, that is not necesseraly all the subtrees.
bool isSigTable(Tree t, Tree &id, Tree &n, Tree &sig)
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
bool isSigAttach(Tree t, Tree &t0, Tree &t1)
bool isSigDocAccessTbl(Tree t, Tree &tbl, Tree &ridx)
bool isSigWRTbl(Tree u, Tree &id, Tree &t, Tree &i, Tree &s)
int arity() const
return the number of branches (subtrees) of a tree
const tvec & branches() const
return all branches (subtrees) of a tree
const char * name(Symbol *sym)
Returns the name of a symbol.
bool isSigWaveform(Tree s)
bool isRec(Tree t, Tree &body)
is t a de Bruijn recursive tree
bool isSigInt(Tree t, int *i)
bool isSigDocWriteTbl(Tree t, Tree &n, Tree &sig, Tree &widx, Tree &wsig)
bool isSigDelay1(Tree t, Tree &t0)
bool isSigFloatCast(Tree t)
void * getUserData(Symbol *sym)
Returns user data.
bool isSigIntCast(Tree t)
bool isProj(Tree t, int *i, Tree &rgroup)
Tree branch(int i) const
return the ith branch (subtree) of a tree
bool isSigOutput(Tree t, int *i, Tree &t0)