Skip to content

Commit 73c4602

Browse files
committed
Minor documentation updates
1 parent 2a0e979 commit 73c4602

File tree

5 files changed

+697
-64
lines changed

5 files changed

+697
-64
lines changed

Diff for: doc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ set(DOC_INSTALL_DIR "share/doc/packages/doxygen" CACHE STRING "Relative path whe
3232
set(DOC_FILES
3333
arch.doc
3434
archoverview.eps
35-
archoverview.gif
35+
archoverview.svg
3636
autolink.doc
3737
changelog.doc
3838
commands.doc

Diff for: doc/arch.doc

+55-55
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/******************************************************************************
22
*
3-
*
3+
*
44
*
55
* Copyright (C) 1997-2015 by Dimitri van Heesch.
66
*
77
* 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
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
1010
* for any purpose. It is provided "as is" without express or implied warranty.
1111
* See the GNU General Public License for more details.
1212
*
@@ -22,28 +22,28 @@
2222

2323
The following picture shows how source files are processed by doxygen.
2424

25-
\image html archoverview.gif "Data flow overview"
25+
\image html archoverview.svg "Data flow overview"
2626
\image latex archoverview.eps "Data flow overview" width=14cm
2727

2828
The following sections explain the steps above in more detail.
2929

3030
<h3>Config parser</h3>
3131

3232
The configuration file that controls the settings of a project is parsed
33-
and the settings are stored in the singleton class \c Config
34-
in <code>src/config.h</code>. The parser itself is written using \c flex
35-
and can be found in <code>src/config.l</code>. This parser is also used
33+
and the settings are stored in the singleton class \c Config
34+
in <code>src/config.h</code>. The parser itself is written using \c flex
35+
and can be found in <code>src/config.l</code>. This parser is also used
3636
directly by \c doxywizard, so it is put in a separate library.
3737

38-
Each configuration option has one of 5 possible types: \c String,
38+
Each configuration option has one of 5 possible types: \c String,
3939
\c List, \c Enum, \c Int, or \c Bool. The values of these options are
4040
available through the global functions \c Config_getXXX(), where \c XXX is the
4141
type of the option. The argument of these function is a string naming
42-
the option as it appears in the configuration file. For instance:
42+
the option as it appears in the configuration file. For instance:
4343
\c Config_getBool("GENERATE_TESTLIST") returns a reference to a boolean
44-
value that is \c TRUE if the test list was enabled in the configuration file.
44+
value that is \c TRUE if the test list was enabled in the configuration file.
4545

46-
The function \c readConfiguration() in \c src/doxygen.cpp
46+
The function \c readConfiguration() in \c src/doxygen.cpp
4747
reads the command line options and then calls the configuration parser.
4848

4949
<h3>C Preprocessor</h3>
@@ -54,29 +54,29 @@ C Preprocessor (after being piped through a user defined filter if available).
5454
The way the preprocessor works differs somewhat from a standard C Preprocessor.
5555
By default it does not do macro expansion, although it can be configured to
5656
expand all macros. Typical usage is to only expand a user specified set
57-
of macros. This is to allow macro names to appear in the type of
57+
of macros. This is to allow macro names to appear in the type of
5858
function parameters for instance.
5959

60-
Another difference is that the preprocessor parses, but not actually includes
60+
Another difference is that the preprocessor parses, but not actually includes
6161
code when it encounters a \c \#include (with the exception of \c \#include
62-
found inside { ... } blocks). The reasons behind this deviation from
63-
the standard is to prevent feeding multiple definitions of the
64-
same functions/classes to doxygen's parser. If all source files would
65-
include a common header file for instance, the class and type
66-
definitions (and their documentation) would be present in each
67-
translation unit.
62+
found inside { ... } blocks). The reasons behind this deviation from
63+
the standard is to prevent feeding multiple definitions of the
64+
same functions/classes to doxygen's parser. If all source files would
65+
include a common header file for instance, the class and type
66+
definitions (and their documentation) would be present in each
67+
translation unit.
6868

6969
The preprocessor is written using \c flex and can be found in
70-
\c src/pre.l. For condition blocks (\c \#if) evaluation of constant expressions
71-
is needed. For this a \c yacc based parser is used, which can be found
70+
\c src/pre.l. For condition blocks (\c \#if) evaluation of constant expressions
71+
is needed. For this a \c yacc based parser is used, which can be found
7272
in \c src/constexp.y and \c src/constexp.l.
7373

74-
The preprocessor is invoked for each file using the \c preprocessFile()
75-
function declared in \c src/pre.h, and will append the preprocessed result
74+
The preprocessor is invoked for each file using the \c preprocessFile()
75+
function declared in \c src/pre.h, and will append the preprocessed result
7676
to a character buffer. The format of the character buffer is
7777

7878
\verbatim
79-
0x06 file name 1
79+
0x06 file name 1
8080
0x06 preprocessed contents of file 1
8181
...
8282
0x06 file name n
@@ -85,17 +85,17 @@ to a character buffer. The format of the character buffer is
8585

8686
<h3>Language parser</h3>
8787

88-
The preprocessed input buffer is fed to the language parser, which is
89-
implemented as a big state machine using \c flex. It can be found
90-
in the file \c src/scanner.l. There is one parser for all
91-
languages (C/C++/Java/IDL). The state variables \c insideIDL
92-
and \c insideJava are uses at some places for language specific choices.
88+
The preprocessed input buffer is fed to the language parser, which is
89+
implemented as a big state machine using \c flex. It can be found
90+
in the file \c src/scanner.l. There is one parser for all
91+
languages (C/C++/Java/IDL). The state variables \c insideIDL
92+
and \c insideJava are uses at some places for language specific choices.
9393

94-
The task of the parser is to convert the input buffer into a tree of entries
95-
(basically an abstract syntax tree). An entry is defined in \c src/entry.h
96-
and is a blob of loosely structured information. The most important field
94+
The task of the parser is to convert the input buffer into a tree of entries
95+
(basically an abstract syntax tree). An entry is defined in \c src/entry.h
96+
and is a blob of loosely structured information. The most important field
9797
is \c section which specifies the kind of information contained in the entry.
98-
98+
9999
Possible improvements for future versions:
100100
- Use one scanner/parser per language instead of one big scanner.
101101
- Move the first pass parsing of documentation blocks to a separate module.
@@ -104,8 +104,8 @@ Possible improvements for future versions:
104104

105105
<h3>Data organizer</h3>
106106

107-
This step consists of many smaller steps, that build
108-
dictionaries of the extracted classes, files, namespaces,
107+
This step consists of many smaller steps, that build
108+
dictionaries of the extracted classes, files, namespaces,
109109
variables, functions, packages, pages, and groups. Besides building
110110
dictionaries, during this step relations (such as inheritance relations),
111111
between the extracted entities are computed.
@@ -117,15 +117,15 @@ on the tree of entries, built during language parsing. Look at the
117117
The result of this step is a number of dictionaries, which can be
118118
found in the doxygen "namespace" defined in \c src/doxygen.h. Most
119119
elements of these dictionaries are derived from the class \c Definition;
120-
The class \c MemberDef, for instance, holds all information for a member.
121-
An instance of such a class can be part of a file ( class \c FileDef ),
122-
a class ( class \c ClassDef ), a namespace ( class \c NamespaceDef ),
120+
The class \c MemberDef, for instance, holds all information for a member.
121+
An instance of such a class can be part of a file ( class \c FileDef ),
122+
a class ( class \c ClassDef ), a namespace ( class \c NamespaceDef ),
123123
a group ( class \c GroupDef ), or a Java package ( class \c PackageDef ).
124124

125125
<h3>Tag file parser</h3>
126126

127127
If tag files are specified in the configuration file, these are parsed
128-
by a SAX based XML parser, which can be found in \c src/tagreader.cpp.
128+
by a SAX based XML parser, which can be found in \c src/tagreader.cpp.
129129
The result of parsing a tag file is the insertion of \c Entry objects in the
130130
entry tree. The field \c Entry::tagInfo is used to mark the entry as
131131
external, and holds information about the tag file.
@@ -136,15 +136,15 @@ Special comment blocks are stored as strings in the entities that they
136136
document. There is a string for the brief description and a string
137137
for the detailed description. The documentation parser reads these
138138
strings and executes the commands it finds in it (this is the second pass
139-
in parsing the documentation). It writes the result directly to the output
139+
in parsing the documentation). It writes the result directly to the output
140140
generators.
141141

142142
The parser is written in C++ and can be found in \c src/docparser.cpp. The
143143
tokens that are eaten by the parser come from \c src/doctokenizer.l.
144144
Code fragments found in the comment blocks are passed on to the source parser.
145145

146146
The main entry point for the documentation parser is \c validatingParseDoc()
147-
declared in \c src/docparser.h. For simple texts with special
147+
declared in \c src/docparser.h. For simple texts with special
148148
commands \c validatingParseText() is used.
149149

150150
<h3>Source parser</h3>
@@ -156,13 +156,13 @@ The code parser tries to cross-reference to source code it parses with
156156
documented entities. It also does syntax highlighting of the sources. The
157157
output is directly written to the output generators.
158158

159-
The main entry point for the code parser is \c parseCode()
159+
The main entry point for the code parser is \c parseCode()
160160
declared in \c src/code.h.
161161

162162
<h3>Output generators</h3>
163163

164-
After data is gathered and cross-referenced, doxygen generates
165-
output in various formats. For this it uses the methods provided by
164+
After data is gathered and cross-referenced, doxygen generates
165+
output in various formats. For this it uses the methods provided by
166166
the abstract class \c OutputGenerator. In order to generate output
167167
for multiple formats at once, the methods of \c OutputList are called
168168
instead. This class maintains a list of concrete output generators,
@@ -171,15 +171,15 @@ where each method called is delegated to all generators in the list.
171171
To allow small deviations in what is written to the output for each
172172
concrete output generator, it is possible to temporarily disable certain
173173
generators. The OutputList class contains various \c disable() and \c enable()
174-
methods for this. The methods \c OutputList::pushGeneratorState() and
174+
methods for this. The methods \c OutputList::pushGeneratorState() and
175175
\c OutputList::popGeneratorState() are used to temporarily save the
176-
set of enabled/disabled output generators on a stack.
176+
set of enabled/disabled output generators on a stack.
177177

178178
The XML is generated directly from the gathered data structures. In the
179179
future XML will be used as an intermediate language (IL). The output
180180
generators will then use this IL as a starting point to generate the
181181
specific output formats. The advantage of having an IL is that various
182-
independently developed tools written in various languages,
182+
independently developed tools written in various languages,
183183
could extract information from the XML output. Possible tools could be:
184184
- an interactive source browser
185185
- a class diagram generator
@@ -188,18 +188,18 @@ could extract information from the XML output. Possible tools could be:
188188
<h3>Debugging</h3>
189189

190190
Since doxygen uses a lot of \c flex code it is important to understand
191-
how \c flex works (for this one should read the \c man page)
192-
and to understand what it is doing when \c flex is parsing some input.
191+
how \c flex works (for this one should read the \c man page)
192+
and to understand what it is doing when \c flex is parsing some input.
193193
Fortunately, when \c flex is used with the `-d` option it outputs what rules
194-
matched. This makes it quite easy to follow what is going on for a
195-
particular input fragment.
194+
matched. This makes it quite easy to follow what is going on for a
195+
particular input fragment.
196196

197197
To make it easier to toggle debug information for a given \c flex file I
198198
wrote the following \c perl script, which automatically adds or removes `-d`
199199
from the correct line in the \c Makefile:
200200

201201
\verbatim
202-
#!/usr/bin/perl
202+
#!/usr/bin/perl
203203

204204
$file = shift @ARGV;
205205
print "Toggle debugging mode for $file\n";
@@ -232,7 +232,7 @@ if (open(F,"<src/CMakeFiles/_doxygen.dir/build.make.old")) {
232232
unlink "src/CMakeFiles/_doxygen.dir/build.make.old";
233233
}
234234
else {
235-
print STDERR "Warning file src/CMakeFiles/_doxygen.dir/build.make does not exist!\n";
235+
print STDERR "Warning file src/CMakeFiles/_doxygen.dir/build.make does not exist!\n";
236236
}
237237

238238
# touch the file
@@ -242,7 +242,7 @@ utime $now, $now, $file;
242242
Another way to get rules matching / debugging information
243243
from the \c flex code is setting \c LEX_FLAGS with \c make (`make LEX_FLAGS=-d`).
244244

245-
Note that by running doxygen with `-d lex` you get information about which
245+
Note that by running doxygen with `-d lex` you get information about which
246246
`flex codefile` is used.
247247

248248
<h3>Testing</h3>
@@ -258,7 +258,7 @@ Studio projects), e.g. `setenv TEST_FLAGS "--id 5 --id 7"` and `make tests`.
258258

259259
<h3>Doxyfile differences</h3>
260260

261-
In case one has to communicate through e.g. a forum the configuration settings that
261+
In case one has to communicate through e.g. a forum the configuration settings that
262262
are different from the standard doxygen configuration file settings one can run the
263263
doxygen command: with the `-x` option and the name of the configuration file (default
264264
is `Doxyfile`). The output will be a list of the not default settings (in `Doxyfile`

Diff for: doc/archoverview.gif

-7.64 KB
Binary file not shown.

0 commit comments

Comments
 (0)