1 /******************************************************************************
5 * Copyright (C) 1997-2012 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
17 /*! \page autolink Automatic link generation
21 Most documentation systems have special `see also' sections where links
22 to other pieces of documentation can be inserted.
23 Although doxygen also has a command to start such a section (See section
24 \ref cmdsa "\\sa"), it does allow you to put these kind of links anywhere in the
26 For \f$\mbox{\LaTeX}\f$ documentation a reference to the page number
27 is written instead of a link. Furthermore, the index at the end of the
28 document can be used to quickly find the documentation of a member, class,
30 For man pages no reference information is generated.
32 The next sections show how to generate links to the various documented
33 entities in a source file.
35 \section linkurl Links to web pages and mail addresses
37 Doxygen will automatically replace any URLs and mail addresses found in the
38 documentation by links (in HTML). To manually specify link text, use the
39 HTML '<tt>a</tt>' tag:
40 \verbatim <a href="linkURL">link text</a> \endverbatim
41 which will be automatically translated to other output formats by Doxygen.
43 \section linkclass Links to classes
45 All words in the documentation that correspond to a documented class and
46 contain at least one non-lower case character will automatically be
47 replaced by a link to the page containing the
48 documentation of the class. If you want to prevent that a word
49 that corresponds to a documented class is replaced by a link you
50 should put a \% in front of the word.
51 To link to an all lower case symbol, use \ref cmdref "\\ref".
53 \section linkfile Links to files
55 All words that contain a dot (<tt>.</tt>) that is not the last character
56 in the word are considered to be file names.
57 If the word is indeed the name of a documented input file, a link will
58 automatically be created to the documentation of that file.
60 \section linkfunc Links to functions
62 Links to functions are created if one of the following patterns is
65 <li><tt>\<functionName\>"("\<argument-list\>")"</tt>
66 <li><tt>\<functionName\>"()"</tt>
67 <li><tt>"::"\<functionName\></tt>
68 <li><tt>(\<className\>"::")<sup>n</sup>\<functionName\>"("\<argument-list\>")"</tt>
69 <li><tt>(\<className\>"::")<sup>n</sup>\<functionName\>"("\<argument-list\>")"\<modifiers\></tt>
70 <li><tt>(\<className\>"::")<sup>n</sup>\<functionName\>"()"</tt>
71 <li><tt>(\<className\>"::")<sup>n</sup>\<functionName\></tt>
76 Function arguments should be specified with correct types, i.e.
77 'fun(const std::string&,bool)' or '()' to match any prototype.
79 Member function modifiers (like 'const' and 'volatile')
80 are required to identify the target, i.e. 'func(int) const' and 'fun(int)'
81 target different member functions.
83 For JavaDoc compatibility a \# may be used instead of a :: in
86 In the documentation of a class containing a member foo,
87 a reference to a global variable is made using "::foo", whereas \#foo
88 will link to the member.
90 For non overloaded members the argument list may be omitted.
92 If a function is overloaded and no matching argument list is specified
93 (i.e. pattern 2 or 6 is used), a link will be created to the
94 documentation of one of the overloaded members.
96 For member functions the class scope (as used in patterns 4 to 7) may
99 <li>The pattern points to a documented member that belongs to the same class
100 as the documentation block that contains the pattern.
101 <li>The class that corresponds to the documentation blocks that contains
102 the pattern has a base class that contains a documented member
103 that matches the pattern.
106 \section linkother Links to other members
108 All of these entities can be linked to in the same way as described in the
109 previous section. For sake of clarity it is advised to only use
110 patterns 3 and 7 in this case.
113 \verbinclude autolink.cpp
115 Click <a href="$(DOXYGEN_DOCDIR)/examples/autolink/html/index.html">here</a>
116 for the corresponding HTML documentation that is generated by Doxygen.
119 \section resolving typedefs
121 Typedefs that involve classes, structs and unions, like
123 typedef struct StructName TypeName
125 create an alias for StructName, so links will be generated to StructName,
126 when either StructName itself or TypeName is encountered.
129 \verbinclude restypedef.cpp
131 Click <a href="$(DOXYGEN_DOCDIR)/examples/restypedef/html/restypedef_8cpp.html">here</a>
132 for the corresponding HTML documentation that is generated by Doxygen.