cutSchema Class Reference

Terminate a cable (cut box). More...

#include <cutSchema.h>

Inherits schema.

Collaboration diagram for cutSchema:
[legend]

List of all members.

Public Member Functions

virtual void place (double x, double y, int orientation)
 The input point is placed in the middle.
virtual void draw (device &dev)
 A cut is represented by a small black dot.
virtual point inputPoint (unsigned int i) const
 By definition a Cut has only one input point.
virtual point outputPoint (unsigned int i) const
 By definition a Cut has no output point.

Private Member Functions

 cutSchema ()
 A Cut is represented by a small black dot.

Private Attributes

point fPoint

Friends

schemamakeCutSchema ()
 Creates a new Cut schema.

Detailed Description

Terminate a cable (cut box).

Definition at line 32 of file cutSchema.h.


Constructor & Destructor Documentation

cutSchema::cutSchema (  )  [private]

A Cut is represented by a small black dot.

It has 1 input and no outputs. It has a 0 width and a 1 wire height. The constructor is private in order to enforce the usage of makeCutSchema.

Definition at line 45 of file cutSchema.cpp.

00046     :   schema (1, 0, 0, dWire)
00047 {}


Member Function Documentation

void cutSchema::draw ( device dev  )  [virtual]

A cut is represented by a small black dot.

Implements schema.

Definition at line 64 of file cutSchema.cpp.

References dWire, fPoint, device::rond(), point::x, and point::y.

00065 {
00066     dev.rond(fPoint.x, fPoint.y, dWire/8.0);
00067 }

Here is the call graph for this function:

point cutSchema::inputPoint ( unsigned int  i  )  const [virtual]

By definition a Cut has only one input point.

Implements schema.

Definition at line 72 of file cutSchema.cpp.

References fPoint.

00073 {
00074     assert(i==0);
00075     return fPoint;
00076 }

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

By definition a Cut has no output point.

Implements schema.

Definition at line 81 of file cutSchema.cpp.

00082 {
00083     assert(false);
00084     return point(-1,-1);
00085 }

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

The input point is placed in the middle.

Implements schema.

Definition at line 53 of file cutSchema.cpp.

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

00054 {
00055     beginPlace(ox, oy, orientation);
00056     fPoint = point(ox, oy + height()*0.5);
00057     endPlace();
00058 }

Here is the call graph for this function:


Friends And Related Function Documentation

schema* makeCutSchema (  )  [friend]

Creates a new Cut schema.

Definition at line 33 of file cutSchema.cpp.

00034 {
00035     return new cutSchema();
00036 }


Member Data Documentation

Definition at line 34 of file cutSchema.h.

Referenced by draw(), inputPoint(), 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