Terminate a cable (cut box). More...
#include <cutSchema.h>
Inherits schema.
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 | |
schema * | makeCutSchema () |
Creates a new Cut schema. |
Terminate a cable (cut box).
Definition at line 32 of file cutSchema.h.
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.
void cutSchema::draw | ( | device & | dev | ) | [virtual] |
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 }
schema* makeCutSchema | ( | ) | [friend] |
Creates a new Cut schema.
Definition at line 33 of file cutSchema.cpp.
00034 { 00035 return new cutSchema(); 00036 }
point cutSchema::fPoint [private] |
Definition at line 34 of file cutSchema.h.
Referenced by draw(), inputPoint(), and place().