Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Coding Standards

Indenting

Each level of indenting is two spaces, no tabs. Long conditionals may be split onto multiple lines, in which case the lines shall begin with a && or ||, and lined up with the first character after the opening parenthesis.

Curly Braces

Curly braces shall appear by themselves on a line, indented the same as the statement that opened them (if/for/etc).

Parenthesis

Items in a list inside parenthesis shall be spaced such that there is a space before the opening parenthesis, after the closing parenthesis (unless it is the end of a line), and after each comma inside the parenthesis.

Comments

Each file in the project shall begin with a standard GNU LGPL header consisting of C++ single-line style comments. After this, each file shall have a Doxygen comment documenting the file itself.

Doxygen comments shall use the Javadoc format of a slash and two asterisks for multi-line comments. Single line comments for data members and typedefs shall be a C++ comment with three forward slashes, plus a less-than sign if the comment documents a member before the comment.

All comments shall be preceded by a single blank line, except for comments marking a class or function definition. In those cases, comments shall be preceded by three blank lines.

Namespaces

Libdoomwad shall have a single namespace, "Doomwad". All library contents shall be contained in this namespace to avoid polluting the global namespace.

Preprocessor

Good C++ programming practices discourage use of the preprocessor except for conditional compilation, for example, for platform-specific code and to protect headers from multiple inclusion. Libdoomwad will use the preprocessor for the following tasks and only the following tasks: protecting from multiple inclusion; conditional compilation based on hardware platform, operating system, or compiler; DLL importing and exporting of symbols in Microsoft Windows; testing to make sure the compiler is C++.
Generated on Fri Jun 10 19:38:51 2005 for libdoomwad by  doxygen 1.4.0