FAUST compiler  0.9.9.6b8
Public Member Functions | Private Member Functions | Friends | List of all members
inverterSchema Class Reference

An inverter : a special symbol corresponding to '*(-1)' to create more compact diagrams. More...

#include <inverterSchema.h>

Inheritance diagram for inverterSchema:
Inheritance graph
[legend]
Collaboration diagram for inverterSchema:
Collaboration graph
[legend]

Public Member Functions

virtual void draw (device &dev)
 Nothing to draw. More...
 
- Public Member Functions inherited from blockSchema
virtual void place (double x, double y, int orientation)
 Define the graphic position of the blockSchema. 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
 

Private Member Functions

 inverterSchema (const string &color)
 Build n cables in parallel. More...
 

Friends

schemamakeInverterSchema (const string &color)
 Build n cables in parallel. More...
 

Additional Inherited Members

- Protected Member Functions inherited from blockSchema
 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 inherited from blockSchema
const string fText
 Text to be displayed. More...
 
const string fColor
 color of the box More...
 
const string fLink
 option URL link More...
 
vector< pointfInputPoint
 input connection points More...
 
vector< pointfOutputPoint
 output connection points More...
 

Detailed Description

An inverter : a special symbol corresponding to '*(-1)' to create more compact diagrams.

Definition at line 11 of file inverterSchema.h.

Constructor & Destructor Documentation

inverterSchema::inverterSchema ( const string &  color)
private

Build n cables in parallel.

Definition at line 45 of file inverterSchema.cpp.

46  : blockSchema (1, 1, 2.5*dWire, dWire, "-1", color, "")
47 {
48 }
const double dWire
distance between two wires
Definition: schema.h:33
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 displaye...
Definition: blockSchema.cpp:62

Member Function Documentation

void inverterSchema::draw ( device dev)
virtual

Nothing to draw.

Actual drawing will take place when the wires are enlargered

Reimplemented from blockSchema.

Definition at line 55 of file inverterSchema.cpp.

References dHorz, blockSchema::fColor, blockSchema::fLink, schema::height(), kLeftRight, schema::orientation(), device::triangle(), schema::width(), schema::x(), and schema::y().

56 {
57  dev.triangle(x() + dHorz, y()+0.5, width() - 2*dHorz, height()-1, fColor.c_str(),fLink.c_str(), orientation()==kLeftRight);
58 }
const string fLink
option URL link
Definition: blockSchema.h:40
double y() const
Definition: schema.h:139
double width() const
Definition: schema.h:126
double x() const
Definition: schema.h:138
int orientation() const
Definition: schema.h:140
double height() const
Definition: schema.h:127
const double dHorz
marge horizontale
Definition: schema.h:36
virtual void triangle(double x, double y, double l, double h, const char *color, const char *link, bool leftright)=0
const string fColor
color of the box
Definition: blockSchema.h:39

Here is the call graph for this function:

Friends And Related Function Documentation

schema* makeInverterSchema ( const string &  color)
friend

Build n cables in parallel.

Definition at line 36 of file inverterSchema.cpp.

37 {
38  return new inverterSchema(color);
39 }
inverterSchema(const string &color)
Build n cables in parallel.

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