Exercise index of this lecture   Alphabetic index   Course home   

Documentation of Object-oriented Programs

15.1   Install Doxygen  

Download and install the latest version of Doxygen from www.doxygen.org on your computer. Consult the information about Doxygen on the accompanying slide. Also, consult our simple example of BankAccount documentation made by Doxygen.

More specifically on Windows (as of February 2010) go to the Doxygen Download page and download the binary distribution doxygen-1.6.3-setup.exe. The direct link is here. After installation, start the Doxywizard.

Consult the Doxygen documentation, maybe in particular the documentation of the GUI front-end. In addition, read Dan Jensens note Installing and Using Doxygen.


15.2   Give Doxygen a Try  

This exercise is guided tour in using Doxygen together with Visual C# 2008 Express. The exercise will help you set up the BankAccount documentation example, which we have seen on an earlier slide page in this lecture.

We will assume that you already have installed Doxygen and that you use Visual C# 2008 Express.

Start Visual C# 2008 Express. Use File > New Project... and make (at least in this exercise) a Class Library project.

Insert the BankAccount class in Visual C# 2008 Express in the usual way.

Do File > Save All. Notice the location of you project. On a piece of paper (or in a text editor) notice the full file path to your Visual C# 2008 project.

Start the Doxywizard program, which comes together with Doxygen.

In the Wizard > Project field: Give a name to your project. Just chose a suitable name.

In the Source Code Directory field, select the full path to the directory where Visual C# 2008 Express stores the source files. This is the directory in which Visual C# 2008 express stores the files with .cs file extension. You find this directory inside the Visual C# 2008 express project directory, which you captured earlier in this exercise. Relative to the way C# source programs are organized, it is usually not necessary to select Scan recursively.

In the Destination directory field select the directory in which you want to store the documentation which Doxygen generates. An existing directory of your choice.

In Wizard > Mode select the extraction mode. Try first documented entities only. It is recommended that you explicitly document the entries which appear in your documentation. Select the Java or C# programming language option.

In Wizard > Output select one of the HTML options (try first plain HTML). Deselect LaTeX.

In Doxygen, save the doxygen setup via File > Save or File > SaveAs.... This will make a file called Doxyfile. The Doxyfile contains all the settings of Doxygen. At another occasion, you can continue working on a particular batch of documentation by doing a File > Open... on the Doxyfile.

Now, in the Run tab, activate the button Run doxygen.

Use the button Show HTML output to look at the generated HTML documentation in your browser.


Notice that Doxygen is a very rich tool. Take a look at some of the Expert options in the DoxyWizard. There exists another note, written by a former student, Dan Jensen. You are encouraged read Dans note as your next step in getting familiar with Doxygen.


15.3   Documentation of class Set  

In a previous exercise we have worked with the class Set<T>.

Write documentation for the operations insersection, union, and diff (set difference). If you have time and energy, also write documentation for other members.

Generate Doxygen documentation for the class.

You may also want to generate XML documentation for the class.

The natural starting point of this exercise is your own solution to the previous exercises. You can also chose to document my solution.



Generated: Monday February 7, 2011, 12:24:05