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

📄 docguide.docs

📁 this is simple sip stack.
💻 DOCS
字号:
/*!@page docguide Documentation Guidelines @section doxygen Using DoxygenDoxygen is a document generation program, used by many C/C++ projects. Itshome page is at <a href="http://www.doxygen.org">http://www.doxygen.org</a>. The Sofia documentation is written using Doxygen.Doxygen works by extracting the documentation data both from the actualC/C++ source code and from the specially formatted comments. The comments can contain some Javadoc-like @ref doxycommands "special commands". In general the the style of the comments and documentation should follow the<a href="http://java.sun.com/j2se/javadoc/writingdoccomments/">javadoc style guide</a>.A Doxygen comment must either contain reference about the entityit is describing, e.g., command \@file when describing files:@verbatim/** * @file foo.c  *  * Implementation of foo. The foo takes care of grokking xyzzy. *  * @author Jaska Jokunen <jaska.jokunen@company.com> \n *  * @date Created: Wed Oct 20 15:06:51 EEST 2004 jasjoku */@endverbatimUsually the entity that is documented comes straight after the documentationcomment. For example, documenting a function happens like this:@anchor orch@verbatim/** * Orches a candometer. If orching candometer is not possible, it * tries to schadule hearping. *  * @param k        pointer to a candometer [IN] * @param level    orching level [IN] * @param return_h return value for schaduled hearping [OUT] * * @return * The function orch() returns the candometer value, or #ERROR upon an error. * If the returned value is 0, the newly schaduled hearping is returned in * @a return_h. */int orch(cando_t *k, int level, hearping_t *return_h){  ...}@endverbatim@subsection doxyfile Doxyfile and Doxyfile.confThe doxygen options are specified through a configuration file,<i>Doxyfile</i>. As a convention, a module-specific Doxyfile includes a common file libsofia-sip-ua/docs/Doxyfile.conf. This makes it possible to keep the module-specific Doxyfiles as clean as possible:@codePROJECT_NAME         = "ipt"OUTPUT_DIRECTORY     = ../docs/iptINPUT 		     = ipt.docs . @INCLUDE = ../Doxyfile.confTAGFILES            += ../docs/docs/doxytags=../docsTAGFILES            += ../docs/su/doxytags=../suGENERATE_TAGFILE     = ../docs/ipt/doxytags@endcodeFrom the file above, you can observe some conventions. TheDoxygen-generated HTML documentation is collected in @b docssubdirectory at top level. A separate output directory is created foreach submodule under it. Doxytags for the module are generated in the @edoxytags file in the output directory. @subsection module_docs Module documentation in <module>.docsEach module contains a documentation file containing at least the modulemainpage called @e \<module\>.docs. There should be the moduleboilerplate information, for instance the following example is excerptcontents of file @e ipt.docs:@verbatim/**@mainpage IPT Library@section ipt_meta Module Meta InformationUtility library for IP Telephony applications.@CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>@STATUS Core library@LICENSE LGPL@section ipt_overview OverviewThis module contain some routines useful for IPT applications, like - ...- ...*/@endverbatim@section doxycommands Common Doxygen CommandsIn this section we go through the most common Doxygen commands. Allthe commands are explained in the manual.The commands include - @ref doxystyle "style commands (@@a, @@b, @@c, @@e, @@em, @@p)"- @ref doxyfuncs "function parameters and return values (@@param, @@return, @@retval)"@subsection doxystyle Style Commands - @a, @b, @c, @eThe text style can be changed with @@b @b (bold), @@c @c (code), or@@e @e (italic) commands. Function argument names use style command@@a. For example, a sentence "The @b Content-Type header @a ct specifies the @emedia-type of the message body, e.g., @c audio/amr would be AMR-encodedaudio." is produced with commands like@codeThe @b Content-Type header @a ct specifies the @e media-type of the message body, e.g., @c audio/amr would be AMR-encoded audio.@endcode The style commands have synonyms, e.g., @@em and @@e mean same, as well as @@c and @@p.@subsection doxyfuncs Function Parameters and Return Values - @param, @return, @retvalParameters to a function are documented with @@param commands. (Seethe @ref orch "orch()" function above.) As a convention, the data flowdirection [IN], [OUT] or [IN/OUT] is indicated in the brackets atthe end of @@param command.Return values can be documented in two alternative manners, eitherusing @@return command (see @ref orch "orch()") or @@retval command. Thelatter is used if the function returns a small number of possiblevalues, e.g., enumeration or success/failure indication.@verbatim/**Schadule hearping. *  * The function schadule() schadules a hearping. *  * @param h pointer to hearping [IN] *  * @retval 0  hearping was successful * @retval -1 an error occurred */int schadule(hearping_t *h){  ...}@endverbatim@subsection doxyexamples Example Blocks - @code, @endcodeAn example code fragment can be included using @@code and @@endcodecommands.@verbatim/**Destroy a hearping. *  * The function hearping_destroy() deinitializes a hearping and * reclaims the memory allocated for it.  *  * @param h pointer to pointer to hearping [IN/OUT] *  * The function clears the pointer to hearping, so it must be called * with a pointer to pointer: * @code *   hearping_destroy(&x->hearping); * @endcode */void hearping_destroy(hearping_t **h){@endverbatim@subsection docpar ParagraphsThe command @@par can be used to divide text into paragraphs. The text onthe same line with @@par is used as a subtitle for the paragraph. Thecommands @@date, @@note, @@bug, @@todo, @@sa (See Also) and@@deprecated can be used to add common paragraphs to documentation entries.@subsection doclicense License TextThere is special commands @@NOKOS, @@LGPL or @@LICENSE for adding specificcopying terms to the documentation entry.@subsection docfiles Documenting FilesIn most files there is documentation entry for the file itself. It isusually at top, containing @@file command or alias @@CFILE/@@IFILE. Thereare Emacs macros for creating the boilerplate entry.@subsection docgrouping Grouping EntriesWhen the structure of the documentation does not follow directory or filestructure, it is possible to use grouping commands @@defgroup and @@ingroup.The command @@defgroup creates a group, and @@ingroup adds an entry to angroup. @subsection doclinking Creating LinksNormally, Doxygen creates links to classes (and C structs) when itencounters the struct/class name.  It is also possible to add links tofunctions, type names and variables. If the function name is followed bypair of parenthesis (), Doxygen creates a link to it. If a type name orvariable is prefixed with hash @#, Doxygen creates a link to it.It is also possible to create links with freely selected link todocumentation entries with @@link and @@endlink commands. When the link target is a named page, section, or subsection, it is possibleto use the @@ref command.@subsection doctext Writing Body TextThe main body of the documentation is specified with @@mainpage command. Thecontents of the @@mainpage entry become the HTML home page of thedocumentation set. In each documentation set generated with Doxygen therecan be only one @@mainpage command. Commands @@section, @@subsection, and@@subsubsection can be used to structure the body text.It is also possible to add individual HTML pages to the documentation. Ithappens with @@page command. These individual pages are like the home pageadded with @@mainpage, they can be accessed with the Related Pages link fromthe navigation bar.@subsection docimages Adding ImagesImages are added with @@image command. As the different documentationformats support different image formats, the @@image has list the image filename for each supported documentation format. The following example usesbitmap image for HTML documentation and Encapsulate PostScript forprint documents:@code@image html sip-parser.gif@image latex sip-parser.eps@endcode*/

⌨️ 快捷键说明

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