doxygen_manual-1.8.1 (1035109), страница 11
Текст из файла (страница 11)
This will appear as-is in the output and is ideal for a short description.For longer descriptions you often will find the need for some more structure, like a block of verbatim text, a list,or a simple table. For this doxygen supports the Markdown syntax, including parts of the Markdown Extraextension.Markdown is designed to be very easy to read and write. It’s formatting is inspired by plain text mail. Markdownworks great for simple, generic formatting, like an introduction page for your project. Doxygen also supports readingof markdown files directly. See here for more details regards Markdown support.For programming language specific formatting doxygen has two forms of additional markup on top of Markdownformatting.1. Javadoc like markup.
See here for a complete overview of all commands supported by doxygen.2. XML markup as specified in the C# standard. See here for the XML commands supported by doxygen.If this is still not enough doxygen also supports a subset of the HTML markup language.Generated by Doxygen32Documenting the codeGenerated by DoxygenChapter 4MarkdownMarkdown support was introduced in doxygen version 1.8.0. It is a plain text formatting syntax written by JohnGruber, with the following underlying design goal:The design goal for Markdown’s formatting syntax is to make it as readable as possible.
The ideais that a Markdown-formatted document should be publishable as-is, as plain text, without looking likeit’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influencedby several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntaxis the format of plain text email.In the next section the standard Markdown features are briefly discussed. The reader is referred to the Markdownsite for more details.Some enhancements were made, for instance PHP Markdown Extra, and GitHub flavoredMarkdown.
The section Markdown Extensions discusses the extensions that doxygen supports.Finally section Doxygen specifics discusses some specifics for doxygen’s implementation of the Markdown standard.4.1Standard Markdown4.1.1ParagraphsEven before doxygen had Markdown support it supported the same way of paragraph handling as Markdown: tomake a paragraph you just separate consecutive lines of text by one or more blank lines.An example:Here is text for one paragraph.We continue with more text in another paragraph.4.1.2HeadersJust like Markdown, doxygen supports two types of headersLevel 1 or 2 headers can be made as the followsThis is an level 1 header=========================This is an level 2 header-------------------------A header is followed by a line containing only =’s or -’s.
Note that the exact amount of =’s or -’s is not important aslong as there are at least two.34MarkdownAlternatively, you can use #’s at the start of a line to make a header. The number of #’s at the start of the linedetermines the level (up to 6 levels are supported). You can end a header by any number of #’s.Here is an example:# This is a level 1 header### This is level 3 header #######4.1.3Block quotesBlock quotes can be created by starting each line with one or more >’s, similar to what is used in text-only emails.> This is a block quote> spanning multiple linesLists and code blocks (see below) can appear inside a quote block.
Quote blocks can also be nested.Note that doxygen requires that you put a space after the (last) > character to avoid false positives, i.e. when writing0 if OK\n>1 if NOKthe second line will not be seen as a block quote.4.1.4ListsSimple bullet lists can be made by starting a line with -, +, or ∗.- Item 1More text for this item.- Item 2+ nested list item.+ another nested item.- Item 3List items can span multiple paragraphs (if each paragraph starts with the proper indentation) and lists can benested. You can also make a numbered list like so1.
First item.2. Second item.4.1.5Code BlocksPreformatted verbatim blocks can be created by indenting each line in a block of text by at least 4 extra spacesThis a normal paragraphThis is a code blockWe continue with a normal paragraph again.Doxygen will remove the mandatory indentation from the code block. Note that you cannot start a code block in themiddle of a paragraph (i.e.
the line preceding the code block must be empty).See section Code Block Indentation for more info how doxygen handles indentation as this is slightly different thanstandard Markdown.Generated by Doxygen4.1 Standard Markdown4.1.635Horizontal RulersA horizontal ruler will be produced for lines containing at least three or more hyphens, asterisks, or underscores.The line may also include any amount of whitespace.Examples:- - ______Note that using asterisks in comment blocks does not work. See Use of asterisks for details.4.1.7EmphasisTo emphasize a text fragment you start and end the fragment with an underscore or star.
Using two stars orunderscores will produce strong emphasis.Examples:*single asterisks*_single underscores_**double asterisks**__double underscores__See section Emphasis limits for more info how doxygen handles emphasis spans slightly different than standardMarkdown.4.1.8code spansTo indicate a span of code, you should wrap it in backticks (‘). Unlike code blocks, code spans appear inline in aparagraph. An example:Use the ‘printf()‘ function.To show a literal backtick inside a code span use double backticks, i.e.To assign the output of command ‘ls‘ to ‘var‘ use ‘‘var=‘ls‘‘‘.See section Code Spans Limits for more info how doxygen handles code spans slightly different than standardMarkdown.4.1.9LinksDoxygen supports both styles of make links defined by Markdown: inline and reference.For both styles the link definition starts with the link text delimited by [square brackets].4.1.9.1Inline LinksFor an inline link the link text is followed by a URL and an optional link title which together are enclosed in a set ofregular parenthesis.
The link title itself is surrounded by quotes.Examples:[The[The[The[Thelinklinklinklinktext](http://example.net/)text](http://example.net/ "Link title")text](/relative/path/to/index.html "Link title")text](somefile.html)Generated by Doxygen36MarkdownIn addition doxygen provides a similar way to link a documented entity:[The link text](@ref MyClass)4.1.9.2Reference LinksInstead of putting the URL inline, you can also define the link separately and then refer to it from within the text.The link definition looks as follows:[link name]: http://www.example.com "Optional title"Instead of double quotes also single quotes or parenthesis can be used for the title part.Once defined, the link looks as follows[link text][link name]If the link text and name are the same, also[link name][]or even[link name]can be used to refer to the link.
Note that the link name matching is not case sensitive as is shown in the followingexample:I get 10 times more traffic from [Google] than from[Yahoo] or [MSN].[google]: http://google.com/[yahoo]: http://search.yahoo.com/[msn]:http://search.msn.com/"Google""Yahoo Search""MSN Search"Link definitions will not be visible in the output.Like for inline links doxygen also supports @ref inside a link definition:[myclass]: @ref MyClass "My class"4.1.10ImagesMarkdown syntax for images is similar to that for links. The only difference is an additional ! before the link text.Examples:![Caption text][img def]![img def][img def]: /path/to/img.jpg "Optional Title"Also here you can use @ref to link to an image:![img def][img def]: @ref image.png "Caption text"The caption text is optional.Generated by Doxygen4.2 Markdown Extensions4.1.1137Automatic LinkingTo create a link to an URL or e-mail address Markdown supports the following syntax:<http://www.example.com><address@example.com>Note that doxygen will also produce the links without the angle brackets.4.2Markdown Extensions4.2.1Table of ContentsDoxygen supports a special link marker [TOC] which can be placed in a page to produce a table of contents at thestart of the page, listing all sections.Note that using [TOC] is the same as using a \tableofcontents command.4.2.2TablesOf the features defined by "Markdown Extra" is support for simple tables:A table consists of a header line, a separator line, and at least one row line.
Table columns are separated by thepipe (|) character.Here is an example:First Header------------Content CellContent Cell||||Second Header------------Content CellContent Cellwhich will produce the following table:First HeaderContent CellContent CellSecond HeaderContent CellContent CellColumn alignment can be controlled via one or two colons at the header separator line:||||Right----:101000||||Center:----:101000||||Left:---101000||||which will look as follows:Right1010004.2.3Center101000Left101000Fenced Code BlocksAnother feature defined by "Markdown Extra" is support for fenced code blocks:A fenced code block does not require indentation, and is defined by a pair of "fence lines". Such a line consists of3 or more tilde (∼) characters on a line. The end of the block should have the same number of tildes.