Commit 89f2a610 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.8-20010715

parent d5150cf4
DOXYGEN Version 1.2.8-20010617 DOXYGEN Version 1.2.8-20010715
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (17 June 2001) Dimitri van Heesch (15 July 2001)
DOXYGEN Version 1.2.8_20010617 DOXYGEN Version 1.2.8_20010715
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (17 June 2001) Dimitri van Heesch (dimitri@stack.nl) (15 July 2001)
1.2.8-20010617 1.2.8-20010715
...@@ -50,4 +50,6 @@ MOC_DIR = moc ...@@ -50,4 +50,6 @@ MOC_DIR = moc
# extra C++ compiler options # extra C++ compiler options
TMAKE_CXXFLAGS += -DDOXYWIZARD TMAKE_CXXFLAGS += -DDOXYWIZARD
win32:TMAKE_CXXFLAGS += -I. -DQT_DLL
win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
...@@ -18,13 +18,12 @@ ...@@ -18,13 +18,12 @@
\subsection config_format Format \subsection config_format Format
A configuration file is a free-form ASCII text file with a structure that A configuration file is a free-form ASCII text file with a structure
is similar to that of a Makefile. It is parsed by \c doxygen. that is similar to that of a Makefile, default name \c Doxyfile. It is
The file may contain tabs and newlines for formatting purposes. parsed by \c doxygen. The file may contain tabs and newlines for
The statements in the file are case-sensitive. formatting purposes. The statements in the file are case-sensitive.
Comments may be placed anywhere within the file (except within quotes). Comments may be placed anywhere within the file (except within quotes).
Comments begin with the \# character and end at the end of the Comments begin with the \# character and end at the end of the line.
line.
The file essentially consists of a list of assignment statements. The file essentially consists of a list of assignment statements.
Each statement consists of a \c TAG_NAME written in capitals, Each statement consists of a \c TAG_NAME written in capitals,
...@@ -905,9 +904,17 @@ EXTRA_PACKAGES = times ...@@ -905,9 +904,17 @@ EXTRA_PACKAGES = times
If the \c PDF_HYPERLINKS tag is set to \c YES, the \f$\mbox{\LaTeX}\f$ that If the \c PDF_HYPERLINKS tag is set to \c YES, the \f$\mbox{\LaTeX}\f$ that
is generated is prepared for conversion to PDF (using ps2pdf). is generated is prepared for conversion to PDF (using ps2pdf).
The PDF file will The PDF file will
contain links (just like the HTML output) instead of page references contain links (just like the HTML output) instead of page references.
This makes the output suitable for online browsing using a PDF viewer. This makes the output suitable for online browsing using a PDF viewer.
\anchor cfg_latex_pdflatex
<dt>\c USE_PDFLATEX <dd>
\addindex LATEX_PDFLATEX
If the \c LATEX_PDFLATEX tag is set to \c YES, doxygen will use
pdflatex to generate the PDF file directly from the \f$\mbox{\LaTeX}\f$
files.
\anchor cfg_latex_batchmode \anchor cfg_latex_batchmode
<dt>\c LATEX_BATCHMODE <dd> <dt>\c LATEX_BATCHMODE <dd>
\addindex LATEX_BATCHMODE \addindex LATEX_BATCHMODE
...@@ -1000,7 +1007,7 @@ EXTRA_PACKAGES = times ...@@ -1000,7 +1007,7 @@ EXTRA_PACKAGES = times
\anchor cfg_man_links \anchor cfg_man_links
<dt>\c MAN_LINKS <dd> <dt>\c MAN_LINKS <dd>
\addindex MAN_LINKS \addindex MAN_LINKs
If the \c MAN_LINKS tag is set to \c YES and doxygen generates man output, If the \c MAN_LINKS tag is set to \c YES and doxygen generates man output,
then it will generate one additional man file for each entity documented in then it will generate one additional man file for each entity documented in
the real man page(s). These additional files only source the real man page, the real man page(s). These additional files only source the real man page,
...@@ -1054,7 +1061,7 @@ EXTRA_PACKAGES = times ...@@ -1054,7 +1061,7 @@ EXTRA_PACKAGES = times
are defined before the preprocessor is started (similar to the -D option of are defined before the preprocessor is started (similar to the -D option of
gcc). The argument of the tag is a list of macros of the form: gcc). The argument of the tag is a list of macros of the form:
<code>name</code> or <code>name=definition</code> (no spaces). <code>name</code> or <code>name=definition</code> (no spaces).
If the definition and the = are omitted =1 is assumed. If the definition and the "=" are omitted, "=1" is assumed.
\anchor cfg_expand_as_defined \anchor cfg_expand_as_defined
<dt>\c EXPAND_AS_DEFINED <dd> <dt>\c EXPAND_AS_DEFINED <dd>
...@@ -1125,7 +1132,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1125,7 +1132,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\addindex HAVE_DOT \addindex HAVE_DOT
If you set the \c HAVE_DOT tag to \c YES then doxygen will assume the dot tool is If you set the \c HAVE_DOT tag to \c YES then doxygen will assume the dot tool is
available from the path. This tool is part of available from the path. This tool is part of
<a href="http://www.research.att.com/sw/tools/graphviz/">Graphviz</a>, a graph <a href="http://www.graphviz.org/">Graphviz</a>, a graph
visualization toolkit from AT&T and Lucent Bell Labs. The other options in visualization toolkit from AT&T and Lucent Bell Labs. The other options in
this section have no effect if this option is set to \c NO (the default) this section have no effect if this option is set to \c NO (the default)
...@@ -1198,6 +1205,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1198,6 +1205,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
generate a legend page explaining the meaning of the various boxes and generate a legend page explaining the meaning of the various boxes and
arrows in the dot generated graphs. arrows in the dot generated graphs.
\anchor cfg_dot_cleanup
<dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP
This tag can be used to ?? cleanup any mess DOT left behind?
If left blank, "NO" is assumed.
</dl> </dl>
\subsection config_search Search engine options \subsection config_search Search engine options
\anchor cfg_searchengine \anchor cfg_searchengine
...@@ -1333,7 +1346,7 @@ INCLUDE_PATH = $(QTDIR)/include ...@@ -1333,7 +1346,7 @@ INCLUDE_PATH = $(QTDIR)/include
RECURSIVE = YES RECURSIVE = YES
\endverbatim \endverbatim
For the Qt-2.1 sources I recommand to use the following settings: For the Qt-2.1 sources I recommend to use the following settings:
\verbatim \verbatim
PROJECT_NAME = Qt PROJECT_NAME = Qt
PROJECT_NUMBER = 2.1 PROJECT_NUMBER = 2.1
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
*/ */
/*! \page diagrams Graphs and diagrams /*! \page diagrams Graphs and diagrams
Doxygen has build-in support to generate inheritance diagrams for C++ Doxygen has built-in support to generate inheritance diagrams for C++
classes. classes.
Doxygen can use the "dot" tool from graphviz 1.5 to generate Doxygen can use the "dot" tool from graphviz 1.5 to generate
more advanced diagrams & graphs. Graphviz is an open-sourced, more advanced diagrams & graphs. Graphviz is an open-sourced,
cross-platform graph drawing toolkit from AT&T and Lucent Bell Labs and cross-platform graph drawing toolkit from AT&T and Lucent Bell Labs and
can be found at http://www.research.att.com/sw/tools/graphviz/ can be found at http://www.graphviz.org/
If you have the "dot" tool available in the path, you can set If you have the "dot" tool available in the path, you can set
\ref cfg_have_dot "HAVE_DOT" to \c YES in the configuration file to \ref cfg_have_dot "HAVE_DOT" to \c YES in the configuration file to
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<li>if \ref cfg_class_graph "CLASS_GRAPH" is set to \c YES, <li>if \ref cfg_class_graph "CLASS_GRAPH" is set to \c YES,
a graph will be generated for each documented class showing the a graph will be generated for each documented class showing the
direct and indirect inheritance relations. This disables the direct and indirect inheritance relations. This disables the
generation of the build-in class inheritance diagrams. generation of the built-in class inheritance diagrams.
<li>if \ref cfg_include_graph "INCLUDE_GRAPH" is set to \c YES, an include <li>if \ref cfg_include_graph "INCLUDE_GRAPH" is set to \c YES, an include
dependency graph is generated for each documented file that includes at dependency graph is generated for each documented file that includes at
least one other file. This feature is currently supported for HTML and RTF least one other file. This feature is currently supported for HTML and RTF
......
...@@ -197,6 +197,22 @@ converted it into an empty file (with >16K of newlines). Another case ...@@ -197,6 +197,22 @@ converted it into an empty file (with >16K of newlines). Another case
where this might happen is if you have lines in your code with more than where this might happen is if you have lines in your code with more than
16K characters. 16K characters.
<li><b>How did doxygen get it's name?</b>
Doxygen got its name from playing with the words
documentation and generator.
\verbatim
documentation -> docs -> dox
generator -> gen
\endverbatim
At the time I was looking into lex and yacc, where a lot of things start with
"yy", so the "y" slipped in and made things pronouncable.
I realized later that doxygen could also be read as Dimitri's oxygen,
which could be seen as something I need to live :-)
</ol> </ol>
\htmlonly \htmlonly
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
\addindex installation \addindex installation
First go to the First go to the
<a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a> page <a href="http://www.doxygen.org/download.html">download</a> page
\latexonly({\tt http://www.stack.nl/$\sim$dimitri/doxygen/download.html})\endlatexonly \latexonly({\tt http://www.doxygen.org/download.html})\endlatexonly
to get the latest distribution, if you did not have it already. to get the latest distribution, if you did not have it already.
This section is divided into the following subsections: This section is divided into the following subsections:
...@@ -37,14 +37,14 @@ This section is divided into the following subsections: ...@@ -37,14 +37,14 @@ This section is divided into the following subsections:
If you downloaded the source distribution, you need at least the If you downloaded the source distribution, you need at least the
following to build the executable: following to build the executable:
<ul> <ul>
<li>The <a href="ftp://prep.ai.mit.edu/pub/gnu">GNU</a> tools <li>The <a href="ftp://prep.ai.mit.edu/pub/gnu/">GNU</a> tools
flex, bison and make flex, bison and make
\addindex flex \addindex flex
\addindex bison \addindex bison
\addindex make \addindex make
<li>In order to generate a Makefile for your platform, you need <li>In order to generate a Makefile for your platform, you need
<a href="http://www.perl.com>perl</a> <a href="http://www.perl.com/>perl</a>
\latexonly(see {\tt http://www.perl.com})\endlatexonly. \latexonly(see {\tt http://www.perl.com/})\endlatexonly.
\addindex perl \addindex perl
</ul> </ul>
...@@ -58,10 +58,12 @@ tools should be installed. ...@@ -58,10 +58,12 @@ tools should be installed.
\addindex Qt \addindex Qt
This is needed to build the GUI front-end. This is needed to build the GUI front-end.
<li>A \f$\mbox{\LaTeX}\f$ distribution: for instance <li>A \f$\mbox{\LaTeX}\f$ distribution: for instance
<a href="http://www.tug.org">teTeX 1.0</a>.<br> <a href="http://www.tug.org/">teTeX 1.0</a>.<br>
\latexonly(see {\tt http://www.tug.org/})\endlatexonly.
This is needed for generating LaTeX, Postscript, and PDF output. This is needed for generating LaTeX, Postscript, and PDF output.
<li><a href="http://www.research.att.com/sw/tools/graphviz/"> <li><a href="http://www.graphviz.org/">
the Graph visualization toolkit version 1.5</a><br> the Graph visualization toolkit version 1.5</a><br>
\latexonly(see {\tt http://www.graphviz.org/})\endlatexonly.
Needed for the include dependency graphs, Needed for the include dependency graphs,
the graphical inheritance graphs, and the collaboration graphs. the graphical inheritance graphs, and the collaboration graphs.
<li>The ghostscript interpreter. <li>The ghostscript interpreter.
...@@ -231,7 +233,7 @@ If you are compiling for HP-UX with aCC and you get this error: ...@@ -231,7 +233,7 @@ If you are compiling for HP-UX with aCC and you get this error:
\endverbatim \endverbatim
If that does not help, try removing <code>ce_parse.cpp</code> and let If that does not help, try removing <code>ce_parse.cpp</code> and let
bison rebuilt it (this worked for me). bison rebuild it (this worked for me).
If you are compiling for Digital Unix, the same problem can be solved If you are compiling for Digital Unix, the same problem can be solved
(according to Barnard Schmallhof) by replacing the following in (according to Barnard Schmallhof) by replacing the following in
...@@ -239,7 +241,8 @@ ce_parse.cpp: ...@@ -239,7 +241,8 @@ ce_parse.cpp:
\verbatim \verbatim
#else /* not GNU C. */ #else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
|| defined (__sparc) || defined (__sgi)
#include <alloca.h> #include <alloca.h>
\endverbatim \endverbatim
...@@ -247,7 +250,8 @@ ce_parse.cpp: ...@@ -247,7 +250,8 @@ ce_parse.cpp:
\verbatim \verbatim
#else /* not GNU C. */ #else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__osf__) #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
|| defined (__sparc) || defined (__sgi) || defined (__osf__)
#include <alloca.h> #include <alloca.h>
\endverbatim \endverbatim
...@@ -261,8 +265,10 @@ ce_parse.cpp: ...@@ -261,8 +265,10 @@ ce_parse.cpp:
#ifdef __GNUC__ #ifdef __GNUC__
#define alloca __builtin_alloca #define alloca __builtin_alloca
#else /* not GNU C. */ #else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__alpha) || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
|| defined (__sparc) || defined (__sgi) || defined (__alpha)
#include <alloca.h> #include <alloca.h>
#else /* not sparc */ #else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__) #if defined (MSDOS) && !defined (__TURBOC__)
...@@ -283,8 +289,10 @@ Compiling the \c doxygen binary went ok, but while linking <code>doxytag</code> ...@@ -283,8 +289,10 @@ Compiling the \c doxygen binary went ok, but while linking <code>doxytag</code>
lot of link errors, like these: lot of link errors, like these:
\verbatim \verbatim
QList<PageInfo>::__vtbl /home/dimitri/doxygen/objects/SunWS_cache/CC_obj_6/6c3eO4IogMT2vrlGCQUQ.o QList<PageInfo>::__vtbl /home/dimitri/doxygen/
[Hint: try checking whether the first non-inlined, non-pure virtual function of class QList<PageInfo> is defined] objects/SunWS_cache/CC_obj_6/6c3eO4IogMT2vrlGCQUQ.o
[Hint: try checking whether the first non-inlined, non-pure
virtual function of class QList<PageInfo> is defined]
\endverbatim \endverbatim
These are generated because the compiler is confused about the object sharing These are generated because the compiler is confused about the object sharing
...@@ -326,6 +334,11 @@ the compiler will fail to compile some of the translator_xx.h files. ...@@ -326,6 +334,11 @@ the compiler will fail to compile some of the translator_xx.h files.
A workaround, if you are planning to use the English translation only, A workaround, if you are planning to use the English translation only,
is to configure doxygen with the <code>--english-only</code> option. is to configure doxygen with the <code>--english-only</code> option.
On some platforms (such as OpenBSD) using some versions of gcc with
-O2 can lead to eating all memory during the compilation of files
such as config.cpp. As a workaround use --debug as a configure option
or omit the -O2 for the particular files in the Makefile.
\subsection install_src_windows Compiling from source on Windows \subsection install_src_windows Compiling from source on Windows
Currently, I have only compiled doxygen for Windows using Microsoft's Currently, I have only compiled doxygen for Windows using Microsoft's
...@@ -353,7 +366,7 @@ Here is what is required: ...@@ -353,7 +366,7 @@ Here is what is required:
variables (if you did not select to do this automatically during variables (if you did not select to do this automatically during
installation). installation).
Borland C++ or MINGW (see http://www.mingw.org) are also supported. Borland C++ or MINGW (see http://www.mingw.org/) are also supported.
<li>Perl 5.0 or higher for Windows. This can be downloaded from: <li>Perl 5.0 or higher for Windows. This can be downloaded from:
http://www.ActiveState.com/Products/ActivePerl/ http://www.ActiveState.com/Products/ActivePerl/
...@@ -439,7 +452,7 @@ Here is what is required: ...@@ -439,7 +452,7 @@ Here is what is required:
<code>objects</code> and <code>bin</code> manually in the root of the <code>objects</code> and <code>bin</code> manually in the root of the
distribution before compiling. distribution before compiling.
<li><a href="http://www.research.att.com/sw/tools/graphviz/"> <li><a href="http://www.graphviz.org/">
the Graph visualization toolkit version 1.5</a><br> the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs, the graphical inheritance graphs, Needed for the include dependency graphs, the graphical inheritance graphs,
and the collaboration graphs. and the collaboration graphs.
......
This diff is collapsed.
This diff is collapsed.
...@@ -69,13 +69,13 @@ Here is the above example with HTML commands: ...@@ -69,13 +69,13 @@ Here is the above example with HTML commands:
*/ */
\endverbatim \endverbatim
\note The the indent here is not important. \note The indentation here is not important.
<b>Using \\arg or \@li</b> <b>Using \\arg or \@li</b>
For compatibility with the Troll Tech's internal documentation tool and For compatibility with the Troll Tech's internal documentation tool and
with KDoc, doxygen has two commands that can be used to create simple with KDoc, doxygen has two commands that can be used to create simple
not nested lists. unnested lists.
See \ref cmdarg "\arg" and \ref cmdli "\li" for more info. See \ref cmdarg "\arg" and \ref cmdli "\li" for more info.
......
...@@ -62,7 +62,7 @@ Russian ...@@ -62,7 +62,7 @@ Russian
Alexandr Chelpanov: cav@cryptopro.ru Alexandr Chelpanov: cav@cryptopro.ru
Slovak Slovak
Stanislav Kudlac: qwerty1@pobox.sk Stanislav Kudl&aacute;&ccaron;: qwerty1@pobox.sk
Slovene Slovene
Matjaz Ostroversnik: matjaz.ostroversnik@zrs-tk.si Matjaz Ostroversnik: matjaz.ostroversnik@zrs-tk.si
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
/*! \page preprocessing Preprocessing /*! \page preprocessing Preprocessing
Source files that are used as input to doxygen can be parsed by doxygen's Source files that are used as input to doxygen can be parsed by doxygen's
build-in C-preprocessor. built-in C-preprocessor.
By default doxygen does only partial preprocessing. That is, it By default doxygen does only partial preprocessing. That is, it
evaluates conditional compilation statements (like \#if) and evaluates conditional compilation statements (like \#if) and
......
...@@ -125,7 +125,7 @@ a browser that supports cascading style sheets (CSS) should be used ...@@ -125,7 +125,7 @@ a browser that supports cascading style sheets (CSS) should be used
\addindex LaTeX \addindex LaTeX
The generated \f$\mbox{\LaTeX}\f$ documentation must first be compiled by The generated \f$\mbox{\LaTeX}\f$ documentation must first be compiled by
a \f$\mbox{\LaTeX}\f$ compiler. (I use teTeX distribution version 0.9 a \f$\mbox{\LaTeX}\f$ compiler (I use teTeX distribution version 0.9
that contains \f$\mbox{\TeX}\f$ version 3.14159). To simplify the process that contains \f$\mbox{\TeX}\f$ version 3.14159). To simplify the process
of compiling the generated of compiling the generated
documentation, \c doxygen writes a \c Makefile into the \c latex directory. documentation, \c doxygen writes a \c Makefile into the \c latex directory.
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
# argument list does not contain argument identifiers # argument list does not contain argument identifiers
# (i.e., when it contains type information only). # (i.e., when it contains type information only).
# #
# 2001/06/11
# - Character entity &ccaron; recognized in maintainers.txt.
#
################################################################ ################################################################
require 5.005; require 5.005;
...@@ -566,13 +569,15 @@ xxxTABLE_FOOTxxx ...@@ -566,13 +569,15 @@ xxxTABLE_FOOTxxx
$tableLATEX .= $latexTableFoot; $tableLATEX .= $latexTableFoot;
$tableHTML =~ s{@}{\@NOSPAM.}sg; $tableHTML =~ s{@}{\@NOSPAM.}sg;
$tableHTML =~ s{&ccaron;}{&#x010d;}sg;
$tableHTML =~ s{&rcaron;}{&#x0159;}sg; $tableHTML =~ s{&rcaron;}{&#x0159;}sg;
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/&aacute;/\\'{a}/sg; $tableLATEX =~ s/&aacute;/\\'{a}/sg;
$tableLATEX =~ s/&auml;/\\"{a}/sg; $tableLATEX =~ s/&auml;/\\"{a}/sg;
$tableLATEX =~ s/&ouml;/\\"{o}/sg; $tableLATEX =~ s/&ouml;/\\"{o}/sg;
$tableLATEX =~ s/&oslash;/\\o{}/sg; $tableLATEX =~ s/&oslash;/\\o{}/sg;
$tableLATEX =~ s/&ccaron;/\\v{c}/sg;
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/_/\\_/sg; $tableLATEX =~ s/_/\\_/sg;
my $notice = "\nHave a look at <a href=\"../doc/$ftranslatortxt\"\n>" my $notice = "\nHave a look at <a href=\"../doc/$ftranslatortxt\"\n>"
......
...@@ -16,16 +16,18 @@ if "%2"=="debug" SET MODE=debug ...@@ -16,16 +16,18 @@ if "%2"=="debug" SET MODE=debug
REM use perl to create the config file REM use perl to create the config file
perl wintools\make.pl %CC% perl wintools\make.pl %CC%
type makeconfig > Makefile type makeconfig > Makefile
type Makefile.win_%MAKE%.in >>Makefile type Makefile.win_%MAKE%.in >>Makefile
type makeconfig > qtools\Makefile type makeconfig > qtools\Makefile
type qtools\Makefile.in >>qtools\Makefile type qtools\Makefile.in >>qtools\Makefile
type makeconfig > src\Makefile type makeconfig > src\Makefile
type src\Makefile.in >>src\Makefile type src\Makefile.in >>src\Makefile
type makeconfig > examples\Makefile type makeconfig > examples\Makefile
type examples\Makefile.win.in >>examples\Makefile type examples\Makefile.win.in >>examples\Makefile
type makeconfig > doc\Makefile type makeconfig > doc\Makefile
type doc\Makefile.win_%MAKE%.in >>doc\Makefile type doc\Makefile.win_%MAKE%.in >>doc\Makefile
type makeconfig > addon\doxywizard\Makefile
type addon\doxywizard\Makefile.win_%MAKE%.in >>addon\doxywizard\Makefile
REM build in release or debug mode REM build in release or debug mode
REM sed is used to replace $extraopts by either debug or release while copying REM sed is used to replace $extraopts by either debug or release while copying
...@@ -35,6 +37,7 @@ sed "s/\$extraopts/%MODE%/g" src\libdoxycfg.pro.in >src\libdoxycfg.pro ...@@ -35,6 +37,7 @@ sed "s/\$extraopts/%MODE%/g" src\libdoxycfg.pro.in >src\libdoxycfg.pro
sed "s/\$extraopts/%MODE%/g" src\doxygen.pro.in >src\doxygen.pro sed "s/\$extraopts/%MODE%/g" src\doxygen.pro.in >src\doxygen.pro
sed "s/\$extraopts/%MODE%/g" src\doxytag.pro.in >src\doxytag.pro sed "s/\$extraopts/%MODE%/g" src\doxytag.pro.in >src\doxytag.pro
sed "s/\$extraopts/%MODE%/g" src\doxysearch.pro.in >src\doxysearch.pro sed "s/\$extraopts/%MODE%/g" src\doxysearch.pro.in >src\doxysearch.pro
sed "s/\$extraopts/%MODE%/g" addon\doxywizard\doxywizard.pro.in >addon\doxywizard\doxywizard.pro
REM run make REM run make
%MAKE%.exe %MAKE%.exe
......
Name: doxygen Name: doxygen
Version: 1.2.8_20010617 Version: 1.2.8_20010715
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 3 Release: 3
Source: doxygen-%{version}.src.tar.gz Source: doxygen-%{version}.src.tar.gz
......
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "entry.h" #include "entry.h"
#include "memberlist.h" #include "memberlist.h"
#include "definition.h" #include "definition.h"
#include "sortdict.h"
class MemberDict; class MemberDict;
class ClassList; class ClassList;
...@@ -67,8 +68,10 @@ class ClassDef : public Definition ...@@ -67,8 +68,10 @@ class ClassDef : public Definition
}; };
DefType definitionType() { return TypeClass; } DefType definitionType() { return TypeClass; }
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const;
QCString getFileBase() const; QCString getFileBase() const;
QCString getSourceFileBase() const; QCString getSourceFileBase() const;
QCString getReference() const;
bool hasDocumentation() const; bool hasDocumentation() const;
...@@ -106,12 +109,12 @@ class ClassDef : public Definition ...@@ -106,12 +109,12 @@ class ClassDef : public Definition
/*! returns TRUE iff a link is possible to an item within this project. /*! returns TRUE iff a link is possible to an item within this project.
*/ */
bool isLinkableInProject(); bool isLinkableInProject() const;
/*! return TRUE iff a link to this class is possible (either within /*! return TRUE iff a link to this class is possible (either within
* this project, or as a cross-reference to another project). * this project, or as a cross-reference to another project).
*/ */
bool isLinkable() bool isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
...@@ -156,6 +159,15 @@ class ClassDef : public Definition ...@@ -156,6 +159,15 @@ class ClassDef : public Definition
*/ */
int isTemplateBaseClass() const { return m_isTemplBaseClass; } int isTemplateBaseClass() const { return m_isTemplBaseClass; }
/*! Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances.
*/
QDict<ClassDef> *getTemplateInstances() const { return m_templateInstances; }
/*! Returns the template master of which this class is an instance.
* Returns 0 if not applicable.
*/
ClassDef *templateMaster() const { return m_templateMaster; }
UsesClassDict *usedImplementationClasses() const UsesClassDict *usedImplementationClasses() const
{ {
return m_usesImplClassDict; return m_usesImplClassDict;
...@@ -166,8 +178,13 @@ class ClassDef : public Definition ...@@ -166,8 +178,13 @@ class ClassDef : public Definition
return m_usesIntfClassDict; return m_usesIntfClassDict;
} }
/*! Returns the definition of a nested compound if
* available, or 0 otherwise.
* @param name The name of the nested compound
*/
virtual Definition *findInnerCompound(const char *name); virtual Definition *findInnerCompound(const char *name);
/* member lists by protection */ /* member lists by protection */
MemberList pubMembers; MemberList pubMembers;
MemberList proMembers; MemberList proMembers;
...@@ -224,16 +241,24 @@ class ClassDef : public Definition ...@@ -224,16 +241,24 @@ class ClassDef : public Definition
void setTemplateArguments(ArgumentList *al); void setTemplateArguments(ArgumentList *al);
void mergeMembers(); void mergeMembers();
void setFileDef(FileDef *fd) { m_fileDef=fd; } void setFileDef(FileDef *fd) { m_fileDef=fd; }
void determineImplUsageRelation(); //void determineImplUsageRelation();
void determineIntfUsageRelation(); //void determineIntfUsageRelation();
void setSubGrouping(bool enabled) { m_subGrouping = enabled; } void setSubGrouping(bool enabled) { m_subGrouping = enabled; }
void setProtection(Protection p) { m_prot=p; } void setProtection(Protection p) { m_prot=p; }
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs); void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d); void addInnerCompound(Definition *d);
void setIsTemplateBaseClass(int num) { m_isTemplBaseClass = num; } void setIsTemplateBaseClass(int num) { m_isTemplBaseClass = num; }
void initTemplateMapping(); void addUsedClass(ClassDef *cd,const char *accessName);
void setTemplateArgumentMapping(const char *formal,const char *actual); //void initTemplateMapping();
QCString getTemplateArgumentMapping(const char *formal) const; //void setTemplateArgumentMapping(const char *formal,const char *actual);
//QCString getTemplateArgumentMapping(const char *formal) const;
ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,
const QCString &templSpec,bool &freshInstance);
void setTemplateBaseClassNames(QDict<int> *templateNames);
QDict<int> *getTemplateBaseClassNames() const;
void setTemplateMaster(ClassDef *tm) { m_templateMaster=tm; }
void addMembersToTemplateInstance(ClassDef *cd,const char *templSpec);
void setClassIsArtificial() { m_artificial = TRUE; }
/*! Creates a new compound definition. /*! Creates a new compound definition.
* \param outerScope class, file or namespace in which this class is * \param outerScope class, file or namespace in which this class is
...@@ -351,11 +376,22 @@ class ClassDef : public Definition ...@@ -351,11 +376,22 @@ class ClassDef : public Definition
*/ */
int m_isTemplBaseClass; int m_isTemplBaseClass;
/*! A mapping used by template classes, which maps formal /*! Template instances that exists of this class, the key in the
* template arguments to their actual instantiations. * dictionary is the template argument list.
* This is used while generating inheritance graphs. */
QDict<ClassDef> *m_templateInstances;
QDict<int> *m_templBaseClassNames;
/*! The class this class is an instance of. */
ClassDef *m_templateMaster;
/*! Indicated whether this class exists because it is used by
* some other class only (TRUE) or if some class inherits from
* it (FALSE). This is need to remove used-only classes from
* the inheritance tree.
*/ */
StringDict *m_templateMapping; bool m_artificial;
}; };
/*! \brief Class that contains information about a usage relation. /*! \brief Class that contains information about a usage relation.
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* includes * includes
*/ */
#include <stdio.h> #include <stdio.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <qregexp.h> #include <qregexp.h>
......
...@@ -290,7 +290,7 @@ class ConfigBool : public ConfigOption ...@@ -290,7 +290,7 @@ class ConfigBool : public ConfigOption
t << endl; t << endl;
} }
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "= "; t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "= ";
if (upd) if (upd && !m_valueString.isEmpty())
{ {
writeStringValue(t,m_valueString); writeStringValue(t,m_valueString);
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
......
...@@ -22,10 +22,12 @@ ...@@ -22,10 +22,12 @@
#include "qtbc.h" #include "qtbc.h"
#include "cppvalue.h" #include "cppvalue.h"
extern bool parseCppExpression(const QCString &s); extern bool parseCppExpression(const char *fileName,int line,const QCString &s);
extern int cppExpYYparse(); extern int cppExpYYparse();
extern int cppExpYYdebug; extern int cppExpYYdebug;
extern QCString strToken; extern QCString g_strToken;
extern CPPValue resultValue; extern CPPValue g_resultValue;
extern QCString g_constExpFileName;
extern int g_constExpLineNr;
#endif #endif
...@@ -25,11 +25,13 @@ ...@@ -25,11 +25,13 @@
#define YY_NO_UNPUT #define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
QCString strToken; QCString g_strToken;
CPPValue g_resultValue;
int g_constExpLineNr;
QCString g_constExpFileName;
static const char *inputString; static const char *g_inputString;
static int inputPosition; static int g_inputPosition;
CPPValue resultValue;
#undef YY_INPUT #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -37,9 +39,9 @@ CPPValue resultValue; ...@@ -37,9 +39,9 @@ CPPValue resultValue;
static int yyread(char *buf,int max_size) static int yyread(char *buf,int max_size)
{ {
int c=0; int c=0;
while( c < max_size && inputString[inputPosition] ) while( c < max_size && g_inputString[g_inputPosition] )
{ {
*buf = inputString[inputPosition++] ; *buf = g_inputString[g_inputPosition++] ;
c++; buf++; c++; buf++;
} }
return c; return c;
...@@ -74,36 +76,38 @@ static int yyread(char *buf,int max_size) ...@@ -74,36 +76,38 @@ static int yyread(char *buf,int max_size)
"(" { return TOK_LPAREN; } "(" { return TOK_LPAREN; }
")" { return TOK_RPAREN; } ")" { return TOK_RPAREN; }
"'"(([^\'\n\r\\]+)|(\\(([ntvbrfa\\?'\"])|([0-9]+)|([xX][0-9a-fA-F]+))))"'" { "'"(([^\'\n\r\\]+)|(\\(([ntvbrfa\\?'\"])|([0-9]+)|([xX][0-9a-fA-F]+))))"'" {
strToken=yytext; g_strToken=yytext;
return TOK_CHARACTER; return TOK_CHARACTER;
} }
0[0-7]*[uUlL]* { strToken=yytext; 0[0-7]*[uUlL]* { g_strToken=yytext;
return TOK_OCTALINT; return TOK_OCTALINT;
} }
[1-9][0-9]*[uUlL]* { strToken=yytext; [1-9][0-9]*[uUlL]* { g_strToken=yytext;
return TOK_DECIMALINT; return TOK_DECIMALINT;
} }
(0x|0X)[0-9a-fA-F]+[uUlL]* { strToken=yytext; return TOK_HEXADECIMALINT; } (0x|0X)[0-9a-fA-F]+[uUlL]* { g_strToken=yytext; return TOK_HEXADECIMALINT; }
(([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+))([eE]([\-\+])?[0-9]+)?([fFlL])? { (([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+))([eE]([\-\+])?[0-9]+)?([fFlL])? {
strToken=yytext; return TOK_FLOAT; g_strToken=yytext; return TOK_FLOAT;
} }
([0-9]+[eE])([\-\+])?[0-9]+([fFlL])? { ([0-9]+[eE])([\-\+])?[0-9]+([fFlL])? {
strToken=yytext; return TOK_FLOAT; g_strToken=yytext; return TOK_FLOAT;
} }
. .
\n \n
%% %%
bool parseCppExpression(const QCString &s) bool parseCppExpression(const char *fileName,int lineNr,const QCString &s)
{ {
//printf("Expression: `%s'\n",s.data()); //printf("Expression: `%s'\n",s.data());
inputString = s; g_constExpFileName = fileName;
inputPosition = 0; g_constExpLineNr = lineNr;
g_inputString = s;
g_inputPosition = 0;
cppExpYYrestart( cppExpYYin ); cppExpYYrestart( cppExpYYin );
cppExpYYparse(); cppExpYYparse();
//printf("Result: %ld\n",(long)resultValue); //printf("Result: %ld\n",(long)resultValue);
return (long)resultValue!=0; return (long)g_resultValue!=0;
} }
extern "C" { extern "C" {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "cppvalue.h" #include "cppvalue.h"
#include "constexp.h" #include "constexp.h"
#include "message.h"
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define MSDOS #define MSDOS
...@@ -32,7 +33,8 @@ ...@@ -32,7 +33,8 @@
int cppExpYYerror(const char *s) int cppExpYYerror(const char *s)
{ {
printf("Error in constant expression evaluation: %s\n",s); warn(g_constExpFileName,g_constExpLineNr,
"Problem during constant expression evaluation: %s",s);
return 0; return 0;
} }
...@@ -73,7 +75,7 @@ int cppExpYYlex(); ...@@ -73,7 +75,7 @@ int cppExpYYlex();
%% %%
start: constant_expression start: constant_expression
{ resultValue = $1; return 0; } { g_resultValue = $1; return 0; }
; ;
constant_expression: logical_or_expression constant_expression: logical_or_expression
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
CPPValue parseOctal() CPPValue parseOctal()
{ {
long val = 0; long val = 0;
for (const char *p = strToken.data(); *p != 0; p++) for (const char *p = g_strToken.data(); *p != 0; p++)
{ {
if (*p >= '0' && *p <= '7') val = val * 8 + *p - '0'; if (*p >= '0' && *p <= '7') val = val * 8 + *p - '0';
} }
...@@ -34,7 +34,7 @@ CPPValue parseOctal() ...@@ -34,7 +34,7 @@ CPPValue parseOctal()
CPPValue parseDecimal() CPPValue parseDecimal()
{ {
long val = 0; long val = 0;
for (const char *p = strToken.data(); *p != 0; p++) for (const char *p = g_strToken.data(); *p != 0; p++)
{ {
if (*p >= '0' && *p <= '9') val = val * 10 + *p - '0'; if (*p >= '0' && *p <= '9') val = val * 10 + *p - '0';
} }
...@@ -44,7 +44,7 @@ CPPValue parseDecimal() ...@@ -44,7 +44,7 @@ CPPValue parseDecimal()
CPPValue parseHexadecimal() CPPValue parseHexadecimal()
{ {
long val = 0; long val = 0;
for (const char *p = strToken.data(); *p != 0; p++) for (const char *p = g_strToken.data(); *p != 0; p++)
{ {
if (*p >= '0' && *p <= '9') val = val * 16 + *p - '0'; if (*p >= '0' && *p <= '9') val = val * 16 + *p - '0';
else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10; else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10;
...@@ -55,9 +55,9 @@ CPPValue parseHexadecimal() ...@@ -55,9 +55,9 @@ CPPValue parseHexadecimal()
CPPValue parseCharacter() // does not work for '\n' and the alike CPPValue parseCharacter() // does not work for '\n' and the alike
{ {
if (strToken[1]=='\\') if (g_strToken[1]=='\\')
{ {
switch(strToken[2]) switch(g_strToken[2])
{ {
case 'n': return CPPValue((long)'\n'); case 'n': return CPPValue((long)'\n');
case 't': return CPPValue((long)'\t'); case 't': return CPPValue((long)'\t');
...@@ -73,14 +73,14 @@ CPPValue parseCharacter() // does not work for '\n' and the alike ...@@ -73,14 +73,14 @@ CPPValue parseCharacter() // does not work for '\n' and the alike
case '0': return parseOctal(); case '0': return parseOctal();
case 'x': case 'x':
case 'X': return parseHexadecimal(); case 'X': return parseHexadecimal();
default: printf("Invalid escape sequence %s found!\n",strToken.data()); default: printf("Invalid escape sequence %s found!\n",g_strToken.data());
return CPPValue(0L); return CPPValue(0L);
} }
} }
return CPPValue((long)strToken[1]); return CPPValue((long)g_strToken[1]);
} }
CPPValue parseFloat() CPPValue parseFloat()
{ {
return CPPValue(atof(strToken)); return CPPValue(atof(g_strToken));
} }
...@@ -24,13 +24,9 @@ ...@@ -24,13 +24,9 @@
class CPPValue class CPPValue
{ {
friend CPPValue parseOctal();
friend CPPValue parseDecimal();
friend CPPValue parseHexadecimal();
friend CPPValue parseCharacter();
friend CPPValue parseFloat();
public: public:
enum Type { Int, Float }; enum Type { Int, Float };
CPPValue(long val=0) : type(Int) { v.l = val; } CPPValue(long val=0) : type(Int) { v.l = val; }
...@@ -57,4 +53,10 @@ class CPPValue ...@@ -57,4 +53,10 @@ class CPPValue
} v; } v;
}; };
extern CPPValue parseOctal();
extern CPPValue parseDecimal();
extern CPPValue parseHexadecimal();
extern CPPValue parseCharacter();
extern CPPValue parseFloat();
#endif #endif
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* includes * includes
*/ */
#include <stdio.h> #include <stdio.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
*/ */
#include "qtbc.h" #include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <qregexp.h> #include <qregexp.h>
......
...@@ -452,7 +452,11 @@ void Definition::addInnerCompound(Definition *) ...@@ -452,7 +452,11 @@ void Definition::addInnerCompound(Definition *)
QCString Definition::qualifiedName() const QCString Definition::qualifiedName() const
{ {
//printf("start Definition::qualifiedName()\n"); //printf("start Definition::qualifiedName()\n");
if (m_outerScope==0) return m_localName; // TODO: remove this check if (m_outerScope==0)
{
if (m_localName=="<globalScope>") return "";
else return m_localName;
}
QCString qualifiedName; QCString qualifiedName;
if (m_outerScope->name()=="<globalScope>") if (m_outerScope->name()=="<globalScope>")
......
...@@ -76,12 +76,12 @@ class Definition ...@@ -76,12 +76,12 @@ class Definition
void setBriefDescription(const char *b); void setBriefDescription(const char *b);
/*! Returns TRUE iff the definition is documented */ /*! Returns TRUE iff the definition is documented */
virtual bool hasDocumentation() const; virtual bool hasDocumentation() const;
virtual bool isLinkableInProject() = 0; virtual bool isLinkableInProject() const = 0;
virtual bool isLinkable() = 0; virtual bool isLinkable() const = 0;
virtual QCString getReference() const { return m_ref; }
bool isReference() const { return !m_ref.isEmpty(); } bool isReference() const { return !m_ref.isEmpty(); }
void setReference(const char *r) { m_ref=r; } void setReference(const char *r) { m_ref=r; }
QCString getReference() const { return m_ref; }
/*! Add the list of anchors that mark the sections that are found in the /*! Add the list of anchors that mark the sections that are found in the
* documentation. * documentation.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
...@@ -828,7 +828,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -828,7 +828,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
URLMASK [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=]+ URLMASK [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=]+
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9] NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"")
ATTR ({B}+[^>\n]*)? ATTR ({B}+[^>\n]*)?
A [aA] A [aA]
......
...@@ -176,6 +176,7 @@ static bool isLeaf(ClassDef *cd) ...@@ -176,6 +176,7 @@ static bool isLeaf(ClassDef *cd)
return TRUE; return TRUE;
} }
#if 0
/*! Builds a mapping from formal arguments of class \a tcd to the /*! Builds a mapping from formal arguments of class \a tcd to the
* actual arguments stored in templSpec. To properly initialize * actual arguments stored in templSpec. To properly initialize
* the mapping with the default template values * the mapping with the default template values
...@@ -320,6 +321,7 @@ static void computeTemplateInstance( ...@@ -320,6 +321,7 @@ static void computeTemplateInstance(
actualArg.resize(0); actualArg.resize(0);
result = 0; result = 0;
} }
#endif
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -693,20 +695,24 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -693,20 +695,24 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QListIterator<DotNode> dnli(*m_rootSubgraphs); QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n; DotNode *n;
int count=0;
for (dnli.toFirst();(n=dnli.current());++dnli) for (dnli.toFirst();(n=dnli.current());++dnli)
{ {
QCString baseName="inherit_graph_"; QCString baseName;
QCString diskName=n->m_url.copy(); baseName.sprintf("inherit_graph_%d",count++);
int i=diskName.find('$'); //="inherit_graph_";
if (i!=-1) //QCString diskName=n->m_url.copy();
{ //int i=diskName.find('$');
diskName=diskName.right(diskName.length()-i-1); //if (i!=-1)
} //{
else /* take the label name as the file name (and strip any template stuff) */ // diskName=diskName.right(diskName.length()-i-1);
{ //}
diskName=n->m_label; //else /* take the label name as the file name (and strip any template stuff) */
} //{
baseName = convertNameToFile(baseName+diskName); // diskName=n->m_label;
//}
//baseName = convertNameToFile(baseName+diskName);
baseName = convertNameToFile(baseName);
QCString dotName=baseName+".dot"; QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif"; QCString gifName=baseName+".gif";
QCString mapName=baseName+".map"; QCString mapName=baseName+".map";
...@@ -817,18 +823,9 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) ...@@ -817,18 +823,9 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper)
} }
} }
DotGfxHierarchyTable::DotGfxHierarchyTable() void DotGfxHierarchyTable::addClassList(ClassSDict *cl)
{ {
m_curNodeNumber=0; ClassSDict::Iterator cli(*cl);
m_rootNodes = new QList<DotNode>;
//m_rootNodes->setAutoDelete(TRUE); // rootNodes owns the nodes
m_usedNodes = new QDict<DotNode>(1009); // virtualNodes only aliases nodes
m_rootSubgraphs = new DotNodeList;
// build a graph with each class as a node and the inheritance relations
// as edges
initClassHierarchy(&Doxygen::classSDict);
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd; ClassDef *cd;
for (cli.toLast();(cd=cli.current());--cli) for (cli.toLast();(cd=cli.current());--cli)
{ {
...@@ -857,6 +854,22 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() ...@@ -857,6 +854,22 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
} }
} }
} }
}
DotGfxHierarchyTable::DotGfxHierarchyTable()
{
m_curNodeNumber=0;
m_rootNodes = new QList<DotNode>;
//m_rootNodes->setAutoDelete(TRUE); // rootNodes owns the nodes
m_usedNodes = new QDict<DotNode>(1009); // virtualNodes only aliases nodes
m_rootSubgraphs = new DotNodeList;
// build a graph with each class as a node and the inheritance relations
// as edges
initClassHierarchy(&Doxygen::classSDict);
initClassHierarchy(&Doxygen::hiddenClasses);
addClassList(&Doxygen::classSDict);
addClassList(&Doxygen::hiddenClasses);
// m_usedNodes now contains all nodes in the graph // m_usedNodes now contains all nodes in the graph
// color the graph into a set of independent subgraphs // color the graph into a set of independent subgraphs
...@@ -918,8 +931,6 @@ int DotClassGraph::m_curNodeNumber; ...@@ -918,8 +931,6 @@ int DotClassGraph::m_curNodeNumber;
void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
const char *label,int distance,const char *usedName,const char *templSpec,bool base) const char *label,int distance,const char *usedName,const char *templSpec,bool base)
{ {
//printf("DoxClassGraph::addClass(class=%s,parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
// cd->name().data(),n->m_label.data(),prot,label,distance,usedName,templSpec,base);
int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid; int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className; QCString className;
if (usedName) // name is a typedef if (usedName) // name is a typedef
...@@ -932,8 +943,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -932,8 +943,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
} }
else // just a normal name else // just a normal name
{ {
className=cd->name(); className=cd->displayName();
} }
//printf("DotClassGraph::addClass(class=`%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
// className.data(),n->m_label.data(),prot,label,distance,usedName,templSpec,base);
DotNode *bn = m_usedNodes->find(className); DotNode *bn = m_usedNodes->find(className);
if (bn) // class already inserted if (bn) // class already inserted
{ {
...@@ -955,7 +968,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -955,7 +968,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
QCString displayName=className; QCString displayName=className;
if (Config_getBool("HIDE_SCOPE_NAMES")) displayName=stripScope(displayName); if (Config_getBool("HIDE_SCOPE_NAMES")) displayName=stripScope(displayName);
QCString tmp_url; QCString tmp_url;
if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); if (cd->isLinkable())
{
tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
}
bn = new DotNode(m_curNodeNumber++, bn = new DotNode(m_curNodeNumber++,
displayName, displayName,
tmp_url.data(), tmp_url.data(),
...@@ -973,7 +989,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -973,7 +989,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
n->addParent(bn); n->addParent(bn);
} }
m_usedNodes->insert(className,bn); m_usedNodes->insert(className,bn);
//printf(" add used node %s of %s\n",cd->name().data(),n->m_label.data()); //printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data());
if (distance<m_recDepth) buildGraph(cd,bn,distance+1,base); if (distance<m_recDepth) buildGraph(cd,bn,distance+1,base);
} }
} }
...@@ -986,23 +1002,25 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) ...@@ -986,23 +1002,25 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
{ {
//printf("-------- inheritance relation %s->%s templ=`%s'\n", //printf("-------- inheritance relation %s->%s templ=`%s'\n",
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data()); // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
QCString templSpec; //QCString templSpec;
if (base) templSpec = substituteTemplateSpec( //if (base) templSpec = substituteTemplateSpec(
cd,bcd->templSpecifiers); // cd,bcd->templSpecifiers);
ClassDef *acd=0; //ClassDef *acd=0;
QCString actualArg; //QCString actualArg;
computeTemplateInstance(cd,bcd->classDef,templSpec,acd,actualArg); //computeTemplateInstance(cd,bcd->classDef,templSpec,acd,actualArg);
//printf("acd=%p actualArg=%s\n",acd,actualArg.data()); //printf("acd=%p actualArg=%s\n",acd,actualArg.data());
if (acd) //if (acd)
{ //{
addClass(acd,n,bcd->prot,0,distance,actualArg, // addClass(acd,n,bcd->prot,0,distance,actualArg,
templSpec,base); // templSpec,base);
} //}
else //else
{ //{
addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName, // addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
templSpec,base); // templSpec,base);
} //}
addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
bcd->templSpecifiers,base);
} }
if (m_graphType != Inheritance) if (m_graphType != Inheritance)
{ {
...@@ -1031,25 +1049,27 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) ...@@ -1031,25 +1049,27 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
label+=QCString("\\n")+s; label+=QCString("\\n")+s;
} }
} }
QCString actualArg; //QCString actualArg;
ClassDef *acd=0; //ClassDef *acd=0;
//printf("-------- usage relation %s->%s templ=`%s'\n", //printf("-------- usage relation %s->%s templ=`%s'\n",
// cd->name().data(),ucd->classDef->name().data(), // cd->name().data(),ucd->classDef->name().data(),
// ucd->templSpecifiers.data()); // ucd->templSpecifiers.data());
QCString templSpec = substituteTemplateSpec( //QCString templSpec = substituteTemplateSpec(
cd,ucd->templSpecifiers); // cd,ucd->templSpecifiers);
computeTemplateInstance(cd,ucd->classDef, templSpec, acd,actualArg); //computeTemplateInstance(cd,ucd->classDef, templSpec, acd,actualArg);
if (acd) //if (acd)
{ //{
addClass(acd,n,EdgeInfo::Black,label,distance,actualArg, // addClass(acd,n,EdgeInfo::Black,label,distance,actualArg,
templSpec,base); // templSpec,base);
} //}
else //else
{ //{
//printf("Found label=`%s'\n",label.data()); // //printf("Found label=`%s'\n",label.data());
addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0, // addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
templSpec,base); // templSpec,base);
} //}
addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
ucd->templSpecifiers,base);
} }
} }
} }
...@@ -1057,17 +1077,17 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) ...@@ -1057,17 +1077,17 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth) DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
{ {
//printf("DotGfxUsage::DotGfxUsage %s\n",cd->name().data()); //printf("--------------- DotClassGraph::DotClassGraph `%s'\n",cd->displayName().data());
m_graphType = t; m_graphType = t;
m_maxDistance = 0; m_maxDistance = 0;
m_recDepth = maxRecursionDepth; m_recDepth = maxRecursionDepth;
QCString tmp_url=""; QCString tmp_url="";
if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase(); if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
QCString className = cd->displayName(); QCString className = cd->displayName();
if (cd->templateArguments()) //if (cd->templateArguments())
{ //{
className+=tempArgListToString(cd->templateArguments()); // className+=tempArgListToString(cd->templateArguments());
} //}
m_startNode = new DotNode(m_curNodeNumber++, m_startNode = new DotNode(m_curNodeNumber++,
className, className,
tmp_url.data(), tmp_url.data(),
...@@ -1075,11 +1095,11 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth) ...@@ -1075,11 +1095,11 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
TRUE // is a root node TRUE // is a root node
); );
m_usedNodes = new QDict<DotNode>(1009); m_usedNodes = new QDict<DotNode>(1009);
m_usedNodes->insert(cd->name(),m_startNode); m_usedNodes->insert(className,m_startNode);
ClassSDict::Iterator cli(Doxygen::classSDict); //ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *icd; //ClassDef *icd;
for (cli.toFirst();(icd=cli.current());++cli) icd->initTemplateMapping(); //for (cli.toFirst();(icd=cli.current());++cli) icd->initTemplateMapping();
//printf("Root node %s\n",cd->name().data()); //printf("Root node %s\n",cd->name().data());
if (m_recDepth>0) if (m_recDepth>0)
......
...@@ -24,6 +24,7 @@ class ClassDef; ...@@ -24,6 +24,7 @@ class ClassDef;
class FileDef; class FileDef;
class QTextStream; class QTextStream;
class DotNodeList; class DotNodeList;
class ClassSDict;
enum GraphOutputFormat { GIF , EPS }; enum GraphOutputFormat { GIF , EPS };
...@@ -105,6 +106,7 @@ class DotGfxHierarchyTable ...@@ -105,6 +106,7 @@ class DotGfxHierarchyTable
private: private:
void addHierarchy(DotNode *n,ClassDef *cd,bool hide); void addHierarchy(DotNode *n,ClassDef *cd,bool hide);
void addClassList(ClassSDict *cl);
QList<DotNode> *m_rootNodes; QList<DotNode> *m_rootNodes;
QDict<DotNode> *m_usedNodes; QDict<DotNode> *m_usedNodes;
......
This diff is collapsed.
...@@ -59,7 +59,7 @@ class Doxygen ...@@ -59,7 +59,7 @@ class Doxygen
{ {
public: public:
static ClassSDict classSDict; static ClassSDict classSDict;
static ClassList hiddenClasses; static ClassSDict hiddenClasses;
static PageSDict *exampleSDict; static PageSDict *exampleSDict;
static PageSDict *pageSDict; static PageSDict *pageSDict;
static PageInfo *mainPage; static PageInfo *mainPage;
......
...@@ -110,12 +110,12 @@ class FileDef : public Definition ...@@ -110,12 +110,12 @@ class FileDef : public Definition
/*! Returns the absolute path of this file. */ /*! Returns the absolute path of this file. */
QCString getPath() const { return path; } QCString getPath() const { return path; }
bool isLinkableInProject() bool isLinkableInProject() const
{ {
return hasDocumentation() && !isReference(); return hasDocumentation() && !isReference();
} }
bool isLinkable() bool isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
......
...@@ -311,13 +311,14 @@ static void generateFolderTreeViewData() ...@@ -311,13 +311,14 @@ static void generateFolderTreeViewData()
QTextStream t(&f); QTextStream t(&f);
t << "<html><head>" << endl; t << "<html><head>" << endl;
t << "<link rel=\"stylesheet\" href=\""; t << "<link rel=\"stylesheet\" href=\"";
if (Config_getString("HTML_STYLESHEET").isEmpty()) QCString cssname=Config_getString("HTML_STYLESHEET");
if (cssname.isEmpty())
{ {
t << "doxygen.css"; t << "doxygen.css";
} }
else else
{ {
QFileInfo cssfi(Config_getString("HTML_STYLESHEET")); QFileInfo cssfi(cssname);
if (!cssfi.exists()) if (!cssfi.exists())
{ {
err("Error: user specified HTML style sheet file does not exist!\n"); err("Error: user specified HTML style sheet file does not exist!\n");
......
...@@ -62,11 +62,11 @@ class GroupDef : public Definition ...@@ -62,11 +62,11 @@ class GroupDef : public Definition
bool containsGroup(const GroupDef *def); // true if def is already a subgroup bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
int countMembers() const; int countMembers() const;
bool isLinkableInProject() bool isLinkableInProject() const
{ {
return hasDocumentation() && !isReference(); return hasDocumentation() && !isReference();
} }
bool isLinkable() bool isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
......
...@@ -46,10 +46,10 @@ static const char *defaultStyleSheet = ...@@ -46,10 +46,10 @@ static const char *defaultStyleSheet =
"A.codeRef { font-weight: normal; color: #4444ee }\n" "A.codeRef { font-weight: normal; color: #4444ee }\n"
"DL.el { margin-left: -1cm }\n" "DL.el { margin-left: -1cm }\n"
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n" "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }\n" "DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
"TD.md { background-color: #f2f2ff }\n" "TD.md { background-color: #f2f2ff }\n"
"DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }\n" "DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }\n" "DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n" "FONT.keyword { color: #008000 }\n"
"FONT.keywordtype { color: #604020 }\n" "FONT.keywordtype { color: #604020 }\n"
"FONT.keywordflow { color: #e08000 }\n" "FONT.keywordflow { color: #e08000 }\n"
...@@ -80,13 +80,14 @@ void HtmlGenerator::append(const OutputGenerator *g) ...@@ -80,13 +80,14 @@ void HtmlGenerator::append(const OutputGenerator *g)
void HtmlGenerator::init() void HtmlGenerator::init()
{ {
QDir d(Config_getString("HTML_OUTPUT")); QCString dname=Config_getString("HTML_OUTPUT");
if (!d.exists() && !d.mkdir(Config_getString("HTML_OUTPUT"))) QDir d(dname);
if (!d.exists() && !d.mkdir(dname))
{ {
err("Could not create output directory %s\n",Config_getString("HTML_OUTPUT").data()); err("Could not create output directory %s\n",dname.data());
exit(1); exit(1);
} }
writeLogo(Config_getString("HTML_OUTPUT")); writeLogo(dname);
if (!Config_getString("HTML_HEADER").isEmpty()) g_header=fileToString(Config_getString("HTML_HEADER")); if (!Config_getString("HTML_HEADER").isEmpty()) g_header=fileToString(Config_getString("HTML_HEADER"));
if (!Config_getString("HTML_FOOTER").isEmpty()) g_footer=fileToString(Config_getString("HTML_FOOTER")); if (!Config_getString("HTML_FOOTER").isEmpty()) g_footer=fileToString(Config_getString("HTML_FOOTER"));
} }
...@@ -117,7 +118,8 @@ static void writeDefaultHeaderFile(QTextStream &t,const char *title, ...@@ -117,7 +118,8 @@ static void writeDefaultHeaderFile(QTextStream &t,const char *title,
} }
else else
{ {
QFileInfo cssfi(Config_getString("HTML_STYLESHEET")); QCString cssname=Config_getString("HTML_STYLESHEET");
QFileInfo cssfi(cssname);
if (!cssfi.exists()) if (!cssfi.exists())
{ {
err("Error: user specified HTML style sheet file does not exist!\n"); err("Error: user specified HTML style sheet file does not exist!\n");
...@@ -278,7 +280,8 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -278,7 +280,8 @@ void HtmlGenerator::writeStyleInfo(int part)
} }
else // write user defined style sheet else // write user defined style sheet
{ {
QFileInfo cssfi(Config_getString("HTML_STYLESHEET")); QCString cssname=Config_getString("HTML_STYLESHEET");
QFileInfo cssfi(cssname);
if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable()) if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
{ {
err("Error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data()); err("Error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data());
...@@ -286,7 +289,7 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -286,7 +289,7 @@ void HtmlGenerator::writeStyleInfo(int part)
else else
{ {
startPlainFile(cssfi.fileName()); startPlainFile(cssfi.fileName());
t << fileToString(Config_getString("HTML_STYLESHEET")); t << fileToString(cssname);
endPlainFile(); endPlainFile();
} }
} }
...@@ -813,7 +816,7 @@ void HtmlGenerator::endIndexList() ...@@ -813,7 +816,7 @@ void HtmlGenerator::endIndexList()
void HtmlGenerator::startAlphabeticalIndexList() void HtmlGenerator::startAlphabeticalIndexList()
{ {
t << "<table align=center width=\"95%\" border=0 cellspacing=0 cellpadding=0>" << endl; t << "<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" << endl;
} }
void HtmlGenerator::endAlphabeticalIndexList() void HtmlGenerator::endAlphabeticalIndexList()
...@@ -823,8 +826,8 @@ void HtmlGenerator::endAlphabeticalIndexList() ...@@ -823,8 +826,8 @@ void HtmlGenerator::endAlphabeticalIndexList()
void HtmlGenerator::writeIndexHeading(const char *s) void HtmlGenerator::writeIndexHeading(const char *s)
{ {
t << "<div class=\"ah\"><font color=\"white\"><b>&nbsp;&nbsp;" << s t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</b></font></div>"; << "&nbsp;&nbsp;</td</tr></table>";
} }
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption) void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
......
...@@ -356,6 +356,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -356,6 +356,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
bool hasChildren = !cd->visited && !hideSuper && cd->subClasses()->count()>0; bool hasChildren = !cd->visited && !hideSuper && cd->subClasses()->count()>0;
if (cd->isLinkable()) if (cd->isLinkable())
{ {
//printf("Writing class %s\n",cd->displayName().data());
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
if (cd->isReference()) if (cd->isReference())
{ {
...@@ -518,10 +519,8 @@ void writeClassTree(ClassSDict *d) ...@@ -518,10 +519,8 @@ void writeClassTree(ClassSDict *d)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeClassHierarchy(OutputList &ol) static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started)
{ {
initClassHierarchy(&Doxygen::classSDict);
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp=0; FTVHelp *ftvHelp=0;
bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool &generateHtml = Config_getBool("GENERATE_HTML") ;
...@@ -536,8 +535,7 @@ void writeClassHierarchy(OutputList &ol) ...@@ -536,8 +535,7 @@ void writeClassHierarchy(OutputList &ol)
ftvHelp = FTVHelp::getInstance(); ftvHelp = FTVHelp::getInstance();
} }
bool started=FALSE; ClassSDict::Iterator cli(*cl);
ClassSDict::Iterator cli(Doxygen::classSDict);
for (;cli.current(); ++cli) for (;cli.current(); ++cli)
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
...@@ -560,7 +558,7 @@ void writeClassHierarchy(OutputList &ol) ...@@ -560,7 +558,7 @@ void writeClassHierarchy(OutputList &ol)
bool hasChildren = !cd->visited && cd->subClasses()->count()>0; bool hasChildren = !cd->visited && cd->subClasses()->count()>0;
if (cd->isLinkable()) if (cd->isLinkable())
{ {
//printf("Writing class %s\n",cd->name().data()); //printf("Writing class %s\n",cd->displayName().data());
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
if (cd->isReference()) if (cd->isReference())
{ {
...@@ -597,6 +595,30 @@ void writeClassHierarchy(OutputList &ol) ...@@ -597,6 +595,30 @@ void writeClassHierarchy(OutputList &ol)
} }
} }
} }
}
void writeClassHierarchy(OutputList &ol)
{
HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp=0;
bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
initClassHierarchy(&Doxygen::classSDict);
initClassHierarchy(&Doxygen::hiddenClasses);
bool started=FALSE;
writeClassTreeForList(ol,&Doxygen::classSDict,started);
writeClassTreeForList(ol,&Doxygen::hiddenClasses,started);
if (started) if (started)
{ {
ol.endIndexList(); ol.endIndexList();
...@@ -1062,7 +1084,7 @@ int countAnnotatedClasses() ...@@ -1062,7 +1084,7 @@ int countAnnotatedClasses()
ClassDef *cd; ClassDef *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
//printf("Annotated class %s\n",cd->name().data()); //printf("Annotated class %s\n",cd->name().data());
count++; count++;
...@@ -1085,7 +1107,7 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -1085,7 +1107,7 @@ void writeAnnotatedClassList(OutputList &ol)
ClassDef *cd; ClassDef *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
QCString type=cd->compoundTypeString(); QCString type=cd->compoundTypeString();
ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName()); ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
...@@ -1168,7 +1190,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1168,7 +1190,7 @@ void writeAlphabeticalClassList(OutputList &ol)
int headerItems=0; int headerItems=0;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->name()); int index = getPrefixIndex(cd->name());
if (toupper(cd->name().at(index))!=startLetter) // new begin letter => new header if (toupper(cd->name().at(index))!=startLetter) // new begin letter => new header
...@@ -1201,7 +1223,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1201,7 +1223,7 @@ void writeAlphabeticalClassList(OutputList &ol)
startLetter=0; startLetter=0;
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->name()); int index = getPrefixIndex(cd->name());
if (toupper(cd->name().at(index))!=startLetter) if (toupper(cd->name().at(index))!=startLetter)
...@@ -1443,7 +1465,7 @@ void writeMemberList(OutputList &ol,bool useSections) ...@@ -1443,7 +1465,7 @@ void writeMemberList(OutputList &ol,bool useSections)
if ( if (
md->isLinkableInProject() && md->isLinkableInProject() &&
(cd=md->getClassDef()) && (cd=md->getClassDef()) &&
cd->isLinkableInProject() cd->isLinkableInProject() && cd->templateMaster()==0
) )
{ {
found=TRUE; found=TRUE;
...@@ -1489,7 +1511,7 @@ void writeMemberList(OutputList &ol,bool useSections) ...@@ -1489,7 +1511,7 @@ void writeMemberList(OutputList &ol,bool useSections)
if ( if (
md->isLinkableInProject() && md->isLinkableInProject() &&
prevName!=cd->displayName() && prevName!=cd->displayName() &&
cd->isLinkableInProject() cd->isLinkableInProject() && cd->templateMaster()==0
) )
{ {
if (count==0) if (count==0)
...@@ -2632,6 +2654,26 @@ void writeIndex(OutputList &ol) ...@@ -2632,6 +2654,26 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage) if (Doxygen::mainPage)
{ {
parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc); parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"page\">" << endl
<< " <filename>"
<< convertToXML(Doxygen::mainPage->fileName)
<< "</filename>"
<< endl
<< " <title>"
<< convertToXML(Doxygen::mainPage->title)
<< "</title>"
<< endl
<< " <name>"
<< convertToXML(Doxygen::mainPage->name)
<< "</name>"
<< endl;
Doxygen::mainPage->writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
} }
endFile(ol); endFile(ol);
......
...@@ -139,6 +139,7 @@ SOURCES = ce_lex.cpp \ ...@@ -139,6 +139,7 @@ SOURCES = ce_lex.cpp \
searchindex.cpp \ searchindex.cpp \
suffixtree.cpp \ suffixtree.cpp \
tagreader.cpp \ tagreader.cpp \
translator.cpp \
util.cpp \ util.cpp \
version.cpp version.cpp
......
...@@ -309,6 +309,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -309,6 +309,7 @@ MemberDef::MemberDef(const char *df,int dl,
{ {
argList=0; argList=0;
} }
m_templateMaster=0;
} }
/*! Destroys the member definition. */ /*! Destroys the member definition. */
...@@ -361,7 +362,11 @@ bool MemberDef::hasExamples() ...@@ -361,7 +362,11 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const QCString MemberDef::getOutputFileBase() const
{ {
if (classDef) if (m_templateMaster)
{
return m_templateMaster->getOutputFileBase();
}
else if (classDef)
{ {
return classDef->getOutputFileBase(); return classDef->getOutputFileBase();
} }
...@@ -570,6 +575,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -570,6 +575,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
Doxygen::tagFile << "\" static=\"yes"; Doxygen::tagFile << "\" static=\"yes";
} }
Doxygen::tagFile << "\">" << endl; Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl; Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
...@@ -963,7 +969,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -963,7 +969,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-ei)); linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-ei));
} }
} }
else else // not an enum value
{ {
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
...@@ -998,7 +1004,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -998,7 +1004,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (cd) if (cd)
{ {
QCString cName=cd->name(); QCString cName=cd->name();
//printf("cName=%s\n",cName.data());
int il=cName.find('<'); int il=cName.find('<');
int ir=cName.findRev('>'); int ir=cName.findRev('>');
if (il!=-1 && ir!=-1 && ir>il) if (il!=-1 && ir!=-1 && ir>il)
...@@ -1273,11 +1278,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1273,11 +1278,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
parseText(ol,reimplFromLine.left(markerPos)); //text left from marker parseText(ol,reimplFromLine.left(markerPos)); //text left from marker
if (bmd->isLinkable()) // replace marker with link if (bmd->isLinkable()) // replace marker with link
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), Definition *bd=bmd->group;
if (bd==0) bd=bcd;
ol.writeObjectLink(bd->getReference(),bd->getOutputFileBase(),
bmd->anchor(),bcd->name()); bmd->anchor(),bcd->name());
if ( bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
//ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// bmd->anchor(),bcd->name());
if ( bd->isLinkableInProject() )
{ {
writePageRef(ol,bcd->getOutputFileBase(),bmd->anchor()); writePageRef(ol,bd->getOutputFileBase(),bmd->anchor());
} }
} }
else else
...@@ -1348,11 +1358,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1348,11 +1358,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (ok && bcd && bmd) // write link for marker if (ok && bcd && bmd) // write link for marker
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// bmd->anchor(),bcd->name());
Definition* bd;
if (bmd->group) bd=bmd->group; else bd=bcd;
ol.writeObjectLink(bd->getReference(),bd->getOutputFileBase(),
bmd->anchor(),bcd->name()); bmd->anchor(),bcd->name());
if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
if (bd->isLinkableInProject() )
{ {
writePageRef(ol,bcd->getOutputFileBase(),bmd->anchor()); writePageRef(ol,bd->getOutputFileBase(),bmd->anchor());
} }
} }
++mli; ++mli;
...@@ -1415,7 +1431,7 @@ void MemberDef::warnIfUndocumented() ...@@ -1415,7 +1431,7 @@ void MemberDef::warnIfUndocumented()
} }
bool MemberDef::isLinkableInProject() bool MemberDef::isLinkableInProject() const
{ {
return !name().isEmpty() && name().at(0)!='@' && return !name().isEmpty() && name().at(0)!='@' &&
((hasDocumentation() && !isReference()) ((hasDocumentation() && !isReference())
...@@ -1424,7 +1440,7 @@ bool MemberDef::isLinkableInProject() ...@@ -1424,7 +1440,7 @@ bool MemberDef::isLinkableInProject()
(classDef!=0 || Config_getBool("EXTRACT_STATIC") || !isStatic()); // not a static file/namespace member (classDef!=0 || Config_getBool("EXTRACT_STATIC") || !isStatic()); // not a static file/namespace member
} }
bool MemberDef::isLinkable() bool MemberDef::isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
...@@ -1515,3 +1531,35 @@ void MemberDef::setNamespace(NamespaceDef *nd) ...@@ -1515,3 +1531,35 @@ void MemberDef::setNamespace(NamespaceDef *nd)
setOuterScope(nd); setOuterScope(nd);
} }
MemberDef *MemberDef::createTemplateInstanceMember(
ArgumentList *formalArgs,ArgumentList *actualArgs)
{
//printf(" Member %s %s %s\n",typeString(),name().data(),argsString());
ArgumentList *actualArgList = 0;
if (argList)
{
actualArgList = new ArgumentList;
ArgumentListIterator ali(*argList);
Argument *arg;
for (;(arg=ali.current());++ali)
{
Argument *actArg = new Argument(*arg);
actArg->type = substituteTemplateArgumentsInString(actArg->type,formalArgs,actualArgs);
actualArgList->append(actArg);
}
}
MemberDef *imd = new MemberDef(
getDefFileName(),getDefLine(),
substituteTemplateArgumentsInString(type,formalArgs,actualArgs),
name(),
substituteTemplateArgumentsInString(args,formalArgs,actualArgs),
exception, prot,
virt, stat, related, mtype, 0, 0
);
imd->argList = actualArgList;
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
// TODO: init other member variables.
return imd;
}
...@@ -35,6 +35,7 @@ class ExampleSDict; ...@@ -35,6 +35,7 @@ class ExampleSDict;
class OutputList; class OutputList;
class GroupDef; class GroupDef;
class QTextStream; class QTextStream;
class ArgumentList;
struct SourceReference struct SourceReference
{ {
...@@ -121,8 +122,8 @@ class MemberDef : public Definition ...@@ -121,8 +122,8 @@ class MemberDef : public Definition
bool isExternal() const { return explExt; } bool isExternal() const { return explExt; }
// output info // output info
bool isLinkableInProject(); bool isLinkableInProject() const;
bool isLinkable(); bool isLinkable() const;
bool hasDocumentation() const; // overrides hasDocumentation in definition.h bool hasDocumentation() const; // overrides hasDocumentation in definition.h
bool isBriefSectionVisible() const; bool isBriefSectionVisible() const;
bool isDetailedSectionVisible(bool inGroup=FALSE) const; bool isDetailedSectionVisible(bool inGroup=FALSE) const;
...@@ -219,10 +220,15 @@ class MemberDef : public Definition ...@@ -219,10 +220,15 @@ class MemberDef : public Definition
int indentDepth() { return indDepth; } int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader); bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; }
QCString getScopeString() const; QCString getScopeString() const;
ClassDef *getClassDefOfAnonymousType(); ClassDef *getClassDefOfAnonymousType();
MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs,
ArgumentList *actualArgs);
void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; }
private: private:
ClassDef *classDef; // member of or related to ClassDef *classDef; // member of or related to
...@@ -285,7 +291,7 @@ class MemberDef : public Definition ...@@ -285,7 +291,7 @@ class MemberDef : public Definition
QCString groupFileName; // file where this grouping was defined QCString groupFileName; // file where this grouping was defined
int groupStartLine; // line " " " " " int groupStartLine; // line " " " " "
bool groupHasDocs; // true if the entry that caused the grouping was documented bool groupHasDocs; // true if the entry that caused the grouping was documented
MemberDef *m_templateMaster;
// disable copying of member defs // disable copying of member defs
......
...@@ -57,14 +57,14 @@ class NamespaceDef : public Definition ...@@ -57,14 +57,14 @@ class NamespaceDef : public Definition
void addUsingDeclaration(ClassDef *cd); void addUsingDeclaration(ClassDef *cd);
ClassList *getUsedClasses() const { return usingDeclList; } ClassList *getUsedClasses() const { return usingDeclList; }
bool isLinkableInProject() bool isLinkableInProject() const
{ {
int i = name().findRev("::"); int i = name().findRev("::");
if (i==-1) i=0; else i+=2; if (i==-1) i=0; else i+=2;
return !name().isEmpty() && name().at(i)!='@' && return !name().isEmpty() && name().at(i)!='@' &&
hasDocumentation() && !isReference(); hasDocumentation() && !isReference();
} }
bool isLinkable() bool isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
......
...@@ -38,11 +38,11 @@ class PackageDef : public Definition ...@@ -38,11 +38,11 @@ class PackageDef : public Definition
QCString getOutputFileBase() const ; QCString getOutputFileBase() const ;
void addClass(const ClassDef *def); void addClass(const ClassDef *def);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
bool isLinkableInProject() bool isLinkableInProject() const
{ {
return hasDocumentation() && !isReference(); return hasDocumentation() && !isReference();
} }
bool isLinkable() bool isLinkable() const
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
...@@ -796,7 +796,7 @@ bool computeExpression(const QCString &expr) ...@@ -796,7 +796,7 @@ bool computeExpression(const QCString &expr)
e = removeIdsAndMarkers(e); e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE; if (e.isEmpty()) return FALSE;
//printf("parsing `%s'\n",e.data()); //printf("parsing `%s'\n",e.data());
return parseCppExpression(e); return parseCppExpression(g_yyFileName,g_yyLineNr,e);
} }
/*! expands the macro definition in \a name /*! expands the macro definition in \a name
......
...@@ -1127,7 +1127,9 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1127,7 +1127,9 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isMainPage: case isMainPage:
t << "\\par " << Rtf_Style_Reset << endl; t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\tc \\v " << theTranslator->trMainPage() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trMainPage() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"index.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index";
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break; break;
case isPackageIndex: case isPackageIndex:
t << "\\par " << Rtf_Style_Reset << endl; t << "\\par " << Rtf_Style_Reset << endl;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
...@@ -727,9 +727,11 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -727,9 +727,11 @@ TITLE [tT][iI][tT][lL][eE]
<FindMembers>{B}*"explicit"{BN}+ { current->memSpec|=Entry::Explicit; <FindMembers>{B}*"explicit"{BN}+ { current->memSpec|=Entry::Explicit;
lineCount(); lineCount();
} }
/*
<FindMembers>{B}*"import"{BN}+ { // IDL import keyword <FindMembers>{B}*"import"{BN}+ { // IDL import keyword
BEGIN( NextSemi ); BEGIN( NextSemi );
} }
*/
<FindMembers>{B}*"typename"{BN}+ { lineCount(); } <FindMembers>{B}*"typename"{BN}+ { lineCount(); }
<FindMembers>{B}*"namespace"{BN}*/[^a-z_A-Z0-9] { <FindMembers>{B}*"namespace"{BN}*/[^a-z_A-Z0-9] {
isTypedef=FALSE; isTypedef=FALSE;
...@@ -1035,7 +1037,9 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1035,7 +1037,9 @@ TITLE [tT][iI][tT][lL][eE]
} }
<FindMembers,FindMemberName>{SCOPENAME} { <FindMembers,FindMemberName>{SCOPENAME} {
// correct for misinterpreting return type as scope name: example: A<T> func() // correct for misinterpreting return type as scope name: example: A<T> func()
if (YY_START==FindMembers && current->tArgList && current->mtArgList==0) //printf("YY_START=%d current->tArgList=%p current->mtArgList=%p\n",
// YY_START,current->tArgList,current->mtArgList);
if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0)
{ {
current->mtArgList=current->tArgList; current->mtArgList=current->tArgList;
current->tArgList=0; current->tArgList=0;
...@@ -1046,6 +1050,10 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1046,6 +1050,10 @@ TITLE [tT][iI][tT][lL][eE]
{ {
BEGIN(CppQuote); BEGIN(CppQuote);
} }
else if (insideIDL && yyleng==6 && strcmp(yytext,"import")==0)
{
BEGIN(NextSemi);
}
else if (insideIDL && strcmp(yytext,"case")==0) else if (insideIDL && strcmp(yytext,"case")==0)
{ {
BEGIN(IDLUnionCase); BEGIN(IDLUnionCase);
...@@ -3400,7 +3408,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3400,7 +3408,7 @@ TITLE [tT][iI][tT][lL][eE]
<DocBaseClass>{ID} { <DocBaseClass>{ID} {
//printf("Adding base class %s\n",yytext); //printf("Adding base class %s\n",yytext);
current->extends->append( current->extends->append(
new BaseInfo(yytext,Public,Normal) new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
); );
} }
<DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); } <DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); }
......
...@@ -39,6 +39,7 @@ class TagMemberInfo ...@@ -39,6 +39,7 @@ class TagMemberInfo
{ {
public: public:
TagMemberInfo() : prot(Public), virt(Normal), isStatic(FALSE) {} TagMemberInfo() : prot(Public), virt(Normal), isStatic(FALSE) {}
QString type;
QString name; QString name;
QString anchor; QString anchor;
QString arglist; QString arglist;
...@@ -54,13 +55,14 @@ class TagClassInfo ...@@ -54,13 +55,14 @@ class TagClassInfo
{ {
public: public:
enum Kind { Class, Struct, Union, Interface, Exception }; enum Kind { Class, Struct, Union, Interface, Exception };
TagClassInfo() { bases=0, members.setAutoDelete(TRUE); } TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); }
~TagClassInfo() { delete bases; } ~TagClassInfo() { delete bases; delete templateArguments; }
QString name; QString name;
QString filename; QString filename;
QStrList docAnchors; QStrList docAnchors;
QList<BaseInfo> *bases; QList<BaseInfo> *bases;
QList<TagMemberInfo> members; QList<TagMemberInfo> members;
QList<QString> *templateArguments;
Kind kind; Kind kind;
}; };
...@@ -168,7 +170,11 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -168,7 +170,11 @@ class TagFileParser : public QXmlDefaultHandler
}; };
public: public:
TagFileParser(const char *tagName) : m_tagName(tagName) {} TagFileParser(const char *tagName) : m_startElementHandlers(17),
m_endElementHandlers(17),
m_tagName(tagName)
{
}
void startCompound( const QXmlAttributes& attrib ) void startCompound( const QXmlAttributes& attrib )
{ {
...@@ -351,6 +357,17 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -351,6 +357,17 @@ class TagFileParser : public QXmlDefaultHandler
{ {
m_curString = ""; m_curString = "";
} }
void endType()
{
if (m_state==InMember)
{
m_curMember->type = m_curString;
}
else
{
err("Error: Unexpected tag `type' found\n");
}
}
void endName() void endName()
{ {
switch (m_state) switch (m_state)
...@@ -386,7 +403,11 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -386,7 +403,11 @@ class TagFileParser : public QXmlDefaultHandler
{ {
virt = Virtual; virt = Virtual;
} }
if (m_curClass->bases==0) m_curClass->bases = new QList<BaseInfo>; if (m_curClass->bases==0)
{
m_curClass->bases = new QList<BaseInfo>;
m_curClass->bases->setAutoDelete(TRUE);
}
m_curClass->bases->append(new BaseInfo(m_curString,prot,virt)); m_curClass->bases->append(new BaseInfo(m_curString,prot,virt));
} }
else else
...@@ -405,6 +426,22 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -405,6 +426,22 @@ class TagFileParser : public QXmlDefaultHandler
err("Error: Unexpected tag `base' found\n"); err("Error: Unexpected tag `base' found\n");
} }
} }
void endTemplateArg()
{
if (m_state==InClass && m_curClass)
{
if (m_curClass->templateArguments==0)
{
m_curClass->templateArguments = new QList<QString>;
m_curClass->templateArguments->setAutoDelete(TRUE);
}
m_curClass->templateArguments->append(new QString(m_curString));
}
else
{
err("Error: Unexpected tag `templarg' found\n");
}
}
void endFilename() void endFilename()
{ {
switch (m_state) switch (m_state)
...@@ -510,6 +547,8 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -510,6 +547,8 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue)); m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startStringValue)); m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement)); m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement));
m_startElementHandlers.insert("templarg", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("type", new StartElementHandler(this,&TagFileParser::startStringValue));
m_endElementHandlers.insert("compound", new EndElementHandler(this,&TagFileParser::endCompound)); m_endElementHandlers.insert("compound", new EndElementHandler(this,&TagFileParser::endCompound));
m_endElementHandlers.insert("member", new EndElementHandler(this,&TagFileParser::endMember)); m_endElementHandlers.insert("member", new EndElementHandler(this,&TagFileParser::endMember));
...@@ -527,6 +566,8 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -527,6 +566,8 @@ class TagFileParser : public QXmlDefaultHandler
m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage)); m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage));
m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor)); m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor));
m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement)); m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement));
m_endElementHandlers.insert("templarg", new EndElementHandler(this,&TagFileParser::endTemplateArg));
m_endElementHandlers.insert("type", new EndElementHandler(this,&TagFileParser::endType));
return TRUE; return TRUE;
} }
...@@ -811,6 +852,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) ...@@ -811,6 +852,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
for (;(tmi=mii.current());++mii) for (;(tmi=mii.current());++mii)
{ {
Entry *me = new Entry; Entry *me = new Entry;
me->type = tmi->type;
me->name = tmi->name; me->name = tmi->name;
me->args = tmi->arglist; me->args = tmi->arglist;
me->protection = tmi->prot; me->protection = tmi->prot;
...@@ -929,6 +971,18 @@ void TagFileParser::buildLists(Entry *root) ...@@ -929,6 +971,18 @@ void TagFileParser::buildLists(Entry *root)
{ {
ce->extends = tci->bases; tci->bases = 0; ce->extends = tci->bases; tci->bases = 0;
} }
if (tci->templateArguments)
{
if (ce->tArgList==0) ce->tArgList = new ArgumentList;
QListIterator<QString> sli(*tci->templateArguments);
QString *argName;
for (;(argName=sli.current());++sli)
{
Argument *a = new Argument;
a->name = *argName;
ce->tArgList->append(a);
}
}
buildMemberList(ce,tci->members); buildMemberList(ce,tci->members);
root->addSubEntry(ce); root->addSubEntry(ce);
......
#include "translator.h"
const char Translator::WinToISOTab[] =
{
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x2E', '\x96', '\x97',
'\x98', '\x99', '\xB9', '\x9B', '\xB6', '\xBB', '\xBE', '\xBC',
'\xA0', '\x20', '\x20', '\xA3', '\xA4', '\xA1', '\xA6', '\xA7',
'\x22', '\xA9', '\xAA', '\x3C', '\xAC', '\x2D', '\xAE', '\xAF',
'\x2E', '\x2B', '\x20', '\xB3', '\x27', '\x75', '\xB6', '\xB7',
'\x20', '\xB1', '\xBA', '\x3E', '\xA5', '\x22', '\xB5', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\x2D',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
const char Translator::ISOToWinTab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
'\x98', '\x99', '\x9A', '\x9B', '\x9C', '\x9D', '\x9E', '\x9F',
'\xA0', '\xA5', '\xA2', '\xA3', '\xA4', '\xBC', '\x8C', '\xA7',
'\xA8', '\x8A', '\xAA', '\x8D', '\x8F', '\xAD', '\x8E', '\xAF',
'\xB0', '\xB9', '\xB2', '\xB3', '\xB4', '\xBE', '\x9C', '\xB7',
'\xB8', '\x9A', '\xBA', '\x9D', '\x9F', '\xBD', '\x9E', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\xF7',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
Q_UINT16 Translator::koi8_r[128] =
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
};
Q_UINT16 Translator::windows_1251[128] =
{ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
};
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
class Translator class Translator
{ {
protected: protected:
static const char WinToISOTab[];
static const char ISOToWinTab[];
static Q_UINT16 koi8_r[128];
static Q_UINT16 windows_1251[128];
/*! Returns the string converted from windows-1250 to iso-8859-2. */ /*! Returns the string converted from windows-1250 to iso-8859-2. */
/* The method was designed initially for translator_cz.h. /* The method was designed initially for translator_cz.h.
* It is used for on-line encoding conversion related to * It is used for on-line encoding conversion related to
...@@ -46,25 +50,6 @@ class Translator ...@@ -46,25 +50,6 @@ class Translator
{ {
// The conversion table for characters >127 // The conversion table for characters >127
// //
static const char WinToISOTab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x2E', '\x96', '\x97',
'\x98', '\x99', '\xB9', '\x9B', '\xB6', '\xBB', '\xBE', '\xBC',
'\xA0', '\x20', '\x20', '\xA3', '\xA4', '\xA1', '\xA6', '\xA7',
'\x22', '\xA9', '\xAA', '\x3C', '\xAC', '\x2D', '\xAE', '\xAF',
'\x2E', '\x2B', '\x20', '\xB3', '\x27', '\x75', '\xB6', '\xB7',
'\x20', '\xB1', '\xBA', '\x3E', '\xA5', '\x22', '\xB5', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\x2D',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
QCString result; QCString result;
int len = sInput.length(); int len = sInput.length();
...@@ -83,25 +68,6 @@ class Translator ...@@ -83,25 +68,6 @@ class Translator
{ {
// The conversion table for characters >127 // The conversion table for characters >127
// //
static const char ISOToWinTab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
'\x98', '\x99', '\x9A', '\x9B', '\x9C', '\x9D', '\x9E', '\x9F',
'\xA0', '\xA5', '\xA2', '\xA3', '\xA4', '\xBC', '\x8C', '\xA7',
'\xA8', '\x8A', '\xAA', '\x8D', '\x8F', '\xAD', '\x8E', '\xAF',
'\xB0', '\xB9', '\xB2', '\xB3', '\xB4', '\xBE', '\x9C', '\xB7',
'\xB8', '\x9A', '\xBA', '\x9D', '\x9F', '\xBD', '\x9E', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\xF7',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
QCString result; QCString result;
int len = sInput.length(); int len = sInput.length();
...@@ -122,24 +88,6 @@ class Translator ...@@ -122,24 +88,6 @@ class Translator
*/ */
QCString Koi8RToWindows1251( const QCString & sInput ) QCString Koi8RToWindows1251( const QCString & sInput )
{ {
static Q_UINT16 koi8_r[128] =
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
};
QString result; QString result;
int len = sInput.length(); int len = sInput.length();
...@@ -160,25 +108,6 @@ class Translator ...@@ -160,25 +108,6 @@ class Translator
Encoding table got from QT:qtextcodec.cpp */ Encoding table got from QT:qtextcodec.cpp */
QCString Windows1251ToKoi8R( const QCString & sInput ) QCString Windows1251ToKoi8R( const QCString & sInput )
{ {
static Q_UINT16 windows_1251[128] =
{ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
};
QString result; QString result;
int len = sInput.length(); int len = sInput.length();
...@@ -267,7 +196,7 @@ class Translator ...@@ -267,7 +196,7 @@ class Translator
*/ */
virtual QCString trGeneratedAutomatically(const char *s) = 0; virtual QCString trGeneratedAutomatically(const char *s) = 0;
/*! put after an enum name in the list of all members */
virtual QCString trEnumName() = 0; virtual QCString trEnumName() = 0;
/*! put after an enum value in the list of all members */ /*! put after an enum value in the list of all members */
......
...@@ -397,7 +397,16 @@ class TranslatorEnglish : public Translator ...@@ -397,7 +397,16 @@ class TranslatorEnglish : public Translator
* the documentation of all classes, structs and unions. * the documentation of all classes, structs and unions.
*/ */
virtual QCString trClassDocumentation() virtual QCString trClassDocumentation()
{ return "Class Documentation"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Data Structure Documentation";
}
else
{
return "Class Documentation";
}
}
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files. * the documentation of all files.
...@@ -1024,7 +1033,9 @@ class TranslatorEnglish : public Translator ...@@ -1024,7 +1033,9 @@ class TranslatorEnglish : public Translator
{ {
return "Graph Legend"; return "Graph Legend";
} }
/*! page explaining how the dot graph's should be interpreted */ /*! page explaining how the dot graph's should be interpreted
* The %A in the text below are to prevent link to classes called "A".
*/
virtual QCString trLegendDocs() virtual QCString trLegendDocs()
{ {
return return
...@@ -1062,21 +1073,21 @@ class TranslatorEnglish : public Translator ...@@ -1062,21 +1073,21 @@ class TranslatorEnglish : public Translator
"<p>\n" "<p>\n"
"The boxes in the above graph have the following meaning:\n" "The boxes in the above graph have the following meaning:\n"
"<ul>\n" "<ul>\n"
"<li>A filled black box represents the struct or class for which the " "<li>%A filled black box represents the struct or class for which the "
"graph is generated.\n" "graph is generated.\n"
"<li>A box with a black border denotes a documented struct or class.\n" "<li>%A box with a black border denotes a documented struct or class.\n"
"<li>A box with a grey border denotes an undocumented struct or class.\n" "<li>%A box with a grey border denotes an undocumented struct or class.\n"
"<li>A box with a red border denotes a documented struct or class for\n" "<li>%A box with a red border denotes a documented struct or class for\n"
"which not all inheritance/containment relations are shown. A graph is " "which not all inheritance/containment relations are shown. %A graph is "
"truncated if it does not fit within the specified boundaries." "truncated if it does not fit within the specified boundaries."
"</ul>\n" "</ul>\n"
"The arrows have the following meaning:\n" "The arrows have the following meaning:\n"
"<ul>\n" "<ul>\n"
"<li>A dark blue arrow is used to visualize a public inheritance " "<li>%A dark blue arrow is used to visualize a public inheritance "
"relation between two classes.\n" "relation between two classes.\n"
"<li>A dark green arrow is used for protected inheritance.\n" "<li>%A dark green arrow is used for protected inheritance.\n"
"<li>A dark red arrow is used for private inheritance.\n" "<li>%A dark red arrow is used for private inheritance.\n"
"<li>A purple dashed arrow is used if a class is contained or used " "<li>%A purple dashed arrow is used if a class is contained or used "
"by another class. The arrow is labeled with the variable(s) " "by another class. The arrow is labeled with the variable(s) "
"through which the pointed class or struct is accessible. \n" "through which the pointed class or struct is accessible. \n"
"</ul>\n"; "</ul>\n";
......
This diff is collapsed.
...@@ -715,7 +715,7 @@ QCString argListToString(ArgumentList *al) ...@@ -715,7 +715,7 @@ QCString argListToString(ArgumentList *al)
result+=")"; result+=")";
if (al->constSpecifier) result+=" const"; if (al->constSpecifier) result+=" const";
if (al->volatileSpecifier) result+=" volatile"; if (al->volatileSpecifier) result+=" volatile";
return result; return removeRedundantWhiteSpace(result);
} }
QCString tempArgListToString(ArgumentList *al) QCString tempArgListToString(ArgumentList *al)
...@@ -743,7 +743,7 @@ QCString tempArgListToString(ArgumentList *al) ...@@ -743,7 +743,7 @@ QCString tempArgListToString(ArgumentList *al)
if (a) result+=", "; if (a) result+=", ";
} }
result+=">"; result+=">";
return result; return removeRedundantWhiteSpace(result);
} }
...@@ -2804,8 +2804,7 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict, ...@@ -2804,8 +2804,7 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict,
* could form a class. When TRUE is returned the result is the * could form a class. When TRUE is returned the result is the
* class \a name and a template argument list \a templSpec. * class \a name and a template argument list \a templSpec.
*/ */
bool extractClassNameFromType(const QCString &type,int &pos, bool extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec)
QCString &name,QCString &templSpec)
{ {
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*"); static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
name.resize(0); name.resize(0);
...@@ -2818,7 +2817,8 @@ bool extractClassNameFromType(const QCString &type,int &pos, ...@@ -2818,7 +2817,8 @@ bool extractClassNameFromType(const QCString &type,int &pos,
{ {
int ts=i+l; int ts=i+l;
int te=ts; int te=ts;
while (type.at(ts)==' ' && ts<typeLen) ts++; // skip any whitespace int tl=0;
while (type.at(ts)==' ' && ts<typeLen) ts++,tl++; // skip any whitespace
if (type.at(ts)=='<') // assume template instance if (type.at(ts)=='<') // assume template instance
{ {
// locate end of template // locate end of template
...@@ -2837,12 +2837,68 @@ bool extractClassNameFromType(const QCString &type,int &pos, ...@@ -2837,12 +2837,68 @@ bool extractClassNameFromType(const QCString &type,int &pos,
te++; te++;
} }
} }
if (te>ts) templSpec = type.mid(ts,te-ts); if (te>ts) templSpec = type.mid(ts,te-ts),tl+=te-ts;
name = type.mid(i,l); name = type.mid(i,l);
pos=i+l; pos=i+l+tl;
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE\n",
// type.data(),pos,name.data(),templSpec.data());
return TRUE; return TRUE;
} }
} }
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n",
// type.data(),pos,name.data(),templSpec.data());
return FALSE; return FALSE;
} }
/*! Substitutes any occurrence of a formal argument from argument list
* \a formalArgs in \a name by the corresponding actual argument in
* argument list \a actualArgs. The result after substitution
* is returned as a string.
*/
QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs)
{
if (formalArgs==0) return name;
QCString result;
static QRegExp re("[a-z_A-Z][:a-z_A-Z0-9]*");
int p=0,l,i;
// for each identifier in the base class name (e.g. B<T> -> B and T)
while ((i=re.match(name,p,&l))!=-1)
{
result += name.mid(p,i-p);
QCString n = name.mid(i,l);
ArgumentListIterator formAli(*formalArgs);
Argument *formArg;
Argument *actArg=actualArgs->first();
// if n is a template argument, then we substitute it
// for its template instance argument.
bool found=FALSE;
for (formAli.toFirst();
(formArg=formAli.current()) && !found;
++formAli,actArg=actualArgs->next()
)
{
if (formArg->name==n && actArg && !actArg->type.isEmpty()) // base class is a template argument
{
// replace formal argument with the actual argument of the instance
result += actArg->type;
found=TRUE;
}
else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty())
{
result += formArg->defval;
found=TRUE;
}
}
if (!found) result += n;
p=i+l;
}
result+=name.right(name.length()-p);
//printf(" Inheritance relation %s -> %s\n",
// name.data(),result.data());
return result;
}
...@@ -150,6 +150,8 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict, ...@@ -150,6 +150,8 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict,
MemberGroupList *memberGroupList); MemberGroupList *memberGroupList);
bool extractClassNameFromType(const QCString &type,int &pos, bool extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec); QCString &name,QCString &templSpec);
QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs);
#endif #endif
...@@ -27,6 +27,7 @@ print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n"; ...@@ -27,6 +27,7 @@ print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n";
print FILE "MAKE = $make\n"; print FILE "MAKE = $make\n";
print FILE "PERL = perl\n"; print FILE "PERL = perl\n";
print FILE "RM = del /s /q\n"; print FILE "RM = del /s /q\n";
print FILE "CP = copy\n";
print FILE "VERSION = "; print FILE "VERSION = ";
# copy contents of VERSION file to FILE # copy contents of VERSION file to FILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment