Neverending ODC
Coding Conventions 1.3.0

Holger Dammertz

Abstract: This are the coding conventions for Neverending ODC. They have to be applied to all C++ code written for the client and server of the project. If you find inconsistencies, errors or have some further additions, please contact me.

Table of Contents

1  General

2  Formatting Conventions

There will be an astyle2 configuration file, that formats the code appropriately. This should be used before committing large chunks of code.

In the doc folder of the client project directory you will find two template files (for .cpp and .h) that can be copy-pasted in your new source file and contain all described seperators and the order of all parts.

3  Naming Conventions

3.1  General

3.2  Class Naming

3.3  Method Naming

3.4  Member Variable Naming

3.5  Singleton classes

4  Documentation

5  In-Development comments (Gotchas)

After each gotcha keyword, the current date could appear:
!!TODO: 2002/08/27 description of task

5.1  Gotcha keywords

!!TODO: topic
Means there is more to do here that you should not forget.
!!BUG: description
There is a known bug but either you don't how to fix it or you have sth. more important to do.
!!UGLY:
When you've done something ugly say so and explain how you would do it differently next time if you had more time.
!!OPT:
You know, that sth. could be done significantly faster but have no time to do it yet; so explain here what could be optimized, and why it is better/faster.
!!FIXME:
The primordial gotcha (similar to !!TODO: but the task should be done quite fast)
!!TRICKY:
The following code was done a bit tricky and you should explain why you have not done it simpler.
The keywords are marked special so you can find them eaysily by searching for !! in your source files. It is also possible to create a tool that automatically generates a report.

References

[1]
C/C++ Kompendium - Dirk Louis - 1998 Markt und Technik, Buch und Software-Verl.
ISBN 3-8272-5386-1
[2]
C++ Coding Standard - Tedd Hoff - 2000
http://www.cs.umd.edu/users/cml/cstyle/CppCodingStandard.html
[3]
Programming in C++, Rules and Recommendations -
FN/Mats Henricson and Erik Nyquist - 1992
http://www.cs.umd.edu/users/cml/cstyle/Ellemtel-rules.html
[4]
OGRE Coding Standards - http://ogre.sourceforge.net
[5]
Thinking in C++, 2nd ed. Volume 1 - Bruce Eckel - 2000
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

1
This is a class where normally only one instance will be created
2
astyle (Artistic Style) is a automatic code beautifier: http://astyle.sourceforge.net/
3
http://www.stack.nl/ dimitri/doxygen/

This document was translated from LATEX by HEVEA.