Difference between revisions of "Cpp Coding Standards"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
m
Line 1: Line 1:
 
This page gathers rules, advice and best practices for developing with C++ in the [[OpenOffice.org]] project.
 
This page gathers rules, advice and best practices for developing with C++ in the [[OpenOffice.org]] project.
 
----
 
----
=== Class Design ===
+
* [[/Topics/CLSDESIGN | Class Design]]
General hints for class design. Items referring to constructors, destructors, copying and allocation (of classes) reside in topic “Class Initialization”. Items referring to virtual classes in hierarchies reside in “Hierarchies of Virtual Classes”. Encapsulation related items are in topic “Encapsulation”.
+
* [[/Topics/CLSINIT | Class Construction, Destruction and Copying]]
 
+
* [[/Topics/CODEDOCU | Code Documentation]]
==== OneResponsibility ====
+
* [[/Topics/DESIGN | Design]]
Give one class only one cohesive responsibility.
+
* [[/Topics/ENC | Encapsulation]]
 
+
* [[/Topics/ERR | Error Handling]]
==== Inherit ====
+
* [[/Topics/FORMAT | Code Format]]
Inherit to be reused, not to reuse. Else prefer composition over inheritance.
+
* [[/Topics/FDESIGN | Function Design]]
 
+
* [[/Topics/FIMPL | Function Implementation]]
==== NoImplicitConversions ====
+
* [[/Topics/GEN | General Coding]]
Make single argument constructors “explicit”. Be aware of default arguments.
+
* [[/Topics/HEADERS | Header Files]]
Do not provide operator TYPE() functions.
+
* [[/Topics/HIERARCHY | Hierarchies of Virtual Classes]]
 
+
* [[/Topics/IFC | Interfaces]]
==== SpecificNewDelete ====
+
* [[/Topics/OBSOLETE | Obsolete Habits]]
When you provide a class-specific new or delete with custom parameters, provide the corresponding new or delete as well. (Not doing this causes memory leaks.)
+
* [[/Topics/SECURITY | Security]]
If you provide one class specific new, this hides all other variants of new. So you probably want to provide also the three all of the standard forms of new (plain, nothrow and inplace).
+
* [[/Topics/STL | The C++ Standard Template Library]]
 
+
* [[/Topics/TYPE | Type Safety]]
 
+
Class Construction, Destruction and Copying
+
 
+
=== Code Documentation ===
+
=== Design ===
+
=== Encapsulation ===
+
=== Error Handling ===
+
=== Code Format ===
+
=== Function Design ===
+
=== Function Implementation ===
+
=== General Coding ===
+
=== Header Files ===
+
=== Hierarchies of Virtual Classes ===
+
=== Interfaces ===
+
=== Obsolete Habits ===
+
=== Security ===
+
=== The C++ Standard Template Library ===
+
=== Type Safety ===
+

Revision as of 10:43, 27 November 2006

This page gathers rules, advice and best practices for developing with C++ in the OpenOffice.org project.


Personal tools