Change location of VES5.0 code
[demo.git] / vnfs / VES5.0 / doxygen-1.8.12 / html / starting.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.12"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>Doxygen: Getting started</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="navtree.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="resize.js"></script>
14 <script type="text/javascript" src="navtreedata.js"></script>
15 <script type="text/javascript" src="navtree.js"></script>
16 <script type="text/javascript">
17   $(document).ready(initResizable);
18 </script>
19 <link href="doxygen_manual.css" rel="stylesheet" type="text/css" />
20 </head>
21 <body>
22 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
23 <div id="titlearea">
24 <table cellspacing="0" cellpadding="0">
25  <tbody>
26  <tr style="height: 56px;">
27   <td id="projectalign" style="padding-left: 0.5em;">
28    <div id="projectname">Doxygen
29    </div>
30   </td>
31  </tr>
32  </tbody>
33 </table>
34 </div>
35 <!-- end header part -->
36 <!-- Generated by Doxygen 1.8.12 -->
37 </div><!-- top -->
38 <div id="side-nav" class="ui-resizable side-nav-resizable">
39   <div id="nav-tree">
40     <div id="nav-tree-contents">
41       <div id="nav-sync" class="sync"></div>
42     </div>
43   </div>
44   <div id="splitbar" style="-moz-user-select:none;" 
45        class="ui-resizable-handle">
46   </div>
47 </div>
48 <script type="text/javascript">
49 $(document).ready(function(){initNavTree('starting.html','');});
50 </script>
51 <div id="doc-content">
52 <div class="header">
53   <div class="headertitle">
54 <div class="title">Getting started </div>  </div>
55 </div><!--header-->
56 <div class="contents">
57 <div class="toc"><h3>Table of Contents</h3>
58 <ul><li class="level1"><a href="#step0">Step 0: Check if doxygen supports your programming language</a></li>
59 <li class="level1"><a href="#step1">Step 1: Creating a configuration file</a></li>
60 <li class="level1"><a href="#step2">Step 2: Running doxygen</a><ul><li class="level2"><a href="#html_out">HTML output</a></li>
61 <li class="level2"><a href="#latex_out">LaTeX output</a></li>
62 <li class="level2"><a href="#rtf_out">RTF output</a></li>
63 <li class="level2"><a href="#xml_out">XML output</a></li>
64 <li class="level2"><a href="#man_out">Man page output</a></li>
65 <li class="level2"><a href="#docbook_out">DocBook output</a></li>
66 </ul>
67 </li>
68 <li class="level1"><a href="#step3">Step 3: Documenting the sources</a></li>
69 </ul>
70 </div>
71 <div class="textblock"><p>The executable <code>doxygen</code> is the main program that parses the sources and generates the documentation. See section <a class="el" href="doxygen_usage.html">Doxygen usage</a> for more detailed usage information.</p>
72 <p>Optionally, the executable <code>doxywizard</code> can be used, which is a <a class="el" href="doxywizard_usage.html">graphical front-end</a> for editing the configuration file that is used by doxygen and for running doxygen in a graphical environment. For Mac OS X doxywizard will be started by clicking on the doxygen application icon.</p>
73 <p>The following figure shows the relation between the tools and the flow of information between them (it looks complex but that's only because it tries to be complete):</p>
74 <div class="image">
75 <img src="infoflow.png" alt="infoflow.png"/>
76 <div class="caption">
77 Doxygen information flow</div></div>
78  <h1><a class="anchor" id="step0"></a>
79 Step 0: Check if doxygen supports your programming language</h1>
80 <p>First, assure that your programming language has a reasonable chance of being recognized by doxygen. These languages are supported by default: C, C++, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, and D. It is possible to configure certain file type extensions to use certain parsers: see the <a class="el" href="config.html#cfg_extension_mapping">Configuration/ExtensionMappings</a> for details. Also, completely different languages can be supported by using preprocessor programs: see the <a href="http://www.doxygen.org/helpers.html">Helpers page</a> for details.</p>
81 <h1><a class="anchor" id="step1"></a>
82 Step 1: Creating a configuration file</h1>
83 <p>Doxygen uses a configuration file to determine all of its settings. Each project should get its own configuration file. A project can consist of a single source file, but can also be an entire source tree that is recursively scanned.</p>
84 <p>To simplify the creation of a configuration file, doxygen can create a template configuration file for you. To do this call <code>doxygen</code> from the command line with the <code>-g</code> option: </p><pre class="fragment">doxygen -g &lt;config-file&gt;
85 </pre><p>where &lt;config-file&gt; is the name of the configuration file. If you omit the file name, a file named <code>Doxyfile</code> will be created. If a file with the name &lt;config-file&gt; already exists, doxygen will rename it to &lt;config-file&gt;.bak before generating the configuration template. If you use <code>-</code> (i.e. the minus sign) as the file name then doxygen will try to read the configuration file from standard input (<code>stdin</code>), which can be useful for scripting.</p>
86 <p>The configuration file has a format that is similar to that of a (simple) Makefile. It consists of a number of assignments (tags) of the form:</p>
87 <p><code>TAGNAME = VALUE</code> or <br />
88  <code>TAGNAME = VALUE1 VALUE2 ... </code><br />
89 </p>
90 <p>You can probably leave the values of most tags in a generated template configuration file to their default value. See section <a class="el" href="config.html">Configuration</a> for more details about the configuration file.</p>
91 <p>If you do not wish to edit the config file with a text editor, you should have a look at <a class="el" href="doxywizard_usage.html">doxywizard</a>, which is a GUI front-end that can create, read and write doxygen configuration files, and allows setting configuration options by entering them via dialogs.</p>
92 <p>For a small project consisting of a few C and/or C++ source and header files, you can leave <a class="el" href="config.html#cfg_input">INPUT</a> tag empty and doxygen will search for sources in the current directory.</p>
93 <p>If you have a larger project consisting of a source directory or tree you should assign the root directory or directories to the <a class="el" href="config.html#cfg_input">INPUT</a> tag, and add one or more file patterns to the <a class="el" href="config.html#cfg_file_patterns">FILE_PATTERNS</a> tag (for instance <code>*.cpp *.h</code>). Only files that match one of the patterns will be parsed (if the patterns are omitted a list of typical patterns is used for the types of files doxygen supports). For recursive parsing of a source tree you must set the <a class="el" href="config.html#cfg_recursive">RECURSIVE</a> tag to <code>YES</code>. To further fine-tune the list of files that is parsed the <a class="el" href="config.html#cfg_exclude">EXCLUDE</a> and <a class="el" href="config.html#cfg_exclude_patterns">EXCLUDE_PATTERNS</a> tags can be used. To omit all <code>test</code> directories from a source tree for instance, one could use:</p>
94 <pre class="fragment">EXCLUDE_PATTERNS = */test/* 
95 </pre><p>Doxygen looks at the file's extension to determine how to parse a file, using the following table:</p>
96 <table class="doxtable">
97 <tr>
98 <th align="right">Extension </th><th>Language  </th></tr>
99 <tr>
100 <td align="right">.idl </td><td>IDL </td></tr>
101 <tr>
102 <td align="right">.ddl </td><td>IDL </td></tr>
103 <tr>
104 <td align="right">.odl </td><td>IDL </td></tr>
105 <tr>
106 <td align="right">.java </td><td>Java </td></tr>
107 <tr>
108 <td align="right">.cs </td><td>C# </td></tr>
109 <tr>
110 <td align="right">.d </td><td>D </td></tr>
111 <tr>
112 <td align="right">.php </td><td>PHP </td></tr>
113 <tr>
114 <td align="right">.php4 </td><td>PHP </td></tr>
115 <tr>
116 <td align="right">.php5 </td><td>PHP </td></tr>
117 <tr>
118 <td align="right">.inc </td><td>PHP </td></tr>
119 <tr>
120 <td align="right">.phtml </td><td>PHP </td></tr>
121 <tr>
122 <td align="right">.m </td><td>Objective-C </td></tr>
123 <tr>
124 <td align="right">.M </td><td>Objective-C </td></tr>
125 <tr>
126 <td align="right">.mm </td><td>Objective-C </td></tr>
127 <tr>
128 <td align="right">.py </td><td>Python </td></tr>
129 <tr>
130 <td align="right">.f </td><td>Fortran </td></tr>
131 <tr>
132 <td align="right">.for </td><td>Fortran </td></tr>
133 <tr>
134 <td align="right">.f90 </td><td>Fortran </td></tr>
135 <tr>
136 <td align="right">.f95 </td><td>Fortran </td></tr>
137 <tr>
138 <td align="right">.f03 </td><td>Fortran </td></tr>
139 <tr>
140 <td align="right">.f08 </td><td>Fortran </td></tr>
141 <tr>
142 <td align="right">.vhd </td><td>VHDL </td></tr>
143 <tr>
144 <td align="right">.vhdl </td><td>VHDL </td></tr>
145 <tr>
146 <td align="right">.tcl </td><td>TCL </td></tr>
147 <tr>
148 <td align="right">.ucf </td><td>VHDL </td></tr>
149 <tr>
150 <td align="right">.qsf </td><td>VHDL </td></tr>
151 <tr>
152 <td align="right">.md </td><td>Markdown </td></tr>
153 <tr>
154 <td align="right">.markdown </td><td>Markdown </td></tr>
155 </table>
156 <p>Any other extension is parsed as if it is a C/C++ file.</p>
157 <p><a class="anchor" id="extract_all"></a>If you start using doxygen for an existing project (thus without any documentation that doxygen is aware of), you can still get an idea of what the structure is and how the documented result would look like. To do so, you must set the <a class="el" href="config.html#cfg_extract_all">EXTRACT_ALL</a> tag in the configuration file to <code>YES</code>. Then, doxygen will pretend everything in your sources is documented. Please note that as a consequence warnings about undocumented members will not be generated as long as <a class="el" href="config.html#cfg_extract_all">EXTRACT_ALL</a> is set to <code>YES</code>.</p>
158 <p>To analyze an existing piece of software it is useful to cross-reference a (documented) entity with its definition in the source files. Doxygen will generate such cross-references if you set the <a class="el" href="config.html#cfg_source_browser">SOURCE_BROWSER</a> tag to <code>YES</code>. It can also include the sources directly into the documentation by setting <a class="el" href="config.html#cfg_inline_sources">INLINE_SOURCES</a> to <code>YES</code> (this can be handy for code reviews for instance).</p>
159 <h1><a class="anchor" id="step2"></a>
160 Step 2: Running doxygen</h1>
161 <p>To generate the documentation you can now enter: </p><pre class="fragment">doxygen &lt;config-file&gt;
162 </pre><p>Depending on your settings doxygen will create <code>html</code>, <code>rtf</code>, <code>latex</code>, <code>xml</code>, <code>man</code>, and/or docbook directories inside the output directory. As the names suggest these directories contain the generated documentation in HTML, RTF, <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/>, XML, Unix-Man page, and DocBook format.</p>
163 <p>The default output directory is the directory in which <code>doxygen</code> is started. The root directory to which the output is written can be changed using the <a class="el" href="config.html#cfg_output_directory">OUTPUT_DIRECTORY</a>. The format specific directory within the output directory can be selected using the <a class="el" href="config.html#cfg_html_output">HTML_OUTPUT</a>, <a class="el" href="config.html#cfg_rtf_output">RTF_OUTPUT</a>, <a class="el" href="config.html#cfg_latex_output">LATEX_OUTPUT</a>, <a class="el" href="config.html#cfg_xml_output">XML_OUTPUT</a>, <a class="el" href="config.html#cfg_man_output">MAN_OUTPUT</a>, and <a class="el" href="config.html#cfg_docbook_output">DOCBOOK_OUTPUT</a>. tags of the configuration file. If the output directory does not exist, <code>doxygen</code> will try to create it for you (but it will <em>not</em> try to create a whole path recursively, like <code>mkdir -p</code> does).</p>
164 <h2><a class="anchor" id="html_out"></a>
165 HTML output</h2>
166 <p><a name="abrowser"></a> The generated HTML documentation can be viewed by pointing a HTML browser to the <code>index.html</code> file in the <code>html</code> directory. For the best results a browser that supports cascading style sheets (CSS) should be used (I'm using Mozilla Firefox, Google Chrome, Safari, and sometimes IE8, IE9, and Opera to test the generated output).</p>
167 <p>Some of the features the HTML section (such as <a class="el" href="config.html#cfg_generate_treeview">GENERATE_TREEVIEW</a> or the search engine) require a browser that supports Dynamic HTML and Javascript enabled.</p>
168 <h2><a class="anchor" id="latex_out"></a>
169 LaTeX output</h2>
170 <p><a name="aLaTeX"></a> The generated <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> documentation must first be compiled by a <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> compiler (I use a recent teTeX distribution for Linux and MacOSX and MikTex for Windows). To simplify the process of compiling the generated documentation, <code>doxygen</code> writes a <code>Makefile</code> into the <code>latex</code> directory (on the Windows platform also a <code>make.bat</code> batch file is generated).</p>
171 <p>The contents and targets in the <code>Makefile</code> depend on the setting of <a class="el" href="config.html#cfg_use_pdflatex">USE_PDFLATEX</a>. If it is disabled (set to <code>NO</code>), then typing <code>make</code> in the <code>latex</code> directory a <code>dvi</code> file called <code>refman.dvi</code> will be generated. This file can then be viewed using <code>xdvi</code> or converted into a PostScript file <code>refman.ps</code> by typing <code>make ps</code> (this requires <code>dvips</code>).</p>
172 <p>To put 2 pages on one physical page use <code>make ps_2on1</code> instead. The resulting PostScript file can be send to a PostScript printer. If you do not have a PostScript printer, you can try to use ghostscript to convert PostScript into something your printer understands.</p>
173 <p>Conversion to PDF is also possible if you have installed the ghostscript interpreter; just type <code>make pdf</code> (or <code>make pdf_2on1</code>).</p>
174 <p>To get the best results for PDF output you should set the <a class="el" href="config.html#cfg_pdf_hyperlinks">PDF_HYPERLINKS</a> and <a class="el" href="config.html#cfg_use_pdflatex">USE_PDFLATEX</a> tags to <code>YES</code>. In this case the <code>Makefile</code> will only contain a target to build <code>refman.pdf</code> directly.</p>
175 <h2><a class="anchor" id="rtf_out"></a>
176 RTF output</h2>
177 <p><a name="aRTF"></a> Doxygen combines the RTF output to a single file called refman.rtf. This file is optimized for importing into the Microsoft Word. Certain information is encoded using so called fields. To show the actual value you need to select all (Edit - select all) and then toggle fields (right click and select the option from the drop down menu).</p>
178 <h2><a class="anchor" id="xml_out"></a>
179 XML output</h2>
180 <p><a name="aXML"></a> The XML output consists of a structured "dump" of the information gathered by doxygen. Each compound (class/namespace/file/...) has its own XML file and there is also an index file called <code>index.xml</code>.</p>
181 <p>A file called <code>combine.xslt</code> XSLT script is also generated and can be used to combine all XML files into a single file.</p>
182 <p>Doxygen also generates two XML schema files <code>index.xsd</code> (for the index file) and <code>compound.xsd</code> (for the compound files). This schema file describes the possible elements, their attributes and how they are structured, i.e. it the describes the grammar of the XML files and can be used for validation or to steer XSLT scripts.</p>
183 <p>In the <code>addon/doxmlparser</code> directory you can find a parser library for reading the XML output produced by doxygen in an incremental way (see <code>addon/doxmlparser/include/doxmlintf.h</code> for the interface of the library)</p>
184 <h2><a class="anchor" id="man_out"></a>
185 Man page output</h2>
186 <p><a name="aman"></a> The generated man pages can be viewed using the <code>man</code> program. You do need to make sure the man directory is in the man path (see the <code>MANPATH</code> environment variable). Note that there are some limitations to the capabilities of the man page format, so some information (like class diagrams, cross references and formulas) will be lost.</p>
187 <h2><a class="anchor" id="docbook_out"></a>
188 DocBook output</h2>
189 <p><a name="adocbook"></a> Doxygen can also generate output in the <a href="http://www.docbook.org/">DocBook</a> format. How to process the DocBook output is beyond the scope of this manual.</p>
190 <h1><a class="anchor" id="step3"></a>
191 Step 3: Documenting the sources</h1>
192 <p>Although documenting the sources is presented as step 3, in a new project this should of course be step 1. Here I assume you already have some code and you want doxygen to generate a nice document describing the API and maybe the internals and some related design documentation as well.</p>
193 <p>If the <a class="el" href="config.html#cfg_extract_all">EXTRACT_ALL</a> option is set to <code>NO</code> in the configuration file (the default), then doxygen will only generate documentation for <em>documented</em> entities. So how do you document these? For members, classes and namespaces there are basically two options:</p><ol type="1">
194 <li><p class="startli">Place a <em>special</em> documentation block in front of the declaration or definition of the member, class or namespace. For file, class and namespace members it is also allowed to place the documentation directly after the member.</p>
195 <p class="startli">See section <a class="el" href="docblocks.html#specialblock">Special comment blocks</a> to learn more about special documentation blocks.</p>
196 </li>
197 <li><p class="startli">Place a special documentation block somewhere else (another file or another location) <em>and</em> put a <em>structural command</em> in the documentation block. A structural command links a documentation block to a certain entity that can be documented (e.g. a member, class, namespace or file).</p>
198 <p class="startli">See section <a class="el" href="docblocks.html#structuralcommands">Documentation at other places</a> to learn more about structural commands.</p>
199 </li>
200 </ol>
201 <p>The advantage of the first option is that you do not have to repeat the name of the entity.</p>
202 <p>Files can only be documented using the second option, since there is no way to put a documentation block before a file. Of course, file members (functions, variables, typedefs, defines) do not need an explicit structural command; just putting a special documentation block in front or behind them will work fine.</p>
203 <p>The text inside a special documentation block is parsed before it is written to the HTML and/or <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> output files.</p>
204 <p><a name="aparsing"></a> During parsing the following steps take place:</p><ul>
205 <li>Markdown formatting is replaced by corresponding HTML or special commands.</li>
206 <li>The special commands inside the documentation are executed. See section <a class="el" href="commands.html">Special Commands</a> for an overview of all commands.</li>
207 <li>If a line starts with some whitespace followed by one or more asterisks (<code>*</code>) and then optionally more whitespace, then all whitespace and asterisks are removed.</li>
208 <li>All resulting blank lines are treated as a paragraph separators. This saves you from placing new-paragraph commands yourself in order to make the generated documentation readable.</li>
209 <li>Links are created for words corresponding to documented classes (unless the word is preceded by a %; then the word will not be linked and the % sign is removed).</li>
210 <li>Links to members are created when certain patterns are found in the text. See section <a class="el" href="autolink.html">Automatic link generation</a> for more information on how the automatic link generation works.</li>
211 <li>HTML tags that are in the documentation are interpreted and converted to <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> equivalents for the <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"/> output. See section <a class="el" href="htmlcmds.html">HTML Commands</a> for an overview of all supported HTML tags.</li>
212 </ul>
213 <p> 
214 Go to the <a href="docblocks.html">next</a> section or return to the
215  <a href="index.html">index</a>.
216  </p>
217 </div></div><!-- contents -->
218 </div><!-- doc-content -->
219 <!-- start footer part -->
220 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
221   <ul>
222     <li class="footer">Generated by
223     <a href="http://www.doxygen.org/index.html">
224     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
225   </ul>
226 </div>
227 </body>
228 </html>