User Tools

Site Tools


for_developers:style_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
for_developers:style_guide [2015/04/01 10:37] – external edit 127.0.0.1for_developers:style_guide [2021/06/09 18:31] (current) – [Code Documentation] ursgraf
Line 1: Line 1:
 ====== Coding Style Guide ====== ====== Coding Style Guide ======
  
-EEROS is written primarily in C++, and its developers follow the [[https://google-styleguide.googlecode.com/svn/trunk/cppguide.html|Google C++ Style Guide]] with some modifications:+EEROS is written primarily in C++, and its developers follow the [[https://google.github.io/styleguide/cppguide.html|Google C++ Style Guide]] with some modifications:
  
 === #define Guards === === #define Guards ===
Line 24: Line 24:
  
 === File Names and Extensions === === File Names and Extensions ===
- +  * File names 
-File names+    File names should be the same as the class name. For example, for the class ExampleClass the header file is ExampleClass.hpp and the source file ExampleClass.cpp 
- +    If there is more then one class defined in a single file, we use the module name for the file name. A module name always starts with a small letter (e.g. exampleModule.cpp) 
-File names should be the same as the class name. For example, for the class ExampleClass the header file is ExampleClass.hpp and the source file ExampleClass.cpp +  File extensions 
- +    C++ Source Code: use .cpp 
-If there is more then one class defined in a single file, we use the module name for the file name. A module name always starts with a small letter (e.g. exampleModule.cpp) +    C++ Headerfiles: use .hpp
- +
-File extensions+
- +
-C++ Source Code: use .cpp +
-C++ Headerfiles: use .hpp+
  
 === Variable Names === === Variable Names ===
Line 58: Line 53:
 tableName_   -> Wrong tableName_   -> Wrong
 </code> </code>
 +
 +
 +
 +
 +==== Code Documentation ====
 +
 +  * The documentation of the code is done with Doxygen.
 +  * The code is documented in the declaration, never in the definition.
 +  * Whenever possible the definition should be separated from the declaration.
 +  * Templates have to be defined directly in the hpp-file. In that case, the documentation will be added there.
 +
 +
  
for_developers/style_guide.1427877444.txt.gz · Last modified: 2016/02/12 09:32 (external edit)