DoxyPress  1.6.0
General Commands

All commands in the documentation are shown starting with a backslash or an at-sign. The choice of which symbol to use is based on user preference.

For commands with one or more arguments, each will usually have a 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 [square] brackets are used the argument is optional.

The following is an alphabetical list of the supported commands with references to their documentation. Unrecognized commands are treated as normal text.

Note
For the following commands the leading backslash has been removed for clarity. The backslash is required when using these commands.
@ \ % |
& < "
$ > . ---
~ # :

Structural Commands

The following is an alphabetical list of the structural commands in DoxyPress.

\addtogroup <name> [(title)]

Defines a group just like \defgroup, but in contrast to that command using the same <name> more than once will not result in a warning, but rather one group with a merged documentation and the first title found in any of the commands.

The title is optional, so this command can also be used to add a number of entities to an existing group using @{ and @} like this:

  /*! \addtogroup mygrp
   *  Additional documentation for group 'mygrp'
   *  @{
   */

  /*!
   *  A function
   */
  void func1()
  {
  }

  /*! Another function */
  void func2()
  {
  }

  /*! @} */
See also
Grouping, \defgroup, \ingroup, \weakgroup

\callgraph

When this command is put in a comment block of a function or method and have-dot is set to YES, then DoxyPress will generate a call graph for that function (provided the implementation of the function or method calls other documented functions). The call graph will be generated regardless of the value of dot-call.

See also
\callergraph, \hidecallgraph, \hidecallergraph, dot-call

\hidecallgraph

When this command is used in a comment block of a function or method DoxyPress will not generate a call graph for that function. The call graph will be hidden regardless of the value of dot-call.

See also
\callgraph, \callergraph, \hidecallergraph, dot-call

\callergraph

When this command is put in a comment block of a function or method and have-dot is set to YES, then DoxyPress will generate a caller graph for that function (provided the implementation of the function or method calls other documented functions). The caller graph will be generated regardless of the value of dot-called-by.

See also
\callgraph, \hidecallgraph, \hidecallergraph, dot-called-by

\hidecallergraph

When this command is used in a comment block of a function or method DoxyPress will not generate a caller graph for that function. The caller graph will be hidden regardless of the value of dot-called-by.

See also
\callgraph, \callergraph, \hidecallgraph, dot-called-by

\showrefby

When this command is used in a comment block DoxyPress will generate an overview of the documented functions and methods that call or access it. The overview will be generated regardless of the value of ref-by-relation.

See also
\showrefs, \hiderefby, \hiderefs, ref-by-relation

\hiderefby

When this command is used in a comment block DoxyPress will not generate an overview of the functions and methods that call or access it. The overview will not be generated regardless of the value of ref-by-relation.

See also
\showrefs, \showrefby, \hiderefs, ref-by-relation

\showrefs

When this command is used in a comment block DoxyPress will generate an overview of the functions and methods that call it. The overview will be generated regardless of the value of of ref-relation.

See also
\showrefby, \hiderefby, \hiderefs, ref-relation

\hiderefs

When this command is used in a comment block DoxyPress will not generate an overview of the functions and methods that call it. The overview will not be generated regardless of the value of ref-relation.

See also
\showrefs, \showrefby, \hiderefby, ref-relation

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

For Objective-C only: Indicates that a comment block contains documentation for a class category with name <name>. The arguments are equal to the \class command.

See also
\class

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

Indicates a comment block which 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 the last two arguments can also be specified using the \headerfile command.

/* A test class */

class Test
{
};

/*!
\class Test class.h "inc/class.h"
\brief This is a test class.

Details about the Test class
*/

\def <macro name>

Indicates that the current comment block contains documentation for a macro with the corresponding macro name. The following example shows three different ways to document a #define macro.

/*!
\def MAX(x,y)

[1] Computes the maximum of \a x and \a y.
*/


/*!
   [2] 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))
/*!< [3] Computes the minimum of \a x and \a y. */

\defgroup <name> (group title)

Indicates that a comment block contains documentation for a group of classes, files or namespaces. This can be used to categorize classes, files or namespaces, and document those categories. You can also use groups as members of other groups, thus building a hierarchy of groups.

The <name> argument should be a single-word identifier.

See also
Grouping, \ingroup, \addtogroup, \weakgroup

\dir [<path fragment>]

Indicates that a comment block contains documentation for a directory. The "path fragment" argument should include the directory name and enough of the path to be unique with respect to the other directories in the project.

The strip-from-path tag determines what is stripped from the full path before it appears in the output.


\enum <name>

This command marks a comment block which contains documentation for an enumeration with the specified name. If the enum is defined in a class and the documentation is located outside the class definition, the full qualified name of the enum should be specified in the documentation block.

If a comment block is located directly in front of an enum declaration, the \enum command is not required.

class test_Enum
{
  public:
    enum fruit { pear, orange };

    /*! Another enum, with inline docs */
    enum veggies
    {
      celery,   /*!< docs for value one */
      carrot    /*!< docs for value two */
    };

   /// Documentation for the Cajun Spices enum
   enum class CajunSpices {
      hungarian_paprika,
      hot_paprika,
      oregano,
      thyme
   };

   /// Documentation for the Moroccan Spices enum
   enum class MoroccanSpices {
      allspice,
      cinnamon,
      ginger,
      red_pepper,     ///< Using New Mexico red peppers gives a better flavor
      thyme
   };

};

/*!
\class test_Enum

The class description for test_Enum.
*/


/*!
\enum test_Enum::fruit

A description of the fruit enum.
*/


/*!
\var test_Enum::fruit  test_Enum::pear

The description of the first fruit which is a pear.
*/

\example <file-name>

Indicates that a comment block contains documentation for a source code example. The name of the source file is <file-name>. The text of this file will be included in the documentation, just after the documentation contained in the comment block. All examples are placed in a list. The source code is scanned for documented members and classes. If any are found, the names are cross-referenced with the documentation. Source files or directories can be specified using the example-source tag in the project file.

If <file-name> itself is not unique for the set of example files specified by the example-source tag, include part of the absolute path to disambiguate it.

If more than one source file is needed for the example, the \include command can be used.

/** Calendar class
 *  More details about this class would go here.
 */

class Calendar
{
  public:
    /** An example method.
     *  More details about this method would go here.
     */
    std::string getMonthName();
};


/**
\example include_test.cpp

This is an example of how to use the Calendar class. More details about this example ...
*/

The source for include_test.cpp is shown below:

void main()
{
  Calendar tmp;
  tmp.getMonthName();
}
See also
\include

\endinternal

This command ends a documentation fragment that was started with a \internal command. The text between \internal and \endinternal will only be visible if internal-docs is set to YES.


\extends <name>

This command can be used to manually indicate an inheritance relation, when the programming language does not support this concept natively (e.g. C).

The file manual.c in the example directory shows how to use this command.

See also
\implements, \memberof

\file [<name>]

Indicates that a comment block contains documentation for a source or header file with name <name>. The file name may include (part of) the path if the file-name alone is not unique. If the file name is omitted (i.e. the line after \file is left blank) then the documentation block that contains the \file command will belong to the file it is located in.

The documentation of global functions, variables, typedefs, and enums will only be included in the output if the file they are in is documented or if EXTRACT_ALL is set to YES.

/**
\file file.h
A brief file description.

A more elaborated file description.
*/

/**
A global integer value.
More details about this value.
*/
extern int globalValue;
Note
In the above example javadoc-auto-brief has been set to YES in the project file.

\fn (function declaration)

Indicates that a comment block contains documentation for a function (either global or as a member of a class). This command is only needed if a comment block is not placed in front (or behind) the function declaration or definition.

If your comment block is in front of the function declaration or definition this command can (and to avoid redundancy should) be omitted.

A full function declaration including arguments should be specified after the \fn command on a single line, since the argument ends at the end of the line!

This command is equivalent to \var, \typedef, and \property.

Warning
This command should only be used if absolutely necessary since it may lead to duplication of information.
Example:
class Test
{
  public:
    const char *member(char,int) throw(std::out_of_range);
};

const char *Test::member(char c,int n) throw(std::out_of_range) {}

/*!
\class Test
\brief Test class.

Details about Test.
*/


/*!
\fn const char *Test::member(char c,int n)
\brief A member function.
\param c a character.
\param n an integer.
\exception std::out_of_range parameter is out of range.
\return a character pointer.
*/
See also
\var, \property, \typedef

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

Intended to be used for class, struct, or union documentation, where the documentation is in front of the definition. The arguments of this command are the same as the second and third argument of \class .

The <header-file> name refers to the file that should be included by the application to obtain the definition of the class, struct, or union. 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 double quotes or sharp brackets around the name. By default sharp brackets are used if just the name is given.

If a pair of double quotes is given for either the <header-file> or <header-name> argument, the current file (in which the command was found) will be used but with quotes. So for a comment block with a \headerfile command inside a file test.h, the following three commands are equivalent:

  \headerfile test.h "test.h"
  \headerfile test.h ""
  \headerfile ""

To get sharp brackets you do not need to specify anything,

but if you want to be explicit you could use any of the following:

  \headerfile test.h <test.h>
  \headerfile test.h <>
  \headerfile <>

To globally reverse the default include representation to local includes you can set force-local-includes to YES.

To disable the include information altogether set show-include-files to NO.


\hideinitializer

By default the value of a define and the initializer of a variable are displayed unless they are longer than 30 lines. By putting this command in a comment block of a define or variable, the initializer is always hidden. The maximum number of initialization lines can be changed in the tag parameter for max-init-lines, the default value is 30.

See also
\showinitializer

\idlexcept <name>

Indicates that a comment block contains documentation for a IDL exception with name <name>.


\implements <name>

This command can be used to manually indicate an inheritance relation when the programming language does not have support for inheritance. For example, this can be used when documenting structures in C.

See also
\extends, \memberof

\ingroup (<groupname> [<groupname> <groupname>])

If the \ingroup command is placed in a comment block of a class, file or namespace, then it will be added to the group or groups identified by <groupname>.

See also
Grouping, \defgroup, \addtogroup, \weakgroup

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

Indicates that a comment block contains documentation for an interface with name <name>. The arguments are equal to the arguments of the \class command.

See also
\class

\internal

This command starts a documentation fragment that is meant for internal use only. The fragment naturally ends at the end of the comment block. You can also force the internal section to end earlier by using the \endinternal command.

If the \internal command is put inside a section (see for example \section) all subsections after the command are considered to be internal as well. Only a new section at the same level will end the fragment that is considered internal.

Specify internal-docs in the project file to show (YES) or hide (NO) the internal documentation.

See also
\endinternal

\mainpage [(title)]

If the \mainpage command is placed in a comment block the block is used to customize the index page (in HTML) or the first chapter (in LaTeX).

The title argument is optional and replaces the default title DoxyPress normally generates. If you do not want any title you can specify notitle as the argument of \mainpage.

Here is an example:

/*! \mainpage My Personal Index Page
 *
 * \section intro_sec Introduction
 *
 * This is the introduction.
 *
 * \section install_sec Installation
 *
 * \subsection step1 Step 1: Opening the box
 *
 * etc...
 */

You can refer to the main page using: \ref index.

See also
\section, \subsection, \page

\memberof <name>

This command makes a function a member of a class in a similar way as \relates does, only with this command the function is represented as a real member of the class. This can be useful when the programming language does not support the concept of member functions natively (e.g. C).

It is also possible to use this command together with \public, \protected or \private.

The file manual.c in the example directory shows how to use this command.

See also
\extends, \implements, \public, \protected, \private

\name [(header)]

This command turns a comment block into a header definition of a member group. The comment block should be followed by a //@{ ... //@} block containing the members of the group.

Refer to Member Groups for an example.


\namespace <name>

Indicates that a comment block contains documentation for a namespace with name <name>.


\nosubgrouping

This command can be put in the documentation of a class. It can be used in combination with member grouping to avoid that DoxyPress puts a member group as a subgroup of a Public/Protected/Private/... section.

See also
\publicsection, \protectedsection, \privatesection

\overload [(function declaration)]

This command is used to insert the following text in the documentation for an overloaded method or function. Any other documentation inside the documentation block will by appended after the generated message.

  This is an overloaded method or function provided for convenience.
  It differs from the other overloads only in the argument(s).

The \overload command does not work inside a one-line comment.

If the documentation for the overloaded method is not located in front of the function declaration or definition, the optional argument should be used to specify the correct function.

Example:
class Test
{
  public:
    void drawRect(int,int,int,int);
    void drawRect(const Rect &r);
};

/*!
\class Test

Documentation for this class would go here.
*/


/*!
\fn void Test::drawRect(int x,int y,int w,int h)

Draws a rectangle with a left upper corner at ( \a x , \a y ), width \a w and height \a h.
*/


/*!
\overload void Test::drawRect(const Rect &r)
*/

\package <name>

Indicates that a comment block contains documentation for a Java package with name <name>.


\page <name> (title)

Indicates that a comment block contains a piece of documentation that is not directly related to one specific class, file or member. The HTML generator creates a page containing the documentation. The LaTeX generator starts a new section in the chapter 'Page documentation'.

The <name> argument consists of a combination of letters and number digits. If you want to use upper case letters or mixed casing in the <name> argument, you should set case-sensitive-fname to YES in your project file.

This is advisable only if your file system is case sensitive. Otherwise and for better portability, use all lower case letters for <name> in all references to the page.

Example:
/*!
\page page1 A documentation page
\tableofcontents
  Leading text.

\section sec An example section
  This page contains the subsections \ref subsection1 and \ref subsection2.
  For more info see page \ref page2.

\subsection subsection1 The first subsection
  Text.

\subsection subsection2 The second subsection
  More text.
*/

/*!
\page page2 Another page

 Even more info.
*/
See also
\section, \subsection, \ref

\private

Indicates that the member documented by the comment block is private, i.e., should only be accessed by other members in the same class.

DoxyPress automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4).

For starting a section of private members, in a way similar to the "private:" class marker in C++, use \privatesection .

See also
\memberof, \public, \protected, \privatesection

\privatesection

Starting a section of private members, in a way similar to the "private:" class marker in C++. Indicates that the member documented by the comment block is private, i.e., should only be accessed by other members in the same class.

See also
\memberof, \public, \protected, \private

\property (qualified property name)

Indicates that a comment block contains documentation for a property (either global or as a member of a class).

This command is equivalent to \fn, \typedef, and \var.

See also
\fn, \typedef, \var

\protected

Indicates that the member documented by the comment block is protected, i.e., should only be accessed by other members in the same or derived classes.

DoxyPress automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4).

For starting a section of protected members, similar to the "protected:" class marker in C++, use \protectedsection.

See also
\memberof, \public, \private, \protected, \protectedsection

\protectedsection

Starting a section of protected members, in a way similar to the "protected:" class marker in C++. Indicates that the member documented by the comment block is protected, i.e., should only be accessed by other members in the same or derived classes.

See also
\memberof, \public, \private, \protected

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

Indicates that a comment block contains documentation for a protocol in Objective-C with name <name>. The arguments are equal to the \class command.

See also
\class

\public

Indicates that the member documented by the comment block is public, i.e., can be accessed by any other class or function.

DoxyPress automatically detects the protection level of members in object oriented languages. This command is intended for use only when the language does not support the concept of pure virtual methods natively, such as C and PHP.

For starting a section of public members, in a way similar to the "public:" class marker in C++, use \publicsection.

See also
\memberof, \protected, \private, \publicsection

\publicsection

Starting a section of public members, in a way similar to the "public:" class marker in C++. Indicates that the member documented by the comment block is public, which means it can be accessed by any other class or function.

See also
\memberof, \protected, \private, \public

