System.err.println("Writing header '" + (new File(destPath + System.getProperty("file.separator") + implName)).getAbsolutePath() + "'");
System.err.println("Writing implementation '" + (new File(destPath + System.getProperty("file.separator") + implName)).getAbsolutePath() + "'");
  public void convert() throws TestLangParseException, TestLangRuntimeException {    header.addLine("#ifndef _H_" + headerName.substring(0, headerName.lastIndexOf('.')));    header.addLine("#define _H_" + headerName.substring(0, headerName.lastIndexOf('.')));    header.addLine("#include \"EventAggregator.hh\"");    header.addLine("#include \"AggregateListener.hh\"");        header.addLine("#include \"Test.hh\"");    header.addLine("#include \"TestSet.hh\"");    header.addLine("#include \"Assertion.hh\"");    header.addLine("#include \"StringDomain.hh\"");    header.addLine("namespace Prototype {");    header.indent();    impl.addLine("#include \"" + headerName + "\"");    impl.addLine("#include <iostream>");    impl.addLine("namespace Prototype {");    impl.indent();    convertTestSet(testTree);    AssertionGenerator.toCpp(header, impl);    TestSetGenerator.toCpp(header);    impl.unindent();    impl.addLine("}");    header.unindent();    header.addLine("}");    header.addLine("namespace " + rootTestName + "_TestHidden {");    header.indent();    header.addLine("static Prototype::" + rootTestName + "* test;");    header.unindent();    header.addLine("}");    header.addLine("void testLangInit(const Prototype::PlanDatabaseId& db, const Prototype::DecisionManagerId& dm = Prototype::DecisionManagerId::noId(),");    header.indent();    header.addLine("\tconst Prototype::ConstraintEngineId& ce = Prototype::ConstraintEngineId::noId(),");    header.addLine("\tconst Prototype::RulesEngineId& re = Prototype::RulesEngineId::noId()) {");    header.addLine("Prototype::EventAggregator::instance(dm, ce, db, re);");    header.addLine(rootTestName + "_TestHidden::test = new Prototype::" + rootTestName + "(db);");    header.unindent();    header.addLine("}");    header.addLine("void testLangDeinit() {");    header.indent();    header.addLine(rootTestName + "_TestHidden::test->dumpResults();");    header.addLine("delete " + rootTestName + "_TestHidden::test;");    header.addLine("Prototype::EventAggregator::remove();");    header.unindent();    header.addLine("}");    header.addLine("#endif");    try {      System.err.println("Writing header '" + (new File(destPath + System.getProperty("file.separator") + headerName)).getAbsolutePath() + "'");      header.write(new FileOutputStream(new File(destPath + System.getProperty("file.separator") + headerName)));      System.err.println("Writing header '" + (new File(destPath + System.getProperty("file.separator") + implName)).getAbsolutePath() + "'");      impl.write(new FileOutputStream(new File(destPath + System.getProperty("file.separator") + implName)));    }    catch(IOException ioe){ioe.printStackTrace(); System.exit(-1);}  }