FAUST compiler  0.9.9.6b8
Public Member Functions | Private Member Functions | Private Attributes | Friends
cableSchema Class Reference

Simple cables (identity box) in parallel. More...

#include <cableSchema.h>

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

List of all members.

Public Member Functions

virtual void place (double x, double y, int orientation)
 Place the communication points vertically spaced by dWire.
virtual void draw (device &dev)
 Nothing to draw.
virtual point inputPoint (unsigned int i) const
 *input and output points are the same as the width is 0
virtual point outputPoint (unsigned int i) const
 *input and output points are the same as the width is 0
virtual void collectTraits (collector &c)
 Nothing to collect.

Private Member Functions

 cableSchema (unsigned int n)
 Build n cables in parallel.

Private Attributes

vector< pointfPoint

Friends

schemamakeCableSchema (unsigned int n)
 Build n cables in parallel.

Detailed Description

Simple cables (identity box) in parallel.

The width of a cable is null. Therefore input and output connection points are the same. The constructor is private to enforce the use of makeCableSchema.

Definition at line 34 of file cableSchema.h.


Constructor & Destructor Documentation

cableSchema::cableSchema ( unsigned int  n) [private]

Build n cables in parallel.

Definition at line 42 of file cableSchema.cpp.

References fPoint.

    :   schema (n, n, 0, n*dWire)
{
    for (unsigned int i=0; i<n; i++)    fPoint.push_back(point(0,0));
}

Member Function Documentation

void cableSchema::collectTraits ( collector c) [virtual]

Nothing to collect.

Actual collect will take place when the wires are enlargered

Implements schema.

Definition at line 83 of file cableSchema.cpp.

{
}
void cableSchema::draw ( device dev) [virtual]

Nothing to draw.

Actual drawing will take place when the wires are enlargered

Implements schema.

Definition at line 73 of file cableSchema.cpp.

{
}
point cableSchema::inputPoint ( unsigned int  i) const [virtual]

*input and output points are the same as the width is 0

Implements schema.

Definition at line 90 of file cableSchema.cpp.

References fPoint, and schema::inputs().

{
    assert(i<inputs());
    return fPoint[i];
}

Here is the call graph for this function:

point cableSchema::outputPoint ( unsigned int  i) const [virtual]

*input and output points are the same as the width is 0

Implements schema.

Definition at line 99 of file cableSchema.cpp.

References fPoint, and schema::outputs().

{
    assert(i<outputs());
    return fPoint[i];
}

Here is the call graph for this function:

void cableSchema::place ( double  x,
double  y,
int  orientation 
) [virtual]

Place the communication points vertically spaced by dWire.

Implements schema.

Definition at line 52 of file cableSchema.cpp.

References schema::beginPlace(), dWire, schema::endPlace(), fPoint, schema::height(), schema::inputs(), and kLeftRight.

{
    beginPlace(ox, oy, orientation);
    if (orientation == kLeftRight) {
        for (unsigned int i=0; i<inputs(); i++) {
            fPoint[i] = point(ox, oy + dWire/2.0 + i*dWire);
        }
    } else {
        for (unsigned int i=0; i<inputs(); i++) {
            fPoint[i] = point(ox, oy + height() - dWire/2.0 - i*dWire);
        }
    }
    endPlace();
}

Here is the call graph for this function:


Friends And Related Function Documentation

schema* makeCableSchema ( unsigned int  n) [friend]

Build n cables in parallel.

Definition at line 32 of file cableSchema.cpp.

{
    assert(n>0);
    return new cableSchema(n);
}

Member Data Documentation

vector<point> cableSchema::fPoint [private]

Definition at line 36 of file cableSchema.h.

Referenced by cableSchema(), inputPoint(), outputPoint(), and place().


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