\pure

Indicates that the member documented by the comment block is pure virtual, i.e., it is abstract and has no implementation associated with it.

This command is intended for use only when the language does not support the concept of pure virtual methods natively, such as C and PHP.


\relates <name>

This command can be used in the documentation of a non-member function <name>. It puts the function inside the 'related function' section of the class documentation. This command is useful for documenting non-friend functions that are nevertheless strongly coupled to a certain class. It prevents the need of having to document a file, but only works for functions.

Example:
/*!
A String class.
*/

class String
{
  friend int strcmp(const String &, const String &);
};

/*!
Compares two strings.
*/
int strcmp(const String &s1, const String &s2)
{
}

/*!
\relates String

A string debug function.
*/
void stringDebug()
{
}

\related <name>

Equivalent to \relates


\relatesalso <name>

This command can be used in the documentation of a non-member function <name>. It puts the function both inside the 'related function' section of the class documentation as well as leaving it at its normal file documentation location. This command is useful for documenting non-friend functions that are nevertheless strongly coupled to a certain class. It only works for functions.


\relatedalso <name>

Equivalent to \relatesalso


\showinitializer

By default the value of a define and the initializer of a variable are only displayed if they are less than 30 lines long. By putting this command in a comment block of a define or variable, the initializer is shown unconditionally.

The maximum number of initialization lines can be changed in the tag parameter for max-init-lines, the default value is 30.

See also
\hideinitializer

\static

Indicates that the member documented by the comment block is static, i.e., it works on a class, instead of on an instance of the class.

This command is intended for use only when the language does not support the concept of static methods natively, for example in C.


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

Indicates that a comment block contains documentation for a struct with name <name>. The arguments are equal to the arguments of the \class command.

See also
\class

\typedef (typedef declaration)

Indicates that a comment block contains documentation for a typedef (either global or as a member of a class).

This command is equivalent to \fn, \property, and \var.

See also
\fn, \property, \var

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

Marks a comment block which contains documentation for a union with name <name>. The arguments are equal to the arguments of the \class command.

See also
\class

\var (variable declaration)

Marks a comment block which contains documentation for a variable or an enum value. This command is equivalent to \fn, \property, and \typedef.

For information related to documenting an anonymous enums in C like languages, refer to anonymous enum.

See also
\fn, \property, \typedef

\weakgroup <name> [(title)]

The command is similar to \addtogroup, but has a lower priority when resolving conflicting grouping definitions.

See also
Grouping, \addtogroup

Section Commands

The following is an alphabetical list of the section commands in DoxyPress.

\attention { attention text }

Starts a paragraph where a message that needs attention may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \attention commands will be joined into a single paragraph. The \attention command ends when a blank line or some other sectioning command is encountered.


\author { list of authors }

Starts a paragraph where one or more author names may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \author commands will be joined into a single paragraph. Each author description will start a new line. Alternatively, one \author command may mention several authors. The \author command ends when a blank line or some other sectioning command is encountered.

Example:
/*! 
 *  \brief     Pretty class
 *  \details   This class is used to demonstrate a number of section commands.
 *  \author    John Doe
 *  \author    Jane Doe
 *  \version   4.1a
 *  \date      2008-2016
 *  \pre       First initialize the system.
 *  \bug       Not all memory is freed when deleting an object of this class.
 *  \warning   Improper use can crash your application
 *  \copyright GNU Public License.
 */
class SomeNiceClass {};

\authors { list of authors }

Equivalent to \author.


\brief { brief description }

Starts a paragraph which serves as a brief description. For classes and files the brief description will be appear at the start of the documentation page and in any class list.

For class members and file members the brief description will appear with the declaration of each method, function, or other members. If the repeat-brief tag is set the brief description will also be prepended to the detailed description.

A brief description may span several lines and it ends when a blank line or another section command is encountered. If multiple \brief commands are present they will be joined.

Refer to \author for an example.

Synonymous to \short.


\bug { bug description }

Starts a paragraph where one or more bugs may be reported. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \bug commands will be joined into a single paragraph. Each bug description will start on a new line. Alternatively, one \bug command may mention several bugs. The \bug command ends when a blank line or some other sectioning command is encountered.

Refer to \author for an example.


\bypassundocwarn

Use this command to mark a function or method which should not be documented. This commend will prevent a warning about "undocumented function" when extract-all is enabled.

This is a useful feature to ensure all of your public functions are documented and not see warnings for those which should not be included in the end user documentation.


\cond [(section-label)]

Starts a conditional section that ends with a corresponding \endcond command. The closing command may be located in another comment block. The purpose of these commands is to conditionally exclude part of a file from being processed. These conditional commands can not be used in the ALIASES tag.

The code located between \cond and \endcond is only included when the section label is listed in the enabled-sections tag. If the section label is omitted, the code will be excluded. The section label can be a logical expression composed of other section labels, parentheses, !, &&, and ||.

If you use an expression for the condition it must be enclosed in parentheses as shown in the following example.

\cond (! LABEL1 && LABEL2)
Conditional Sections

For conditional sections within a single comment block, use an \if ... \endif block instead. Conditional sections can be nested. A nested sub-section will only be parsed if it is enabled and all parent sections are included.

The following example shows nested conditional sections. The output will be different depending on whether or not enabled-sections contain TEST or DEV.

/** An interface */
class Intf
{
  public:
    /** A method */
    virtual void func() = 0;

    /// @cond TEST

    /** A method used for testing */
    virtual void test() = 0;

    /// @endcond
};

/// @cond DEV
/*
 *  The implementation of the interface
 */
class Implementation : public Intf
{
  public:
    void func();

    /// @cond TEST
    void test();
    /// @endcond

    /// @cond
    /** This method is obsolete and does
     *  not show up in the documentation.
     */
    void obsolete();
    /// @endcond
};

/// @endcond
See also
\endcond, enabled-sections

\copyright { copyright description }

Starts a paragraph where the copyright of an entity can be described. This paragraph will be indented. The text of the paragraph has no special internal structure.

Refer to \author for an example.


\date { date description }

Starts a paragraph where one or more dates may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \date commands will be joined into a single paragraph. Each date description will start on a new line. Alternatively, one \date command may mention several dates. The \date command ends when a blank line or some other sectioning command is encountered.

Refer to \author for an example.


\deprecated { description }

Starts a paragraph indicating that this documentation block belongs to a deprecated entity. Can be used to describe alternatives, expected life span, etc.


\details { detailed description }

Just like \brief starts a brief description, \details starts the detailed description. You can also start a new paragraph (blank line) then the \details command is not needed.


\else

Starts a conditional section if the previous conditional section was not enabled. The previous section should have been started with a \if, \ifnot, or \elseif command.

See also
\if, \ifnot, \elseif, \endif

\elseif (section-label)

Starts a conditional documentation section if the previous section was not enabled. A conditional section is disabled by default. To enable it you must put the section-label after the enabled-sections tag in the project file. The section label can be a logical expression build of section names, round brackets, && (AND), || (OR) and ! (NOT). Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well.

See also
\endif, \ifnot, \else, \elseif

\endcond

Ends a conditional section which was started by the \cond command. The closing command may be located in another comment block. The purpose of these commands is to conditionally exclude part of a file from being processed. These conditional commands can not be used in the ALIASES tag.

See also
\cond

\endif

Ends a conditional section that was started by \if or \ifnot For each \if or \ifnot one and only one matching \endif must follow.

See also
\if, \ifnot

\exception <exception-object> { exception description }

Starts an exception description for an exception object with name <exception-object>. Followed by a description of the exception. The existence of the exception object is not checked. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \exception commands will be joined into a single paragraph. Each exception description will start on a new line. The \exception description ends when a blank line or some other sectioning command is encountered.

Refer to \fn for an example.


\if (section-label)

Starts a conditional documentation section. The section ends with a matching \endif command. A conditional section is disabled by default. To enable it you must put the section-label after the enabled-sections tag in the project file.

