Commit 46361b70 authored by dimitri's avatar dimitri

Release-1.3.7-20040718

parent e6e861e8
Makefile
.makeconfig
.tmakeconfig
DOXYGEN Version 1.3.7-20040704
DOXYGEN Version 1.3.7-20040718
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (04 July 2004)
Dimitri van Heesch (18 July 2004)
DOXYGEN Version 1.3.7_20040704
DOXYGEN Version 1.3.7_20040718
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) (04 July 2004)
Dimitri van Heesch (dimitri@stack.nl) (18 July 2004)
1.3.7-20040704
1.3.7-20040718
Makefile
doxmlparser.pro
Makefile
doxywizard.pro
\ No newline at end of file
......@@ -308,24 +308,6 @@ Step3::Step3(QWidget *parent) : QWidget(parent,"Step3")
bg->setButton(0);
layout->addWidget(bg);
//w = new QWidget( this );
//bl = new QHBoxLayout(w);
//bl->addWidget(new QLabel("Select the output language:",w));
//m_outputLang = new QComboBox(w);
//m_outputLang->setMinimumSize(m_outputLang->sizeHint());
//bl->setSpacing(10);
//bl->addWidget(m_outputLang);
//bl->addStretch(1);
//m_outputLang->insertItem("English");
//m_outputLang->insertItem("Dutch");
//m_outputLang->insertItem("German");
//m_outputLang->insertItem("Spanish");
//m_outputLang->insertItem("French");
//m_outputLang->insertItem("Chinese");
//m_outputLang->insertItem("Japanese");
//m_outputLang->insertItem("Korean");
//layout->addWidget(w);
layout->addStretch(1);
connect(m_latexEnabled,SIGNAL(stateChanged(int)),
......@@ -558,9 +540,9 @@ void Step4::setDiagramMode(DiagramMode mode)
{
switch(mode)
{
case DM_None: m_diagramMode->setButton(0); break;
case DM_Builtin: m_diagramMode->setButton(1); break;
case DM_Dot: m_diagramMode->setButton(2); break;
case DM_None: m_diagramMode->setButton(0); diagramModeChanged(0); break;
case DM_Builtin: m_diagramMode->setButton(1); diagramModeChanged(1); break;
case DM_Dot: m_diagramMode->setButton(2); diagramModeChanged(2); break;
}
}
......@@ -654,6 +636,12 @@ MainWidget::MainWidget(QWidget *parent)
// initialize config settings
Config::instance()->init();
Config::instance()->check();
#if defined(Q_OS_MACX)
// we bundle dot with doxywizard on the Mac so we can safely enable
// it here
Config_getString("DOT_PATH")=getResourcePath();
Config_getBool("HAVE_DOT")=TRUE;
#endif
QWidget *w = new QWidget(this);
setCentralWidget(w);
......@@ -1130,7 +1118,10 @@ void MainWidget::launchExpert()
expert.init();
expert.exec();
#if defined(Q_OS_MACX)
// we bundle dot with doxywizard on the Mac so we can safely enable
// it here
Config_getString("DOT_PATH")=getResourcePath();
Config_getBool("HAVE_DOT")=TRUE;
#endif
setConfigSaved(FALSE);
}
......@@ -1183,6 +1174,13 @@ void MainWidget::resetConfig()
{
// initialize config settings
Config::instance()->init();
#if defined(Q_OS_MACX)
// we bundle dot with doxywizard on the Mac so we can safely enable
// it here
Config_getString("DOT_PATH")=getResourcePath();
Config_getBool("HAVE_DOT")=TRUE;
#endif
m_configFileName = "";
setConfigSaved(FALSE);
statusBar()->message("Configuration settings reset to their defaults",messageTimeout);
......
......@@ -53,7 +53,7 @@ win32:INCLUDEPATH += .
macosx-c++:LIBS+=-framework CoreFoundation -framework ApplicationServices
# extra link options
win32:TMAKE_LFLAGS = /NODEFAULTLIB:msvcrt.lib
win32:TMAKE_LFLAGS = /NODEFAULTLIB:msvcrt.lib doxywizard.res
win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt332.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
win32:TMAKE_LIBS_QT =
......@@ -28,7 +28,7 @@ f_insttool=NO
f_english=NO
f_wizard=NO
f_thread=NO
f_langs=nl,se,cz,fr,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt
f_langs=nl,se,cz,fr,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
while test -n "$1"; do
case $1 in
......@@ -111,7 +111,7 @@ Options:
See PLATFORMS for a list of possibilities
--prefix dir Installation prefix directory (doxygen will be
put in PREFIX/bin/doxygen)
[default: /usr]
[default: $f_prefix]
--docdir dir Documentation is installed in DOCDIR/doxygen/
[default: PREFIX/share/doc/packages]
--install name Use \`name' as the name of the GNU install tool
......@@ -527,7 +527,7 @@ echo -n " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(NL,SE,CZ,FR,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,
DK,SK,UA,GR,TW,SR,CA,LT);
DK,SK,UA,GR,TW,SR,CA,LT,ZA);
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
......
......@@ -108,11 +108,18 @@ documentation:
\refitem cmdpackage \\package
\refitem cmdpage \\page
\refitem cmdpar \\par
\refitem cmdparagraph \\paragraph
\refitem cmdparam \\param
\refitem cmdpost \\post
\refitem cmdpre \\pre
\refitem cmd_php_only \\private (PHP only)
\refitem cmd_php_only \\privatesection (PHP only)
\refitem cmdproperty \\property
\refitem cmd_php_only \\protected (PHP only)
\refitem cmd_php_only \\protectedsection (PHP only)
\refitem cmdprotocol \\protocol
\refitem cmd_php_only \\public (PHP only)
\refitem cmd_php_only \\publicsection (PHP only)
\refitem cmdref \\ref
\refitem cmdrelates \\relates
\refitem cmdrelatesalso \\relatesalso
......@@ -2010,10 +2017,21 @@ class C {};
prevent auto-linking to word that is also a documented class or struct.
<hr>
<hr>
\section cmd_php_only PHP only commands
For PHP files there are a number of additional commands, that can be
used inside classes to make members public, private, or protected even
though the language itself doesn't support this notion.
To mark a single item use one of \\private, \\protected, \\public.
For starting a section with a certain protection level use one of:
\\privatesection, \\protectedsection, \\publicsection.
The latter commands are similar to
"private:", "protected:", and "public:" in C++.
<h2>\htmlonly <center> --- \endhtmlonly
Commands included for Qt compatibility
\htmlonly --- </center>\endhtmlonly</h2>
<hr>
The following commands are supported to remain compatible to the Qt class
browser generator. Do \e not use these commands in your own documentation.
......@@ -2028,16 +2046,7 @@ browser generator. Do \e not use these commands in your own documentation.
<li>\\l
<li>\\postheader
</ul>
For PHP files there are a number of additional commands, that can be
used inside classes to make members public, private, or protected even
though the language itself doesn't support this notion.
To mark a single item use one of \\private, \\protected, \\public.
For starting a section with a certain protection level use one of:
\\privatesection, \\protectedsection, \\publicsection.
The latter commands are similar to
"private:", "protected:", and "public:" in C++.
<hr>
*/
......@@ -97,6 +97,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_extract_private EXTRACT_PRIVATE
\refitem cfg_extract_static EXTRACT_STATIC
\refitem cfg_file_patterns FILE_PATTERNS
\refitem cfg_filter_patterns FILTER_PATTERNS
\refitem cfg_filter_source_files FILTER_SOURCE_FILES
\refitem cfg_full_path_names FULL_PATH_NAMES
\refitem cfg_generate_autogen_def GENERATE_AUTOGEN_DEF
......@@ -777,6 +778,16 @@ function's detailed documentation block.
input file. Doxygen will then use the output that the filter program writes
to standard output.
\anchor cfg_filter_patterns
<dt>\c FILTER_PATTERNS <dd>
\addindex FILTER_PATTERNS
The \c FILTER_PATTERNS tag can be used to specify filters on a per file pattern
basis. Doxygen will compare the file name with each pattern and apply the
filter if there is a match. The filters are a list of the form:
pattern=filter (like <code>*.cpp=my_cpp_filter</code>). See \c INPUT_FILTER for further
info on how filters are used. If \c FILTER_PATTERNS is empty, \c INPUT_FILTER
is applied to all files.
\anchor cfg_filter_source_files
<dt>\c FILTER_SOURCE_FILES <dd>
\addindex FILTER_SOURCE_FILES
......
......@@ -16,13 +16,77 @@
*/
/*! \page doxywizard_usage Doxywizard usage
Doxywizard is a GUI front-end for creating and editing
configuration files that are used by doxygen.
Doxywizard is a GUI front-end for configuring and running doxygen.
Doxywizard consists of a single executable that, when started,
pops up a window.
When you start doxywizard it will display the main window
(the actual look depends on the OS used).
The main window has a number of tab field, one
\image html doxywizard_main.png "Main window"
The windows shows the steps to take to configure and run doxygen.
The first step is to choose one of the ways to configure doxygen.
<dl>
<dt>Wizard<dd>Click this button to quickly configure the most important
settings and leave the rest of the options to their defaults.
<dt>Expert<dd>Click this button to to gain access to the
\ref config "full range of configuration options".
<dt>Load<dd>Click this button to load an existing configuration file
from disk.
</dl>
Note that you can select multiple buttons in a row, for instance to first
configure doxygen using the Wizard and then fine tune the settings via
the Expert.
After doxygen is configured you need to save the configuration as a file
to disk. This second step allows doxygen to use the configuration
and has the additional advantage that the configuration can be reused
to run doxygen with the same settings at a later point in time.
Since some configuration options may use relative paths, the next step is
to select a directory from which to run doxygen. This is typically the root
of the source tree and will most of the time already be filled in correctly.
Once the configuration file is saved and the working directory is set, you
can run doxygen based on the selected settings. Do this by pressing the
"Start" button. Once doxygen runs you can cancel it by clicking the same
button again. The output produced by doxygen is captured and shown in a log
window. Once doxygen finishes, the log can be saved as a text file.
<h3>The Wizard Dialog</h3>
If you select the Wizard button in step 1, then a dialog with
a number of tabs will appear.
\image html doxywizard_page1.png "Wizard dialog: Project settings"
The fields in the project tab speak for themselves. Once doxygen has finished
the Destination directory is where to look for the results. Doxygen will
put each output format in a separate sub-directory.
\image html doxywizard_page2.png "Wizard dialog: Mode of operating"
The mode tab allows you to select how doxygen will look at your sources.
The default is to only look for things that have been documented.
You can also select how doxygen should present the results.
The latter does not affect the way doxygen parses your source code.
\image html doxywizard_page3.png "Wizard dialog: Output to produce"
You can select one or more of the output formats that doxygen should
produce. For HTML and LaTeX there are additional options.
\image html doxywizard_page4.png "Wizard dialog: Diagrams to generate"
Doxygen can produce a number of diagrams. Using the diagrams tab you
can select which ones to generate. For most diagrams the
dot tool of the <a href="http://www.graphviz.org">GraphViz</a> package
is needed (if you use the binary packages for Mac or Windows this
tool is already included).
<h3>Expert dialog</h3>
The Expert dialog has a number of tab fields, one
for each section in the configuration file. Each tab-field
contains a number of lines, one for each configuration option in
that section.
......@@ -38,13 +102,37 @@ The kind of input widget depends on the type of the configuration option.
<li>For options taking a lists of strings, a one line edit field is
available, with a `+' button to add this string to the list and
a `-' button to remove the selected string from the list. There
is also a button with a circular "refresh" arrow that, when pressed,
is also a `*' button that, when pressed,
replaces the selected item in the list with the string entered in the
edit field.
<li>For file and folder entries, there are special buttons
that start a file dialog.
that start a file selection dialog.
</ul>
\image html doxywizard.gif
\image html doxywizard_expert.png "Some options from the Expert dialog"
The get additional information about the meaning of an option, click
on the "Help" button at the bottom right of the dialog and then on the
item. A tooltip with additional information will appear.
<h3>Menu options</h3>
The GUI front-end has a menu with a couple of useful items
\image html doxywizard_menu.png "File menu"
<dl>
<dt>Open...<dd>This is the same as the "Load" button in the main window
and allows to open a configuration file from disk.
<dt>Save as..<dd>This is the same as the "Save" button in the main window
and can be used to save the current configuration settings to disk.
<dt>Recent configurations<dd>Allow to quickly load a recently saved
configuration.
<dt>Set as default...<dd>Stores the current configuration settings as the
default to use next time the GUI is started. You will be asked to
confirm the action.
<dt>Reset...<dd>Restores the factory defaults as the default settings to use.
You will be asked to confirm the action.
</dl>
*/
......@@ -23,12 +23,13 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
Currently (version 1.3.7), 29 languages
Currently (version 1.3.8), 30 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, French, German, Greek,
Hungarian, Italian, Japanese (+En), Korean (+En), Lithuanian,
Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak,.
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En),
Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian,
Slovak, Slovene, Spanish, Swedish, and Ukrainian..
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
......@@ -49,11 +50,17 @@ when the translator was updated.
</tr>
<!-- table content begin -->
<tr bgcolor="#ffffff">
<td>Afrikaans</td>
<td>Johan Prinsloo</td>
<td>johan@NOSPAM.zippysnoek.com</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Brazilian Portuguese</td>
<td>Fabio "FJTC" Jun Takada Chino</td>
<td>chino@NOSPAM.icmc.sc.usp.br</td>
<td>1.3.8</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Catalan</td>
......@@ -63,9 +70,9 @@ when the translator was updated.
</tr>
<tr bgcolor="#ffffff">
<td>Chinese</td>
<td>Wei Liu<br>Wang Weihan</td>
<td>liuwei@NOSPAM.asiainfo.com<br>wangweihan@NOSPAM.capinfo.com.cn</td>
<td>1.2.13</td>
<td>Li Daobing<br>Wei Liu</td>
<td>lidaobing@NOSPAM.gmail.com<br>liuwei@NOSPAM.asiainfo.com</td>
<td>1.3.08</td>
</tr>
<tr bgcolor="#ffffff">
<td>Chinese Traditional</td>
......@@ -77,13 +84,13 @@ when the translator was updated.
<td>Croatian</td>
<td>Boris Bralo</td>
<td>boris.bralo@NOSPAM.zg.tel.hr</td>
<td>1.3.8</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Czech</td>
<td>Petr P&#x0159;ikryl</td>
<td>prikrylp@NOSPAM.skil.cz</td>
<td>1.3.8</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Danish</td>
......@@ -95,7 +102,7 @@ when the translator was updated.
<td>Dutch</td>
<td>Dimitri van Heesch</td>
<td>dimitri@NOSPAM.stack.nl</td>
<td>1.3.8</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>English</td>
......@@ -137,7 +144,7 @@ when the translator was updated.
<td>Italian</td>
<td>Alessandro Falappa<br>Ahmed Aldo Faisal</td>
<td>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</td>
<td>1.3.8</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Japanese</td>
......@@ -221,7 +228,7 @@ when the translator was updated.
<td>Spanish</td>
<td>Francisco Oltra Thennet</td>
<td>foltra@NOSPAM.puc.cl</td>
<td>1.3.08</td>
<td>1.3.8</td>
</tr>
<tr bgcolor="#ffffff">
<td>Swedish</td>
......@@ -250,23 +257,25 @@ when the translator was updated.
\hline
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny chino@icmc.sc.usp.br} & 1.3.8 \\
Afrikaans & Johan Prinsloo & {\tt\tiny johan@zippysnoek.com} & up-to-date \\
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny chino@icmc.sc.usp.br} & up-to-date \\
\hline
Catalan & Albert Mora & {\tt\tiny amora@iua.upf.es} & 1.2.17 \\
\hline
Chinese & Wei Liu & {\tt\tiny liuwei@asiainfo.com} & 1.2.13 \\
~ & Wang Weihan & {\tt\tiny wangweihan@capinfo.com.cn} & ~ \\
Chinese & Li Daobing & {\tt\tiny lidaobing@gmail.com} & 1.3.08 \\
~ & Wei Liu & {\tt\tiny liuwei@asiainfo.com} & ~ \\
\hline
Chinese Traditional & Daniel YC Lin & {\tt\tiny daniel@twpda.com} & 1.3.8 \\
~ & Gary Lee & {\tt\tiny garylee@ecosine.com.tw} & ~ \\
\hline
Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.tel.hr} & 1.3.8 \\
Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & 1.3.8 \\
Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & up-to-date \\
\hline
Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny erik@mail.nu} & 1.3.8 \\
\hline
Dutch & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & 1.3.8 \\
Dutch & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\
\hline
English & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\
\hline
......@@ -281,7 +290,7 @@ when the translator was updated.
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari@diatronltd.com} & 1.3.8 \\
~ & \'{A}kos Kiss & {\tt\tiny akiss@users.sourceforge.net} & ~ \\
\hline
Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & 1.3.8 \\
Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & up-to-date \\
~ & Ahmed Aldo Faisal & {\tt\tiny aaf23@cam.ac.uk} & ~ \\
\hline
Japanese & Ryunosuke Satoh & {\tt\tiny sun594@hotmail.com} & 1.3.3 \\
......@@ -314,7 +323,7 @@ when the translator was updated.
\hline
Slovene & Matjaz Ostroversnik & {\tt\tiny matjaz.ostroversnik@zrs-tk.si} & 1.2.16 \\
\hline
Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.08 \\
Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.8 \\
\hline
Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.3.3 \\
\hline
......
......@@ -9,6 +9,9 @@
% the maintainer(s) for the language (one line, one maintainer)
% in the form: <readable name><colon><e-mail>
TranslatorAfrikaans
Johan Prinsloo: johan@zippysnoek.com
TranslatorBrazilian
Fabio "FJTC" Jun Takada Chino: chino@icmc.sc.usp.br
......@@ -16,8 +19,8 @@ TranslatorCatalan
Albert Mora: amora@iua.upf.es
TranslatorChinese
Li Daobing: lidaobing@gmail.com
Wei Liu: liuwei@asiainfo.com
Wang Weihan: wangweihan@capinfo.com.cn
TranslatorChinesetraditional
Daniel YC Lin: daniel@twpda.com
......
......@@ -42,6 +42,7 @@
2004/04/16 - Added new tokens to the tokenizer (to remove some warnings).
2004/05/25 - Added from __future__ import generators not to force Python 2.3.
2004/06/03 - Removed dependency on textwrap module.
2004/07/07 - Fixed the bug in the fill() function.
"""
from __future__ import generators
......@@ -70,7 +71,7 @@ def fill(s):
else:
lines.append(line) # another full line formed
line = word # next line started
lines.append(line) # the last line
return '\n'.join(lines)
......@@ -1390,7 +1391,7 @@ class TrManager:
alphabetically). This means that they derive from the
Translator class and they implement all %d of the required
methods. Anyway, there still may be some details listed even
for them. Please, see the details for them:'''
for them:'''
s = s % len(self.requiredMethodsDic)
f.write('-' * 70 + '\n')
f.write(fill(s) + '\n\n')
......
Makefile
libmd5.pro
Makefile
libpng.pro
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.7_20040704
Version: 1.3.7_20040718
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
Makefile
qtools.pro
Makefile
doxygen.pro
doxytag.pro
libdoxycfg.pro
libdoxygen.pro
......@@ -75,6 +75,7 @@ class ClassDef : public Definition
QCString getReference() const;
bool isReference() const;
bool isLocal() const { return m_isLocal; }
bool isArtificial() const { return m_artificial; }
bool hasDocumentation() const;
......
......@@ -2017,7 +2017,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_name+=yytext;
BEGIN( FuncCall );
}
<FuncCall,Body,MemberCall,MemberCall2>\" {
<FuncCall,Body,MemberCall,MemberCall2,SkipInits>\" {
startFontClass("stringliteral");
g_code->codify(yytext);
g_lastStringContext=YY_START;
......
......@@ -1943,7 +1943,17 @@ void Config::create()
"by executing (via popen()) the command <filter> <input-file>, where <filter> \n"
"is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n"
"input file. Doxygen will then use the output that the filter program writes \n"
"to standard output. \n"
"to standard output. If FILTER_PATTERNS is specified, this tag will be \n"
"ignored. \n"
);
cl = addList(
"FILTER_PATTERNS",
"The FILTER_PATTERNS tag can be used to specify filters on a per file pattern \n"
"basis. Doxygen will compare the file name with each pattern and apply the \n"
"filter if there is a match. The filters are a list of the form: \n"
"pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further \n"
"info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER \n"
"is applied to all files. \n"
);
cl->setWidgetType(ConfigList::File);
cb = addBool(
......
......@@ -246,7 +246,7 @@ static bool readCodeFragment(const char *fileName,
{
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
QCString cmd=Config_getString("INPUT_FILTER")+" \""+fileName+"\"";
QCString cmd=getFileFilter(fileName)+" \""+fileName+"\"";
FILE *f = Config_getBool("FILTER_SOURCE_FILES") ? popen(cmd,"r") : fopen(fileName,"r");
bool found=FALSE;
if (f)
......
......@@ -1249,6 +1249,17 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
}
}
//---------------------------------------------------------------------------
DocVerbatim::DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile)
: m_parent(parent), m_context(context), m_text(text), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile), m_relPath(g_relPath)
{
}
//---------------------------------------------------------------------------
void DocInclude::parse()
......@@ -1480,7 +1491,7 @@ bool DocXRefItem::parse()
//---------------------------------------------------------------------------
DocFormula::DocFormula(DocNode *parent,int id) :
m_parent(parent)
m_parent(parent), m_relPath(g_relPath)
{
QString formCmd;
formCmd.sprintf("\\form#%d",id);
......@@ -4117,7 +4128,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
break;
case HTML_UNKNOWN:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag <%s> found", tagName.data());
m_children.append(new DocWord(this, "<"+tagName+">"));
m_children.append(new DocWord(this, "<"+tagName+tagHtmlAttribs.toString()+">"));
break;
break;
default:
......@@ -4257,8 +4268,8 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
// ignore </a> tag (can be part of <a name=...></a>
break;
case HTML_UNKNOWN:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag </%s> found",
tagName.data());
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag </%s> found", tagName.data());
m_children.append(new DocWord(this,"</"+tagName+">"));
break;
default:
// we should not get here!
......
......@@ -357,9 +357,7 @@ class DocVerbatim : public DocNode
enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
m_parent(parent), m_context(context), m_text(text), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile) {}
const QString &exampleFile);
Kind kind() const { return Kind_Verbatim; }
Type type() const { return m_type; }
QString text() const { return m_text; }
......@@ -368,6 +366,7 @@ class DocVerbatim : public DocNode
void accept(DocVisitor *v) { v->visit(this); }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
QString relPath() const { return m_relPath; }
private:
DocNode *m_parent;
......@@ -376,6 +375,7 @@ class DocVerbatim : public DocNode
Type m_type;
bool m_isExample;
QString m_exampleFile;
QString m_relPath;
};
......@@ -455,6 +455,7 @@ class DocFormula : public DocNode
Kind kind() const { return Kind_Formula; }
QString name() const { return m_name; }
QString text() const { return m_text; }
QString relPath() const { return m_relPath; }
int id() const { return m_id; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
......@@ -463,6 +464,7 @@ class DocFormula : public DocNode
DocNode *m_parent;
QString m_name;
QString m_text;
QString m_relPath;
int m_id;
};
......
......@@ -2433,9 +2433,11 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
* dotfiles to generate image maps.
* \param inFile just the basename part of the filename
* \param outDir output directory
* \param relPath relative path the to root of the output dir
* \returns a string which is the HTML image map (without the \<map\>\</map\>)
*/
QString getDotImageMapFromFile(const QString& inFile, const QString& outDir)
QString getDotImageMapFromFile(const QString& inFile, const QString& outDir,
const QCString &relPath)
{
QString outFile = inFile + ".map";
......@@ -2458,7 +2460,7 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir)
}
QString result;
QTextOStream tmpout(&result);
convertMapFile(tmpout, outFile, "",TRUE);
convertMapFile(tmpout, outFile, relPath ,TRUE);
QDir().remove(outFile);
// printf("result=%s\n",result.data());
......
......@@ -202,7 +202,8 @@ class DotCallGraph
void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format);
QString getDotImageMapFromFile(const QString& inFile, const QString& outDir);
QString getDotImageMapFromFile(const QString& inFile, const QString& outDir,
const QCString& relPath);
#endif
......@@ -119,6 +119,8 @@ SearchIndex * Doxygen::searchIndex=0;
SDict<DefinitionList> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> Doxygen::lookupCache(20000,20000);
bool Doxygen::lookupCacheEnabled=FALSE;
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
......@@ -149,7 +151,6 @@ void clearAll()
Doxygen::formulaNameDict.clear();
Doxygen::tagDestinationDict.clear();
delete Doxygen::mainPage; Doxygen::mainPage=0;
}
void statistics()
......@@ -3387,7 +3388,7 @@ static bool findClassRelation(
}
baseClassName=stripTemplateSpecifiersFromScope
(removeRedundantWhiteSpace(baseClassName));
MemberDef *baseClassTypeDef;
MemberDef *baseClassTypeDef=0;
QCString templSpec;
ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? 0 : cd,
cd->getFileDef(), // todo: is this ok?
......@@ -3417,7 +3418,9 @@ static bool findClassRelation(
);
int i;
if (baseClass==0 && (i=baseClassName.find('<'))!=-1)
int si=baseClassName.findRev("::");
if (si==-1) si=0;
if (baseClass==0 && (i=baseClassName.find('<',si))!=-1)
// base class has template specifiers
{
// TODO: here we should try to find the correct template specialization
......@@ -3450,10 +3453,10 @@ static bool findClassRelation(
//printf("cd=%p baseClass=%p\n",cd,baseClass);
bool found=baseClass!=0 && (baseClass!=cd || mode==TemplateInstances);
if (!found && (i=baseClassName.findRev("::"))!=-1)
if (!found && si!=-1)
{
// replace any namespace aliases
replaceNamespaceAliases(baseClassName,i);
replaceNamespaceAliases(baseClassName,si);
baseClass=getResolvedClass(cd,cd->getFileDef(),baseClassName);
found=baseClass!=0 && baseClass!=cd;
}
......@@ -3493,7 +3496,11 @@ static bool findClassRelation(
else if (mode==DocumentedOnly)
{
QCString usedName;
if (baseClassTypeDef) usedName=biName;
if (baseClassTypeDef)
{
usedName=biName;
//printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data());
}
cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec);
......@@ -6975,7 +6982,8 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
QFileInfo fi(fileName);
if (!fi.exists()) return;
if (Config_getString("INPUT_FILTER").isEmpty())
QCString filterName = getFileFilter(fileName);
if (filterName.isEmpty())
{
QFile f(fileName);
if (!f.open(IO_ReadOnly))
......@@ -6994,11 +7002,11 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
}
else
{
QCString cmd=Config_getString("INPUT_FILTER")+" "+fileName;
QCString cmd=filterName+" "+fileName;
FILE *f=popen(cmd,"r");
if (!f)
{
err("Error: could not execute filter %s\n",Config_getString("INPUT_FILTER").data());
err("Error: could not execute filter %s\n",filterName.data());
return;
}
const int bufSize=1024;
......@@ -7428,6 +7436,8 @@ void initDoxygen()
excludeNameDict.setAutoDelete(TRUE);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::lookupCacheEnabled=FALSE;
}
void cleanUpDoxygen()
......@@ -8225,6 +8235,10 @@ void parseInput()
computeClassRelations();
classEntries.clear();
// from now on the class relations are fixed and we can
// start to cache them to improve performance
Doxygen::lookupCacheEnabled=TRUE;
msg("Searching for enumerations...\n");
findEnums(root);
findEnumDocumentation(root);
......
......@@ -22,6 +22,7 @@
#include "qtbc.h"
#include <qtextstream.h>
#include <qdatetime.h>
#include <qcache.h>
#include "groupdef.h"
#include "filedef.h"
#include "classdef.h"
......@@ -51,6 +52,15 @@ class StringDict : public QDict<QCString>
virtual ~StringDict() {}
};
struct LookupInfo
{
LookupInfo(ClassDef *cd=0,MemberDef *td=0,QCString ts="")
: classDef(cd), typeDef(td), templSpec(ts) {}
ClassDef *classDef;
MemberDef *typeDef;
QCString templSpec;
};
extern QCString spaces;
......@@ -101,6 +111,8 @@ class Doxygen
static SDict<DefinitionList> *symbolMap;
static bool outputToWizard;
static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache;
static bool lookupCacheEnabled;
};
void initDoxygen();
......
......@@ -35,6 +35,18 @@ class HtmlAttribList : public QList<HtmlAttrib>
{ operator=(l); }
HtmlAttribList &operator=(const HtmlAttribList &l)
{ clear(); QList<HtmlAttrib>::operator=(l); return *this; }
QString toString() const
{
HtmlAttribList *that = (HtmlAttribList *)this;
QString result;
HtmlAttrib *attr=that->first();
while (attr)
{
result+=" "+attr->name+"=\""+attr->value+"\"";
attr=that->next();
}
return result;
}
private:
QCollection::Item newItem( QCollection::Item d )
{ return (QCollection::Item)new HtmlAttrib(*(HtmlAttrib *)d); }
......
......@@ -28,7 +28,7 @@
#include "config.h"
#define PREFRAG_START "<div class=\"fragment\"><pre>"
#define PREFRAG_END "</pre></div"
#define PREFRAG_END "</pre></div>"
static QString htmlAttribsToString(const HtmlAttribList &attribs)
{
......@@ -228,7 +228,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
file.close();
m_t << "<div align=\"center\">" << endl;
writeDotFile(fileName);
writeDotFile(fileName,s->relPath());
m_t << "</div>" << endl;
file.remove();
......@@ -308,13 +308,14 @@ void HtmlDocVisitor::visit(DocFormula *f)
if (m_hide) return;
bool bDisplay = f->text().at(0)=='\\';
if (bDisplay) m_t << "<p class=\"formulaDsp\">" << endl;
m_t << "<img class=\"formula" << (bDisplay ? "Dsp" : "Inl");
m_t << "<img class=\"formula"
<< (bDisplay ? "Dsp" : "Inl");
m_t << "\" alt=\"";
filterQuotedCdataAttr(f->text());
m_t << "\"";
/// @todo cache image dimensions on formula generation and give height/width
/// for faster preloading and better rendering of the page
m_t << " src=\"" << f->name() << ".png\">";
m_t << " src=\"" << f->relPath() << f->name() << ".png\">";
if (bDisplay)
m_t << endl << "<p>" << endl;
}
......@@ -742,7 +743,7 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df)
{
if (m_hide) return;
writeDotFile(df->file());
writeDotFile(df->file(),"");
m_t << "<div align=\"center\">" << endl;
if (df->hasCaption())
{
......@@ -1053,7 +1054,7 @@ void HtmlDocVisitor::popEnabled()
delete v;
}
void HtmlDocVisitor::writeDotFile(const QString &fileName)
void HtmlDocVisitor::writeDotFile(const QString &fileName,const QString &relPath)
{
QString baseName=fileName;
int i;
......@@ -1065,10 +1066,10 @@ void HtmlDocVisitor::writeDotFile(const QString &fileName)
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
QString mapName = baseName+".map";
QString mapFile = fileName+".map";
m_t << "<img src=\"" << baseName << "."
m_t << "<img src=\"" << relPath << baseName << "."
<< Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
QString imap = getDotImageMapFromFile(fileName,outDir);
QString imap = getDotImageMapFromFile(fileName,outDir,relPath.data());
m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl;
}
......@@ -137,7 +137,7 @@ class HtmlDocVisitor : public DocVisitor
void startLink(const QString &ref,const QString &file,
const QString &relPath,const QString &anchor);
void endLink();
void writeDotFile(const QString &fileName);
void writeDotFile(const QString &fileName,const QString &relPath);
void pushEnabled();
void popEnabled();
......
......@@ -28,3 +28,4 @@
#define LANG_SR
#define LANG_CA
#define LANG_LT
#define LANG_ZA
......@@ -115,6 +115,9 @@
#ifdef LANG_LT
#include "translator_lt.h"
#endif
#ifdef LANG_ZA
#include "translator_za.h"
#endif
#endif
#define L_EQUAL(a) !stricmp(langName,a)
......
......@@ -115,6 +115,7 @@ HEADERS = bufstr.h \
translator_sr.h \
translator_tw.h \
translator_ua.h \
translator_za.h \
unistd.h \
util.h \
version.h \
......
......@@ -578,10 +578,10 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n");
return FALSE; // in namespace but namespace not linkable
}
if (!group && fileDef && !fileDef->isLinkableInProject())
if (!group && !nspace && fileDef && !fileDef->isLinkableInProject())
{
//printf("in a file but file not linkable!\n");
return FALSE; // in file but file not linkable
return FALSE; // in file (and not in namespace) but file not linkable
}
if (prot==Private && !Config_getBool("EXTRACT_PRIVATE") && mtype!=Friend)
{
......
......@@ -270,7 +270,9 @@ class MemberDef : public Definition
// cached typedef functions
bool isTypedefValCached() const { return m_isTypedefValCached; }
ClassDef *getCachedTypedefVal() const { return m_cachedTypedefValue; }
void cacheTypedefVal(ClassDef *val) { m_isTypedefValCached=TRUE; m_cachedTypedefValue=val; }
QCString getCachedTypedefTemplSpec() const { return m_cachedTypedefTemplSpec; }
void cacheTypedefVal(ClassDef *val,const QCString &templSpec)
{ m_isTypedefValCached=TRUE; m_cachedTypedefValue=val; m_cachedTypedefTemplSpec=templSpec; }
// declaration <-> definition relation
void setMemberDefinition(MemberDef *md) { memDef=md; }
......@@ -360,6 +362,7 @@ class MemberDef : public Definition
bool m_isTypedefValCached;
ClassDef *m_cachedTypedefValue;
QCString m_cachedTypedefTemplSpec;
// inbody documentation
int m_inbodyLine;
......
......@@ -190,9 +190,10 @@ static FILE *checkAndOpenFile(const QCString &absName)
if (alreadyIncluded) return 0;
if (!Config_getString("INPUT_FILTER").isEmpty())
QCString filterName = getFileFilter(absName);
if (!filterName.isEmpty())
{
QCString cmd = Config_getString("INPUT_FILTER")+" "+absName;
QCString cmd = filterName+" "+absName;
f=popen(cmd,"r");
if (!f) err("Error: could not execute filter %s\n",cmd.data());
}
......@@ -1480,7 +1481,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Command>.
<UndefName>{ID} {
Define *def;
if ((def=isDefined(yytext)) && !def->isPredefined)
if ((def=isDefined(yytext))
/*&& !def->isPredefined*/
)
{
//printf("undefining %s\n",yytext);
def->undef=TRUE;
......@@ -1955,7 +1958,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
{
FileState *fs=g_includeStack.pop();
//fileDefineCache->merge(g_yyFileName,fs->fileName);
if (Config_getString("INPUT_FILTER").isEmpty())
if (getFileFilter(fs->fileName.data()).isEmpty())
fclose(fs->filePtr);
else
pclose(fs->filePtr);
......@@ -2203,7 +2206,7 @@ void preprocessFile(const char *fileName,BufStr &output)
}
QCString &inputFilter = Config_getString("INPUT_FILTER");
QCString inputFilter = getFileFilter(fileName);
if (inputFilter.isEmpty())
{
preYYin = fopen(fileName,"r");
......
......@@ -24,7 +24,7 @@
*/
#define CN_SPC
class TranslatorChinese : public TranslatorAdapter_1_2_13
class TranslatorChinese : public TranslatorAdapter_1_3_3
{
public:
/*! Used for identification of the language. The identification
......@@ -495,8 +495,8 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13
case ClassDef::Struct: result+="结构"; break;
case ClassDef::Union: result+="联合"; break;
case ClassDef::Interface: result+="接口"; break;
case ClassDef::Protocol: result+="protocol"; break; // translate me!
case ClassDef::Category: result+="category"; break; // translate me!
case ClassDef::Protocol: result+="协议"; break; // translate me!
case ClassDef::Category: result+="分类"; break; // translate me!
case ClassDef::Exception: result+="异常"; break;
}
result+="参考";
......@@ -661,8 +661,8 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13
case ClassDef::Struct: result+="结构"; break;
case ClassDef::Union: result+="联合"; break;
case ClassDef::Interface: result+="接口"; break;
case ClassDef::Protocol: result+="protocol"; break; // translate me!
case ClassDef::Category: result+="category"; break; // translate me!
case ClassDef::Protocol: result+="协议"; break; // translate me!
case ClassDef::Category: result+="分类"; break; // translate me!
case ClassDef::Exception: result+="异常"; break;
}
result+="的文档由以下文件生成:";
......@@ -1282,6 +1282,194 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13
{
return "参考";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.13
//////////////////////////////////////////////////////////////////////////
/*! used in member documentation blocks to produce a list of
* members that are implemented by this one.
*/
virtual QCString trImplementedFromList(int numEntries)
{
/* return "Implements "+trWriteList(numEntries)+"."; */
return "实现了"CN_SPC+trWriteList(numEntries)+"。";
}
/*! used in member documentation blocks to produce a list of
* all members that implement this abstract member.
*/
virtual QCString trImplementedInList(int numEntries)
{
/* return "Implemented in "+trWriteList(numEntries)+"."; */
return "在"CN_SPC+trWriteList(numEntries)+CN_SPC"内被实现。";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.16
//////////////////////////////////////////////////////////////////////////
/*! used in RTF documentation as a heading for the Table
* of Contents.
*/
virtual QCString trRTFTableOfContents()
{
/* return "Table of Contents"; */
return "目录";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.17
//////////////////////////////////////////////////////////////////////////
/*! Used as the header of the list of item that have been
* flagged deprecated
*/
virtual QCString trDeprecatedList()
{
/* return "Deprecated List"; */
return "过时列表";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
/*! Used as a header for declaration section of the events found in
* a C# program
*/
virtual QCString trEvents()
{
/* return "Events"; */
return "事件";
}
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
/* return "Event Documentation"; */
return "事件文档";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3
//////////////////////////////////////////////////////////////////////////
/*! Used as a heading for a list of Java class types with package scope.
*/
virtual QCString trPackageTypes()
{
/* return "Package Types"; */
return "模块类型";
}
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
virtual QCString trPackageMembers()
{
/* return "Package Functions"; */
return "模块函数";
}
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
virtual QCString trStaticPackageMembers()
{
/* return "Static Package Functions"; */
return "静态模块函数";
}
/*! Used as a heading for a list of Java class variables with package
* scope.
*/
virtual QCString trPackageAttribs()
{
/* return "Package Attributes"; */
return "模块属性";
}
/*! Used as a heading for a list of static Java class variables with
* package scope.
*/
virtual QCString trStaticPackageAttribs()
{
/* return "Static Package Attributes"; */
return "静态模块属性";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3.1
//////////////////////////////////////////////////////////////////////////
/*! Used in the quick index of a class/file/namespace member list page
* to link to the unfiltered list of all members.
*/
virtual QCString trAll()
{
/* return "All"; */
return "全部";
}
/*! Put in front of the call graph for a function. */
virtual QCString trCallGraph()
{
/* return "Here is the call graph for this function:"; */
return "函数调用图:";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3.3
//////////////////////////////////////////////////////////////////////////
/*! When the search engine is enabled this text is put in the header
* of each page before the field where one can enter the text to search
* for.
*/
virtual QCString trSearchForIndex()
{
/* return "Search for"; */
return "搜索";
}
/*! This string is used as the title for the page listing the search
* results.
*/
virtual QCString trSearchResultsTitle()
{
/* return "Search Results"; */
return "搜索结果";
}
/*! This string is put just before listing the search results. The
* text can be different depending on the number of documents found.
* Inside the text you can put the special marker $num to insert
* the number representing the actual number of search results.
* The @a numDocuments parameter can be either 0, 1 or 2, where the
* value 2 represents 2 or more matches. HTML markup is allowed inside
* the returned string.
*/
virtual QCString trSearchResults(int numDocuments)
{
if (numDocuments==0)
{
/* return "Sorry, no documents matching your query."; */
return "对不起,找不到与你的查询相符的文档。";
}
else if (numDocuments==1)
{
/* return "Found <b>1</b> document matching your query."; */
return "找到<b>1</b>篇与你的查询相符的文档。";
}
else
{
/* return "Found <b>$num</b> documents matching your query. "
"Showing best matches first."; */
return "找到<b>$num</b>篇与你的查询相符的文档。"
"先显示最吻合的文档。";
}
}
/*! This string is put before the list of matched words, for each search
* result. What follows is the list of words that matched the query.
*/
virtual QCString trSearchMatches()
{
return "Matches:";
return "符合的结果:";
}
};
#endif
This diff is collapsed.
......@@ -73,27 +73,6 @@ extern char **environ;
//#define MAP_ALGO ALGO_CRC16
#define MAP_ALGO ALGO_MD5
//------------------------------------------------------------------------
struct LookupInfo
{
LookupInfo(ClassDef *cd=0,MemberDef *td=0,QCString ts="")
: classDef(cd), typeDef(td), templSpec(ts) {}
ClassDef *classDef;
MemberDef *typeDef;
QCString templSpec;
};
static QCache<LookupInfo> g_lookupCache(20000,20000);
// object that automatically initializes the cache at startup
class CacheInitializer
{
public:
CacheInitializer() { g_lookupCache.setAutoDelete(TRUE); }
} g_cacheInitializer;
//------------------------------------------------------------------------
// TextGeneratorOLImpl implementation
//------------------------------------------------------------------------
......@@ -618,6 +597,10 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe
bool isCached = md->isTypedefValCached(); // value already cached
if (isCached)
{
//printf("Already cached %s->%s\n",
// md->name().data(),
// md->getCachedTypedefVal()?md->getCachedTypedefVal()->name().data():"<none>");
if (pTemplSpec) *pTemplSpec = md->getCachedTypedefTemplSpec();
return md->getCachedTypedefVal();
}
QCString qname = md->qualifiedName();
......@@ -638,32 +621,61 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe
}
if (type.left(7)=="struct ") // strip leading "struct"
{
type=type.mid(7);
}
else if (type.left(6)=="union ") // or strip leading "union"
{
type=type.mid(6);
}
type=type.stripWhiteSpace(); // strip leading and trailing whitespace
ClassDef *result = getResolvedClassRec(md->getOuterScope(),fileScope,type,0,0);
MemberDef *memTypeDef = 0;
ClassDef *result = getResolvedClassRec(md->getOuterScope(),
fileScope,type,&memTypeDef,0);
// if type is a typedef than return what it resolves to.
if (memTypeDef) return newResolveTypedef(fileScope,memTypeDef,pTemplSpec);
//printf("type=%s result=%p\n",type.data(),result);
if (result==0)
{
// try unspecialized version if type is template
int si=type.findRev("::");
int i=type.find('<');
if (i!=-1) // typedef of a template => try the unspecialized version
if (si==-1 && i!=-1) // typedef of a template => try the unspecialized version
{
*pTemplSpec = type.mid(i);
result = getResolvedClassRec(md->getOuterScope(),fileScope,type.left(i),0,0);
}
else if (si!=-1) // A::B
{
i=type.find('<',si);
if (i==-1) // Something like A<T>::B => lookup A::B
{
i=type.length();
}
else // Something like A<T>::B<S> => lookup A::B, spec=<S>
{
*pTemplSpec = type.mid(i);
}
result = getResolvedClassRec(md->getOuterScope(),fileScope,
stripTemplateSpecifiersFromScope(type.left(i),FALSE),0,0);
}
}
// remember computed value for next time
if (result && result->getDefFileName()!="<code>")
if (Doxygen::lookupCacheEnabled && result && result->getDefFileName()!="<code>")
// this check is needed to prevent that temporary classes that are
// introduced while parsing code fragments are being cached here.
{
//printf("setting cached typedef %p in result %p\n",md,result);
//printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine());
md->cacheTypedefVal(result);
if (pTemplSpec)
{
md->cacheTypedefVal(result,*pTemplSpec);
}
else
{
md->cacheTypedefVal(result,"");
}
}
g_resolvedTypedefs.remove(qname); // remove from the trace list
......@@ -839,7 +851,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
result= (i==-1) ? -1 : i+1;
}
done:
//g_lookupCache.insert(key,new int(result));
//Doxygen::lookupCache.insert(key,new int(result));
return result;
}
......@@ -971,7 +983,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
}
}
done:
//g_lookupCache.insert(key,new int(result));
//Doxygen::lookupCache.insert(key,new int(result));
return result;
}
......@@ -1031,9 +1043,9 @@ ClassDef *getResolvedClassRec(Definition *scope,
// scope, the name to search for and the explicit scope prefix. The speedup
// achieved by this simple cache can be enormous.
QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
LookupInfo *pval=g_lookupCache.find(key);
LookupInfo *pval=Doxygen::lookupCache.find(key);
//printf("Searching for %s result=%p\n",key.data(),pval);
if (pval)
if (Doxygen::lookupCacheEnabled && pval)
{
if (pTemplSpec) *pTemplSpec=pval->templSpec;
if (pTypeDef) *pTypeDef=pval->typeDef;
......@@ -1045,7 +1057,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
else // not found yet; we already add a 0 to avoid the possibility of
// endless recursion.
{
g_lookupCache.insert(key,new LookupInfo);
Doxygen::lookupCache.insert(key,new LookupInfo);
}
ClassDef *bestMatch=0;
......@@ -1100,7 +1112,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
QCString spec;
minDistance=distance;
bestMatch = newResolveTypedef(fileScope,md,&spec);
//printf(" bestTypeDef=%p\n",md);
//printf(" bestTypeDef=%p spec=%s\n",md,spec.data());
bestTypedef = md;
bestTemplSpec = spec;
}
......@@ -1122,7 +1134,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
*pTemplSpec = bestTemplSpec;
}
pval=g_lookupCache.find(key);
pval=Doxygen::lookupCache.find(key);
if (pval)
{
pval->classDef = bestMatch;
......@@ -1131,7 +1143,14 @@ ClassDef *getResolvedClassRec(Definition *scope,
}
else
{
g_lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec));
if (Doxygen::lookupCacheEnabled)
{
Doxygen::lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec));
}
else // remove the 0 key from the cache
{
Doxygen::lookupCache.remove(key);
}
}
//printf("] bestMatch=%s distance=%d\n",
// bestMatch?bestMatch->name().data():"<none>",minDistance);
......@@ -1602,6 +1621,55 @@ int filterCRLF(char *buf,int len)
return dest; // length of the valid part of the buf
}
/*! looks for a filter for the file \a name. Returns the name of the filter
* if there is a match for the file name, otherwise an empty string.
*/
QCString getFileFilter(const char* name)
{
// sanity check
if (name==0) return "";
// first look for filter pattern list
QStrList& filterList = Config_getList("FILTER_PATTERNS");
if (filterList.isEmpty())
{
// use INPUT_FILTER instead (For all files)
return Config_getString("INPUT_FILTER");
}
// compare the file name to the filter pattern list
QStrListIterator sli(filterList);
char* filterStr;
for(sli.toFirst(); (filterStr = sli.current()); ++sli)
{
QCString fs = filterStr;
int i_equals=fs.find('=');
if (i_equals!=-1)
{
QCString filterPattern = fs.left(i_equals);
#if defined(_WIN32) || defined(_OS_MAC_) // windows or mac
QRegExp fpat(filterPattern,FALSE,TRUE); // case insensitive match
#else // unix
QRegExp fpat(filterPattern,TRUE,TRUE); // case sensitive match
#endif
if (fpat.match(name)!=-1)
{
// found a match!
QCString filterName = fs.mid(i_equals+1);
return filterName;
}
}
}
// no match
return "";
}
/*! reads a file with name \a name and returns it as a string. If \a filter
* is TRUE the file will be filtered by any user specified input filter.
* If \a name is "-" the string will be read from standard input.
......@@ -1641,7 +1709,8 @@ QCString fileToString(const char *name,bool filter)
err("Error: file `%s' not found\n",name);
return "";
}
if (Config_getString("INPUT_FILTER").isEmpty() || !filter)
QCString filterName = getFileFilter(name);
if (filterName.isEmpty() || !filter)
{
f.setName(name);
fileOpened=f.open(IO_ReadOnly);
......@@ -1666,11 +1735,11 @@ QCString fileToString(const char *name,bool filter)
}
else // filter the input
{
QCString cmd=Config_getString("INPUT_FILTER")+" \""+name+"\"";
QCString cmd=filterName+" \""+name+"\"";
FILE *f=popen(cmd,"r");
if (!f)
{
err("Error: could not execute filter %s\n",Config_getString("INPUT_FILTER").data());
err("Error: could not execute filter %s\n",filterName.data());
return "";
}
const int bSize=4096;
......
......@@ -104,6 +104,7 @@ bool getDefs(const QCString &scopeName,
bool checkCV=FALSE
);
QCString getFileFilter(const char* name);
bool resolveRef(/* in */ const char *scName,
/* in */ const char *name,
......
......@@ -955,8 +955,19 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
t << "\">" << convertToXML(bcd->classDef->displayName())
<< "</basecompoundref>" << endl;
t << "\">";
if (!bcd->templSpecifiers.isEmpty())
{
convertToXML(
insertTemplateSpecifierInScope(
bcd->classDef->displayName(),bcd->templSpecifiers)
);
}
else
{
convertToXML(bcd->classDef->displayName());
}
t << "</basecompoundref>" << endl;
}
}
if (cd->subClasses()->count()>0)
......
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