Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Coding Style

Sourcecode Indention

Example:

 void foo(float x, float y) {
     if (x > y) {
         bar(x);
     } else {
         bar(y);
     }
 }

Naming Conventions

Classes are named Lsg<real class name>. Class names start with a capital letter. If multiple words form a class name, they are combined with every word starting with a capital letter.

Class methods are named <Classname>_<method name>. Method names start with a lower-case letter. If multiple words form a method name, all except the first start with a capital letter.

Examples:

Classes

Classes mostly consist of two files, a header and a source file. Extremely large classes my use more than one source file. The filenames should not contain the lsg prefix.

The header file defines the class structure and all non-static function prototypes. For any virtual method that is not overriden, a define mapping the method to the parent classes implementation, should be included.


(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen