*/
public static void printCtorDtorImpl(PrintStream stream, String className, String baseClass, boolean initMaps,
boolean errHandler, IGenerationDataProvider dataProvoider, String ctorParas,
List<String> initializationList, String ctorTmpl, String dtorTmpl) {
Config config = dataProvoider.getConfig();
// c-tor
stream.println(config.getOutputSourceFileMethodDelimiter());
stream.print(className + "::" + className + "(");
if (ctorParas != null) {
stream.print(" " + ctorParas);
if (errHandler) {
stream.print(",");
} else {
stream.print(" ");
}
}
if (errHandler) {
stream.print(" " + config.getNamespace() + "::" + config.getClassNamePublic() + "* impl, "
+ config.getBaseClassNamespace() + "::");
stream.println("IErrorHandler* errorHandler ");
}
stream.print(")");
if (errHandler) {
stream.print(config.getIndentation());
stream.println(": " + config.getBaseClassNamespace() + "::" + baseClass + "(impl, errorHandler)");
} else {
stream.println();
}
if (initializationList != null && !initializationList.isEmpty()) {
stream.print(config.getIndentation());
if (!errHandler) {
stream.print(": ");
} else {
stream.print(", ");
}
stream.println(initializationList.get(0));
for (int i = 1; i < initializationList.size(); i++) {
stream.print(config.getIndentation());
stream.print(", ");
stream.println(initializationList.get(i));
}
}
stream.println("{");
if (initMaps) {
stream.print(config.getIndentation());
stream.println(createInitFunctionMapMethodName() + "();");
stream.print(config.getIndentation());
stream.println(createInitNameMapMethodName() + "();");
}
if (ctorTmpl != null) {
stream.println(TemplateEngine.fillInTemplate(ctorTmpl, null, null, null, null, null, null, dataProvoider));
}
stream.println("}");
stream.println();
// d-tor
stream.println(config.getOutputSourceFileMethodDelimiter());
stream.println(className + "::~" + className + "()");
stream.println("{");
if (dtorTmpl != null) {
stream.println(TemplateEngine.fillInTemplate(dtorTmpl, null, null, null, null, null, null, dataProvoider));
}