update codegen. add python code gen

This commit is contained in:
2023-10-10 10:39:27 +08:00
parent d003b28b2e
commit 0071e001fd
7 changed files with 226 additions and 73 deletions

View File

@ -5,8 +5,10 @@ import java.util.stream.Collectors;
* The nameof values writer for CK_CLASSID.
*/
public class ClassidWriter {
public static void writeAccVals(OutputStreamWriter writer, EnumsHelper.Enum_t classids) throws Exception {
IndentHelper indent = new IndentHelper(writer);
public static void writeAccVal(String filename, EnumsHelper.Enum_t classids) throws Exception {
OutputStreamWriter writer = CommonHelper.openOutputFile(filename);
IndentHelper indent = new IndentHelper(writer, CommonHelper.LangType.CPP);
indent.puts("const CkClassidReflectionArray CK_CLASSID {");
indent.inc();
@ -20,5 +22,7 @@ public class ClassidWriter {
indent.dec();
indent.puts("};");
writer.close();
}
}