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.
--------
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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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
# extra C++ compiler options
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 @@
\subsection config_format Format
A configuration file is a free-form ASCII text file with a structure that
is similar to that of a Makefile. It is parsed by \c doxygen.
The file may contain tabs and newlines for formatting purposes.
The statements in the file are case-sensitive.
A configuration file is a free-form ASCII text file with a structure
that is similar to that of a Makefile, default name \c Doxyfile. It is
parsed by \c doxygen. The file may contain tabs and newlines for
formatting purposes. The statements in the file are case-sensitive.
Comments may be placed anywhere within the file (except within quotes).
Comments begin with the \# character and end at the end of the
line.
Comments begin with the \# character and end at the end of the line.
The file essentially consists of a list of assignment statements.
Each statement consists of a \c TAG_NAME written in capitals,
......@@ -905,9 +904,17 @@ EXTRA_PACKAGES = times
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).
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.
\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
<dt>\c LATEX_BATCHMODE <dd>
\addindex LATEX_BATCHMODE
......@@ -1000,7 +1007,7 @@ EXTRA_PACKAGES = times
\anchor cfg_man_links
<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,
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,
......@@ -1054,7 +1061,7 @@ EXTRA_PACKAGES = times
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:
<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
<dt>\c EXPAND_AS_DEFINED <dd>
......@@ -1125,7 +1132,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\addindex HAVE_DOT
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
<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
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>
generate a legend page explaining the meaning of the various boxes and
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>
\subsection config_search Search engine options
\anchor cfg_searchengine
......@@ -1333,7 +1346,7 @@ INCLUDE_PATH = $(QTDIR)/include
RECURSIVE = YES
\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
PROJECT_NAME = Qt
PROJECT_NUMBER = 2.1
......
......@@ -16,13 +16,13 @@
*/
/*! \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.
Doxygen can use the "dot" tool from graphviz 1.5 to generate
more advanced diagrams & graphs. Graphviz is an open-sourced,
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
\ref cfg_have_dot "HAVE_DOT" to \c YES in the configuration file to
......@@ -39,7 +39,7 @@
<li>if \ref cfg_class_graph "CLASS_GRAPH" is set to \c YES,
a graph will be generated for each documented class showing 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
dependency graph is generated for each documented file that includes at
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
where this might happen is if you have lines in your code with more than
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>
\htmlonly
......
......@@ -18,8 +18,8 @@
\addindex installation
First go to the
<a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a> page
\latexonly({\tt http://www.stack.nl/$\sim$dimitri/doxygen/download.html})\endlatexonly
<a href="http://www.doxygen.org/download.html">download</a> page
\latexonly({\tt http://www.doxygen.org/download.html})\endlatexonly
to get the latest distribution, if you did not have it already.
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
following to build the executable:
<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
\addindex flex
\addindex bison
\addindex make
<li>In order to generate a Makefile for your platform, you need
<a href="http://www.perl.com>perl</a>
\latexonly(see {\tt http://www.perl.com})\endlatexonly.
<a href="http://www.perl.com/>perl</a>
\latexonly(see {\tt http://www.perl.com/})\endlatexonly.
\addindex perl
</ul>
......@@ -58,10 +58,12 @@ tools should be installed.
\addindex Qt
This is needed to build the GUI front-end.
<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.
<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>
\latexonly(see {\tt http://www.graphviz.org/})\endlatexonly.
Needed for the include dependency graphs,
the graphical inheritance graphs, and the collaboration graphs.
<li>The ghostscript interpreter.
......@@ -231,7 +233,7 @@ If you are compiling for HP-UX with aCC and you get this error:
\endverbatim
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
(according to Barnard Schmallhof) by replacing the following in
......@@ -239,7 +241,8 @@ ce_parse.cpp:
\verbatim
#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>
\endverbatim
......@@ -247,7 +250,8 @@ ce_parse.cpp:
\verbatim
#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>
\endverbatim
......@@ -261,8 +265,10 @@ ce_parse.cpp:
#ifdef __GNUC__
#define alloca __builtin_alloca
#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) || defined (__alpha)
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
|| defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) \
|| defined (__sparc) || defined (__sgi) || defined (__alpha)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
......@@ -283,8 +289,10 @@ Compiling the \c doxygen binary went ok, but while linking <code>doxytag</code>
lot of link errors, like these:
\verbatim
QList<PageInfo>::__vtbl /home/dimitri/doxygen/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]
QList<PageInfo>::__vtbl /home/dimitri/doxygen/
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
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.
A workaround, if you are planning to use the English translation only,
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
Currently, I have only compiled doxygen for Windows using Microsoft's
......@@ -353,7 +366,7 @@ Here is what is required:
variables (if you did not select to do this automatically during
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:
http://www.ActiveState.com/Products/ActivePerl/
......@@ -439,7 +452,7 @@ Here is what is required:
<code>objects</code> and <code>bin</code> manually in the root of the
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>
Needed for the include dependency graphs, the graphical inheritance 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:
*/
\endverbatim
\note The the indent here is not important.
\note The indentation here is not important.
<b>Using \\arg or \@li</b>
For compatibility with the Troll Tech's internal documentation tool and
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.
......
......@@ -62,7 +62,7 @@ Russian
Alexandr Chelpanov: cav@cryptopro.ru
Slovak
Stanislav Kudlac: qwerty1@pobox.sk
Stanislav Kudl&aacute;&ccaron;: qwerty1@pobox.sk
Slovene
Matjaz Ostroversnik: matjaz.ostroversnik@zrs-tk.si
......
......@@ -17,7 +17,7 @@
/*! \page preprocessing Preprocessing
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
evaluates conditional compilation statements (like \#if) and
......
......@@ -125,7 +125,7 @@ a browser that supports cascading style sheets (CSS) should be used
\addindex LaTeX
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
of compiling the generated
documentation, \c doxygen writes a \c Makefile into the \c latex directory.
......
......@@ -38,6 +38,9 @@
# argument list does not contain argument identifiers
# (i.e., when it contains type information only).
#
# 2001/06/11
# - Character entity &ccaron; recognized in maintainers.txt.
#
################################################################
require 5.005;
......@@ -566,13 +569,15 @@ xxxTABLE_FOOTxxx
$tableLATEX .= $latexTableFoot;
$tableHTML =~ s{@}{\@NOSPAM.}sg;
$tableHTML =~ s{&ccaron;}{&#x010d;}sg;
$tableHTML =~ s{&rcaron;}{&#x0159;}sg;
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/&aacute;/\\'{a}/sg;
$tableLATEX =~ s/&auml;/\\"{a}/sg;
$tableLATEX =~ s/&ouml;/\\"{o}/sg;
$tableLATEX =~ s/&oslash;/\\o{}/sg;
$tableLATEX =~ s/&ccaron;/\\v{c}/sg;
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/_/\\_/sg;
my $notice = "\nHave a look at <a href=\"../doc/$ftranslatortxt\"\n>"
......
......@@ -16,16 +16,18 @@ if "%2"=="debug" SET MODE=debug
REM use perl to create the config file
perl wintools\make.pl %CC%
type makeconfig > Makefile
type Makefile.win_%MAKE%.in >>Makefile
type makeconfig > qtools\Makefile
type qtools\Makefile.in >>qtools\Makefile
type makeconfig > src\Makefile
type src\Makefile.in >>src\Makefile
type makeconfig > examples\Makefile
type examples\Makefile.win.in >>examples\Makefile
type makeconfig > doc\Makefile
type doc\Makefile.win_%MAKE%.in >>doc\Makefile
type makeconfig > Makefile
type Makefile.win_%MAKE%.in >>Makefile
type makeconfig > qtools\Makefile
type qtools\Makefile.in >>qtools\Makefile
type makeconfig > src\Makefile
type src\Makefile.in >>src\Makefile
type makeconfig > examples\Makefile
type examples\Makefile.win.in >>examples\Makefile
type makeconfig > 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 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
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\doxysearch.pro.in >src\doxysearch.pro
sed "s/\$extraopts/%MODE%/g" addon\doxywizard\doxywizard.pro.in >addon\doxywizard\doxywizard.pro
REM run make
%MAKE%.exe
......
Name: doxygen
Version: 1.2.8_20010617
Version: 1.2.8_20010715
Summary: documentation system for C, C++ and IDL
Release: 3
Source: doxygen-%{version}.src.tar.gz
......
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include "entry.h"
#include "memberlist.h"
#include "definition.h"
#include "sortdict.h"
class MemberDict;
class ClassList;
......@@ -67,8 +68,10 @@ class ClassDef : public Definition
};
DefType definitionType() { return TypeClass; }
QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const;
QCString getFileBase() const;
QCString getSourceFileBase() const;
QCString getReference() const;
bool hasDocumentation() const;
......@@ -106,12 +109,12 @@ class ClassDef : public Definition
/*! 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
* this project, or as a cross-reference to another project).
*/
bool isLinkable()
bool isLinkable() const
{
return isLinkableInProject() || isReference();
}
......@@ -156,6 +159,15 @@ class ClassDef : public Definition
*/
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
{
return m_usesImplClassDict;
......@@ -166,8 +178,13 @@ class ClassDef : public Definition
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);
/* member lists by protection */
MemberList pubMembers;
MemberList proMembers;
......@@ -224,16 +241,24 @@ class ClassDef : public Definition
void setTemplateArguments(ArgumentList *al);
void mergeMembers();
void setFileDef(FileDef *fd) { m_fileDef=fd; }
void determineImplUsageRelation();
void determineIntfUsageRelation();
//void determineImplUsageRelation();
//void determineIntfUsageRelation();
void setSubGrouping(bool enabled) { m_subGrouping = enabled; }
void setProtection(Protection p) { m_prot=p; }
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d);
void setIsTemplateBaseClass(int num) { m_isTemplBaseClass = num; }
void initTemplateMapping();
void setTemplateArgumentMapping(const char *formal,const char *actual);
QCString getTemplateArgumentMapping(const char *formal) const;
void addUsedClass(ClassDef *cd,const char *accessName);
//void initTemplateMapping();
//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.
* \param outerScope class, file or namespace in which this class is
......@@ -351,11 +376,22 @@ class ClassDef : public Definition
*/
int m_isTemplBaseClass;
/*! A mapping used by template classes, which maps formal
* template arguments to their actual instantiations.
* This is used while generating inheritance graphs.
/*! Template instances that exists of this class, the key in the
* dictionary is the template argument list.
*/
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.
......
......@@ -21,7 +21,7 @@
* includes
*/
#include <stdio.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
......
......@@ -290,7 +290,7 @@ class ConfigBool : public ConfigOption
t << endl;
}
t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "= ";
if (upd)
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
}
......
......@@ -19,7 +19,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......
......@@ -22,10 +22,12 @@
#include "qtbc.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 cppExpYYdebug;
extern QCString strToken;
extern CPPValue resultValue;
extern QCString g_strToken;
extern CPPValue g_resultValue;
extern QCString g_constExpFileName;
extern int g_constExpLineNr;
#endif
......@@ -25,11 +25,13 @@
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
QCString strToken;
QCString g_strToken;
CPPValue g_resultValue;
int g_constExpLineNr;
QCString g_constExpFileName;
static const char *inputString;
static int inputPosition;
CPPValue resultValue;
static const char *g_inputString;
static int g_inputPosition;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
......@@ -37,9 +39,9 @@ CPPValue resultValue;
static int yyread(char *buf,int max_size)
{
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++;
}
return c;
......@@ -74,36 +76,38 @@ static int yyread(char *buf,int max_size)
"(" { return TOK_LPAREN; }
")" { return TOK_RPAREN; }
"'"(([^\'\n\r\\]+)|(\\(([ntvbrfa\\?'\"])|([0-9]+)|([xX][0-9a-fA-F]+))))"'" {
strToken=yytext;
g_strToken=yytext;
return TOK_CHARACTER;
}
0[0-7]*[uUlL]* { strToken=yytext;
0[0-7]*[uUlL]* { g_strToken=yytext;
return TOK_OCTALINT;
}
[1-9][0-9]*[uUlL]* { strToken=yytext;
[1-9][0-9]*[uUlL]* { g_strToken=yytext;
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])? {
strToken=yytext; return TOK_FLOAT;
g_strToken=yytext; return TOK_FLOAT;
}
([0-9]+[eE])([\-\+])?[0-9]+([fFlL])? {
strToken=yytext; return TOK_FLOAT;
g_strToken=yytext; return TOK_FLOAT;
}
.
\n
%%
bool parseCppExpression(const QCString &s)
bool parseCppExpression(const char *fileName,int lineNr,const QCString &s)
{
//printf("Expression: `%s'\n",s.data());
inputString = s;
inputPosition = 0;
g_constExpFileName = fileName;
g_constExpLineNr = lineNr;
g_inputString = s;
g_inputPosition = 0;
cppExpYYrestart( cppExpYYin );
cppExpYYparse();
//printf("Result: %ld\n",(long)resultValue);
return (long)resultValue!=0;
return (long)g_resultValue!=0;
}
extern "C" {
......
......@@ -20,6 +20,7 @@
#include "cppvalue.h"
#include "constexp.h"
#include "message.h"
#if defined(_MSC_VER)
#define MSDOS
......@@ -32,7 +33,8 @@
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;
}
......@@ -73,7 +75,7 @@ int cppExpYYlex();
%%
start: constant_expression
{ resultValue = $1; return 0; }
{ g_resultValue = $1; return 0; }
;
constant_expression: logical_or_expression
......
......@@ -24,7 +24,7 @@
CPPValue parseOctal()
{
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';
}
......@@ -34,7 +34,7 @@ CPPValue parseOctal()
CPPValue parseDecimal()
{
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';
}
......@@ -44,7 +44,7 @@ CPPValue parseDecimal()
CPPValue parseHexadecimal()
{
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';
else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10;
......@@ -55,9 +55,9 @@ CPPValue parseHexadecimal()
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 't': return CPPValue((long)'\t');
......@@ -73,14 +73,14 @@ CPPValue parseCharacter() // does not work for '\n' and the alike
case '0': return parseOctal();
case 'x':
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((long)strToken[1]);
return CPPValue((long)g_strToken[1]);
}
CPPValue parseFloat()
{
return CPPValue(atof(strToken));
return CPPValue(atof(g_strToken));
}
......@@ -24,13 +24,9 @@
class CPPValue
{
friend CPPValue parseOctal();
friend CPPValue parseDecimal();
friend CPPValue parseHexadecimal();
friend CPPValue parseCharacter();
friend CPPValue parseFloat();
public:
enum Type { Int, Float };
CPPValue(long val=0) : type(Int) { v.l = val; }
......@@ -57,4 +53,10 @@ class CPPValue
} v;
};
extern CPPValue parseOctal();
extern CPPValue parseDecimal();
extern CPPValue parseHexadecimal();
extern CPPValue parseCharacter();
extern CPPValue parseFloat();
#endif
......@@ -21,7 +21,7 @@
* includes
*/
#include <stdio.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......
......@@ -47,7 +47,7 @@
*/
#include "qtbc.h"
#include <stdio.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
......
......@@ -452,7 +452,11 @@ void Definition::addInnerCompound(Definition *)
QCString Definition::qualifiedName() const
{
//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;
if (m_outerScope->name()=="<globalScope>")
......
......@@ -76,12 +76,12 @@ class Definition
void setBriefDescription(const char *b);
/*! Returns TRUE iff the definition is documented */
virtual bool hasDocumentation() const;
virtual bool isLinkableInProject() = 0;
virtual bool isLinkable() = 0;
virtual bool isLinkableInProject() const = 0;
virtual bool isLinkable() const = 0;
virtual QCString getReference() const { return m_ref; }
bool isReference() const { return !m_ref.isEmpty(); }
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
* documentation.
......
......@@ -22,7 +22,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......@@ -828,7 +828,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
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\"]"\"")
ATTR ({B}+[^>\n]*)?
A [aA]
......
......@@ -176,6 +176,7 @@ static bool isLeaf(ClassDef *cd)
return TRUE;
}
#if 0
/*! Builds a mapping from formal arguments of class \a tcd to the
* actual arguments stored in templSpec. To properly initialize
* the mapping with the default template values
......@@ -320,6 +321,7 @@ static void computeTemplateInstance(
actualArg.resize(0);
result = 0;
}
#endif
//--------------------------------------------------------------------
......@@ -693,20 +695,24 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n;
int count=0;
for (dnli.toFirst();(n=dnli.current());++dnli)
{
QCString baseName="inherit_graph_";
QCString diskName=n->m_url.copy();
int i=diskName.find('$');
if (i!=-1)
{
diskName=diskName.right(diskName.length()-i-1);
}
else /* take the label name as the file name (and strip any template stuff) */
{
diskName=n->m_label;
}
baseName = convertNameToFile(baseName+diskName);
QCString baseName;
baseName.sprintf("inherit_graph_%d",count++);
//="inherit_graph_";
//QCString diskName=n->m_url.copy();
//int i=diskName.find('$');
//if (i!=-1)
//{
// diskName=diskName.right(diskName.length()-i-1);
//}
//else /* take the label name as the file name (and strip any template stuff) */
//{
// diskName=n->m_label;
//}
//baseName = convertNameToFile(baseName+diskName);
baseName = convertNameToFile(baseName);
QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif";
QCString mapName=baseName+".map";
......@@ -817,18 +823,9 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper)
}
}
DotGfxHierarchyTable::DotGfxHierarchyTable()
void DotGfxHierarchyTable::addClassList(ClassSDict *cl)
{
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);
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toLast();(cd=cli.current());--cli)
{
......@@ -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
// color the graph into a set of independent subgraphs
......@@ -918,8 +931,6 @@ int DotClassGraph::m_curNodeNumber;
void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
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;
QCString className;
if (usedName) // name is a typedef
......@@ -932,8 +943,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
}
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);
if (bn) // class already inserted
{
......@@ -955,7 +968,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
QCString displayName=className;
if (Config_getBool("HIDE_SCOPE_NAMES")) displayName=stripScope(displayName);
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++,
displayName,
tmp_url.data(),
......@@ -973,7 +989,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
n->addParent(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);
}
}
......@@ -986,23 +1002,25 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
{
//printf("-------- inheritance relation %s->%s templ=`%s'\n",
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
QCString templSpec;
if (base) templSpec = substituteTemplateSpec(
cd,bcd->templSpecifiers);
ClassDef *acd=0;
QCString actualArg;
computeTemplateInstance(cd,bcd->classDef,templSpec,acd,actualArg);
//QCString templSpec;
//if (base) templSpec = substituteTemplateSpec(
// cd,bcd->templSpecifiers);
//ClassDef *acd=0;
//QCString actualArg;
//computeTemplateInstance(cd,bcd->classDef,templSpec,acd,actualArg);
//printf("acd=%p actualArg=%s\n",acd,actualArg.data());
if (acd)
{
addClass(acd,n,bcd->prot,0,distance,actualArg,
templSpec,base);
}
else
{
addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
templSpec,base);
}
//if (acd)
//{
// addClass(acd,n,bcd->prot,0,distance,actualArg,
// templSpec,base);
//}
//else
//{
// addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
// templSpec,base);
//}
addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
bcd->templSpecifiers,base);
}
if (m_graphType != Inheritance)
{
......@@ -1031,25 +1049,27 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
label+=QCString("\\n")+s;
}
}
QCString actualArg;
ClassDef *acd=0;
//QCString actualArg;
//ClassDef *acd=0;
//printf("-------- usage relation %s->%s templ=`%s'\n",
// cd->name().data(),ucd->classDef->name().data(),
// ucd->templSpecifiers.data());
QCString templSpec = substituteTemplateSpec(
cd,ucd->templSpecifiers);
computeTemplateInstance(cd,ucd->classDef, templSpec, acd,actualArg);
if (acd)
{
addClass(acd,n,EdgeInfo::Black,label,distance,actualArg,
templSpec,base);
}
else
{
//printf("Found label=`%s'\n",label.data());
addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
templSpec,base);
}
//QCString templSpec = substituteTemplateSpec(
// cd,ucd->templSpecifiers);
//computeTemplateInstance(cd,ucd->classDef, templSpec, acd,actualArg);
//if (acd)
//{
// addClass(acd,n,EdgeInfo::Black,label,distance,actualArg,
// templSpec,base);
//}
//else
//{
// //printf("Found label=`%s'\n",label.data());
// addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
// 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)
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_maxDistance = 0;
m_recDepth = maxRecursionDepth;
QCString tmp_url="";
if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
QCString className = cd->displayName();
if (cd->templateArguments())
{
className+=tempArgListToString(cd->templateArguments());
}
//if (cd->templateArguments())
//{
// className+=tempArgListToString(cd->templateArguments());
//}
m_startNode = new DotNode(m_curNodeNumber++,
className,
tmp_url.data(),
......@@ -1075,11 +1095,11 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
TRUE // is a root node
);
m_usedNodes = new QDict<DotNode>(1009);
m_usedNodes->insert(cd->name(),m_startNode);
m_usedNodes->insert(className,m_startNode);
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *icd;
for (cli.toFirst();(icd=cli.current());++cli) icd->initTemplateMapping();
//ClassSDict::Iterator cli(Doxygen::classSDict);
//ClassDef *icd;
//for (cli.toFirst();(icd=cli.current());++cli) icd->initTemplateMapping();
//printf("Root node %s\n",cd->name().data());
if (m_recDepth>0)
......
......@@ -24,6 +24,7 @@ class ClassDef;
class FileDef;
class QTextStream;
class DotNodeList;
class ClassSDict;
enum GraphOutputFormat { GIF , EPS };
......@@ -105,6 +106,7 @@ class DotGfxHierarchyTable
private:
void addHierarchy(DotNode *n,ClassDef *cd,bool hide);
void addClassList(ClassSDict *cl);
QList<DotNode> *m_rootNodes;
QDict<DotNode> *m_usedNodes;
......
This diff is collapsed.
......@@ -59,7 +59,7 @@ class Doxygen
{
public:
static ClassSDict classSDict;
static ClassList hiddenClasses;
static ClassSDict hiddenClasses;
static PageSDict *exampleSDict;
static PageSDict *pageSDict;
static PageInfo *mainPage;
......
......@@ -110,12 +110,12 @@ class FileDef : public Definition
/*! Returns the absolute path of this file. */
QCString getPath() const { return path; }
bool isLinkableInProject()
bool isLinkableInProject() const
{
return hasDocumentation() && !isReference();
}
bool isLinkable()
bool isLinkable() const
{
return isLinkableInProject() || isReference();
}
......
......@@ -311,13 +311,14 @@ static void generateFolderTreeViewData()
QTextStream t(&f);
t << "<html><head>" << endl;
t << "<link rel=\"stylesheet\" href=\"";
if (Config_getString("HTML_STYLESHEET").isEmpty())
QCString cssname=Config_getString("HTML_STYLESHEET");
if (cssname.isEmpty())
{
t << "doxygen.css";
}
else
{
QFileInfo cssfi(Config_getString("HTML_STYLESHEET"));
QFileInfo cssfi(cssname);
if (!cssfi.exists())
{
err("Error: user specified HTML style sheet file does not exist!\n");
......
......@@ -62,11 +62,11 @@ class GroupDef : public Definition
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject()
bool isLinkableInProject() const
{
return hasDocumentation() && !isReference();
}
bool isLinkable()
bool isLinkable() const
{
return isLinkableInProject() || isReference();
}
......
......@@ -46,10 +46,10 @@ static const char *defaultStyleSheet =
"A.codeRef { font-weight: normal; color: #4444ee }\n"
"DL.el { margin-left: -1cm }\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"
"DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }\n"
"DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n"
"FONT.keywordtype { color: #604020 }\n"
"FONT.keywordflow { color: #e08000 }\n"
......@@ -80,13 +80,14 @@ void HtmlGenerator::append(const OutputGenerator *g)
void HtmlGenerator::init()
{
QDir d(Config_getString("HTML_OUTPUT"));
if (!d.exists() && !d.mkdir(Config_getString("HTML_OUTPUT")))
QCString dname=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);
}
writeLogo(Config_getString("HTML_OUTPUT"));
writeLogo(dname);
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"));
}
......@@ -117,7 +118,8 @@ static void writeDefaultHeaderFile(QTextStream &t,const char *title,
}
else
{
QFileInfo cssfi(Config_getString("HTML_STYLESHEET"));
QCString cssname=Config_getString("HTML_STYLESHEET");
QFileInfo cssfi(cssname);
if (!cssfi.exists())
{
err("Error: user specified HTML style sheet file does not exist!\n");
......@@ -278,7 +280,8 @@ void HtmlGenerator::writeStyleInfo(int part)
}
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())
{
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)
else
{
startPlainFile(cssfi.fileName());
t << fileToString(Config_getString("HTML_STYLESHEET"));
t << fileToString(cssname);
endPlainFile();
}
}
......@@ -813,7 +816,7 @@ void HtmlGenerator::endIndexList()
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()
......@@ -823,8 +826,8 @@ void HtmlGenerator::endAlphabeticalIndexList()
void HtmlGenerator::writeIndexHeading(const char *s)
{
t << "<div class=\"ah\"><font color=\"white\"><b>&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</b></font></div>";
t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</td</tr></table>";
}
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
......
......@@ -356,6 +356,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
bool hasChildren = !cd->visited && !hideSuper && cd->subClasses()->count()>0;
if (cd->isLinkable())
{
//printf("Writing class %s\n",cd->displayName().data());
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
if (cd->isReference())
{
......@@ -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;
FTVHelp *ftvHelp=0;
bool &generateHtml = Config_getBool("GENERATE_HTML") ;
......@@ -536,8 +535,7 @@ void writeClassHierarchy(OutputList &ol)
ftvHelp = FTVHelp::getInstance();
}
bool started=FALSE;
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassSDict::Iterator cli(*cl);
for (;cli.current(); ++cli)
{
ClassDef *cd=cli.current();
......@@ -560,7 +558,7 @@ void writeClassHierarchy(OutputList &ol)
bool hasChildren = !cd->visited && cd->subClasses()->count()>0;
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());
if (cd->isReference())
{
......@@ -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)
{
ol.endIndexList();
......@@ -1062,7 +1084,7 @@ int countAnnotatedClasses()
ClassDef *cd;
for (;(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
//printf("Annotated class %s\n",cd->name().data());
count++;
......@@ -1085,7 +1107,7 @@ void writeAnnotatedClassList(OutputList &ol)
ClassDef *cd;
for (;(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
QCString type=cd->compoundTypeString();
ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
......@@ -1168,7 +1190,7 @@ void writeAlphabeticalClassList(OutputList &ol)
int headerItems=0;
for (;(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
int index = getPrefixIndex(cd->name());
if (toupper(cd->name().at(index))!=startLetter) // new begin letter => new header
......@@ -1201,7 +1223,7 @@ void writeAlphabeticalClassList(OutputList &ol)
startLetter=0;
for (cli.toFirst();(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
int index = getPrefixIndex(cd->name());
if (toupper(cd->name().at(index))!=startLetter)
......@@ -1443,7 +1465,7 @@ void writeMemberList(OutputList &ol,bool useSections)
if (
md->isLinkableInProject() &&
(cd=md->getClassDef()) &&
cd->isLinkableInProject()
cd->isLinkableInProject() && cd->templateMaster()==0
)
{
found=TRUE;
......@@ -1489,7 +1511,7 @@ void writeMemberList(OutputList &ol,bool useSections)
if (
md->isLinkableInProject() &&
prevName!=cd->displayName() &&
cd->isLinkableInProject()
cd->isLinkableInProject() && cd->templateMaster()==0
)
{
if (count==0)
......@@ -2632,6 +2654,26 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
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);
......
......@@ -139,6 +139,7 @@ SOURCES = ce_lex.cpp \
searchindex.cpp \
suffixtree.cpp \
tagreader.cpp \
translator.cpp \
util.cpp \
version.cpp
......
......@@ -309,6 +309,7 @@ MemberDef::MemberDef(const char *df,int dl,
{
argList=0;
}
m_templateMaster=0;
}
/*! Destroys the member definition. */
......@@ -361,7 +362,11 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const
{
if (classDef)
if (m_templateMaster)
{
return m_templateMaster->getOutputFileBase();
}
else if (classDef)
{
return classDef->getOutputFileBase();
}
......@@ -570,6 +575,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
Doxygen::tagFile << "\" static=\"yes";
}
Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
......@@ -963,7 +969,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-ei));
}
}
else
else // not an enum value
{
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
......@@ -998,7 +1004,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (cd)
{
QCString cName=cd->name();
//printf("cName=%s\n",cName.data());
int il=cName.find('<');
int ir=cName.findRev('>');
if (il!=-1 && ir!=-1 && ir>il)
......@@ -1273,11 +1278,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
parseText(ol,reimplFromLine.left(markerPos)); //text left from marker
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());
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
......@@ -1348,11 +1358,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
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());
if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
if (bd->isLinkableInProject() )
{
writePageRef(ol,bcd->getOutputFileBase(),bmd->anchor());
writePageRef(ol,bd->getOutputFileBase(),bmd->anchor());
}
}
++mli;
......@@ -1415,7 +1431,7 @@ void MemberDef::warnIfUndocumented()
}
bool MemberDef::isLinkableInProject()
bool MemberDef::isLinkableInProject() const
{
return !name().isEmpty() && name().at(0)!='@' &&
((hasDocumentation() && !isReference())
......@@ -1424,7 +1440,7 @@ bool MemberDef::isLinkableInProject()
(classDef!=0 || Config_getBool("EXTRACT_STATIC") || !isStatic()); // not a static file/namespace member
}
bool MemberDef::isLinkable()
bool MemberDef::isLinkable() const
{
return isLinkableInProject() || isReference();
}
......@@ -1515,3 +1531,35 @@ void MemberDef::setNamespace(NamespaceDef *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;
class OutputList;
class GroupDef;
class QTextStream;
class ArgumentList;
struct SourceReference
{
......@@ -121,8 +122,8 @@ class MemberDef : public Definition
bool isExternal() const { return explExt; }
// output info
bool isLinkableInProject();
bool isLinkable();
bool isLinkableInProject() const;
bool isLinkable() const;
bool hasDocumentation() const; // overrides hasDocumentation in definition.h
bool isBriefSectionVisible() const;
bool isDetailedSectionVisible(bool inGroup=FALSE) const;
......@@ -219,10 +220,15 @@ class MemberDef : public Definition
int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; }
QCString getScopeString() const;
ClassDef *getClassDefOfAnonymousType();
MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs,
ArgumentList *actualArgs);
void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; }
private:
ClassDef *classDef; // member of or related to
......@@ -285,7 +291,7 @@ class MemberDef : public Definition
QCString groupFileName; // file where this grouping was defined
int groupStartLine; // line " " " " "
bool groupHasDocs; // true if the entry that caused the grouping was documented
MemberDef *m_templateMaster;
// disable copying of member defs
......
......@@ -57,14 +57,14 @@ class NamespaceDef : public Definition
void addUsingDeclaration(ClassDef *cd);
ClassList *getUsedClasses() const { return usingDeclList; }
bool isLinkableInProject()
bool isLinkableInProject() const
{
int i = name().findRev("::");
if (i==-1) i=0; else i+=2;
return !name().isEmpty() && name().at(i)!='@' &&
hasDocumentation() && !isReference();
}
bool isLinkable()
bool isLinkable() const
{
return isLinkableInProject() || isReference();
}
......
......@@ -38,11 +38,11 @@ class PackageDef : public Definition
QCString getOutputFileBase() const ;
void addClass(const ClassDef *def);
void writeDocumentation(OutputList &ol);
bool isLinkableInProject()
bool isLinkableInProject() const
{
return hasDocumentation() && !isReference();
}
bool isLinkable()
bool isLinkable() const
{
return isLinkableInProject() || isReference();
}
......
......@@ -22,7 +22,7 @@
*/
#include <stdio.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......@@ -796,7 +796,7 @@ bool computeExpression(const QCString &expr)
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
//printf("parsing `%s'\n",e.data());
return parseCppExpression(e);
return parseCppExpression(g_yyFileName,g_yyLineNr,e);
}
/*! expands the macro definition in \a name
......
......@@ -1127,7 +1127,9 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isMainPage:
t << "\\par " << Rtf_Style_Reset << 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;
case isPackageIndex:
t << "\\par " << Rtf_Style_Reset << endl;
......
......@@ -22,7 +22,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......@@ -727,9 +727,11 @@ TITLE [tT][iI][tT][lL][eE]
<FindMembers>{B}*"explicit"{BN}+ { current->memSpec|=Entry::Explicit;
lineCount();
}
/*
<FindMembers>{B}*"import"{BN}+ { // IDL import keyword
BEGIN( NextSemi );
}
*/
<FindMembers>{B}*"typename"{BN}+ { lineCount(); }
<FindMembers>{B}*"namespace"{BN}*/[^a-z_A-Z0-9] {
isTypedef=FALSE;
......@@ -1035,7 +1037,9 @@ TITLE [tT][iI][tT][lL][eE]
}
<FindMembers,FindMemberName>{SCOPENAME} {
// 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->tArgList=0;
......@@ -1046,6 +1050,10 @@ TITLE [tT][iI][tT][lL][eE]
{
BEGIN(CppQuote);
}
else if (insideIDL && yyleng==6 && strcmp(yytext,"import")==0)
{
BEGIN(NextSemi);
}
else if (insideIDL && strcmp(yytext,"case")==0)
{
BEGIN(IDLUnionCase);
......@@ -3400,7 +3408,7 @@ TITLE [tT][iI][tT][lL][eE]
<DocBaseClass>{ID} {
//printf("Adding base class %s\n",yytext);
current->extends->append(
new BaseInfo(yytext,Public,Normal)
new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
);
}
<DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); }
......
......@@ -39,6 +39,7 @@ class TagMemberInfo
{
public:
TagMemberInfo() : prot(Public), virt(Normal), isStatic(FALSE) {}
QString type;
QString name;
QString anchor;
QString arglist;
......@@ -54,13 +55,14 @@ class TagClassInfo
{
public:
enum Kind { Class, Struct, Union, Interface, Exception };
TagClassInfo() { bases=0, members.setAutoDelete(TRUE); }
~TagClassInfo() { delete bases; }
TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); }
~TagClassInfo() { delete bases; delete templateArguments; }
QString name;
QString filename;
QStrList docAnchors;
QList<BaseInfo> *bases;
QList<TagMemberInfo> members;
QList<QString> *templateArguments;
Kind kind;
};
......@@ -168,7 +170,11 @@ class TagFileParser : public QXmlDefaultHandler
};
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 )
{
......@@ -351,6 +357,17 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curString = "";
}
void endType()
{
if (m_state==InMember)
{
m_curMember->type = m_curString;
}
else
{
err("Error: Unexpected tag `type' found\n");
}
}
void endName()
{
switch (m_state)
......@@ -386,7 +403,11 @@ class TagFileParser : public QXmlDefaultHandler
{
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));
}
else
......@@ -405,6 +426,22 @@ class TagFileParser : public QXmlDefaultHandler
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()
{
switch (m_state)
......@@ -510,6 +547,8 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("page", 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("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("member", new EndElementHandler(this,&TagFileParser::endMember));
......@@ -527,6 +566,8 @@ class TagFileParser : public QXmlDefaultHandler
m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage));
m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor));
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;
}
......@@ -811,6 +852,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
for (;(tmi=mii.current());++mii)
{
Entry *me = new Entry;
me->type = tmi->type;
me->name = tmi->name;
me->args = tmi->arglist;
me->protection = tmi->prot;
......@@ -929,6 +971,18 @@ void TagFileParser::buildLists(Entry *root)
{
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);
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 @@
class Translator
{
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. */
/* The method was designed initially for translator_cz.h.
* It is used for on-line encoding conversion related to
......@@ -46,25 +50,6 @@ class Translator
{
// 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;
int len = sInput.length();
......@@ -83,25 +68,6 @@ class Translator
{
// 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;
int len = sInput.length();
......@@ -122,24 +88,6 @@ class Translator
*/
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;
int len = sInput.length();
......@@ -160,25 +108,6 @@ class Translator
Encoding table got from QT:qtextcodec.cpp */
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;
int len = sInput.length();
......@@ -267,7 +196,7 @@ class Translator
*/
virtual QCString trGeneratedAutomatically(const char *s) = 0;
/*! put after an enum name in the list of all members */
virtual QCString trEnumName() = 0;
/*! put after an enum value in the list of all members */
......
......@@ -397,7 +397,16 @@ class TranslatorEnglish : public Translator
* the documentation of all classes, structs and unions.
*/
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
* the documentation of all files.
......@@ -1024,7 +1033,9 @@ class TranslatorEnglish : public Translator
{
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()
{
return
......@@ -1062,21 +1073,21 @@ class TranslatorEnglish : public Translator
"<p>\n"
"The boxes in the above graph have the following meaning:\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"
"<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 red border denotes a documented struct or class for\n"
"which not all inheritance/containment relations are shown. A graph is "
"<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 red border denotes a documented struct or class for\n"
"which not all inheritance/containment relations are shown. %A graph is "
"truncated if it does not fit within the specified boundaries."
"</ul>\n"
"The arrows have the following meaning:\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"
"<li>A dark green arrow is used for protected 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 dark green arrow is used for protected 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 "
"by another class. The arrow is labeled with the variable(s) "
"through which the pointed class or struct is accessible. \n"
"</ul>\n";
......
This diff is collapsed.
......@@ -715,7 +715,7 @@ QCString argListToString(ArgumentList *al)
result+=")";
if (al->constSpecifier) result+=" const";
if (al->volatileSpecifier) result+=" volatile";
return result;
return removeRedundantWhiteSpace(result);
}
QCString tempArgListToString(ArgumentList *al)
......@@ -743,7 +743,7 @@ QCString tempArgListToString(ArgumentList *al)
if (a) result+=", ";
}
result+=">";
return result;
return removeRedundantWhiteSpace(result);
}
......@@ -2804,8 +2804,7 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict,
* could form a class. When TRUE is returned the result is the
* class \a name and a template argument list \a templSpec.
*/
bool extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec)
bool extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec)
{
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
name.resize(0);
......@@ -2818,7 +2817,8 @@ bool extractClassNameFromType(const QCString &type,int &pos,
{
int ts=i+l;
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
{
// locate end of template
......@@ -2837,12 +2837,68 @@ bool extractClassNameFromType(const QCString &type,int &pos,
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);
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;
}
}
//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;
}
/*! 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,
MemberGroupList *memberGroupList);
bool extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec);
QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs);
#endif
......@@ -27,6 +27,7 @@ print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n";
print FILE "MAKE = $make\n";
print FILE "PERL = perl\n";
print FILE "RM = del /s /q\n";
print FILE "CP = copy\n";
print FILE "VERSION = ";
# 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