Skip to content

Style guide

Patrick Diehl edited this page Nov 9, 2019 · 2 revisions

Variables

  • Pointers have the following naming convention d_name_p
  • Class members have the following naming convention d_name

Methods

  • Methods, which return a pointer have following naming convention getNameP
  • Methods, which set a pointer have the following naming convention setNameP

Style guide

The Google C++ Style Guide is used to format the C++ header and source files. The tool clang-format can be used to generate the configuration file (clang-format -style=Google -dump-config > .clang-format). The files can be formatted using clang-format -i *.cpp and clang-format -i *.hpp. For ease a bash script (format.sh) is provided and we recommend to run this script before a pull request is submitted.

Clone this wiki locally