|
FAUST compiler
0.9.9.6b8
|
#include <schema.h>
Public Member Functions | |
| void | addOutput (const point &p) |
| void | addInput (const point &p) |
| void | addTrait (const trait &t) |
| void | computeVisibleTraits () |
| bool | isVisible (const trait &t) |
| void | draw (device &dev) |
Public Attributes | |
| set< point > | fOutputs |
| set< point > | fInputs |
| set< trait > | fTraits |
| set< trait > | fWithInput |
| set< trait > | fWithOutput |
| void collector::addInput | ( | const point & | p | ) | [inline] |
Definition at line 83 of file schema.h.
Referenced by recSchema::collectFeedback(), blockSchema::collectInputWires(), and topSchema::collectTraits().
{ fInputs.insert(p); }

| void collector::addOutput | ( | const point & | p | ) | [inline] |
Definition at line 82 of file schema.h.
Referenced by recSchema::collectFeedback(), blockSchema::collectOutputWires(), and topSchema::collectTraits().
{ fOutputs.insert(p); }

| void collector::addTrait | ( | const trait & | t | ) | [inline] |
Definition at line 84 of file schema.h.
Referenced by recSchema::collectFeedback(), recSchema::collectFeedfront(), blockSchema::collectInputWires(), seqSchema::collectInternalWires(), blockSchema::collectOutputWires(), recSchema::collectTraits(), mergeSchema::collectTraits(), decorateSchema::collectTraits(), splitSchema::collectTraits(), and enlargedSchema::collectTraits().
{ fTraits.insert(t); }

| void collector::computeVisibleTraits | ( | ) |
Definition at line 29 of file collector.cpp.
{
bool modified;
do {
modified = false;
for (set<trait>::iterator p = fTraits.begin(); p != fTraits.end(); p++) {
if (fWithInput.count(*p) == 0) { // not connected to a real output
if (fOutputs.count(p->start) > 0) {
fWithInput.insert(*p); // the cable is connected to a real output
fOutputs.insert(p->end); // end become a real output too
modified = true;
}
}
if (fWithOutput.count(*p) == 0) { // not connected to a real input
if (fInputs.count(p->end) > 0) {
fWithOutput.insert(*p); // the cable is connected to a real input
fInputs.insert(p->start); // start become a real input too
modified = true;
}
}
}
} while (modified);
}
| void collector::draw | ( | device & | dev | ) |
Definition at line 59 of file collector.cpp.
Referenced by writeSchemaFile().
{
computeVisibleTraits();
for (set<trait>::iterator p = fTraits.begin(); p != fTraits.end(); p++) {
if (isVisible(*p)) p->draw(dev);
}
}

| bool collector::isVisible | ( | const trait & | t | ) |
Definition at line 54 of file collector.cpp.
{
return fWithInput.count(t) && fWithOutput.count(t);
}
| set<point> collector::fInputs |
| set<point> collector::fOutputs |
| set<trait> collector::fTraits |
1.8.0