在与Doxygen挣扎之后,我终于找到了以下解决方案.
为您的概念定义一个组:使用页面不合适,因为页面应指明其子页面(从树的顶部到底部),而组表示可能有许多父组.这允许:
例
/*!@defgroup measurement_functor_concepts Measurement function objects
* @ingroup generalconcepts
* @{
* @par Description
* blablabla
*
* @par Notations
* Let @c F be the type of the function object, @c f an instance.
*
* @par Valid Expressions
* - @c f function object is ...
* - <b>f.result()</b> returns ...
* @}
*/
Run Code Online (Sandbox Code Playgroud)concept使用一个参数定义自定义命令:
ALIASES += concept{1}="@ingroup \1\n@par Implemented concepts:\n@ref \1"
Run Code Online (Sandbox Code Playgroud)
命令:
Implemented concepts提供实现概念的链接.表明特定的类/结构实现了这个概念:
//!@brief Does things...
//!@concept{measurement_functor_concepts}
template <class T>
struct my_struct: public std::unary_function<T, void> {};
Run Code Online (Sandbox Code Playgroud)我没有找到一种方法来生成一个很好的文档,如Boost(有效表达式的好表等),但至少这个文档组织正确地分隔了事情.