美文网首页
Special Commands

Special Commands

作者: 华山论剑 | 来源:发表于2017-02-04 21:43 被阅读11次

    文档:http://www.stack.nl/~dimitri/doxygen/manual/commands.html

    Introduction

    All commands in the documentation start with a backslash () or an at-sign (@). If you prefer you can replace all commands starting with a backslash below by their counterparts that start with an at-sign.

    Some commands have one or more arguments. Each argument has a certain range:

    • If <sharp> braces are used the argument is a single word.
    • If (round) braces are used the argument extends until the end of the line on which the command was found.
    • If {curly} braces are used the argument extends until the next paragraph. Paragraphs are delimited by a blank line or by a section indicator.

    If in addition to the above argument specifiers [square] brackets are used the argument is optional.


    常用命令

    \def <name>

    Indicates that a comment block contains documentation for a #define macro.

    Example:

        /*! \file define.h
            \brief testing defines
            
            This is to test the documentation of defines.
        */
        /*!
          \def MAX(x,y)
          Computes the maximum of \a x and \a y.
        */
        /*! 
           Computes the absolute value of its argument \a x.
        */
        #define ABS(x) (((x)>0)?(x):-(x))
        #define MAX(x,y) ((x)>(y)?(x):(y))
        #define MIN(x,y) ((x)>(y)?(y):(x)) 
                /*!< Computes the minimum of \a x and \a y. */
    

    \class <name> [<header-file>] [<header-name>]

    Indicates that a comment block contains documentation for a class with name <name>. Optionally a header file and a header name can be specified. If the header-file is specified, a link to a verbatim copy of the header will be included in the HTML documentation. The <header-name> argument can be used to overwrite the name of the link that is used in the class documentation to something other than <header-file>. This can be useful if the include name is not located on the default include path (like <X11/X.h>). With the <header-name> argument you can also specify how the include statement should look like, by adding either quotes or sharp brackets around the name. Sharp brackets are used if just the name is given. Note that the last two arguments can also be specified using the \headerfile command.

    Example:

        /* A dummy class */
        class Test
        {
        };
        /*! \class Test class.h "inc/class.h"
         *  \brief This is a test class.
         *
         * Some details about the Test class.
         */
    

    相关文章

      网友评论

          本文标题:Special Commands

          本文链接:https://www.haomeiwen.com/subject/xqssittx.html