public void write(SourceWriter w) { w.indent().append("while (!_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (!_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void write(SourceWriter w) { w.indent().append("while (_FN.isTrue("); condition.write(w); w.append(")) {\n"); w.inc(); statement.write(w); w.dec(); w.line("}"); }
public void writeDefaultValue(SourceWriter w) { if (!(left instanceof Variable)) { throw new IllegalStateException("Cannot write default value unless this is a declaration"); } w.indent().append("if (Double.isNaN(").append(left).append(")) {").newLine(); w.inc(); w.indent().append(this).append(";").newLine(); w.dec(); w.line("}"); }
public void writeDefaultValue(SourceWriter w) { if (!(left instanceof Variable)) { throw new IllegalStateException("Cannot write default value unless this is a declaration"); } w.indent().append("if (Double.isNaN(").append(left).append(")) {").newLine(); w.inc(); w.indent().append(this).append(";").newLine(); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listVariable); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listLiteral); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listLiteral); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { w.indent().append("for(Double ").append(loopVariable).append(" : ").append(listVariable); w.append(") {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
w.inc(); w.inc(); w.indent().append("super(new String[] {"); globals.listNames(w); w.inc(); for (Map.Entry<String, String> entry : options.entrySet()) { String name = entry.getKey(); w.inc(); if (w.isInternalBaseClass()) { for (String sourceImage : sourceImages) { w.line("public double evaluate(double _x, double _y) {"); w.inc(); w.inc(); w.line("setDefaultBounds();"); w.dec(); w.line("}"); w.line("if (!_imageScopeVarsInitialized) {"); w.inc(); w.line("initImageScopeVars();"); w.dec();
w.inc(); w.inc(); w.indent().append("super(new String[] {"); globals.listNames(w); w.inc(); for (Map.Entry<String, String> entry : options.entrySet()) { String name = entry.getKey(); w.inc(); if (w.isInternalBaseClass()) { for (String sourceImage : sourceImages) { w.line("public double evaluate(double _x, double _y) {"); w.inc(); w.inc(); w.line("setDefaultBounds();"); w.dec(); w.line("}"); w.line("if (!_imageScopeVarsInitialized) {"); w.inc(); w.line("initImageScopeVars();"); w.dec();
@Override public void write(SourceWriter w) { String lowVariable = "_lo" + loopVariable; String highVariable = "_hi" + lowVariable; w.indent().append("final int ").append(lowVariable).append(" = (int) (").append(low).append(");").newLine(); w.indent().append("final int ").append(highVariable).append(" = (int) (").append(high).append(");").newLine(); w.indent().append("for(int ").append(loopVariable).append(" = ").append(lowVariable); w.append("; ").append(loopVariable).append(" <= ").append(highVariable); w.append("; ").append(loopVariable).append("++) {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }
@Override public void write(SourceWriter w) { String lowVariable = "_lo" + loopVariable; String highVariable = "_hi" + lowVariable; w.indent().append("final int ").append(lowVariable).append(" = (int) (").append(low).append(");").newLine(); w.indent().append("final int ").append(highVariable).append(" = (int) (").append(high).append(");").newLine(); w.indent().append("for(int ").append(loopVariable).append(" = ").append(lowVariable); w.append("; ").append(loopVariable).append(" <= ").append(highVariable); w.append("; ").append(loopVariable).append("++) {").newLine(); w.inc(); statement.write(w); w.dec(); w.line("}"); }