doxygen_manual-1.8.1 (1035109), страница 35
Текст из файла (страница 35)
Each version descriptionwill start on a new line. Alternatively, one \version command may mention several version strings. The \versioncommand ends when a blank line or some other sectioning command is encountered. See section \author for anexample.21.87 \warning { warning message }Starts a paragraph where one or more warning messages may be entered. The paragraph will be indented. Thetext of the paragraph has no special internal structure. All visual enhancement commands may be used inside theparagraph. Multiple adjacent \warning commands will be joined into a single paragraph. Each warning descriptionGenerated by Doxygen138Special Commandswill start on a new line. Alternatively, one \warning command may mention several warnings.
The \warning commandends when a blank line or some other sectioning command is encountered. See section \author for an example.21.88 \xrefitem <key> ”(heading)” ”(list title)” { text }This command is a generalization of commands such as \todo and \bug. It can be used to create user-defined textsections which are automatically cross-referenced between the place of occurrence and a related page, which willbe generated. On the related page all sections of the same type will be collected.The first argument <key> is an identifier uniquely representing the type of the section.
The second argument is aquoted string representing the heading of the section under which text passed as the fourth argument is put. Thethird argument (list title) is used as the title for the related page containing all items with the same key. The keys"todo", "test", "bug" and "deprecated" are predefined.To get an idea on how to use the \xrefitem command and what its effect is, consider the todo list, which (for Englishoutput) can be seen an alias for the command\xrefitem todo "Todo" "Todo List"Since it is very tedious and error-prone to repeat the first three parameters of the command for each section, thecommand is meant to be used in combination with the ALIASES option in the configuration file.
To define a newcommand \reminder, for instance, one should add the following line to the configuration file:ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""Note the use of escaped quotes for the second and third argument of the \xrefitem command.Commands to create links21.89 \addindex (text)This command adds (text) to the LATEX index.21.90 \anchor <word>This command places an invisible, named anchor into the documentation to which you can refer with the \ref command.NoteAnchors can currently only be put into a comment block that is marked as a page (using \page) or mainpage(\mainpage).See alsosection \ref.21.91 \cite <label>Adds a bibliographic reference in the text and in the list of bibliographic references.
The <label> must be a valid BibTeX label that can be found in one of the .bib files listed in CITE_BIB_FILES. For the LaTeX output the formatting ofthe reference in the text can be configured with LATEX_BIB_STYLE. For other output formats a fixed representationis used. Note that using this command requires the bibtex tool to be present in the search path.Generated by Doxygen21.92 \endlink13921.92 \endlinkThis command ends a link that is started with the \link command.See alsosection \link.21.93 \link <link-object>The links that are automatically generated by doxygen always have the name of the object they point to as link-text.The \link command can be used to create a link to an object (a file, class, or member) with a user specified link-text.The link command should end with an \endlink command.
All text between the \link and \endlink commands servesas text for a link to the <link-object> specified as the first argument of \link.See section autolink for more information on automatically generated links and valid link-objects.21.94 \ref <name> [”(text)”]Creates a reference to a named section, subsection, page or anchor. For HTML documentation the referencecommand will generate a link to the section. For a section or subsection the title of the section will be used as thetext of the link. For an anchor the optional text between quotes will be used or <name> if no text is specified.
ForLATEX documentation the reference command will generate a section number for sections or the text followed by apage number if <name> refers to an anchor.See alsoSection \page for an example of the \ref command.21.95 \subpage <name> [”(text)”]This command can be used to create a hierarchy of pages. The same structure can be made using the \defgroupand \ingroup commands, but for pages the \subpage command is often more convenient. The main page (see\mainpage) is typically the root of hierarchy.This command behaves similar as \ref in the sense that it creates a reference to a page labeled <name> with theoptional link text as specified in the second argument.It differs from the \ref command in that it only works for pages, and creates a parent-child relation between pages,where the child page (or sub page) is identified by label <name>.See the \section and \subsection commands if you want to add structure without creating multiple pages.NoteEach page can be the sub page of only one other page and no cyclic relations are allowed, i.e.
the pagehierarchy must have a tree structure.Here is an example:/*! \mainpage A simple manualSome general info.This manual is divided in the following sections:- \subpage intro- \subpage advanced "Advanced usage"Generated by Doxygen140Special Commands*///----------------------------------------------------------/*! \page intro IntroductionThis page introduces the user to the topic.Now you can proceed to the \ref advanced "advanced section".*///----------------------------------------------------------/*! \page advanced Advanced UsageThis page is for advanced users.Make sure you have first read \ref intro "the introduction".*/21.96 \tableofcontentsCreates a table of contents at the top of a page, listing all sections and subsections in the page.WarningThis command only works inside related page documentation and not in other documentation blocks and onlyhas effect in the HTML output!21.97 \section <section-name> (section title)Creates a section with name <section-name>.
The title of the section should be specified as the second argumentof the \section command.WarningThis command only works inside related page documentation and not in other documentation blocks!See alsoSection \page for an example of the \section command.21.98 \subsection <subsection-name> (subsection title)Creates a subsection with name <subsection-name>. The title of the subsection should be specified as the secondargument of the \subsection command.WarningThis command only works inside a section of a related page documentation block and not in other documentation blocks!See alsoSection \page for an example of the \subsection command.21.99 \subsubsection <subsubsection-name> (subsubsection title)Creates a subsubsection with name <subsubsection-name>.
The title of the subsubsection should be specified asthe second argument of the \subsubsection command.Generated by Doxygen21.100 \paragraph <paragraph-name> (paragraph title)141WarningThis command only works inside a subsection of a related page documentation block and not in other documentation blocks!See alsoSection \page for an example of the \section command and \subsection command.21.100 \paragraph <paragraph-name> (paragraph title)Creates a named paragraph with name <paragraph-name>. The title of the paragraph should be specified as thesecond argument of the \paragraph command.WarningThis command only works inside a subsubsection of a related page documentation block and not in otherdocumentation blocks!Commands for displaying examples21.101 \dontinclude <file-name>This command can be used to parse a source file without actually verbatim including it in the documentation (as the\include command does).
This is useful if you want to divide the source file into smaller pieces and add documentation between the pieces. Source files or directories can be specified using the EXAMPLE_PATH tag of doxygen’sconfiguration file.The class and member declarations and definitions inside the code fragment are ’remembered’ during the parsingof the comment block that contained the \dontinclude command.For line by line descriptions of source files, one or more lines of the example can be displayed using the \line, \skip,\skipline, and \until commands. An internal pointer is used for these commands.
The \dontinclude command setsthe pointer to the first line of the example.Example:/*! A test class. */class Test{public:/// a member functionvoid example();};/*!***********/\page example\dontinclude example_test.cppOur main function starts like this:\skip main\until {First we create a object \c t of the Test class.\skipline TestThen we call the example member function\line exampleAfter that our little test routine ends.\line }Where the example file example_test.cpp looks as follows:void main(){Generated by Doxygen142Special CommandsTest t;t.example();}Alternatively, the \snippet command can be used to include only a fragment of a source file.
For this to work thefragment has to be marked.See alsosections \line, \skip, \skipline, \until, and \include.21.102 \include <file-name>This command can be used to include a source file as a block of code. The command takes the name of an includefile as an argument. Source files or directories can be specified using the EXAMPLE_PATH tag of doxygen’sconfiguration file.If <file-name> itself is not unique for the set of example files specified by the EXAMPLE_PATH tag, you can includepart of the absolute path to disambiguate it.Using the \include command is equivalent to inserting the file into the documentation block and surrounding it with\code and \endcode commands.The main purpose of the \include command is to avoid code duplication in case of example blocks that consist ofmultiple source and header files.For a line by line description of a source files use the \dontinclude command in combination with the \line, \skip,\skipline, and \until commands.Alternatively, the \snippet command can be used to include only a fragment of a source file.