diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-13 15:44:46 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-13 15:44:46 +0100 |
commit | 2d07c0dc6bec17ea9f60d4c22669456f6aad52d7 (patch) | |
tree | 629d03f93390fec099840b563922fc99387f2278 /contributing.md | |
parent | 9ce53b197953e66189febeaa434255b848647993 (diff) | |
parent | f2509e89c02894ebd3ad992324eb300103621d26 (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 93 |
1 files changed, 90 insertions, 3 deletions
diff --git a/contributing.md b/contributing.md index 8799057..3090727 100644 --- a/contributing.md +++ b/contributing.md @@ -54,8 +54,6 @@ that you can click on to open them. - Implementation details (if applicable) - Header files (`.h`) contain the following types of comments: - [Usage documentation](#documentation) (required) - > [!NOTE] - > Constructors/destructors aren't required to have a `\brief` description - Implementation details (if they affect the header) - Design/data structure decisions (if applicable) - <details><summary> @@ -436,7 +434,8 @@ that you can click on to open them. ``` </td></tr></table></details> - <details><summary> - Variables that are being moved always use the fully qualified <code>std::move</code> + Variables that are being moved always use the fully qualified + <code>std::move</code> </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> ```cpp @@ -652,6 +651,33 @@ that you can click on to open them. bool bar = 0; ``` </td></tr></table></details> +- <details><summary> + The reason for <code>friend</code> relations are documented + </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> + + ```cpp + //! ComponentManager calls the private constructor of this class + friend class ComponentManager; + ``` + </td><td> + + ```cpp + friend class ComponentManager; + ``` + </td></tr></table></details> +- <details><summary> + Do not <i>pick</i> fixed-width integer types (unless required) + </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> + + ```cpp + unsigned long long foo(); + ``` + </td><td> + + ```cpp + uint64_t foo(); + ``` + </td></tr></table></details> ## CMakeLists-specific @@ -702,6 +728,67 @@ that you can click on to open them. void foo(); ``` </td></tr></table></details> +- <details><summary> + The default constructor and destructor aren't required to have a + <code>\brief</code> description + </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> + + ```cpp + Foo(); + virtual ~Foo(); + ``` + </td><td> + + ```cpp + //! Create instance of Foo + Foo(); + //! Destroy instance of Foo + virtual ~Foo(); + ``` + </td></tr></table></details> +- <details><summary> + Parameter direction shouldn't be specified using Doxygen + </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> + + ```cpp + /** + * \param bar Reference to Bar + */ + void foo(const Bar & bar); + ``` + </td><td> + + ```cpp + /** + * \param[in] bar Reference to Bar + */ + void foo(const Bar & bar); + ``` + </td></tr></table></details> +- <details><summary> + Deleted functions shouldn't have Doxygen comments + </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> + + ```cpp + // singleton + Foo(const Foo &) = delete; + Foo(Foo &&) = delete; + Foo & operator=(const Foo &) = delete; + Foo & operator=(Foo &&) = delete; + ``` + </td><td> + + ```cpp + //! Deleted copy constructor + Foo(const Foo &) = delete; + //! Deleted move constructor + Foo(Foo &&) = delete; + //! Deleted copy assignment operator + Foo & operator=(const Foo &) = delete; + //! Deleted move assignment operator + Foo & operator=(Foo &&) = delete; + ``` + </td></tr></table></details> # Libraries |