FAUST compiler  0.9.9.6b8
Public Member Functions | Public Attributes | List of all members
collector Struct Reference

#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< 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(), connectorSchema::collectInputWires(), blockSchema::collectInputWires(), and topSchema::collectTraits().

83 { fInputs.insert(p); }
set< point > fInputs
Definition: schema.h:77

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(), connectorSchema::collectOutputWires(), blockSchema::collectOutputWires(), and topSchema::collectTraits().

82 { fOutputs.insert(p); }
set< point > fOutputs
Definition: schema.h:76

Here is the caller graph for this function:

void collector::addTrait ( const trait t)
inline
void collector::computeVisibleTraits ( )

Definition at line 29 of file collector.cpp.

30 {
31  bool modified;
32 
33  do {
34  modified = false;
35  for (set<trait>::iterator p = fTraits.begin(); p != fTraits.end(); p++) {
36  if (fWithInput.count(*p) == 0) { // not connected to a real output
37  if (fOutputs.count(p->start) > 0) {
38  fWithInput.insert(*p); // the cable is connected to a real output
39  fOutputs.insert(p->end); // end become a real output too
40  modified = true;
41  }
42  }
43  if (fWithOutput.count(*p) == 0) { // not connected to a real input
44  if (fInputs.count(p->end) > 0) {
45  fWithOutput.insert(*p); // the cable is connected to a real input
46  fInputs.insert(p->start); // start become a real input too
47  modified = true;
48  }
49  }
50  }
51  } while (modified);
52 }
set< trait > fWithOutput
Definition: schema.h:80
set< point > fOutputs
Definition: schema.h:76
set< trait > fWithInput
Definition: schema.h:79
set< trait > fTraits
Definition: schema.h:78
set< point > fInputs
Definition: schema.h:77
void collector::draw ( device dev)

Definition at line 59 of file collector.cpp.

Referenced by writeSchemaFile().

60 {
62  for (set<trait>::iterator p = fTraits.begin(); p != fTraits.end(); p++) {
63  if (isVisible(*p)) p->draw(dev);
64  }
65 }
bool isVisible(const trait &t)
Definition: collector.cpp:54
set< trait > fTraits
Definition: schema.h:78
void computeVisibleTraits()
Definition: collector.cpp:29

Here is the caller graph for this function:

bool collector::isVisible ( const trait t)

Definition at line 54 of file collector.cpp.

55 {
56  return fWithInput.count(t) && fWithOutput.count(t);
57 }
set< trait > fWithOutput
Definition: schema.h:80
set< trait > fWithInput
Definition: schema.h:79

Member Data Documentation

set<point> collector::fInputs

Definition at line 77 of file schema.h.

set<point> collector::fOutputs

Definition at line 76 of file schema.h.

set<trait> collector::fTraits

Definition at line 78 of file schema.h.

set<trait> collector::fWithInput

Definition at line 79 of file schema.h.

set<trait> collector::fWithOutput

Definition at line 80 of file schema.h.


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