The section label can be a logical expression using section names, parentheses, &&, || and !. Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well.

An expression must be surrounded by parentheses as in \cond (! LABEL1 && LABEL2).

Example:
  /*! Unconditionally shown documentation.
   *  \if Cond1
   *    Only included if Cond1 is set.
   *  \endif
   *  \if Cond2
   *    Only included if Cond2 is set.
   *    \if Cond3
   *      Only included if Cond2 and Cond3 are set.
   *    \endif
   *    More text.
   *  \endif
   *  Unconditional text.
   */

You can also use conditional commands inside an alias to document a class in two languages.

Example 2:
/*! \english
 *  This is English.
 *  \endenglish
 *  \dutch
 *  Dit is Nederlands.
 *  \enddutch
 */
class Example
{
};

This example requires the aliases tag to be defined in the project file. The enabled-sections tag can be used to enable either english or dutch.

   "english=\if english" \
   "endenglish=\endif" \
   "dutch=\if dutch" \
   "enddutch=\endif"
See also
\endif, \ifnot, \else, \elseif, enabled-sections

\ifnot (section-label)

Starts a conditional documentation section. The section ends with a matching \endif command. This conditional section is enabled by default. To disable it you must put the section-label after the enabled-sections tag in the project file. The section label can be a logical expression build of section names, round brackets, && (AND), || (OR) and ! (NOT).

See also
\endif, \if, \else, \elseif, enabled-sections

\invariant { description of invariant }

Starts a paragraph where the invariant of an entity can be described. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \invariant commands will be joined into a single paragraph. Each invariant description will start on a new line. Alternatively, one \invariant command may mention several invariants. The \invariant command ends when a blank line or some other sectioning command is encountered.


\note { text }

Starts a paragraph where a note can be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \note commands will be joined into a single paragraph. Each note description will start on a new line. Alternatively, one \note command may mention several notes. The \note command ends when a blank line or some other sectioning command is encountered.

Refer to \par for an example.


\par [(paragraph title)] { paragraph }

If a paragraph title is given this command starts a paragraph with a user defined heading. The heading extends until the end of the line. The paragraph following the command will be indented.

If no paragraph title is given this command will start a new paragraph. This will also work inside other paragraph commands (like \param or \warning) without ending that command.

The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. The \par command ends when a blank line or some other sectioning command is encountered.

Example:
/*! \class Test
 * Normal text.
 *
 * \par User defined paragraph:
 * Contents of the paragraph.
 *
 * \par
 * New paragraph under the same heading.
 *
 * \note
 * This note consists of two paragraphs.
 * This is the first paragraph.
 *
 * \par
 * And this is the second paragraph.
 *
 * More normal text. 
 */
  
class Test {};

\param [(dir)] <parameter-name> { parameter description }

Starts a parameter description for a function parameter with name <parameter-name>, followed by a description of the parameter. The existence of the parameter is checked and a warning is given if the documentation of this (or any other) parameter is missing or not present in the function declaration or definition.

The \param command has an optional attribute, (dir), specifying the direction of the parameter. Possible values are "[in]", "[in,out]", and "[out]", note the [square] brackets in this description. When a parameter is both input and output, [in,out] is used as attribute. Here is an example for the function memcpy:

/*!
* Copies bytes from a source memory area to a destination memory area,
* where both areas may not overlap.
* @param[out] dest The memory area to copy to.
* @param[in] src The memory area to copy from.
* @param[in] n The number of bytes to copy
*/
void memcpy(void *dest, const void *src, size_t n);

The parameter description is a paragraph with no special internal structure. All visual enhancement commands may be used inside the paragraph.

Multiple adjacent \param commands will be joined into a single paragraph. Each parameter description will start on a new line. The \param description ends when a blank line or some other sectioning command is encountered.

Refer to \fn for an example.

Note that you can also document multiple parameters with a single \param command using a comma separated list. Here is an example:

/** Sets the position.
* @param x,y,z Coordinates of the position in 3D space.
*/
void setPosition(double x,double y,double z,double t)
{
}

Note that for PHP one can also specify the type (or types if you separate them with a pipe symbol) which are allowed for a parameter (as this is not part of the definition). The syntax is the same as for phpDocumentor, i.e.

@param  datatype1|datatype2 $paramname description

\parblock

For commands that expect a single paragraph as argument (such as \par, \param and \warning), the \parblock command allows to start a description that covers multiple paragraphs, which then ends with \endparblock.

Example:

/** Example of a param command with a description consisting of two paragraphs
 *  \param p
 *  \parblock
 *  First paragraph of the param description.
 *
 *  Second paragraph of the param description.
 *  \endparblock
 *  Rest of the comment block continues.
 */

Note that the \parblock command may also appear directly after \param's first argument.


\endparblock

This ends a block of paragraphs started with \parblock.


\tparam <template-parameter-name> { description }

Starts a template parameter for a class or function template parameter with name <template-parameter-name>, followed by a description of the template parameter.

Otherwise similar to \param.


\post { description of the postcondition }

Starts a paragraph where the postcondition of an entity can be described. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \post commands will be joined into a single paragraph. Each postcondition will start on a new line. Alternatively, one \post command may mention several postconditions. The \post command ends when a blank line or some other sectioning command is encountered.


\pre { description of the precondition }

Starts a paragraph where the precondition of an entity can be described. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \pre commands will be joined into a single paragraph. Each precondition will start on a new line. Alternatively, one \pre command may mention several preconditions. The \pre command ends when a blank line or some other sectioning command is encountered.


\remark { remark text }

Starts a paragraph where one or more remarks may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \remark commands will be joined into a single paragraph. Each remark will start on a new line. Alternatively, one \remark command may mention several remarks. The \remark command ends when a blank line or some other sectioning command is encountered.


\remarks { remark text }

Equivalent to \remark.


\result { description of the result value }

Equivalent to \return.


\return { description of the return value }

Starts a return value description for a function. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \return commands will be joined into a single paragraph. The \return description ends when a blank line or some other sectioning command is encountered.

Refer to \fn for an example.


\returns { description of the return value }

Equivalent to \return.


\retval <return value> { description }

Starts a description for a function's return value with name <return value>, followed by a description of the return value. The text of the paragraph that forms the description has no special internal structure. All visual enhancement commands may be used inside the paragraph.

Multiple adjacent \retval commands will be joined into a single paragraph. Each return value description will start on a new line. The \retval description ends when a blank line or some other sectioning command is encountered.


\sa { references }

Starts a paragraph where one or more cross-references to classes, functions, methods, variables, files or URL may be specified. Two names joined by either :: or # are understood as referring to a class and one of its members. One of several overloaded methods or constructors may be selected by including a parenthesized list of argument types after the method name.

Synonymous to \see

Refer to Auto Links for information on how to create links to objects.


\see { references }

Equivalent to \sa


\short { short description }

Equivalent to \brief.


\since { text }

This command can be used to specify since when (version or time) an entity is available. The paragraph that follows \since does not have any special internal structure. All visual enhancement commands may be used inside the paragraph. The \since description ends when a blank line or some other sectioning command is encountered.


\test { paragraph describing a test case }

Starts a paragraph where a test case can be described. The description will also add the test case to a separate test list. The two instances of the description will be cross-referenced. Each test case in the test list will be preceded by a header that indicates the origin of the test case.


\throw <exception-object> { exception description }

Synonymous \exception.

Note:
the command \throws is a synonym for this command.
See also
\exception

\throws <exception-object> { exception description }

Equivalent to \throw.


\todo { paragraph describing what is to be done }

Starts a paragraph where a TODO item is described. The description will also add an item to a separate TODO list. The two instances of the description will be cross-referenced. Each item in the TODO list will be preceded by a header that indicates the origin of the item.


\version { version number }

Starts a paragraph where one or more version strings may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \version commands will be joined into a single paragraph. Each version description will start on a new line. Alternatively, one \version command may mention several version strings. The \version command ends when a blank line or some other sectioning command is encountered.

