Download presentation
Presentation is loading. Please wait.
Published byClaribel O’Connor’ Modified over 8 years ago
1
Problem Solving With C++ Doxygen Oct/Nov 2016
2
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.
3
Example The generic syntax of documentation comments is to start a comment with an extra asterisk after the leading comment delimiter '/*': /** @param Description of method's or function's input parameter @param... @return Description of the return value */
4
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. /// /// @param Description of method's or function's input parameter /// @param... /// @return Description of the return value /*! *... text... */
5
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 }
6
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
7
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
8
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.