10 Pages

B Documentation with Doxygen

Write a description for every class, method, and procedure you create. Explain what the input parameters represent (and what the valid ranges for these variables are) and what the output means. Include descriptions of what the variables inside the procedure mean. This vital step in programming takes a bit of effort, but ultimately saves you hours.

Over time, you will develop a personal library of classes and procedures. At some point you will want to reuse a class or procedure you have already created. If you don’t document, you will spend nearly as much time trying to figure out what the procedure is for as it would take to rewrite it! The most likely reader of your comments is you. However, a colleague might

learn that you have created a C++ class that he or she would like to use in another project. Your comments will make your colleague’s work much simpler (and your colleague won’t be repeatedly visiting your office asking you what the procedures do and what the parameters represent).