Refer to \author for an example.


\warning { warning message }

Starts a paragraph where one or more warning messages may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \warning commands will be joined into a single paragraph. Each warning description will start on a new line. Alternatively, one \warning command may mention several warnings. The \warning command ends when a blank line or some other sectioning command is encountered.

Refer to \author for an example.


\xrefitem <key> "(heading)" "(list title)" { text }

This command is used to define a group which is like the \todo and \bug commands.

The first argument <key> is a unique identifier to name the group. The second argument is a quoted string representing the heading of the group. The third argument is used as the title for the group page. The fourth argument is the text to be shown on the documented page where everything is collated.

The keys todo, test, bug and deprecated are predefined and can not be used with this command.

The \xrefitem command is normally added to the aliases tag in your project file. The following example will define a new command called \reminder.

  reminder=\xrefitem myReminders "My Reminder List" "Heading for Reminders"

In the following example the user defined \error command will collate to the page named my_errors instead of a fully auto generated page. This provides control over the collated output.

/**
@page my_errors List of my Errors
@brief List of common error codes

Information about errors.
*/


/**
\error ERROR 101: in case a file can not be opened.

Check about file system read/write access.
*/
#define MY_ERR_CANNOT_OPEN_FILE                   101

/**
\error ERROR 102: in case a file can not be closed.

Check about file system read/write access.
*/
#define MY_ERR_CANNOT_CLOSE_FILE                  102

This example requires \error to be defined as shown:

  error=\xrefitem my_errors "" ""

Link Commands

The following is an alphabetical list of the commands to create links in DoxyPress.

\addindex (text)

This command adds (text) to the LaTeX index.


\anchor <word>

This command places an invisible named anchor into the documentation which can be referenced with the \ref command.

Note
Anchors can only be used in a comment block which is marked as a page or the mainpage.
See also
\ref

\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 of the reference in the text can be configured with latex-bib-style. For other output formats a fixed representation is used. Note that using this command requires the bibtex program to be present in the search path.


\endlink

This command ends a link that is started with the \link command.

See also
\link

\link <link-object>

Links which are automatically generated by DoxyPress 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 must end with an \endlink command. All text between the \link and \endlink commands serve as text for a link to the <link-object> which is specified as the first argument.

Refer to Auto Links for more information on automatically generated links and valid link-objects.

\\link myMethod() \\endlink

\ref <name> ["(text)"]

Creates a reference to a named section, subsection, page or anchor. For HTML documentation the reference command will generate a link to the section. For a section or subsection the title of the section will be used as the text of the link. For an anchor the optional text between quotes will be used or <name> if no text is specified. For LaTeX documentation the reference command will generate a section number for sections or the text followed by a page number if <name> refers to an anchor.

Refer to \page for an example of the \ref command.


\refitem <name>

Just like the \ref command, this command creates a reference to a named section. This reference appears in a list which starts with \secreflist and ends with \endsecreflist .


\secreflist

Starts an index list of items, created with \refitem, which links to a named section.


\endsecreflist

End an index list started with \secreflist.


\subpage <name> ["(text)"]

This command can be used to create a hierarchy of pages. The same structure can be made using the \defgroup and \ingroup commands, but for pages the \subpage command is often more convenient. The main page 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 the optional 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>.

Refer to \section and \subsection commands if you want to add structure without creating multiple pages.

Note
Each page can be the sub page of only one other page and no cyclic relations are allowed. The page hierarchy must have a tree structure.

Here is an example:

/*! \mainpage A simple manual

Some general info.

This manual is divided in the following sections:
- \subpage intro
- \subpage advanced
*/

/*! \page intro Introduction
This page introduces the user to the topic.
Now you can proceed to the \ref advanced "advanced section".
*/


/*! \page advanced Advanced Usage
This page is for advanced users.
Make sure you have first read \ref intro "the introduction".
*/

\tableofcontents

Creates a table of contents at the top of a page, listing all sections and subsections in the page.

Warning
This command only works inside related page documentation and not in other documentation blocks. It only effects HTML output.

\section <section-name> (section title)

Creates a section with name <section-name>. The title of the section should be specified as the second argument of the \section command.

Warning
This command only works inside related page documentation and not in other documentation blocks.

Refer to \page for an example of the \section command.


\subsection <subsection-name> (subsection title)

Creates a subsection with name <subsection-name>. The title of the subsection should be specified as the second argument of the \subsection command.

Warning
This command only works inside a section of a related page documentation block and not in other documentation blocks.

Refer to \page for an example of the \subsection command.


\subsubsection <subsubsection-name> (subsubsection title)

Creates a subsubsection with name <subsubsection-name>. The title of the subsubsection should be specified as the second argument of the \subsubsection command.

Warning
This command only works inside a subsection of a related page documentation block and not in other documentation blocks.
See also
\page, \section, \subsection

\paragraph <paragraph-name> (paragraph title)

Creates a named paragraph with name <paragraph-name>. The title of the paragraph should be specified as the second argument of the \paragraph command.

Warning
This command only works inside a subsubsection of a related page documentation block and not in other documentation blocks.


Example Commands

The following is an alphabetical list of the example commands in DoxyPress.

\dontinclude <file-name>

This command can be used to parse an example file which is not specified as part of the input source.

The file name specified as the argument to this command must be used in conjunction with other commands to have any effect. The example file is found by searching the directories listed in the example-source tag.

One of the purposes of this command is to break up the documentation into line by line descriptions. The following commands are used to describe the portions of the file which are included.

Another way to include various parts of an example is by using the \snippet command.

/*! Documentation for the Calendar class. */

class Calendar
{
  public:
    /// a member function
    std::string getMonthName();
};

/*!
\page example

\dontinclude include_test.cpp

Our main function begins with a declaration :

\skip main

\until {
First an instance of the Calendar class is created

\skipline Calendar
Then a call is made to our method and the name of the month is returned.

\line getMonthName
Then our program ends.

\line }
 */

The source for include_test.cpp is shown below:

void main()
{
  Calendar tmp;
  tmp.getMonthName();
}

This will result in the following output:

Our main function begins with a declaration:
First an instance of the Calendar class is created
Then a call is made to our method and the name of the month is returned.
Then our program ends.
See also
\line, \skip, \skipline, \until, \include

\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 include file as an argument. Source files or directories can be specified using the example-source tag in the project file.

If <file-name> itself is not unique for the set of example files specified by the example-source tag, you can include part 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 of multiple 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. For this to work the fragment has to be marked.

Note
The DoxyPress commands do not work inside blocks of code. It is allowed to nest C-style comments inside a code block.
See also
\example, \dontinclude, \verbatim

\includedoc <file-name>

This command works the same as \include, however the included file is treated as documentation.


\includelineno <file-name>

This command works the same way as \include, but will add line numbers to the included file.

See also
\include

\line ( pattern )

This command searches line by line through the example that was last included using \include or \dontinclude until it finds a non-blank line. If that line contains the specified pattern, it is written to the output.

The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following the non-blank line that was found (or to the end of the example if no such line could be found).

Refer to \dontinclude for an example.


\skip ( pattern )

This command searches line by line through the example that was last included using \include or \dontinclude until it finds a line that contains the specified pattern.

The internal pointer that is used to keep track of the current line in the example, is set to the start of the line that contains the specified pattern (or to the end of the example if the pattern could not be found).

Refer to \dontinclude for an example.


\skipline ( pattern )

This command searches line by line through the example that was last included using \include or \dontinclude until it finds a line that contains the specified pattern. It then writes the line to the output.

The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following the line that is written (or to the end of the example if the pattern could not be found).

Note:
The command:
\skipline pattern
is equivalent to:
\skip pattern
\line pattern

Refer to \dontinclude for an example.


\snippet <file-name> ( block_id )

Where the \include command can be used to include a complete file as source code, this command can be used to quote only a fragment of a source file. In case this is used as <file-name> the current file is taken as file to take the snippet from.

