Docclass revision 1.9 Docclass is a simple C++ program which reads in C++ header files, and outputs documentation describing the class hierarchy, methods, inherited methods etc. This version removes compiler errors/warnings for Borland C++, and no longer core dumps when called with no arguments under Unix. All output is now through an OutputProcessor class, which can be subclassed if you want fancy printer output. Docclass has a rather dumb parser, but it should cope with reasonably sane C++ class declarations. It understands comments, and tries to group the comments with the appropriate class or method. Some things you should know ... The files provided were prepared on a DOS machine. Unix users will have to remove the ^M ('\r') characters at the end of each line. Most Unix users will also need to rename docclass.cpp - I use docclass.C, so that g++ recognises it as a C++ source file. The special comment //! or /*!*/ tells docclass to ignore the thing to which it is attached. If such a comment is not attached to anything, then the rest of the current file or class declaration is ignored. You need to run docclass on ALL the header files in a class hierarchy to get complete output. To this end, DOS users should link with the command line expansion utility provided with your compiler (e.g. _mainl.obj for Zortech C++). DOS users are recommended to use large model. Docclass does not require templates, or nested classes, as many people have C++ compilers which don't support them. With any luck, it should understand them a little in the code it analyses, though. To compile under Zortech C++ ... ztc -g -mli docclass.cpp _mainl.obj To compile under Borland C++ ... bcc -ml -N -y -vi docclass.cpp ..\lib\wildargs.obj To compile under GNU C++ First strip all the ^M (carriage return) characters from all the files (including this one). Use your favourite editor. (In vi, try ":1,$ s /^V^M//".) mv docclass.cpp docclass.C g++ -g docclass.C -o docclass I would be grateful if users would contact me with command lines for other compilers. Docclass is Copyright (c) Trumphurst Ltd. I have made it available on the Internet for personal use only. Please do not use it in a commercial situation (except for testing to see if it is suitable) without first obtaining permission (mail address below). It is available for public ftp from http://www.trumphurst.com/docclass.phtml Comments, improvements etc. should be sent via out contact form. Trumphurst Ltd. reserve the right to remove the program from public distribution at any time. Please note that I originally called this program "classdoc", but that name conflicts with the classdoc package written by dag@control.lth.se (Dag Bruck). His package, written in AWK, produces UNIX-style manual pages from C++ class headers. If you are interested in automatic documentation, you might want to look at this too. Nikki Locke