/**
* @author Name <[email protected]>
* @date July 2023
* @brief Blahblah
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup group-name Group Display Name
* \ingroup parent-group
* @{
*/
/* ------------------- Includes */
/** @} */ // group-name
#ifdef __cplusplus
} // extern C
#endif
/**
* @author Name <[email protected]>
* @date July 2023
* @brief Blahblah
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* \addtogroup group-name
* @{
*/
/** @} */ // group-name
#ifdef __cplusplus
} // extern C
#endif
An index.dox
file can be used at the root of a module folder to define the overall doxygen group:
/* This file is intended for doxygen */
/*!
* \defgroup sub-group Sub group name
* @{
* \ingroup Root-group
* @}
*/
This sub-group
can be then referenced in the \addtogroup
call in the header template file.
{
"Header template": {
"prefix": "templateHeader",
"scope": "c,cpp",
"body": [
"/**",
" * @author ${1:Name} <${2:[email protected]}>",
" * @date $CURRENT_MONTH_NAME $CURRENT_YEAR",
" * @brief ${3:Blahblah}",
" */",
"",
"#pragma once",
"",
"#ifdef __cplusplus",
"extern \"C\" {",
"#endif",
"",
"/**",
" * \\defgroup ${5:group-name} ${6:Group Display Name}",
" * \\ingroup ${7:parent-group}",
" * @{",
" */",
"",
"/* ------------------- Includes */",
"",
"$0",
"",
"/** @} */ // $5",
"",
"#ifdef __cplusplus",
"} // extern C",
"#endif",
]
},
"Source template": {
"prefix": "templateSource",
"scope": "c,cpp",
"body": [
"/**",
" * @author ${1:Name} <${2:[email protected]}>",
" * @date $CURRENT_MONTH_NAME $CURRENT_YEAR",
" * @brief ${4:Blahblah}",
" */",
"",
"#ifdef __cplusplus",
"extern \"C\" {",
"#endif",
"",
"/**",
" * \\addtogroup ${5:group-name}",
" * @{",
" */",
"",
"$0",
"",
"/** @} */ // $5",
"",
"#ifdef __cplusplus",
"} // extern C",
"#endif",
]
},
"Test template": {
"prefix": "templateTest",
"scope": "c,cpp",
"body": [
"/**",
" * @author ${1:Name} <${2:[email protected]}>",
" * @date $CURRENT_MONTH_NAME $CURRENT_YEAR",
" * @brief ${4:Blahblah}",
" */",
"",
"/**",
" * \\defgroup ${5:group-name} ${6:Group name}",
" * \\addtogroup ${7:parent-group}",
" * @{",
" */",
"",
"/* ------------------- Includes */",
"",
"#include <string>",
"#include <iostream>",
"#include <gtest/gtest.h>",
"",
"$0",
"",
"/** @} */ // $5"
]
},
"Section": {
"prefix": "section",
"body": [
"/* ------------------- ${1:Name} */",
"",
"$0"
]
},
"Doxygen comment": {
"prefix": "dlc",
"body": "/** ${1} */$0"
},
"Long Doxygen comment": {
"prefix": "dllc",
"body": "/** $0 */"
},
}