Difference between revisions of "Cpp Coding Standards/FDESIGN"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (correcting links)
Line 15: Line 15:
 
----
 
----
 
=== Related Rules ===
 
=== Related Rules ===
* [[../Function Implementation#Short | FIMPL:Short]] - Short Functions
+
* [[../FIMPL#Short | FIMPL:Short]] - Short Functions
* [[../Interfaces#Consi |IFC:Consi]] - Consistency
+
* [[../IFC#Consi |IFC:Consi]] - Consistency
* [[../Interfaces#Over |IFC:Over]] - Unambiguous Overloads
+
* [[../IFC#Over |IFC:Over]] - Unambiguous Overloads
  
 
----
 
----
 
[[Category:Coding Standards]]
 
[[Category:Coding Standards]]

Revision as of 16:10, 22 May 2007

Function Design (FDESIGN) - Summary

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

One Task (OneTask)

Give a 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