use of de.neemann.digital.builder.circuit.CircuitBuilder in project Digital by hneemann.
the class BuilderExpressionCreatorTest method create.
private Model create(ExpressionListenerStore els, ExpressionModifier modifier) throws ExpressionException, FormatterException, ElementNotFoundException, PinException, NodeException {
CircuitBuilder circuitBuilder = new CircuitBuilder(shapeFactory, false);
new BuilderExpressionCreator(circuitBuilder, modifier).create(els);
return new ModelCreator(circuitBuilder.createCircuit(), libary).createModel(false);
}
use of de.neemann.digital.builder.circuit.CircuitBuilder in project Digital by hneemann.
the class TestResultTest method getModel.
private Model getModel(String func) throws IOException, ParseException, BuilderException, PinException, NodeException, ElementNotFoundException {
ArrayList<Expression> exp = new Parser(func).parse();
ElementLibrary library = new ElementLibrary();
CircuitBuilder cb = new CircuitBuilder(new ShapeFactory(library));
cb.addCombinatorial("Y", exp.get(0));
Circuit circ = cb.createCircuit();
Model model = new ModelCreator(circ, library).createModel(false);
model.init();
return model;
}
use of de.neemann.digital.builder.circuit.CircuitBuilder in project Digital by hneemann.
the class TableDialog method createCircuit.
private void createCircuit(boolean useJKff, ExpressionModifier... modifier) {
try {
CircuitBuilder circuitBuilder = new CircuitBuilder(shapeFactory, useJKff, model.getTable().getVars()).setModelAnalyzerInfo(model.getTable().getModelAnalyzerInfo());
new BuilderExpressionCreator(circuitBuilder, modifier).setUseJKOptimizer(useJKff).create(lastGeneratedExpressions);
Circuit circuit = circuitBuilder.createCircuit();
new Main.MainBuilder().setParent(TableDialog.this).setLibrary(library).setCircuit(circuit).setBaseFileName(filename).openLater();
} catch (ExpressionException | FormatterException | RuntimeException e) {
new ErrorMessage(Lang.get("msg_errorDuringCalculation")).addCause(e).show(this);
}
}
Aggregations