Skip to content
Urs Ganse edited this page Feb 2, 2021 · 2 revisions

Style

In Vlasiator we use the style detailed here: http://geosoft.no/development/cppstyle.html. The exceptions are:

8: Does not apply
11: Does not apply
25: Does not apply
34: Use .cpp for C++ source files, .hpp for C++ like headers (template functions etc), and .h for C-like headers
36: Does not apply
37: Does not apply (But do try to remain within 120 characters)
40: Instead of #define based include guards, it is also ok to use #pragma once
71: Indention is 3 spaces
74: The opening brace is, in general, on the same line as the definition.
92: Use doxygen style
94: We use QT style comments for Doxygen documentation, not Javadoc

The code style consistency is at the moment not in a good shape, but new code should strive to be written in the style described above. This is important because of this issue.

Comments

Use Doxygen QT style. See these pages for further info and examples: