cableSchema Class Reference

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

#include <cableSchema.h>

Inherits schema.

Collaboration diagram for cableSchema:
[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

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.

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


Member Function Documentation

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.

00074 {
00075 }

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 80 of file cableSchema.cpp.

References fPoint, and schema::inputs().

00081 {
00082     assert(i<inputs());
00083     return fPoint[i];
00084 }

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 89 of file cableSchema.cpp.

References fPoint, and schema::outputs().

00090 {
00091     assert(i<outputs());
00092     return fPoint[i];
00093 }

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.

00053 {
00054     beginPlace(ox, oy, orientation);
00055     if (orientation == kLeftRight) {
00056         for (unsigned int i=0; i<inputs(); i++) {
00057             fPoint[i] = point(ox, oy + dWire/2.0 + i*dWire);
00058         }
00059     } else {
00060         for (unsigned int i=0; i<inputs(); i++) {
00061             fPoint[i] = point(ox, oy + height() - dWire/2.0 - i*dWire);
00062         }
00063     }
00064     endPlace();
00065 }

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.

00033 {
00034     assert(n>0);
00035     return new cableSchema(n);
00036 }


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:
Generated on Thu Jul 15 16:15:54 2010 for FAUST compiler by  doxygen 1.6.3