place and connect two diagrams in split composition More...
#include <splitSchema.h>
Public Member Functions | |
virtual void | place (double ox, double oy, int orientation) |
Places the two subschema horizontaly, centered, with enough gap for the connections. | |
virtual void | draw (device &dev) |
Draw the two sub schema and the connections between them. | |
virtual point | inputPoint (unsigned int i) |
The inputs of s1 <: s2 are the inputs of s1. | |
virtual point | outputPoint (unsigned int i) |
The outputs of s1 <: s2 are the outputs of s2. | |
Private Member Functions | |
splitSchema (schema *s1, schema *s2, double hgap) | |
Constructor for a split schema s1 <: s2 where the outputs of s1 are distributed to the inputs of s2. | |
Friends | |
schema * | makeSplitSchema (schema *s1, schema *s2) |
Creates a new split schema. |
place and connect two diagrams in split composition
Definition at line 33 of file splitSchema.h.
Constructor for a split schema s1 <: s2 where the outputs of s1 are distributed to the inputs of s2.
The constructor is private in order to enforce the usage of makeSplitSchema
Definition at line 52 of file splitSchema.cpp.
00053 : schema( s1->inputs(), 00054 s2->outputs(), 00055 s1->width() + s2->width() + hgap, 00056 max(s1->height(), s2->height()) ), 00057 fSchema1(s1), 00058 fSchema2(s2), 00059 fHorzGap(hgap) 00060 { 00061 }
Creates a new split schema.
Cables are enlarged to dWire. The horizontal gap between the two subschema is such that the connections are not too slopy.
Definition at line 34 of file splitSchema.cpp.
00035 { 00036 // make sure a and b are at least dWire large 00037 schema * a = makeEnlargedSchema(s1, dWire); 00038 schema * b = makeEnlargedSchema(s2, dWire); 00039 00040 // horizontal gap to avaoid too slopy connections 00041 double hgap = (a->height()+b->height())/4; 00042 00043 return new splitSchema(a,b,hgap); 00044 }