code.addLine(TabbedLine("#define " + decl.name + " "
+ SpecNaming.StateInst + "->" + decl.name));
}
- code.addLine(TabbedLine(ShortComment("User-defined intial state code")));
+ if (!globalConstruct.autoGenInitial)
+ code.addLine(TabbedLine(ShortComment("User-defined state intialization code")));
+ else
+ // Auto-generated the initialization function
+ code.addLine(TabbedLine(ShortComment("Auto-generated state intialization code")));
// Align the code with one tab
globalConstruct.initState.align(1);
code.addLines(globalConstruct.initState);
fieldsInit.align(1);
code.addLines(fieldsInit);
code.addLine("");
- code.addLine(TabbedLine(ShortComment("Execute the print-out")));
+ if (!globalConstruct.autoGenPrint)
+ code.addLine(TabbedLine(ShortComment("Execute user-defined state printing code")));
+ else
+ // Auto-generated the copy function
+ code.addLine(TabbedLine(ShortComment("Execute auto-generated state printing code")));
+
// Align the code with one tab
globalConstruct.printState.align(1);
code.addLines(globalConstruct.printState);
code.addLines(fieldsInit);
construct.print.align(1);
- code.addLine(TabbedLine(ShortComment("Execute Print")));
+ if (!construct.autoGenPrint)
+ code.addLine(TabbedLine(ShortComment("Execute user-defined value printing code")));
+ else
+ // Auto-generated the value printing function
+ code.addLine(TabbedLine(ShortComment("Execute auto-generated value printing code")));
code.addLines(construct.print);
code.addLine("}");