Kurt Nørmark ©
Department of Computer Science, Aalborg University, Denmark
Abstract Previous lecture Next lecture Index References Contents | This lecture is about documentation of object-oriented programs. |
Documentation of Object-oriented Programs |
Program Documentation Slide Annotated slide Contents Index References Textbook |
|
|
Program Documentation - When and Where? Slide Annotated slide Contents Index References Textbook |
|
Documentation of C# Programs Slide Annotated slide Contents Index References Textbook |
|
|
|
A documentation example in C# Slide Annotated slide Contents Index References Textbook |
|
Program: The class BankAccount - with documentation comments. |
|
Program: The generated XML documentation - augmented manually with xml-stylesheet clause. |
|
|
Figure. A screenshot of the HTML rendering of the XML documentation file |
The XML Documentation Language for C# Slide Annotated slide Contents Index References Textbook |
|
|
|
|
|
Tool support: The C# Compiler Slide Annotated slide Contents Index References Textbook |
|
|
Tool support: Doxygen Slide Annotated slide Contents Index References Textbook |
|
|
Exercise 15.3. 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. |
Exercise 15.3. 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. |
Tool support: Other possibilities Slide Annotated slide Contents Index References Textbook |
|
Another documentation example in C# Slide Annotated slide Contents Index References Textbook |
|
|
Program: The base class BankAccount. |
|
Program: The class CheckAccount. |
|
Program: The class SavingsAccount. |
|
Program: The class LotteryAccount. |
|
Program: The singleton class Lottery - used by LotteryAccount. |
|
|
Exercise 15.4. 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. |
Conclusion - Documentation of C# Programs Slide Annotated slide Contents Index References Textbook |
|
|
Project Recommendations |
Documentation Recommendations Slide Annotated slide Contents Index References Textbook |
|
|
|
Chapter 15: Documentation of Object-oriented Programs
Course home Author home About producing this web Previous lecture (top) Next lecture (top) Previous lecture (bund) Next lecture (bund)
Generated: February 7, 2011, 12:23:38