34 if (width > s->
width()) {
46 :
schema(s->inputs(), s->outputs(), width, s->height()),
70 for (
unsigned int i=0; i <
inputs(); i++) {
75 for (
unsigned int i=0; i <
outputs(); i++) {
114 for (
unsigned int i=0; i<
inputs(); i++) {
117 if ( (p.z>=0) && (q.z>=0) ) dev.
trait(p.
x, p.
y, q.
x, q.
y);
121 for (
unsigned int i=0; i<
outputs(); i++) {
124 if ( (p.z>=0) && (q.z>=0) ) dev.
trait(p.
x, p.
y, q.
x, q.
y);
140 for (
unsigned int i=0; i<
inputs(); i++) {
147 for (
unsigned int i=0; i<
outputs(); i++) {
void addTrait(const trait &t)
virtual void collectTraits(collector &c)
Draw the enlarged schema.
unsigned int outputs() const
virtual point outputPoint(unsigned int i) const
Returns an output point.
virtual point inputPoint(unsigned int i) const =0
void beginPlace(double x, double y, int orientation)
virtual void draw(device &dev)=0
virtual void collectTraits(collector &c)=0
unsigned int inputs() const
enlargedSchema(schema *s, double width)
Put additional space left and right of a schema so that the result has a certain width.
vector< point > fInputPoint
virtual void place(double x, double y, int orientation)=0
virtual void draw(device &dev)
Draw the enlarged schema.
virtual point outputPoint(unsigned int i) const =0
An abstract block diagram schema.
virtual void place(double x, double y, int orientation)
Define the graphic position of the schema.
virtual void trait(double x1, double y1, double x2, double y2)=0
virtual point inputPoint(unsigned int i) const
Returns an input point.
vector< point > fOutputPoint
schema * makeEnlargedSchema(schema *s, double width)
Returns an enlarged schema, but only if really needed that is if the requiered width is greater that ...