CodingStyle
From OpenCity
Following the CodingStyle makes the program codes more consistent and more readable.
[edit]
General rules
- 80th column limit.
- 40 lines method/function's body limit.
- The "defines" are CAPITALIZED, and prefixed with "OC_"
- The "enum" types are prefixed with "OPENCITY_"
- There is one horizontal line which separates a function from another
- Doxygen things when it's useful
- The tab size is 4 spaces
- Comments should be written with a lower indentation level than the concerned codes.
- Each class "MyClass" should have "MyClass.h" and "MyClass.cpp" files
[edit]
Class' member rules
- Each private member method's name will be prefixed by the class name. For example: all the private methods of the class "City" will have their names beginning with "city".
- Each member variable name starts by the "m" character
[edit]

