We know that indentation style is a personal matter but the codebase needs to look consistent, so please adhere to the conventions below.
return, and other keywords
||, and other operators
The OMNeT++ IDE provides you pre-configured code styles in Window -> Preferences -> C++ -> Code Style. Choose OMNeT++ as your code style. Pressing Ctrl+Shift+F will reformat your code to match this style.
Rules for variable names, function names, class names and other identifiers.
//comments for consistency with NED and MSG files.
//comments in the code (except for Doxygen comments)
Consistent layout of class declarations throughout the project helps maintainers to remain sane.
/** */) for public API only
//comments where necessary
Misnamed and “kitchen-sink” functions are unfortunately quite common, and make the code hard to follow and reason about. Here’s what you can do:
//comment above each block to document its intended purpose
Most users of INET are not C++ scholars. We think the codebase should be written in a style and in a subset of C++ that makes it accessible to our users.
From INET 3.0, the following C++11 features will be allowed (and recommended):