Package me.pixodro.j2cpp.core.rewrite

Examples of me.pixodro.j2cpp.core.rewrite.ASTWriter


      }
    }
  }

  private String generateHeader(final CompilationUnitInfo compilationUnitInfo) {
    final ASTWriter writer = new ASTWriter();
    final StringBuffer output = new StringBuffer();
    output.append("#ifndef __").append(compilationUnitInfo.getName()).append("_H_\n");
    output.append("#define __").append(compilationUnitInfo.getName()).append("_H_\n");
    output.append("\n");
    for (final String include : compilationUnitInfo.hppStdIncludes) {
      output.append("#include <").append(include).append(">\n");
    }
    // for (final String include : compilationUnitInfo.hppIncludes) {
    // output.append("#include \"").append(include).append(".h\"\n");
    // }
    output.append("\n");
    output.append(writer.write(compilationUnitInfo.getHpp()));
    output.append("\n");
    output.append("#endif //__").append(compilationUnitInfo.getName()).append("_H_\n");
    return output.toString();
  }
View Full Code Here


    output.append("#endif //__").append(compilationUnitInfo.getName()).append("_H_\n");
    return output.toString();
  }

  private String generateCompilationUnit(final CompilationUnitInfo compilationUnitInfo) {
    final ASTWriter writer = new ASTWriter();
    final StringBuffer output = new StringBuffer();
    for (final String include : compilationUnitInfo.cppStdIncludes) {
      output.append("#include <").append(include).append(">\n");
    }
    // for (final String include : compilationUnitInfo.cppIncludes) {
    // output.append("#include \"").append(include).append(".h\"\n");
    // }
    output.append("#include \"").append(compilationUnitInfo.getName()).append(".h\"\n");
    output.append("\n");
    output.append(writer.write(compilationUnitInfo.getCpp()));
    return output.toString();
  }
View Full Code Here

TOP

Related Classes of me.pixodro.j2cpp.core.rewrite.ASTWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.