Difference between revisions of "Cpp Coding Standards/CODEDOC"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m
Line 15: Line 15:
 
----
 
----
 
=== Explanations ===
 
=== Explanations ===
 +
[[../CLSDESIGN]]
  
 
----
 
----
 
[[Category:CodingStandards]]
 
[[Category:CodingStandards]]

Revision as of 11:37, 28 November 2006

Code Documentation

How to document code. There are two kinds of code comments: Interface documentation to be extracted from a documentation tool. This will be called “documentation” in the following. And comments between code lines, those will be called “comments” here.


Summary

ClassResponsibility

Start the documentation of each class with a concise statement about its responsibility.

ClearFunctionBehaviour

In function documentation, do not comment the obvious. Do not repeat information that is in the function name or parameter types or names. There may well be functions that need no further documentation.

Do document, when any of the pre- or postconditions of a function is not unambiguously clear. Document, when the behavior in error cases is unclear.

Format

In documentation, adhere to the documentation tags and format as described in http://tools.openoffice.org/autodoc/HowToWriteDocumentation-Cpp.html.


Explanations

Cpp Coding Standards/CLSDESIGN


Personal tools