Problem Solving With C++ Doxygen Oct/Nov 2016
Introduction Doxygen is a documentation generator, a tool for writing software reference documentation. The documentation is written within code, and is thus relatively easy to keep up to date. Doxygen extracts documentation from source file comments. Doxygen can generate output in HyperText Markup Language (HTML), LaTeX, Portable Document Format (PDF) etc. It also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.
Example The generic syntax of documentation comments is to start a comment with an extra asterisk after the leading comment delimiter '/*': Description of method's or function's Description of the return value */
Example Many programmers avoid using C-style comments and instead use C++ style single line comments. Doxygen accepts comments with additional slash as Doxygen comments. /// Description of method's or function's input parameter Description of the return value /*! *... text... */
Putting documentation after members If you want to document the members of a file, struct, union, class, or enum, it is sometimes desired to place the documentation block after the member instead of before. For this purpose you have to put an additional < marker in the comment block. Note that this also works for the parameters of a function. int var; /*!< Detailed description after the member */ int var; /**< Detailed description after the member */ int var; //!< Detailed description after the member //!< /** * Constructor that sets the time to a given value. */ Time (int timemillis /// ) { // the code }
Important Options within Configuration file: PROJECT_NAME = 'My Project' INPUT = “Input Class Directory“ OUTPUT_DIRECTORY = “Output Directory” GENERATE_HTML = YES HTML_OUTPUT=“HTML Output directory” HTML_FILE_EXTENSION=.html
Creating DoxyGen Config file doxygen –g Config This will create a default doxygen configuration file. doxygen config This will generate the documentations in form of HTML files, which can viewed for later use
Assignment 1.Copy the sample files using the following command. cp ~cs253/skmishra/doxygen/*. 2. Now try to generate documentation for PA7 using doxygen tool.