For example, the putting the following command in the documentation, references a snippet in file example.cpp residing in a subdirectory which should be pointed to by example-source.

  \snippet snippets/example.cpp Adding a resource

The text following the file name is the unique identifier for the snippet. This is used to delimit the quoted code in the relevant snippet file as shown in the following example that corresponds to the above \snippet command:

QImage image(64, 64, QImage::Format_RGB32);
image.fill(qRgb(255, 160, 128));
//! [Adding a resource]
document->addResource(QTextDocument::ImageResource, QUrl("mydata://image.png"), QVariant(image));
//! [Adding a resource]
...

The lines containing the block markers will not be included, so the output will be:

document->addResource(QTextDocument::ImageResource, QUrl("mydata://image.png"), QVariant(image));

The [block_id] markers should appear exactly twice in the source file.

Refer to \dontinclude for an alternative way to include fragments of a source file which does not require markers.


\snippetdoc <file-name> ( block_id )

This command works the same as using \snippet however it will include the contents of the specified file between the given block id.

See also
\snippet

\snippetlineno <file-name> ( block_id )

This command works the same as using \snippet however it will add line numbers.

See also
\snippet

\sortid (id)

The value for id must be an integer. This command is used to specify the sort order of html pages in the treeview output for DoxyPress.


\until ( pattern )

This command writes all lines of the example that was last included using \include or \dontinclude to the output, until it finds a line containing the specified pattern. The line containing the pattern will be written as well.

The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following last written line (or to the end of the example if the pattern could not be found).

Refer to \dontinclude for an example.


\verbinclude <file-name>

This command includes the file <file-name> verbatim in the documentation. The command is equivalent to pasting the file in the documentation and placing \verbatim and \endverbatim commands around it.

Source files or directories can be specified using the example-source tag in the project file.


\htmlinclude <file-name>

This command includes the file <file-name> verbatim in the HTML output documentation. Using this command is equivalent to pasting the file in the documentation and placing the \htmlonly and \endhtmlonly commands around it.

The contents of the file indicated by \htmlinclude is inserted as is. If you insert an HTML fragment that has block scope like a table or list, which should appear outside <p>..</p>, this can lead to invalid HTML. For this situation use \htmlinclude[block] to end the current paragraph and restart after the file is included.

Source files or directories can be specified using the example-source tag in the project file.

See also
cmdhtmlonly

\docbookinclude <file-name>

This command includes the contents of the file <file-name> in the DocBook output documentation. The text from this include file is also added to the generated XML output and will appear inside a <docbookonly> element.

Using this command is equivalent to pasting the contents of the file in the documentation and placing \docbookonly and \enddocbookonly commands around it.

Files or directories that DoxyPress should look for can be specified using the example-source tag in the project file.

See also
\docbookonly

\latexinclude <file-name>

This command includes the contents of the file <file-name> in the LaTeX output documentation. Using this command is equivalent to pasting the file in the documentation and placing \latexonly and \endlatexonly commands around it.

Source files or directories can be specified using the example-source tag in the project file.


\maninclude <file-name>

This command includes the contents of the file <file-name> in the MAN output documentation. The text from this include file is also added to the generated XML output and will appear inside a <manonly> element.

Using this command is equivalent to pasting the contents of the file in the documentation and placing \manonly and \endmanonly commands around it.

Files or directories that DoxyPress should look for can be specified using the example-source tag in the project file.

See also
\manonly

\rtfinclude <file-name>

This command includes the contents of the file <file-name> as is in the RTF output documentation. The text from this include file is also added to the generated XML output and will appear inside a <rtfonly> element.

Using this command is equivalent to pasting the contents of the file in the documentation and placing \rtfonly and \endrtfonly commands around it.

Files or directories that DoxyPress should look for can be specified using the example-source tag in the project file.

See also
\rtfonly

\xmlinclude <file-name>

This command includes contents of the the file <file-name> as is in the XML output documentation.

Using this command is equivalent to pasting the contents of the file in the documentation and placing \xmlonly and \endxmlonly commands around it.

Files or directories that DoxyPress should look for can be specified using the example-source tag in the project file.

See also
\xmlonly


Formatting Commands

The following is an alphabetical list of the visual enhancement commands in DoxyPress.

\a <word>

Displays the argument <word> in italics. Use this command to emphasize a single word. This command is equivalent to \e and \em.

To emphasize multiple words use <em>multiple words</em>.

Example:
  The \a x and \a y coordinates are used to draw a line.

This will result in the following text:    The x and y coordinates are used to draw a line.


\arg { item-description }

This command has one argument which continues until the first blank line or until another \arg is encountered. The command can be used to generate a simple but not nested list of arguments. For nested lists standard HTML commands should be used.

Each argument should start with a \arg command.

Example:
  \arg \c AlignLeft left alignment.
  \arg \c AlignCenter center alignment.
  \arg \c AlignRight right alignment

  No other types of alignment are supported.

This will result in the following text:

  • AlignLeft left alignment.
  • AlignCenter center alignment.
  • AlignRight right alignment

No other types of alignment are supported.


\b <word>

Displays the argument <word> using a bold font. Equivalent to <b>word</b>. To put multiple words in bold use <b>multiple words</b>.


\c <word>

Displays the argument <word> using a typewriter font. Use this to refer to a word of code. To format multiple words use <tt>multiple words</tt>.

Example:
   This function returns \c void and not \c bool.

Results in the following text:   This function returns void and not bool.


\code [ '{'<word>'}']

Starts a block of code. A code block is treated differently from ordinary text. It is interpreted as source code. The names of classes and members and other documented entities are automatically replaced by links to the documentation.

By default the language used for syntax highlighting is based on the extension of the file where the \code block was found. For example, if the code is located in a Python file the syntax highlighting will be done according to the Python syntax.

To explicitly indicate the source language add a specifier after the opening \code command.

SpecifierLanguageNotes
\code {.cpp} C / C++ Also: .c .cc .cxx .c++ .h .hh .hpp .h++ .hxx
\code {.cs} C#
\code {.js} Javascript Also: .as
\code {.m} Objective C Also: .mm .M
\code {.f90} Fortran Also: .f .for .f03 .f08
\code {.php} PHP Also: .php4 .php5
\code {.py} Python Also: .pyw
\code {.tcl} tcl
\code {.xml} XML
\code {.unparsed} No Parser Text is shown as is


// Sample for C++
class Calendar {
public:
std::string month(int num);
private:
bool isSummer;
};
std::string month(int num) {
if (num == 1) {
return "January"
}
/* method continues */
}
// various keywords for comparison
for ( ) { }
interface
namespace
public
variable
!< Sample for Fortran !>
program hello_fortran
implicit none
character (32) :: text
text = "This is a simple Fortran program"
write (*.*) text
end
! various keywords for comparison
for( ) { }
interface
namespace
public
variable
// Sample for Java
public class HelloJava {
public static void main(String[] args) {
System.out.println ("This is a simple Java program");
}
}
// various keywords for comparison
for ( ) { }
interface
namespace
public
variable
// Sample for Javascript
<script LANGUAGE = "Javascript">
var today = new Date()
</script>
/* Sample for PHP */
$name = $_POST["customer"];
$email = $_POST["email"];
# Sample for Python
class Python:
def month(self):
return m_month
m_month = 4
# various keywords for comparison
for ( ) { }
interface
namespace
public
variable
1 // Sample for tcl
2 
3 puts "What is your preferred computer language?"
4 gets stdin lang
5 
6 // various keywords for comparison
7 for { } { } { } { }
8 interface
9 namespace
10 public
11 variable
<!-- Sample for XML -->
<root>Menu
<child>Lunch
<item>Salad</item>
<item>Soup</item>
</child>
<child>Dinner
<item>Fried Chicken</item>
</child>
</root>


