FAUST compiler  0.9.9.6b8
Public Member Functions | Public Attributes
collector Struct Reference

#include <schema.h>

List of all members.

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< pointfOutputs
set< pointfInputs
set< traitfTraits
set< traitfWithInput
set< traitfWithOutput

Detailed Description

Definition at line 74 of file schema.h.


Member Function Documentation

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); }

Here is the caller graph for this function:

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); }

Here is the caller graph for this function:

void collector::addTrait ( const trait t) [inline]

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);
    }
}

Here is the caller graph for this function:

bool collector::isVisible ( const trait t)

Definition at line 54 of file collector.cpp.

{
    return fWithInput.count(t) && fWithOutput.count(t);
}

Member Data Documentation

Definition at line 77 of file schema.h.

Definition at line 76 of file schema.h.

Definition at line 78 of file schema.h.

Definition at line 79 of file schema.h.

Definition at line 80 of file schema.h.


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