A brief introduction to doxygen - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

A brief introduction to doxygen

Description:

A brief introduction to doxygen What does a compiler do? A compiler ignores comments and processes the code. What does doxygen do? It ignores the code and processes ... – PowerPoint PPT presentation

Number of Views:167
Avg rating:3.0/5.0
Slides: 14
Provided by: George872
Category:

less

Transcript and Presenter's Notes

Title: A brief introduction to doxygen


1
A brief introduction to doxygen
2
What does a compiler do?
  • A compiler ignores comments and processes the
    code.
  • What does doxygen do?
  • It ignores the code and processes to comments.
  • Used to create HTML documentation.

3
Getting started with doxygen
  • Download from doxygen.org
  • Also on scott in /home/ggrevera/doxygen/bin
  • Do this only once in directory (folder)
    containing your source code
  • doxygen g
  • This creates a doxygen configuration file called
    Doxyfile which you may edit to change default
    options.
  • Edit Doxyfile and make sure all EXTRACTs are YES
  • For C (not C) development, also set
    OPTIMIZE_OUTPUT_FOR_C YES
  • Then whenever you change your code and wish to
    update the documentation
  • doxygen
  • which updates all documentation in HTML
    subdirectory

4
Using doxygen document every (source code) file
/ \file ImageData.java \brief contains
ImageData class definition (note that this
class is abstract) ltmore verbose
description heregt \author George J. Grevera,
Ph.D. / . . .
5
Using doxygen document every function
//------------------------------------------------
---------------------- / \brief JImageViewer
class. Longer description goes here.
/ public class JImageViewer extends JFrame
implements ActionListener . . .
6
Using doxygen document every function
//------------------------------------------------
---------------------- / \brief Main
application entry point. \param args Each
image file name in args will cause that image
to be displayed in a window. \returns
nothing / public static void main ( String
args ) if (args.length0) new
JImageViewer() else for (int i
0 i lt args.length i) new
JImageViewer(argsi)
7
Using doxygen document all class members (and
global and static variables in C/C)
//------------------------------------------------
---------------------- int mW ///lt
image width int mH ///lt image
height int mMin ///lt min image
value int mMax ///lt max image
value int mImage ///lt actual image
data //-------------------------------------------
---------------------------
8
Not every comment should be a doxygen comment.
  • Required
  • every file
  • every function/method
  • every class member (data)
  • (in C/C) every static and/or global variable
  • Use regular, plain comments in the body of a
    function/method. (One exception is the \todo.)

9
  • int mColorImageData ///lt should be
    mColorImageDatamHmW3
  • //----------------------------------------------
    ------------------------
  • / \brief Given a buffered image, this ctor
    reads the image data, stores
  • the raw pixel data in an array, and creates
    a displayable version of
  • the image. Note that this ctor is
    protected. The user should only
  • use ImageData.load( fileName ) to
    instantiate an object of this type.
  • \param bi buffered image used to construct
    this class instance
  • \param w width of image
  • \param h height of image
  • \returns nothing (constructor)
  • /
  • protected ColorImageData ( final BufferedImage
    bi, final int w, final int h )
  • mW w
  • mH h
  • mOriginalImage bi
  • mIsColor true
  • //format TYPE_INT_ARGB will be saved to
    mDisplayData
  • mDisplayData mOriginalImage.getRGB(0, 0,
    mW, mH, null, 0, mW)
  • mImageData new int mW mH 3

10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
Summary of most useful tags
  • \file
  • \author
  • \brief
  • \param
  • \returns
  • \todo (not used in assignments)
  • And many, many others.
Write a Comment
User Comments (0)
About PowerShow.com