Difference between revisions of "Cpp Coding Standards/CODEDOC"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
Line 7: Line 7:
 
----
 
----
 
=== Summary ===
 
=== Summary ===
==== Describe Class Responsibility <span id="ClassResp">(ClassResp)</span> ====
+
==== Describe the Class Responsibility <span id="ClassResp">(ClassResp)</span> ====
 
Start the documentation of each class with a concise statement about its responsibility.
 
Start the documentation of each class with a concise statement about its responsibility.
  

Revision as of 12:16, 29 November 2006

Topic-Id: CODEDOCU

How to document code. There are two kinds of code comments:

  • Interface documentation to be extracted from a documentation tool. This here is called “documentation”.
  • Comments between code lines. Those are called “comments” here.

Summary

Describe the Class Responsibility (ClassResp)

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

Details

Clarify Function Behaviour (ClearBehave)

In function 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.

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.

Details

Format (Format)

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

Details


Personal tools