iMSTK
Interactive Medical Simulation Toolkit
|
Does foo and bar. /// /// Does not do foo the usual way if baz
is true. /// Add reference to implemented papers /// /// Typical usage: ///
This guide collates best practices from a variety of sources, while some of these express a certain taste we want the items that are covered here to be consistent across iMSTK.
Coding style is not only limited to the actual formatting but also to things like the naming of functions or variables, or the use of certain c++ features or patterns. By being consistent in these we make development for iMSTK easier for ourselves and others as names and patterns are reused across the code base.
While the text of this guide is mostly culled from the OpenSurgSim coding guide the following resources were used to create and refine the style
First and foremost, be reasonable and pay attention to clarity. White space and comments are to aid in code readability, not detract from it.
CodeFormatEnforcer
target will correct all formatting issues.Use doxygen style comments.
Example: ``` ///
/// ///
quux | kind of foo to do. /// | |
[out] | result | filled with bar sequence on foo success. /// /// |
if | a division by zero occurs /// /// |