If the documentation is not in a source file or can not be determined the text in the code block will be shown as is. If you want to explicitly disable syntax highlighting use .unparsed.

  \code{.unparsed}
  Show this code or text exactly as it appears.
  \endcode
Show this code or text exactly as it appears.
See also
\endcode, \verbatim

\copydoc <link-object>

Copies a documentation block from the object specified by <link-object> and pastes it at the location of the command. This command can be useful to avoid cases where a documentation block would otherwise have to be duplicated or it can be used to extend the documentation of an inherited member.

The link object can point to a member (of a class, file or group), a class, a namespace, a group, a page, or a file (checked in that order). Note that if the object pointed to is a member (function, variable, typedef, etc), the compound (class, file, or group) containing it should also be documented for the copying to work.

To copy the documentation for a member of a class one can, for instance, put the following in the documentation:

  /*! @copydoc MyClass::myfunction()
   *  More documentation.
   */

if the member is overloaded, specify the argument types explicitly (without spaces), as in the following:

  //! @copydoc MyClass::myfunction(type1,type2)

Qualified names are only needed if the context in which the documentation block is found requires them.

The \copydoc command can be used recursively, but cycles in the \copydoc relation will be broken and flagged as an error.

The \copydoc foo() is roughly equivalent to doing:

  \brief   \\copybrief foo()
  \details \\copydetails foo()

Refer to \copybrief and \copydetails for copying only the brief or detailed part of the comment block.


\copybrief <link-object>

Works in a similar way as \copydoc but will only copy the brief description, not the detailed documentation.


\copydetails <link-object>

Works in a similar way as \copydoc but will only copy the detailed documentation, not the brief description.


\docbookonly

Starts a block of text that will be verbatim included in the generated docbook documentation only. The block ends with a \enddocbookonly command.

See also
\manonly, \latexonly, \rtfonly, \xmlonly, \htmlonly

\dot ["caption"] [<sizeindication>=<size>]

Starts a text fragment which should contain a valid description of a dot graph. The text fragment ends with \enddot. DoxyPress will pass the text on to dot and include the resulting image and image map into the output.

The first argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The second argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.

The nodes of a graph can be made clickable by using the URL attribute. By using the command \ref inside the URL value you can conveniently link to an item inside DoxyPress. Here is an example:

/*! class B */
class B {};
/*! class C */
class C {};
/*! \mainpage
*
* Class relations expressed via an inline dot graph:
* \dot
* digraph example {
* node [shape=record, fontname=Helvetica, fontsize=10];
* b [ label="class B" URL="\ref B"];
* c [ label="class C" URL="\ref C"];
* b -> c [ arrowhead="open", style="dashed" ];
* }
* \enddot
* Note that the classes in the above graph are clickable
* (in the HTML output).
*/

\emoji "name"

This command will generate an emoji character based on the supplied name. The supported names are limited to those listed here: https://gist.github.com/rxaviers/7360908

You can use the name with or without colons. For example \emoji smile is the same as using \emoji :smile:. If an emoji character is not supported the name will be places in the output document surrounded by colons. For example, \emoji unsupported. A warning message will also be displayed.


\msc ["caption"] [<sizeindication>=<size>]

Starts a text fragment which should contain a valid description of a message sequence chart. Refer to https://www.mcternan.me.uk/mscgen/ for examples.

The text fragment ends with \endmsc.

The first argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The second argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.

Note
The text fragment should only include the part of the message sequence chart that is within the msc {...} block.
You need to install the mscgen tool to use this command.

Here is an example of the use of the \msc command.

/** Sender class. Can be used to send a command to the server.
* The receiver will acknowledge the command by calling Ack().
* \msc
* Sender,Receiver;
* Sender->Receiver [label="Command()", URL="\ref Receiver::Command()"];
* Sender<-Receiver [label="Ack()", URL="\ref Ack()", ID="1"];
* \endmsc
*/
class Sender
{
public:
/** Acknowledgment from server */
void Ack(bool ok);
};
/** Receiver class. Can be used to receive and execute commands.
* After execution of a command, the receiver will send an acknowledgment
* \msc
* Receiver,Sender;
* Receiver<-Sender [label="Command()", URL="\ref Command()"];
* Receiver->Sender [label="Ack()", URL="\ref Sender::Ack()", ID="1"];
* \endmsc
*/
class Receiver
{
public:
/** Executable a command on the server */
void Command(int commandId);
};
See also
\mscfile

\startuml [{file}] ["caption"] [<sizeindication>=<size>]

Starts a text fragment which should contain a valid description of a PlantUML diagram. The text fragment ends with \enduml.

Refer to https://plantuml.com for examples.

Note
You need to install Java and the PlantUML's jar file, if you want to use this command. The location of the jar file should be specified using plantuml-jar-path.

The first argument is optional and is for compatibility with running PlantUML as a preprocessing step before running DoxyPress, you can also add the name of the image file after \startuml and inside curly brackets.

  @startuml{myimage.png} "Image Caption" width=5cm
  Alice -> Bob : Hello
  @enduml

When the name of the image is specified, DoxyPress will generate an image with that name. Without the name DoxyPress will choose a name automatically.

The second argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The third argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.

Here is an example of the use of the \startuml command.

/** Sender class. Can be used to send a command to the server.
* The receiver will acknowledge the command by calling Ack().
* \startuml
* Sender->Receiver : Command()
* Sender<--Receiver : Ack()
* \enduml
*/
class Sender
{
public:
/** Acknowledgment from server */
void Ack(bool ok);
};
/** Receiver class. Can be used to receive and execute commands.
* After execution of a command, the receiver will send an acknowledgment
* \startuml
* Receiver<-Sender : Command()
* Receiver-->Sender : Ack()
* \enduml
*/
class Receiver
{
public:
/** Executable a command on the server */
void Command(int commandId);
};

\dotfile <file> ["caption"] [<sizeindication>=<size>]

Inserts an image generated by dot from <file> into the documentation.

The first argument specifies the file name of the image DoxyPress will look for files in the paths (or files) specified after the dot-file-dirs tag.

If the dot file is found it will be used as an input file to the dot tool. The resulting image will be put into the correct output directory. If the dot file name contains spaces you'll have to put quotes ("...") around it.

The second argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The third argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.

See also
\dot

\mscfile <file> ["caption"][<sizeindication>=<size>]

Inserts an image generated by mscgen from <file> into the documentation. Refer to https://www.mcternan.me.uk/mscgen/ for examples.

The first argument specifies the file name of the image. DoxyPress will look for files in the paths or files specified after the msc-file-dirs tag.

If the msc file is found it will be used as an input file to the mscgen tool. The resulting image will be put into the correct output directory. If the msc file name contains spaces, put quotes ("...") around it.

The second argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The third argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.

See also
cmdmsc

\diafile <file> ["caption"] [<sizeindication>=<size>]

Inserts an image made in dia from <file> into the documentation.

The first argument specifies the file name of the image. DoxyPress will look for files in the paths or files specified after the dia-file-dirs tag.

If the dia file is found it will be used as an input file dia. The resulting image will be put into the correct output directory. If the dia file name contains spaces, put quotes ("...") around it.

The second argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The third argument is also optional and can be used to specify the width or height of the image.

For a description of the possibilities see the paragraph Size Indication with the \image command.


\e <word>

Displays the argument <word> in italics. Equivalent to \a and \em. To emphasize multiple words use <em>multiple words</em>.

Example:
   This is a \e good example for documenting a method.

Will result in the following text:    This is a good example for documenting a method.


\em <word>

Displays the argument <word> in italics. Equivalent to \a and \e. To emphasize multiple words use <em>multiple words</em>.

Example:
 This is a \em good example for documenting a method.

Will result in the following text:    This is a good example for documenting a method.


\endcode

Ends a block of code.

See also
\code

\enddocbookonly

Ends a block of text that was started with a \docbookonly command.

See also
\docbookonly

\enddot

Ends a block that was started with \dot.


\endmsc

