write some boring struct in VxTypes
This commit is contained in:
24
CodeGen/EnumsMigration/ErrorsWriter.java
Normal file
24
CodeGen/EnumsMigration/ErrorsWriter.java
Normal file
@ -0,0 +1,24 @@
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
/**
|
||||
* The nameof values writer for CKERROR
|
||||
*/
|
||||
public class ErrorsWriter {
|
||||
public static void writeAccVals(OutputStreamWriter writer, EnumsHelper.Enum_t errors) throws Exception {
|
||||
IndentHelper indent = new IndentHelper(writer);
|
||||
|
||||
indent.puts("const CkErrorReflectionArray CKERROR {");
|
||||
indent.inc();
|
||||
for (EnumsHelper.EnumEntry_t entry : errors.mEntries) {
|
||||
String comment = CommonHelper.escapeString(entry.mEntryComment);
|
||||
if (comment == null)
|
||||
comment = "";
|
||||
|
||||
indent.printf("{ LibCmo::CK2::CKERROR::%s, { \"%s\", \"%s\" } },", entry.mEntryName, entry.mEntryName,
|
||||
comment);
|
||||
}
|
||||
indent.dec();
|
||||
indent.puts("};");
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user