⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grouping.doc

📁 doxygen(一个自动从源代码生成文档的工具)的源代码
💻 DOC
字号:
/****************************************************************************** * * $Id: grouping.doc,v 1.3 2001/03/19 19:27:39 root Exp $ * * Copyright (C) 1997-2001 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby  * granted. No representations are made about the suitability of this software  * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * *//*! \page grouping GroupingDoxygen has two mechanisms to group things together. One mechanism works at a global level, creating a new pagefor each group. These groups are called "modules" in the documentation.The other mechanism works within a member list of some compound entity,and is refered to as a "member group".\subsection modules ModulesModules are a way to group things together on a separate page. Youcan document a group as a whole, as well as all individual members.Members of a group can be files, namespaces, classes, functions,variables, enums, typedefs, and defines, but also other groups.To define a group, you should put the \ref cmddefgroup "\\defgroup"command in a special comment block. The first argument of the command is a label that should uniquely identify the group.  You can make an entity a member of a specific group by putting a \ref cmdingroup "\\ingroup" command inside its documentation block.The second argument is the title of the group.To avoid putting \ref cmdingroup "\\ingroup" commands in the documentationof each member you can also group members together by the open marker <code>\@{</code> before the group and the closing marker <code>\@}</code> after the group. The markers can be put in the documentation of the group definition or in a separate documentation block. Groups can also be nested using these grouping markers.You will get an error message when you use the same group label more than once.If you don't want doxygen to enforceunique labels, then you can use \ref cmdaddtogroup "\\addtogroup" instead of\ref cmddefgroup "\\defgroup". It can be used exactly like \ref cmddefgroup "\\defgroup",but when the group has been defined already, then it silently merges the existing documentationwith the new one.The title of the group is optional for this command, so you can use\verbatim/** \addtogroup <label> *//*\@{*//*\@}*/\endverbatimto add members to a group that is defined in more detail elsewhere.Note that compound entities (like classes, files and namespaces) canbe put into multiple groups, but members (like variable, functions, typedefsand enums) can only be a member of one group (this restriction is to avoid ambiguous linking targets).Doxygen will put members into that group where the grouping definition hadthe highest priority: f.i. \ref cmdingroup "\\ingroup" overrides any automaticgrouping definition via <code>\@{</code> <code>\@}</code>. Conflicting groupingdefinitions with the same priority trigger a warning, unless one definitionwas for a member without any explicit documentation. The following exampleputs VarInA into group A and silently resolves the conflict for IntegerVariable byputting it into group IntVariables, because the second instance of IntegerVariableis undocumented:\verbatim/** * \ingroup A */extern int VarInA;/** * \defgroup IntVariables Global integer variables *//*@{*//** an integer variable */extern int IntegerVariable;/*@}*/..../** * \defgroup Variables Global variables *//*@{*//** a variable in group A */int VarInA;int IntegerVariable;/*@}*/\endverbatimThe priorities of grouping definitions are (from highest to lowest):\ref cmdingroup "\\ingroup", \ref cmddefgroup "\\defgroup",\ref cmdaddtogroup "\\addtogroup", \ref cmdweakgroup "\\weakgroup".The last command is exactly like \ref cmdaddtogroup "\\addtogroup"with a lower priority. It was added to allow "lazy" groupingdefinitions: you can use commands with a higher priority in your .hfiles to define the hierarchy and \ref cmdweakgroup "\\weakgroup"in .c files without having to duplicate the hierarchy exactly.\par Example:\verbinclude group.cpp\htmlonlyClick <a href="$(DOXYGEN_DOCDIR)/examples/group/html/modules.html">here</a> for the corresponding HTML documentation that is generated by Doxygen.\endhtmlonly\subsection memgroup Member GroupsIf a compound (e.g. a class or file) has many members, it is often desired to group them together. Doxygen already automatically groups things together on type and protection level, but maybe you feel that this is not enough or that that default grouping is wrong. For instance, because you feel that members of different (syntactic) types belong to the same (semantic) group.A member group is defined by a \verbatim//@{   ...//@}\endverbatim block or a \verbatim/*@{*/   ... /*@}*/ \endverbatim block if you prefer C style comments. Note that the members of the group should be physcially inside the member group's body.Before the opening marker of a block a separate comment block may be placed. This block should contain the \ref cmdname "@name" (or \ref cmdname "\name") command and is used to specify the header of the group. Optionally, the comment block may also contain moredetailed information about the group.Nesting of member groups is not allowed. If all members of a member group inside a class have the same type and protection level (for instance all are static public members), then the whole member group is displayed as a subgroup of the type/protection level group (the group is displayed as a subsection of the "Static Public Members" section for instance). If two or more members have different types, then the group is put at the same level as the automatically generated groups.If you want to force all member-groups of a class to be at the top level, you should put a \ref cmdnosubgrouping "\\nosubgrouping" command inside thedocumentation of the class. \par Example:\verbinclude memgrp.cpp\htmlonlyClick <a href="$(DOXYGEN_DOCDIR)/examples/memgrp/html/class_test.html">here</a> for the corresponding HTML documentation that is generated by Doxygen.\endhtmlonlyHere Group1 is displayed as a subsection of the "Public Members". AndGroup2 is a separate section because it contains members withdifferent protection levels (i.e. public and protected).\htmlonlyGo to the <a href="formulas.html">next</a> section or return to the <a href="index.html">index</a>.\endhtmlonly*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -