|
FAUST compiler
0.9.9.6b8
|
A simple rectangular box with a text and inputs and outputs. More...
#include <blockSchema.h>


Public Member Functions | |
| virtual void | place (double x, double y, int orientation) |
| Define the graphic position of the blockSchema. More... | |
| virtual void | draw (device &dev) |
| Draw the blockSchema on the device. More... | |
| virtual point | inputPoint (unsigned int i) const |
| Returns an input point. More... | |
| virtual point | outputPoint (unsigned int i) const |
| Returns an output point. More... | |
| virtual void | collectTraits (collector &c) |
| Draw horizontal arrows from the input points to the blockSchema rectangle. More... | |
Public Member Functions inherited from schema | |
| schema (unsigned int inputs, unsigned int outputs, double width, double height) | |
| virtual | ~schema () |
| double | width () const |
| double | height () const |
| unsigned int | inputs () const |
| unsigned int | outputs () const |
| void | beginPlace (double x, double y, int orientation) |
| void | endPlace () |
| bool | placed () const |
| double | x () const |
| double | y () const |
| int | orientation () const |
Protected Member Functions | |
| blockSchema (unsigned int inputs, unsigned int outputs, double width, double height, const string &name, const string &color, const string &link) | |
| Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displayed, and an optional link. More... | |
| void | placeInputPoints () |
| Computes the input points according to the position and the orientation of the blockSchema. More... | |
| void | placeOutputPoints () |
| Computes the output points according to the position and the orientation of the blockSchema. More... | |
| void | drawRectangle (device &dev) |
| Draw the colored rectangle with the optional link. More... | |
| void | drawText (device &dev) |
| Draw the text centered on the box. More... | |
| void | drawOrientationMark (device &dev) |
| Draw the orientation mark, a small point that indicates the first input (like integrated circuits) More... | |
| void | drawInputArrows (device &dev) |
| Draw horizontal arrows from the input points to the blockSchema rectangle. More... | |
| void | collectInputWires (collector &c) |
| Draw horizontal arrows from the input points to the blockSchema rectangle. More... | |
| void | collectOutputWires (collector &c) |
| Draw horizontal line from the blockSchema rectangle to the output points. More... | |
Protected Attributes | |
| const string | fText |
| Text to be displayed. More... | |
| const string | fColor |
| color of the box More... | |
| const string | fLink |
| option URL link More... | |
| vector< point > | fInputPoint |
| input connection points More... | |
| vector< point > | fOutputPoint |
| output connection points More... | |
Friends | |
| schema * | makeBlockSchema (unsigned int inputs, unsigned int outputs, const string &name, const string &color, const string &link) |
| Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displayed, and an optional link. More... | |
A simple rectangular box with a text and inputs and outputs.
The constructor is private in order to make sure makeBlockSchema is used instead
Definition at line 35 of file blockSchema.h.
|
protected |
Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displayed, and an optional link.
The length of the text as well as th number of inputs and outputs are used to compute the size of the blockSchema
Definition at line 62 of file blockSchema.cpp.
References fInputPoint, fOutputPoint, schema::inputs(), and schema::outputs().

|
protected |
Draw horizontal arrows from the input points to the blockSchema rectangle.
Definition at line 265 of file blockSchema.cpp.
References collector::addInput(), collector::addTrait(), dHorz, fInputPoint, schema::inputs(), kLeftRight, schema::orientation(), point::x, and point::y.
Referenced by collectTraits().


|
protected |
Draw horizontal line from the blockSchema rectangle to the output points.
Definition at line 280 of file blockSchema.cpp.
References collector::addOutput(), collector::addTrait(), dHorz, fOutputPoint, kLeftRight, schema::orientation(), schema::outputs(), point::x, and point::y.
Referenced by collectTraits().


|
virtual |
Draw horizontal arrows from the input points to the blockSchema rectangle.
Implements schema.
Definition at line 255 of file blockSchema.cpp.
References collectInputWires(), and collectOutputWires().

|
virtual |
Draw the blockSchema on the device.
This methos can only be called after the blockSchema have been placed
Implements schema.
Reimplemented in inverterSchema.
Definition at line 180 of file blockSchema.cpp.
References drawInputArrows(), drawOrientationMark(), drawRectangle(), drawText(), and schema::placed().

|
protected |
Draw horizontal arrows from the input points to the blockSchema rectangle.
Definition at line 240 of file blockSchema.cpp.
References dHorz, fInputPoint, device::fleche(), schema::inputs(), kLeftRight, schema::orientation(), point::x, and point::y.
Referenced by draw().


|
protected |
Draw the orientation mark, a small point that indicates the first input (like integrated circuits)
Definition at line 222 of file blockSchema.cpp.
References dHorz, dVert, schema::height(), kLeftRight, device::markSens(), schema::orientation(), schema::width(), schema::x(), and schema::y().
Referenced by draw().


|
protected |
Draw the colored rectangle with the optional link.
Definition at line 193 of file blockSchema.cpp.
References dHorz, dVert, fColor, fLink, schema::height(), device::rect(), schema::width(), schema::x(), and schema::y().
Referenced by draw().


|
protected |
Draw the text centered on the box.
Definition at line 208 of file blockSchema.cpp.
References fLink, fText, schema::height(), device::text(), schema::width(), schema::x(), and schema::y().
Referenced by draw().


|
virtual |
Returns an input point.
Implements schema.
Definition at line 99 of file blockSchema.cpp.
References fInputPoint, schema::inputs(), and schema::placed().

|
virtual |
Returns an output point.
Implements schema.
Definition at line 110 of file blockSchema.cpp.
References fOutputPoint, schema::outputs(), and schema::placed().

|
virtual |
Define the graphic position of the blockSchema.
Computes the graphic position of all the elements, in particular the inputs and outputs. This method must be called before draw(), otherwise draw is not allowed
Implements schema.
Definition at line 85 of file blockSchema.cpp.
References schema::beginPlace(), schema::endPlace(), placeInputPoints(), and placeOutputPoints().

|
protected |
Computes the input points according to the position and the orientation of the blockSchema.
Definition at line 122 of file blockSchema.cpp.
References dWire, fInputPoint, schema::height(), schema::inputs(), kLeftRight, schema::orientation(), schema::width(), schema::x(), and schema::y().
Referenced by place().


|
protected |
Computes the output points according to the position and the orientation of the blockSchema.
Definition at line 151 of file blockSchema.cpp.
References dWire, fOutputPoint, schema::height(), kLeftRight, schema::orientation(), schema::outputs(), schema::width(), schema::x(), and schema::y().
Referenced by place().


|
friend |
Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displayed, and an optional link.
Computes the size of the box according to the length of the text and the maximum number of ports.
Definition at line 41 of file blockSchema.cpp.
|
protected |
color of the box
Definition at line 39 of file blockSchema.h.
Referenced by inverterSchema::draw(), and drawRectangle().
|
protected |
input connection points
Definition at line 43 of file blockSchema.h.
Referenced by blockSchema(), collectInputWires(), drawInputArrows(), inputPoint(), and placeInputPoints().
|
protected |
option URL link
Definition at line 40 of file blockSchema.h.
Referenced by inverterSchema::draw(), drawRectangle(), and drawText().
|
protected |
output connection points
Definition at line 44 of file blockSchema.h.
Referenced by blockSchema(), collectOutputWires(), outputPoint(), and placeOutputPoints().
|
protected |
1.8.7