Table of Contents
The output of gccxml (a patched gcc-3.3 c++ frontend) is parsed, and the declaration nodes (for namespaces, classes, class-templates etc.), which contain source file and line number information, are stored in maps (dictionaries). Additionally a (simple) parser scans the c++ files for comments in "javadoc" format and tags these to the nodes. Finally, documentation in "docbook" format is created.
Gathering the information from an xml output file, and collecting the comments from the c++ files already works. Formatting the output in docbook format is just at the beginning (help welcome). There are also a lot of other things to do: When multiple c++ source files are used, the output files created by gccxml must be merged (but i don't think that this will be a problem, since mangled names are unique)
gccxml Only creates information for templates, if they are
instantiated in the source files (since c++ compilers have to ignore
templates, if they aren't instantiated (or at least gcc-3.3 is doing so,
with gcc-3.4 i am not so sure)).
So one is forced to create dummy source files, in which the header files are included and the templates get instantiated. But on the other hand this is also a good check, if the templates are ok, and also a good regression test, so this doesn't bother me very much.
C++ source files:
Output created by
Docbook output created by
cniffxx (well, as i said,
formatting the output is just at the beginning:)):
(probably your browser resolves external entities, so
when clicking on
x1_index.xml you see
all three files as one.)
Docbook output rendered into html:
This is mainly a reminder for myself, pathnames reflect my local configuration.
gccxml from the command line:
C:\NORBERT\cniffxx-cvs\sandbox\sax_test1\input>gccxml x1.cpp -fxml=x1.xml
xalan from the command line:
C:\NORBERT\cniffxx-cvs\sandbox\sax_test1\output>xalan -v -o index.html index.xml
Project page with CVS, forum, etc.:
Financial help is welcome, since:
a) I could need a faster computer, using xml-tools written in java,
like Xalan etc., is too slow on my machine (a bit out of date,
b) a nice, working documentation tool based on gccxml, might encourage the gccxml developers to actively maintain gccxml, or even encourage the gcc developers themselves to add some xml export feature to their c++ frontend (and, of course, some financial reward, would also increase my own motivation to work on this project (and speed it up)).