12

Doxygen のドキュメントには、 \ingroup を使用してエンティティを複数のグループに追加できることが記載されています。

\ingroup (<groupname> [<groupname> <groupname>])

問題は、私が試してみたところ、Doxygen がエンティティをグループ リストの最後のグループだけに追加したことです。何かのようなもの

/** \ingroup A B
 * ...
 */

要素をモジュール A に追加しますが、B には追加しません。理由と解決方法を知っている人はいますか?

Doxygen バージョン 1.7.6.1 および 1.8.1.2 で試しました。

ご協力いただきありがとうございます。

編集:doxygenが次のような警告を出力することに気付きました:

Member X found in multiple @ingroup groups! The member will be put in group B, and not in group A

これはドキュメントと矛盾しているように思えます。

ANSWER: 自分で答えます。関数を複数のグループに追加しようとしましたが、ドキュメントには「複合エンティティ (クラス、ファイル、名前空間など) は複数のグループに入れることができますが、メンバー (変数、関数、typedef、enum など) はあるグループのメンバー」。

4

2 に答える 2

10

通常、(許可されたアイテムの場合、ファイルとしましょう) 倍数グループを持つグループ内を記述するだけで済みます。完全を期すために、私が使用するテンプレートを示しましょう。

/**
 * \file
 * \ingroup GrpTest GrpLicense
 * \brief Here your brief explanation
 * \details And you put here a more detailed explanation to the 
 * contents of the file.
 * \version 1.0
 * \date 2014-09-27
 * \author Dr Beco
 * \par Webpage
 * <<http://www.program.pg/>>
 * \copyright (c) 2014 GNU GPL v3
 * \note This program is free software: you can redistribute it
 * and/or modify it under the terms of the
 * GNU General Public License as published by
 * the Free Software Foundation version 3 of the License.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.
 * If not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston, MA. 02111-1307, USA.
 * Or read it online at <<http://www.gnu.org/licenses/>>.
 * 
 */

ここで、Doxygen Documentation、特にここにリンクされているページから、次のように読みます。

Note that compound entities (like classes, files and namespaces) 
can be put into multiple groups, 
but members (like variable, functions, typedefs and enums) 
can only be a member of one group 

ドキュメントでは、次の理由も説明されています。

(this restriction is in place to avoid ambiguous linking
targets in case a member is not documented in the context
of its class, namespace or file, but only visible as part of a group).

したがって、残念ながら、関数 (または指定しなかったすべての種類のエンティティ) を複数のグループに追加することはできません。

このリンクが、その他の質問の解決に役立つことを願っています。

于 2014-09-29T21:37:22.430 に答える