Ends a block that was started with \msc.


\enduml

Ends a block that was started with \startuml.


\endhtmlonly

Ends a block of text that was started with a \htmlonly command.

See also
\htmlonly

\endlatexonly

Ends a block of text that was started with a \latexonly command.

See also
\latexonly

\endmanonly

Ends a block of text that was started with a \manonly command.

See also
\manonly

\endrtfonly

Ends a block of text that was started with a \rtfonly command.

See also
\rtfonly

\endverbatim

Ends a block of text that was started with a \verbatim command.

See also
\verbatim

\endxmlonly

Ends a block of text that was started with a \xmlonly command.

See also
\xmlonly

\f$

Marks the start and end of an in-text formula.

Refer to Formulas for an example.


\f[

Marks the start of a long formula that is displayed centered on a separate line.

See also
\f], Formulas

\f]

Marks the end of a long formula that is displayed centered on a separate line.

See also
\f[, Formulas

\f{environment}{

Marks the start of a formula that is in a specific environment.

Note
The second { is optional and is only to help editors (such as Vim) to do proper syntax highlighting by making the number of opening and closing braces the same.
See also
\f}, Formulas

\f}

Marks the end of a formula that is in a specific environment.

See also
\f{, Formulas

\htmlonly ["[block]"]

Starts a block of text that will be verbatim included in the generated HTML documentation only. The block ends with a \endhtmlonly command.

This command can be used to include HTML code that is too complex for DoxyPress (i.e. applets, java-scripts, and HTML tags which require specific attributes).

Normally the contents between \htmlonly and \endhtmlonly is inserted as-is. When you want to insert a HTML fragment that has block scope like a table or list which should appear outside <p>..</p>, this can lead to invalid HTML. You can use \htmlonly[block] to make DoxyPress end the current paragraph and restart it after \endhtmlonly.

Note
environment variables (like $(HOME) ) are resolved inside a HTML-only block.
See also
\manonly, \latexonly, \rtfonly, \xmlonly, \docbookonly

\image <format> <file> ["caption"] [<sizeindication>=<size>]

Inserts an image into the documentation. This command is format specific, so if you want to insert an image for more than one format, repeat this command for each format.

The first argument specifies the output format in which the image should be embedded. Currently, the following values are supported: html, latex, docbook and rtf.

The second argument specifies the file name of the image. DoxyPress will look for files in the paths (or files) that you specified after the image-path tag.

If the image is found it will be copied to the correct output directory. If the image name contains spaces you'll have to put quotes ("...") around the name. You can also specify an absolute URL instead of a file name, but then DoxyPress does not copy the image nor check its existence.

The third argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified on a single line and between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

The fourth argument is also optional and can be used to specify the width or height of the image. This can be useful for LaTeX or docbook output (i.e. format=latex or format=docbook).

Size Indication
The sizeindication can specify the width or height to be used (or a combination). The size specifier in LaTeX (for example 10cm or 4in or a symbolic width like \\textwidth).

Here is example of a comment block:

  /*! Here is a snapshot of my new application:
   *  \image html application.jpg
   *  \image latex application.eps "My application" width=10cm
   */

And this is an example of how the relevant part of the project file may look:

  IMAGE PATH  = my_image_dir
Warning
The image format for HTML is limited to what your browser supports. For LaTeX, the image format must be Encapsulated PostScript (eps). DoxyPress does not verify if the image is in the correct format.

\latexonly

Starts a block of text that will be verbatim included in the generated LaTeX documentation only. The block ends with a \endlatexonly command.

This command can be used to include LaTeX code that is too complex for DoxyPress. Use the cmdhtmlonly and cmdendhtmlonly pair to provide a proper HTML alternative.

Note: environment variables (like $(HOME) ) are resolved inside a LaTeX-only block.

See also
cmdrtfonly, cmdxmlonly, cmdmanonly, cmdhtmlonly, cmdhtmlonly

\manonly

Starts a block of text that will be verbatim included in the generated MAN documentation only. The block ends with a \endmanonly command.

This command can be used to include groff code directly into MAN pages. You can use the cmdhtmlonly and \endhtmlonly and \latexonly and \endlatexonly pairs to provide proper HTML and LaTeX alternatives.

See also
\htmlonly, \xmlonly, \rtfonly, \latexonly, \docbookonly

\li { item-description }

This command has one argument that continues until the first blank line or until another \li is encountered. The command can be used to generate a simple, not nested list of arguments. Each argument should start with a \li command.

For nested lists HTML commands should be used.

Example:
  \li \c AlignLeft left alignment.
  \li \c AlignCenter center alignment.
  \li \c AlignRight right alignment

  No other types of alignment are supported.

Will result in the following text:

  • AlignLeft left alignment.
  • AlignCenter center alignment.
  • AlignRight right alignment


No other types of alignment are supported.


\n

Forces a new line. Equivalent to <br> and inspired by the printf function.


\p <word>

Displays the parameter <word> using a typewriter font. This command is used to identify parameters for a method or function.

Example:
  The \p x and \p y coordinates are used to ...

This will result in the following text:    The x and y coordinates are used to ...


\rtfonly

Starts a block of text that will be verbatim included in the generated RTF documentation only. The block ends with a \endrtfonly command. Environment variables (like $(HOME) ) are resolved inside a RTF-only block.

This command can be used to include RTF code which is complex.

See also
\manonly, \xmlonly, \latexonly, \htmlonly, \docbookonly

\verbatim

Starts a block of text that will be verbatim included in the documentation. The block should end with a \endverbatim command. All commands are disabled in a verbatim block.

See also
\code, \endverbatim, \verbinclude

\xmlonly

Starts a block of text that will be verbatim included in the generated XML output only. The block ends with a \endxmlonly command.

This command can be used to include custom XML tags.

See also
\manonly, \rtfonly, \latexonly, \htmlonly, \docbookonly

\@

This command writes an at-sign (@) to the output. The at-sign has to be escaped in some cases because DoxyPress uses it to detect JavaDoc commands.


\&

This command writes the & character to the output. This character has to be escaped because it has a special meaning in HTML.


\\

This command writes a backslash character (\) to the output. The backslash has to be escaped in some cases because DoxyPress uses it to detect commands.


\$

This command writes the $ character to the output. This character has to be escaped in some cases, because it is used to expand environment variables.


\~ [LanguageId]

This command enables or disables a language specific filter which can be used to put documentation for different languages into one comment block.

Use \~language_id to enable output for a specific language only and \~ to enable output for all languages.

Use the output-language tag to filter out only a specific language.

/*!
   \~english This is English
   \~dutch Dit is Nederlands
   \~german Dies ist Deutsch
   \~ output for all languages.
 */

If you have German selected the output for this block will be:    Dies ist Deutsch output for all languages.


\<

This command writes the < character to the output. This character has to be escaped because it has a special meaning in HTML.


\>

This command writes the > character to the output. This character has to be escaped because it has a special meaning in HTML.


\#

This command writes the # character to the output. This character has to be escaped in some cases, because it is used to refer to documented entities.


\%

This command writes the % character to the output. This character has to be escaped in some cases, because it is used to prevent auto-linking to word that is also a documented class or struct.


\"

This command writes the " character to the output. This character has to be escaped in some cases, because it is used in pairs to indicate an unformatted text fragment.


\.

This command writes a dot (.) to the output. This can be useful to prevent ending a brief description when JAVADOC-AUTO-BRIEF is enabled or to prevent starting a numbered list when the dot follows a number at the start of a line.


\::

This command writes two colons to the output. This character sequence has to be escaped in some cases, because it is used to reference to documented entities.


\|

This command writes a pipe symbol to the output. This character has to be escaped in some cases, because it is used for Markdown tables.


\--

This command writes two dashes to the output. This allows writing two consecutive dashes to the output instead of one n-dash character.


\---

This command writes three dashes to the output. This allows writing three consecutive dashes to the output instead of one m-dash character.