public void writeSlimeConstructor(Writer w, CNode node, String parent, boolean root) throws IOException {
        String tmpName = getTypeName(node, false);
        String typeName = root ? getInternalClassName(node) : tmpName;
        String indent = "    ";
        if (root) {
            w.write(""
                    + typeName + "::" + typeName + "(const ::config::ConfigPayload & __payload)\n"
                    + "{\n");
        } else {
            w.write(""
                    + parent + typeName + "(const ::config::ConfigPayload & __payload)\n"
                    + "{\n");
        }
        w.write(indent + "const vespalib::slime::Inspector & __inspector(__payload.get());\n");
        for (CNode child : node.getChildren()) {
            String childName = getIdentifier(child.getName());
            String childType = getTypeName(child, false);
            String childInspector = "__inspector[\"" + child.getName() + "\"]";
            if (child.isArray) {
                String inserterName = "__" + childName + "Inserter";
                String childVectorType = getTypeName(child, true);
                w.write(indent + "::config::internal::VectorInserter<" + childVectorType);
                if (child instanceof LeafCNode.EnumLeaf) {
                    w.write(", Internal" + childType + "Converter");
                }
                w.write("> " + inserterName + "(" + childName + ");\n");
                w.write(indent + childInspector + ".traverse(" + inserterName + ");\n");
            } else if (child.isMap) {
                String inserterName = "__" + childName + "Inserter";
                w.write(indent + "::config::internal::MapInserter<" + childType);
                if (child instanceof LeafCNode.EnumLeaf) {
                    w.write(", Internal" + childType + "Converter");
                }
                w.write("> " + inserterName + "(" + childName + ");\n");
                w.write(indent + childInspector + ".traverse(" + inserterName + ");\n");
            } else {
                w.write(indent + childName + " = ");
                if (child instanceof LeafCNode.EnumLeaf) {
                    w.write("Internal" + childType + "Converter");
                } else {
                    w.write("::config::internal::ValueConverter<" + childType + ">");
                }
                if (child instanceof LeafCNode && ((LeafCNode) child).getDefaultValue() != null) {
                    LeafCNode leaf = (LeafCNode) child;
                    String defaultValue = getDefaultValue(leaf);
                    if (leaf.getType().equals("enum")) {
                        defaultValue = getTypeName(leaf, false) + "::" + defaultValue;
                    }
                    w.write("()(" + childInspector + ", " + defaultValue + ");\n");
                } else if (child instanceof InnerCNode) {
                    w.write("()(" + childInspector + ");\n");
                } else {
                    w.write("()(\"" + child.getName() + "\", " + childInspector + ");\n");
                }
            }
        }
        w.write("}\n\n");
    }
\n");
        do {
            String current;
            // Extract first line to write
            int newLine = comment.indexOf('\n');
            if (newLine == -1) {
                current = comment;
                comment = "";
            } else {
                current = comment.substring(0, newLine);
                comment = comment.substring(newLine + 1);
            }
            // If line too long, cut it in two
            if (current.length() > maxLineLen) {
                int spaceIndex = current.lastIndexOf(' ', maxLineLen);
                if (spaceIndex >= maxLineLen - 15) {
                    comment = current.substring(spaceIndex + 1)
                              + "\n" + comment;
                    current = current.substring(0, spaceIndex);
                } else {
                    comment = current.substring(maxLineLen) + "\n" + comment;
                    current = current.substring(0, maxLineLen) + "-";
                }
            }
            w.write(indent + (javadoc ? " * " : "// ") + current + "\n");
        } while (comment.length() > 0);
        if (javadoc) w.write(indent + "
configgen/src/main/java/com/yahoo/config/codegen/CppClassBuilder.java