Difference between revisions of "Cpp Coding Standards"

From Apache OpenOffice Wiki
Jump to: navigation, search
(sorting topics)
Line 1: Line 1:
This page gathers rules, advice and best practices for developing with C++ in the [[OpenOffice.org]] project.
+
=== Purpose ===
 +
[[Coding standards]] are a part of [[defect prevention]]. They gather rules, advice and best practices for developing software, especially the code writing part. Here are listed some ideas what such standards could be for developing with C++ and within the [[OpenOffice.org]] project.  
 +
 
 +
=== Identifying Rules ===
 +
To make it easier to talk about the rules, each one gets an identifier. Because, items can be added or sorted out, such ids should not be just cardinal numbers.
 +
 
 +
Here each rule belongs to a topic, which has an id, and has an id itself.
 +
Example: [[/Topics/FDESIGN#OneTask | FDESIGN:OneTask]] is the rule with the id "OneTask" which belongs to the topic [[/Topics/FDESIGN | function design]] with the id [[/Topics/FDESIGN | FDESIGN]].
 +
 
 
----
 
----
 +
=== Topics by Problem Domain ===
 +
''Topics may appear at multiple domains.''
 +
 +
==== Middle- and Lowlevel Design ====
 +
* [[/Topics/DESIGN | DESIGN]] - Design
 +
* [[/Topics/HIERARCHY | HIERARCHY]] - Hierarchies of Virtual Classes
 +
* [[/Topics/CLSDESIGN | CLSDESIGN]]- Class Design
 +
* [[/Topics/IFC | IFC]] - Interfaces
 +
* [[/Topics/FDESIGN | FDESIGN]] - Function Design
 +
 +
==== Classes ====
 +
* [[/Topics/CLSDESIGN | CLSDESIGN]]- Class Design
 +
* [[/Topics/HIERARCHY | HIERARCHY]] - Hierarchies of Virtual Classes
 +
* [[/Topics/IFC | IFC]] - Interfaces
 +
* [[/Topics/ENC | ENC]] - Encapsulation
 +
* [[/Topics/CLSINIT | CLSINIT]] - Class Construction, Destruction and Copying
 +
* [[/Topics/FDESIGN | FDESIGN]] - Function Design
 +
 +
==== Functions and Implementation Generally ====
 +
* [[/Topics/GEN | GEN]] - General Coding
 +
* [[/Topics/FDESIGN | FDESIGN]] - Function Design
 +
* [[/Topics/FIMPL | FIMPL]] - Function Implementation
 +
* [[/Topics/ERR | ERR]] - Error Handling
 +
* [[/Topics/SECURITY | SECURITY]] - Security
 +
 +
==== Preferred vs. Discarded Types and Habits ====
 +
* [[/Topics/STL | STL]] - The C++ Standard Template Library
 +
* [[/Topics/TYPE | TYPE]] - Type Safety
 +
* [[/Topics/OBSOLETE | OBSOLETE]] - Obsolete Habits
 +
 +
==== Files, Formatting, Documentation ====
 +
* [[/Topics/FORMAT | FORMAT]] - Code Format
 +
* [[/Topics/HEADERS | HEADERS]] - Header Files
 +
* [[/Topics/CODEDOCU | CODEDOCU]] - Code Documentation
 +
 +
----
 +
=== Topics in Alphabetical Order ===
 
* [[/Topics/CLSDESIGN | CLSDESIGN]]- Class Design
 
* [[/Topics/CLSDESIGN | CLSDESIGN]]- Class Design
 
* [[/Topics/CLSINIT | CLSINIT]] - Class Construction, Destruction and Copying
 
* [[/Topics/CLSINIT | CLSINIT]] - Class Construction, Destruction and Copying
Line 18: Line 63:
 
* [[/Topics/STL | STL]] - The C++ Standard Template Library
 
* [[/Topics/STL | STL]] - The C++ Standard Template Library
 
* [[/Topics/TYPE | TYPE]] - Type Safety
 
* [[/Topics/TYPE | TYPE]] - Type Safety
 +
 
----
 
----
 
[[Category:Coding Standards]]
 
[[Category:Coding Standards]]

Revision as of 16:46, 27 November 2006

Purpose

Coding standards are a part of defect prevention. They gather rules, advice and best practices for developing software, especially the code writing part. Here are listed some ideas what such standards could be for developing with C++ and within the OpenOffice.org project.

Identifying Rules

To make it easier to talk about the rules, each one gets an identifier. Because, items can be added or sorted out, such ids should not be just cardinal numbers.

Here each rule belongs to a topic, which has an id, and has an id itself. Example: FDESIGN:OneTask is the rule with the id "OneTask" which belongs to the topic function design with the id FDESIGN.


Topics by Problem Domain

Topics may appear at multiple domains.

Middle- and Lowlevel Design

Classes

Functions and Implementation Generally

Preferred vs. Discarded Types and Habits

Files, Formatting, Documentation


Topics in Alphabetical Order


Personal tools