{"id":1084,"date":"2018-05-01T09:57:59","date_gmt":"2018-05-01T09:57:59","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=1084"},"modified":"2025-09-24T15:08:49","modified_gmt":"2025-09-24T15:08:49","slug":"code-documentation-doxygen","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=1084","title":{"rendered":"Code documentation (Doxygen)"},"content":{"rendered":"<p><strong>General<\/strong><\/p>\n<p>Always document large software projects, so other programmers can understand your code. Consider using tools like Javadoc or Doxygen that generate documentation from special code comments.<\/p>\n<hr>\n<p><strong>Positioning<\/strong><\/p>\n<table>\n<tr>\n<th><\/th>\n<th>Before the item<\/th>\n<th>After the item<\/th>\n<\/tr>\n<tr>\n<th>Usually single line<\/th>\n<td>\n<pre>\/\/\/ Documentation<\/pre>\n<\/td>\n<td>\n<pre>\/\/\/< Documentation<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th>Usually multiple lines<\/th>\n<td>\n<pre>\/**<br> * Documentation<br> *\/<\/pre>\n<\/td>\n<td>\n<pre>\/**<<br> * Documentation<br> *\/<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<hr>\n<p><strong>Commands<\/strong><\/p>\n<table>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>@brief<\/td>\n<td>Brief\/Short description<\/td>\n<\/tr>\n<tr>\n<td>@param<\/td>\n<td>Parameter description<\/td>\n<\/tr>\n<tr>\n<td>@return<\/td>\n<td>Return value description<\/td>\n<\/tr>\n<tr>\n<td>@throw<\/td>\n<td>Thrown exception description<\/td>\n<\/tr>\n<\/table>\n<hr>\n<p><strong>Example<\/strong><\/p>\n<pre class=\"brush: cpp; gutter: false; title: ; notranslate\" title=\"\">\r\nstruct Path;\r\nstruct Items;\r\n\r\n\/\/\/ The browser is used to browse a file system\r\nclass Browser\r\n{\r\npublic:\r\n   \/**\r\n    * @brief Creates a browser\r\n    *\r\n    * @param[in] maxPath The maximum path length\r\n    *\/\r\n   Browser(const size_t maxPath);\r\n\r\n   \/**\r\n    * @brief Browses the items of a path\r\n    *\r\n    * @param[in] path The path to browse\r\n    * @param[out] items The browsed items\r\n    *\r\n    * @return true if path exists, else false\r\n    *\/\r\n   bool browse(Path&amp; path, Items&amp; items);\r\n\r\nprivate:\r\n   const size_t m_MaxPath; \/\/\/&lt; The maximum path length\r\n};\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>General Always document large software projects, so other programmers can understand your code. Consider using tools like Javadoc or Doxygen<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[27],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/1084"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1084"}],"version-history":[{"count":8,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/1084\/revisions"}],"predecessor-version":[{"id":19321,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/1084\/revisions\/19321"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}