FAUST compiler  0.9.9.6b8
Functions
mergeSchema.cpp File Reference
#include "mergeSchema.h"
#include <iostream>
#include <assert.h>
Include dependency graph for mergeSchema.cpp:

Go to the source code of this file.

Functions

schemamakeMergeSchema (schema *s1, schema *s2)
 Creates a new merge schema. More...
 

Function Documentation

schema* makeMergeSchema ( schema s1,
schema s2 
)

Creates a new merge 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 35 of file mergeSchema.cpp.

References dWire, schema::height(), and makeEnlargedSchema().

Referenced by generateInsideSchema().

36 {
37  // avoid ugly diagram by ensuring at least dWire width
38  schema * a = makeEnlargedSchema(s1, dWire);
39  schema * b = makeEnlargedSchema(s2, dWire);
40  double hgap = (a->height()+b->height())/4;
41  return new mergeSchema(a,b,hgap);
42 }
const double dWire
distance between two wires
Definition: schema.h:33
Place and connect two diagrams in merge composition.
Definition: mergeSchema.h:33
An abstract block diagram schema.
Definition: schema.h:97
double height() const
Definition: schema.h:127
schema * makeEnlargedSchema(schema *s, double width)
Returns an enlarged schema, but only if really needed that is if the requiered width is greater that ...

Here is the call graph for this function:

Here is the caller graph for this function: