Skip to content

Commit

Permalink
docs: added more information about comments to code-conv
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Oct 21, 2023
1 parent 7150796 commit bc05152
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docpages/advanced_reference/coding_style_standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,35 @@ Constants and macros should be all `UPPERCASE` with `SNAKE_CASE` to separate wor

## Comments

All comments should be in `doxygen` format (similar to javadoc). Please see existing class definitions for an example. You should use doxygen style comments in a class definition inside a header file, and can use any other comment types within the .cpp file. Be liberal with comments, especially if your code makes any assumptions!
All comments should be in `doxygen` format (similar to javadoc). Please see existing class definitions for an example. You should use doxygen style comments in a class definition inside a header file. Be liberal with comments, especially if your code makes any assumptions! Comments should follow the format below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cpp
/**
* @brief This is a function that does some cool stuff.
* More stuff here will still go in brief!
* @warning This current does nothing!
*/
func_name();

/**
* @brief This turns a name into a meme name!
*
* @param name The name of the user that you want to meme-ify.
* @return a meme name!
*/
std::string name_to_meme(const std::string& name) const;

int main() {
/* We are now going to do some cool stuff. */
func_name();

/* Going to turn brain into a meme name.
* Why?
* Because why not. That's why.
*/
std::cout << name_to_meme("Brain") << "\n";
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Spell Checks
Expand Down

0 comments on commit bc05152

Please sign in to comment.