Difference between revisions of "Cpp Coding Standards/FDESIGN"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m
Line 15: Line 15:
 
[[/CanOp|Details]]
 
[[/CanOp|Details]]
  
==== Unambiguous Parameter <span id="Params">(Params)</span> ====
+
==== Unambiguous Parameters <span id="Params">(Params)</span> ====
 
Mark parameter intention unambiguously. Out- and inout- parameters need to be distinguished unmistakably.  
 
Mark parameter intention unambiguously. Out- and inout- parameters need to be distinguished unmistakably.  
  

Revision as of 23:29, 29 November 2006

Topic-Id: FDESIGN

Design of functions and function prototypes. Items referring to code in function bodies, reside in topic FIMPL - Function Implementation.


Summary

One Task (OneTask)

Give one function only one cohesive task.

Details

Canonical Operators (CanOp)

Use canonical signatures for all operator overloads. Provide canonical behavior for arithmetic operators.

Details

Unambiguous Parameters (Params)

Mark parameter intention unambiguously. Out- and inout- parameters need to be distinguished unmistakably.

Use smart pointers as parameter type for objects on the heap, when the responsibility for deleting is unclear or transfered between caller and callee.

Details


Related Rules


Personal tools