void generateConfig(CNode root, NormalizedDefinition nd) {
        try{
            StringWriter headerWriter = new StringWriter();
            StringWriter bodyWriter = new StringWriter();
            writeHeaderFile(headerWriter, root);
            writeBodyFile(bodyWriter, root, relativePathUnderRoot, nd);

            String newHeader = headerWriter.toString();
            String newBody = bodyWriter.toString();

            String prefix = "";
            if (relativePathUnderRoot != null) {
                prefix = relativePathUnderRoot + "/";
            }
            File headerFile = new File(rootDir, prefix + getFileName(root, "h"));
            File bodyFile = new File(rootDir, prefix + getFileName(root, "cpp"));

            writeFile(headerFile, newHeader);
            writeFile(bodyFile, newBody);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
This class autogenerates C++ code for the C++ config, based on a CNode tree given.
configgen/src/main/java/com/yahoo/config/codegen/CppClassBuilder.java