Commit ea8a1bc7 authored by dimitri's avatar dimitri

Release-1.2.8-20010723

parent 5346e180
DOXYGEN Version 1.2.8-20010715 DOXYGEN Version 1.2.8-20010723
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (15 July 2001) Dimitri van Heesch (23 July 2001)
...@@ -27,6 +27,6 @@ ps: docs ...@@ -27,6 +27,6 @@ ps: docs
cd latex & $(MAKE) cd latex & $(MAKE)
src\version.cpp: Makefile src\version.cpp: Makefile
echo char versionString[]="$(VERSION)"; > src\version.cpp echo char versionString[]="""$(VERSION)"""; > src\version.cpp
FORCE: FORCE:
DOXYGEN Version 1.2.8_20010715 DOXYGEN Version 1.2.8_20010723
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (15 July 2001) Dimitri van Heesch (dimitri@stack.nl) (23 July 2001)
1.2.8-20010715 1.2.8-20010723
...@@ -10,15 +10,9 @@ ...@@ -10,15 +10,9 @@
# See the GNU General Public License for more details. # See the GNU General Public License for more details.
# #
all: config.l config.h Makefile.doxywizard all: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard $@ $(MAKE) -f Makefile.doxywizard $@
config.l:
$(CP) ../../src/config.l config.l
config.h:
$(CP) ../../src/config.h config.h
Makefile.doxywizard: doxywizard.pro Makefile.doxywizard: doxywizard.pro
$(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
...@@ -29,7 +23,7 @@ clean: Makefile.doxywizard ...@@ -29,7 +23,7 @@ clean: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard clean $(MAKE) -f Makefile.doxywizard clean
distclean: clean distclean: clean
$(RM) Makefile.doxywizard config.l config.h config.cpp $(RM) Makefile.doxywizard
install: install:
$(INSTTOOL) -d $(INSTALL)/bin $(INSTTOOL) -d $(INSTALL)/bin
......
#
#
#
# Copyright (C) 1997-2001 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
# granted. No representations are made about the suitability of this software
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
all: config.h config.l unistd.h Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard $@
unistd.h:
$(CP) ..\..\src\unistd.h unistd.h
config.h:
$(CP) ..\..\src\config.h config.h
config.l:
$(CP) ..\..\src\config.l config.l
Makefile.doxywizard: doxywizard.pro
$(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
tmake:
$(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
clean: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard clean
distclean: clean
$(RM) Makefile.doxywizard config.cpp
FORCE:
...@@ -56,32 +56,23 @@ static bool loadConfig( QString loadFile ) ...@@ -56,32 +56,23 @@ static bool loadConfig( QString loadFile )
); );
return FALSE; return FALSE;
} }
QFile f( loadFile );
if ( !f.open(IO_ReadOnly) )
{
QMessageBox::warning(0,
"Warning","Cannot open input "+loadFile+
" for reading!.",
"abort"
);
exit(1);
}
// set config values to their defaults // set config values to their defaults
Config::instance()->init(); Config::instance()->init();
// read file into a string buffer
int fsize = fi.size();
QCString contents(fsize+1); // add room for \0 terminator
f.readBlock(contents.data(),fsize);
contents[fsize]='\0';
// parse the config file // parse the config file
// this will initialize the various Config data members // this will initialize the various Config data members
Config::instance()->parse(contents,loadFile); if (Config::instance()->parse(loadFile))
{
QMessageBox::warning(0,
"Warning","Cannot open or read input "+loadFile+"!",
"abort"
);
return FALSE;
}
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
f.close();
return TRUE; return TRUE;
} }
...@@ -322,7 +313,7 @@ void Wizard::about() ...@@ -322,7 +313,7 @@ void Wizard::about()
"<qt><center>A tool to create and edit configuration files " "<qt><center>A tool to create and edit configuration files "
"that can be read by doxygen.</center><p>" "that can be read by doxygen.</center><p>"
"<center>Written by Dimitri van Heesch</center><p>" "<center>Written by Dimitri van Heesch</center><p>"
"<center>(c) 2000</center></qt>" "<center>(c) 2000-2001</center></qt>"
); );
} }
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
# project file for the doxywizard project # project file for the doxywizard project
# special template configuration file because we use flex # special template configuration file because we use flex
TEMPLATE = doxywizard.t unix:TEMPLATE = app.t
win32:TEMPLATE = doxywizard.t
# executable to generate # executable to generate
TARGET = ../../bin/doxywizard TARGET = ../../bin/doxywizard
...@@ -28,8 +29,8 @@ HEADERS = doxywizard.h \ ...@@ -28,8 +29,8 @@ HEADERS = doxywizard.h \
inputbool.h \ inputbool.h \
inputstrlist.h \ inputstrlist.h \
inputint.h \ inputint.h \
config.h \
pixmaps.h pixmaps.h
win32:HEADERS += config.h
# source flle for the project # source flle for the project
SOURCES = doxywizard.cpp \ SOURCES = doxywizard.cpp \
...@@ -39,8 +40,8 @@ SOURCES = doxywizard.cpp \ ...@@ -39,8 +40,8 @@ SOURCES = doxywizard.cpp \
inputbool.cpp \ inputbool.cpp \
inputstrlist.cpp \ inputstrlist.cpp \
inputint.cpp \ inputint.cpp \
config.cpp \
pixmaps.cpp pixmaps.cpp
win32:SOURCES += config.cpp
# where to put the objects # where to put the objects
OBJECTS_DIR = obj OBJECTS_DIR = obj
...@@ -49,7 +50,12 @@ OBJECTS_DIR = obj ...@@ -49,7 +50,12 @@ OBJECTS_DIR = obj
MOC_DIR = moc MOC_DIR = moc
# extra C++ compiler options # extra C++ compiler options
TMAKE_CXXFLAGS += -DDOXYWIZARD INCLUDEPATH += ../../src
win32:TMAKE_CXXFLAGS += -I. -DQT_DLL win32:TMAKE_CXXFLAGS += -DQT_DLL
win32:INCLUDEPATH += .
# extra link options
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 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
win32:TMAKE_LIBS_QT =
unix:LIBS = -L../../lib -ldoxycfg
/******************************************************************************
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <qmainwindow.h>
#include <qpopupmenu.h>
#include <qfileinfo.h>
#include <qmenubar.h>
#include <qstatusbar.h>
#include <qfiledialog.h>
#include <qmessagebox.h>
#include <qapplication.h>
#include <qwhatsthis.h>
#include <qlayout.h>
#include <qtabwidget.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include "doxywizard.h"
#include "pagewidget.h"
#include "inputbool.h"
#include "inputstring.h"
#include "inputstrlist.h"
#include "inputint.h"
#include "config.h"
#include "version.h"
#include "pixmaps.h"
QString configFileName;
const int messageTimeout = 4000; //!< status bar message timeout in millisec.
//-------------------------------------------------------------------------
static bool loadConfig( QString loadFile )
{
QFileInfo fi( loadFile );
if ( !fi.exists() )
{
QMessageBox::warning(0,
"Warning","Input file "+loadFile+
" does not exist! Starting new file.",
"ok"
);
return FALSE;
}
QFile f( loadFile );
if ( !f.open(IO_ReadOnly) )
{
QMessageBox::warning(0,
"Warning","Cannot open input "+loadFile+
" for reading!.",
"abort"
);
exit(1);
}
// set config values to their defaults
Config::init();
// read file into a string buffer
int fsize = fi.size();
QCString contents(fsize+1); // add room for \0 terminator
f.readBlock(contents.data(),fsize);
contents[fsize]='\0';
// parse the config file
// this will initialize the various Config data members
parseConfig(contents,loadFile);
configStrToVal();
f.close();
return TRUE;
}
static bool saveConfig( QString saveFile )
{
QFile f( saveFile );
if ( !f.open(IO_WriteOnly) )
{
QMessageBox::warning(0,
"Warning","Cannot open file "+saveFile+
" for writing. Nothing saved!.",
"ok"
);
return FALSE; // failure
}
writeTemplateConfig(&f,TRUE); // write brief config file
return TRUE; // success
}
//--------------------------------------------------------------------------
Wizard::Wizard(int argc,char **argv) :
QMainWindow( 0, (QCString)"DoxyWizard v"+versionString )
{
// File popupmenu
hasChanged=FALSE;
fileTools = new QToolBar( this, "file operations" );
fileTools->setLabel( "File Operations" );
new QToolButton( QPixmap( file_xpm ), "New File", QString::null,
this, SLOT(newFile()), fileTools, "new file" );
//QToolButton * fileOpen =
new QToolButton( QPixmap( fileopen_xpm ), "Open File", QString::null,
this, SLOT(loadFile()), fileTools, "open file" );
//QToolButton * fileSave =
new QToolButton( QPixmap( filesave_xpm ), "Save File", QString::null,
this, SLOT(saveFile()), fileTools, "save file" );
//Micha: QToolButton * =
new QToolButton( QPixmap( rundoxygen_xpm ), "Save and Run doxygen", QString::null,
this, SLOT(runDoxygen()), fileTools, "save and run doxygen" );
QWhatsThis::whatsThisButton( fileTools );
QPopupMenu* file = new QPopupMenu;
file->insertItem( QIconSet(QPixmap(file_xpm)),
"&New", this, SLOT(newFile()), CTRL+Key_N );
file->insertItem( QIconSet(QPixmap(fileopen_xpm)),
"&Load", this, SLOT(loadFile()), CTRL+Key_O );
file->insertSeparator();
file->insertItem( QIconSet(QPixmap(filesave_xpm)),
"&Save", this, SLOT(saveFile()), CTRL+Key_S );
file->insertItem( "&Save as ...", this, SLOT(saveAsFile()) );
file->insertSeparator();
file->insertItem( "&Quit", this, SLOT(quit()), CTRL+Key_Q );
// Doxygen popupmenu
QPopupMenu* doxygen = new QPopupMenu;
int itemIndex = doxygen->insertItem( QIconSet(QPixmap(rundoxygen_xpm)),
"&Run", this, SLOT(runDoxygen()), CTRL+Key_R );
doxygen->setWhatsThis ( itemIndex, "Run doxygen with the current configuration file..." );
// Help popupmenu
QPopupMenu* help = new QPopupMenu;
help->insertItem( "&About", this, SLOT(about()), Key_F1 );
help->insertItem( "What's &This", this , SLOT(whatsThis()), SHIFT+Key_F1);
// menubar definition
menuBar()->insertItem( "&File", file );
menuBar()->insertItem( "&Doxygen", doxygen );
menuBar()->insertSeparator();
menuBar()->insertItem( "&Help", help );
statusBar()->message("Welcome to DoxyWizard",messageTimeout);
cw = new ConfigFile( this );
connect(cw,SIGNAL(changed()),this,SLOT(changed()));
setCentralWidget( cw );
cw->show();
if (argc==2)
{
loadFile(argv[1]);
}
else
{
newFile();
}
refreshCaption();
resize( 640, 480 );
}
void Wizard::newFile()
{
if (hasChanged)
{
switch( QMessageBox::warning( this, "DoxyWizard", "Start a new file and lose changes?\n",
"Yes", "No", 0, 0, 1 ))
{
case 0:
break;
default: // command aborted by the user
return;
}
}
Config::init();
configFileName="Doxyfile";
cw->init();
}
void Wizard::loadFile(const char *fileName)
{
if (fileName==0)
{
configFileName = QFileDialog::getOpenFileName();
}
else
{
configFileName = fileName;
}
if ( !configFileName.isNull() )
{
//initData( configFileName );
loadConfig(configFileName);
cw->init();
statusBar()->message(configFileName, messageTimeout);
}
}
void Wizard::loadFile()
{
if (hasChanged)
{
switch( QMessageBox::warning(
this, "DoxyWizard", "Load a new file and lose changes?\n",
"Yes", "No", 0, 0, 1 ))
{
case 0:
break;
default: // command aborted by the user
return;
}
}
loadFile(0);
}
void Wizard::saveFile()
{
//printf("configFileName=`%s'\n",configFileName.data());
if (configFileName.isEmpty())
{
saveAsFile();
return;
}
else
{
saveConfig(configFileName);
statusBar()->message(configFileName + " saved", messageTimeout);
}
hasChanged = FALSE;
refreshCaption();
}
void Wizard::saveAsFile()
{
configFileName = QFileDialog::getSaveFileName();
if (configFileName.isNull())
{
statusBar()->message("Save aborted", messageTimeout );
return; // operation cancelled by the user
}
saveConfig(configFileName);
statusBar()->message("Saved as "+ configFileName, messageTimeout );
}
//Micha
void Wizard::runDoxygen()
{
saveFile();
QString s = "doxygen " + configFileName;
system((const char*)s);
statusBar()->message("doxygen completed: "+ configFileName, messageTimeout );
hasChanged = FALSE;
refreshCaption();
}
void Wizard::quit()
{
if (hasChanged)
{
switch( QMessageBox::warning( this, "DoxyWizard", "Quit and lose changes?\n",
"Yes", "No", 0, 0, 1 ))
{
case 0:
qApp->quit();
break;
case 1:
break;
}
}
else
{
qApp->quit();
}
}
void Wizard::changed()
{
hasChanged = TRUE;
refreshCaption();
}
void Wizard::refreshCaption()
{
QString s;
if (hasChanged) s=" *";
setCaption("Doxywizard - ["+configFileName+s+"]");
}
void Wizard::about()
{
QMessageBox::about(this, "DoxyWizard",
"<qt><center>A tool to create and edit configuration files "
"that can be read by doxygen.</center><p>"
"<center>Written by Dimitri van Heesch</center><p>"
"<center>(c) 2000</center></qt>"
);
}
//----------------------------------------------------------------------
ConfigFile::ConfigFile( QWidget *parent ) : QWidget( parent )
{
QVBoxLayout *layout = new QVBoxLayout( this );
// QTabWidget definition
QTabWidget *tab = new QTabWidget( this );
layout->addWidget( tab );
#CONFIG Widgets0
#CONFIG Widgets1
}
ConfigFile::~ConfigFile()
{
}
#CONFIG WidgetSlotImpl
void ConfigFile::init()
{
#CONFIG WidgetInit
}
//----------------------------------------------------------------------
int main(int argc,char **argv)
{
QApplication::setColorSpec( QApplication::NormalColor );
QApplication app(argc,argv);
Wizard wizard(argc,argv);
app.setMainWidget( &wizard );
wizard.show();
return app.exec();
}
...@@ -31,6 +31,6 @@ clean: ...@@ -31,6 +31,6 @@ clean:
language: language.doc language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl
$(PERL) translator.pl $(ENV) VERSION=$(VERSION) DOXYGEN_DOCDIR=. $(PERL) translator.pl
FORCE: FORCE:
...@@ -31,6 +31,6 @@ clean: ...@@ -31,6 +31,6 @@ clean:
language: language.doc language: language.doc
language.doc: maintainers.txt language.tpl translator.pl language.doc: maintainers.txt language.tpl translator.pl
$(PERL) translator.pl set DOXYGEN_DOCDIR=. & set VERSION=$(VERSION) & $(PERL) translator.pl
FORCE: FORCE:
...@@ -31,6 +31,8 @@ clean: ...@@ -31,6 +31,8 @@ clean:
language: language.doc language: language.doc
language.doc: maintainers.txt language.tpl translator.pl language.doc: maintainers.txt language.tpl translator.pl
set DOXYGEN_DOCDIR=.
set VERSION=$(VERSION)
$(PERL) translator.pl $(PERL) translator.pl
FORCE: FORCE:
...@@ -210,9 +210,6 @@ generator -> gen ...@@ -210,9 +210,6 @@ generator -> gen
At the time I was looking into lex and yacc, where a lot of things start with 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. "yy", so the "y" slipped in and made things pronouncable.
I realized later that doxygen could also be read as Dimitri's oxygen,
which could be seen as something I need to live :-)
</ol> </ol>
\htmlonly \htmlonly
......
...@@ -24,20 +24,19 @@ ...@@ -24,20 +24,19 @@
Doxygen has built-in support for multiple languages. This means Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
<p>
Currently (version unknown), 23 languages Currently (version 1.2.8-20010723), 24 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish, Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German, Dutch, English, Finnish, French, German,
Hungarian, Italian, Japanese, Korean, Norwegian, Hungarian, Italian, Japanese, Korean, Norwegian,
Polish, Portuguese, Romanian, Russian, Slovak, Polish, Portuguese, Romanian, Russian, Slovak,
Slovene, Spanish, and Swedish. Slovene, Spanish, Swedish, and Ukrainian.
The table of information related to the supported languages follows. The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column It is sorted by language alphabetically. The <b>Status</b> column
was generated from sources and shows approximately the last version was generated from sources and shows approximately the last version
when the translator was updated. when the translator was updated.
<p>
\htmlonly \htmlonly
<TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0> <TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0>
...@@ -151,7 +150,7 @@ when the translator was updated. ...@@ -151,7 +150,7 @@ when the translator was updated.
<TD>Portuguese</TD> <TD>Portuguese</TD>
<TD>Rui Godinho Lopes</TD> <TD>Rui Godinho Lopes</TD>
<TD>ruiglopes@NOSPAM.yahoo.com</TD> <TD>ruiglopes@NOSPAM.yahoo.com</TD>
<TD>1.1.5</TD> <TD>up-to-date</TD>
</TR> </TR>
<TR BGCOLOR="#ffffff"> <TR BGCOLOR="#ffffff">
<TD>Romanian</TD> <TD>Romanian</TD>
...@@ -189,6 +188,12 @@ when the translator was updated. ...@@ -189,6 +188,12 @@ when the translator was updated.
<TD>sahag96@NOSPAM.nts.mh.se<br>xet@NOSPAM.hem.passagen.se</TD> <TD>sahag96@NOSPAM.nts.mh.se<br>xet@NOSPAM.hem.passagen.se</TD>
<TD>1.0.0</TD> <TD>1.0.0</TD>
</TR> </TR>
<TR BGCOLOR="#ffffff">
<TD>Ukrainian</TD>
<TD>Olexij Tkatchenko</TD>
<TD>olexij.tkatchenko@NOSPAM.gmx.de</TD>
<TD>up-to-date</TD>
</TR>
</TABLE> </TABLE>
</TD> </TD>
</TR> </TR>
...@@ -235,7 +240,7 @@ when the translator was updated. ...@@ -235,7 +240,7 @@ when the translator was updated.
\hline \hline
Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\ Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\
\hline \hline
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.1.5 \\ Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\
\hline \hline
Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\ Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\
\hline \hline
...@@ -250,19 +255,19 @@ when the translator was updated. ...@@ -250,19 +255,19 @@ when the translator was updated.
Swedish & Samuel H\"{a}agglund & {\tt sahag96@nts.mh.se} & 1.0.0 \\ Swedish & Samuel H\"{a}agglund & {\tt sahag96@nts.mh.se} & 1.0.0 \\
& XeT Erixon & {\tt xet@hem.passagen.se} & \\ & XeT Erixon & {\tt xet@hem.passagen.se} & \\
\hline \hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & up-to-date \\
\hline
\end{tabular} \end{tabular}
\endlatexonly \endlatexonly
Have a look at <a href="../doc/translator_report.txt"
><code>doxygen/doc/translator_report.txt</code></a> for more details.
<p>
Most people on the list have indicated that they were also busy Most people on the list have indicated that they were also busy
doing other things, so if you want to help to speed things up please doing other things, so if you want to help to speed things up please
let them (or me) know. let them (or me) know.
If you want to add support for a language that is not yet listed If you want to add support for a language that is not yet listed
please see the next section. please read the next section.
<h3>Adding a new language to doxygen</h3> <h3>Adding a new language to doxygen</h3>
...@@ -306,9 +311,9 @@ Just follow these steps: ...@@ -306,9 +311,9 @@ Just follow these steps:
To enter special characters (with accents) you can: To enter special characters (with accents) you can:
<ul> <ul>
<li> Enter them directly if your keyboard supports that and you are <li> Enter them directly if your keyboard supports that and you are
using a Latin-1 font. using a Latin-1 font. Doxygen will translate the
Doxygen will translate the characters to proper LateX and characters to proper \f$\mbox{\LaTeX}\f$ and leave the
leave the Html and man output for what it is (which is fine, if HTML and man output for what it is (which is fine, if
idLanguageCharset() is set correctly). idLanguageCharset() is set correctly).
<li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;). <li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;).
See the HTML specification for the codes. See the HTML specification for the codes.
...@@ -451,17 +456,23 @@ the minimal number of translator adapter classes. ...@@ -451,17 +456,23 @@ the minimal number of translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b> <b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl for the supported languages, the \c translator.pl perl
script was developed (located in \c doxygen/doc directory). script was developed (located in \c doxygen/doc directory).
It is able to extract the important information about obsolete and It extracts the important information about obsolete and
new methods from the source files for each of the languages -- see new methods from the source files for each of the languages.
the reference to the <em>translator report</em> ASCII file below The information is stored in the <em>translator report</em> ASCII file
the table of supported languages shown earlier. Looking at the base (<code>doxygen/doc/translator_report.txt</code>). \htmlonly If you compiled this documentation
class of the language translator, the script guesses also the status from sources and if you have also doxygen sources available the
of the translator -- see the last column of the mentioned table. link <a href="../doc/translator_report.txt">
The \c translator.pl is called automatically when the doxygen <code>doxygen/doc/translator_report.txt</code></a> should be valid.\endhtmlonly
documentation is generated. You can also run the script manualy
whenever you feel that it can help you. Of course, you are not Looking at the base class of the language translator, the script
forced to use the results of the script. You can find the same guesses also the status of the translator -- see the last column of
information by looking at the adapter class and its base classes. the table with languages above. The \c translator.pl is called
automatically when the doxygen documentation is generated. You can
also run the script manualy whenever you feel that it can help you.
Of course, you are not forced to use the results of the script. You
can find the same information by looking at the adapter class and
its base classes.
<b>How should I update my language translator?</b> Firstly, you <b>How should I update my language translator?</b> Firstly, you
should be the language maintainer, or you should let him/her know should be the language maintainer, or you should let him/her know
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Doxygen has built-in support for multiple languages. This means Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
<p>
Currently (version $version), $numlang languages Currently (version $version), $numlang languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
$languages. $languages.
...@@ -31,17 +31,16 @@ The table of information related to the supported languages follows. ...@@ -31,17 +31,16 @@ The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column It is sorted by language alphabetically. The <b>Status</b> column
was generated from sources and shows approximately the last version was generated from sources and shows approximately the last version
when the translator was updated. when the translator was updated.
<p>
$information_table $information_table
<p>
Most people on the list have indicated that they were also busy Most people on the list have indicated that they were also busy
doing other things, so if you want to help to speed things up please doing other things, so if you want to help to speed things up please
let them (or me) know. let them (or me) know.
If you want to add support for a language that is not yet listed If you want to add support for a language that is not yet listed
please see the next section. please read the next section.
<h3>Adding a new language to doxygen</h3> <h3>Adding a new language to doxygen</h3>
...@@ -85,9 +84,9 @@ Just follow these steps: ...@@ -85,9 +84,9 @@ Just follow these steps:
To enter special characters (with accents) you can: To enter special characters (with accents) you can:
<ul> <ul>
<li> Enter them directly if your keyboard supports that and you are <li> Enter them directly if your keyboard supports that and you are
using a Latin-1 font. using a Latin-1 font. Doxygen will translate the
Doxygen will translate the characters to proper LateX and characters to proper \f$\mbox{\LaTeX}\f$ and leave the
leave the Html and man output for what it is (which is fine, if HTML and man output for what it is (which is fine, if
idLanguageCharset() is set correctly). idLanguageCharset() is set correctly).
<li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;). <li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;).
See the HTML specification for the codes. See the HTML specification for the codes.
...@@ -230,17 +229,22 @@ the minimal number of translator adapter classes. ...@@ -230,17 +229,22 @@ the minimal number of translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b> <b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl for the supported languages, the \c translator.pl perl
script was developed (located in \c doxygen/doc directory). script was developed (located in \c doxygen/doc directory).
It is able to extract the important information about obsolete and It extracts the important information about obsolete and
new methods from the source files for each of the languages -- see new methods from the source files for each of the languages.
the reference to the <em>translator report</em> ASCII file below The information is stored in the <em>translator report</em> ASCII file
the table of supported languages shown earlier. Looking at the base ($translator_report_file_name). \htmlonly If you compiled this documentation
class of the language translator, the script guesses also the status from sources and if you have also doxygen sources available the
of the translator -- see the last column of the mentioned table. link $translator_report_link should be valid.\endhtmlonly
The \c translator.pl is called automatically when the doxygen
documentation is generated. You can also run the script manualy Looking at the base class of the language translator, the script
whenever you feel that it can help you. Of course, you are not guesses also the status of the translator -- see the last column of
forced to use the results of the script. You can find the same the table with languages above. The \c translator.pl is called
information by looking at the adapter class and its base classes. automatically when the doxygen documentation is generated. You can
also run the script manualy whenever you feel that it can help you.
Of course, you are not forced to use the results of the script. You
can find the same information by looking at the adapter class and
its base classes.
<b>How should I update my language translator?</b> Firstly, you <b>How should I update my language translator?</b> Firstly, you
should be the language maintainer, or you should let him/her know should be the language maintainer, or you should let him/her know
......
...@@ -74,3 +74,5 @@ Swedish ...@@ -74,3 +74,5 @@ Swedish
Samuel H&auml;agglund: sahag96@nts.mh.se Samuel H&auml;agglund: sahag96@nts.mh.se
XeT Erixon: xet@hem.passagen.se XeT Erixon: xet@hem.passagen.se
Ukrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de
...@@ -41,9 +41,23 @@ ...@@ -41,9 +41,23 @@
# 2001/06/11 # 2001/06/11
# - Character entity &ccaron; recognized in maintainers.txt. # - Character entity &ccaron; recognized in maintainers.txt.
# #
# 2001/07/17
# - Perl version checking is less confusing now. The script stops
# immediately after the first command below when your perl
# is older that required.
# - The information below the table of languages is not produced
# with the table. Another symbol replacement is done, so language.tpl
# can be updated so that the generated language.doc does not contain
# the link to the translator_report.txt.
#
# Todo:
# -----
# - Something changed. The environment variables like VERSION,
# DOXYGEN_DOCDIR are not set now when make is run.
#
################################################################ ################################################################
require 5.005; use 5.005;
use strict; use strict;
use Carp; use Carp;
...@@ -561,9 +575,9 @@ xxxTABLE_FOOTxxx ...@@ -561,9 +575,9 @@ xxxTABLE_FOOTxxx
##}}} ##}}}
# Finish the tables, and substitute the mark in the doc # Finish the tables, and substitute the mark in the doc
# template by the contatenation of the tables and the notice # template by the contatenation of the tables. Add NOSPAM to
# about $ftranslatortxt. Add NOSPAM to email addresses in the # email addresses in the HTML table. Replace the special
# HTML table. Replace the special character sequences. #{{{ # character sequences. #{{{
# #
$tableHTML .= $htmlTableFoot; $tableHTML .= $htmlTableFoot;
$tableLATEX .= $latexTableFoot; $tableLATEX .= $latexTableFoot;
...@@ -580,14 +594,21 @@ xxxTABLE_FOOTxxx ...@@ -580,14 +594,21 @@ xxxTABLE_FOOTxxx
$tableLATEX =~ s/&rcaron;/\\v{r}/sg; $tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/_/\\_/sg; $tableLATEX =~ s/_/\\_/sg;
my $notice = "\nHave a look at <a href=\"../doc/$ftranslatortxt\"\n>" $output =~ s{\$information_table}{$tableHTML$tableLATEX};
. "<code>doxygen/doc/$ftranslatortxt</code></a> "
. "for more details.";
$output =~ s{\$information_table}{$tableHTML$tableLATEX$notice}; ##}}}
# Replace the other symbols in the template by the expected
# information. ##{{{
#
$output =~ s{\$version}{$doxversion}; $output =~ s{\$version}{$doxversion};
$output =~ s{\$translator_report_file_name}
{<code>doxygen/doc/$ftranslatortxt</code>}x;
$output =~ s{\$translator_report_link}
{<a href=\"../doc/$ftranslatortxt\">
<code>doxygen/doc/$ftranslatortxt</code></a>}x;
##}}} ##}}}
# Replace the introduction notice in the output. #{{{ # Replace the introduction notice in the output. #{{{
...@@ -624,6 +645,13 @@ xxxTABLE_FOOTxxx ...@@ -624,6 +645,13 @@ xxxTABLE_FOOTxxx
$srcdir = "$doxygenrootdir/src"; $srcdir = "$doxygenrootdir/src";
=pod
# Show the environment variables (for debugging only).
#
foreach (sort keys %ENV) { print STDERR "$_=$ENV{$_}\n"; }
print STDERR "\n\n";
=cut
$doxversion = (defined $ENV{'VERSION'}) ? $ENV{'VERSION'} : 'unknown'; $doxversion = (defined $ENV{'VERSION'}) ? $ENV{'VERSION'} : 'unknown';
##}}} ##}}}
......
Doxygen supports the following (23) languages (sorted alphabetically):
Brazilian
Chinese
Croatian
Czech
Danish
Dutch
English
Finnish
French
German
Hungarian
Italian
Japanese
Korean
Norwegian
Polish
Portuguese
Romanian
Russian
Slovak
Slovene
Spanish
Swedish
----------------------------------------------------------------------
The following translator classes are up-to-date (sorted alphabetically).
This means that they derive from the Translator class. If the translator
derives from TranslatorAdapterCVS, it is considered to be almost up-to-date.
In other words, it is newer than the last official release. Anyway, there
still may be some details listed even for the up-to-date translators.
Please, check the text below.
TranslatorCroatian
TranslatorCzech
TranslatorDanish (TranslatorAdapterCVS)
TranslatorEnglish
TranslatorGerman
TranslatorItalian (TranslatorAdapterCVS)
TranslatorRussian
TranslatorSlovak (TranslatorAdapterCVS)
TranslatorSpanish (TranslatorAdapterCVS)
----------------------------------------------------------------------
The following translator classes are obsolete (sorted alphabetically).
This means that they derive from some of the adapter classes.
TranslatorBrazilian (TranslatorAdapter_1_2_6)
TranslatorChinese (TranslatorAdapter_1_2_1)
TranslatorDutch (TranslatorAdapter_1_2_6)
TranslatorFinnish (TranslatorAdapter_1_0_0)
TranslatorFrench (TranslatorAdapter_1_2_0)
TranslatorHungarian (TranslatorAdapter_1_2_1)
TranslatorJapanese (TranslatorAdapter_1_2_5)
TranslatorKorean (TranslatorAdapter_1_1_0)
TranslatorNorwegian (TranslatorAdapter_1_2_2)
TranslatorPolish (TranslatorAdapter_1_2_1)
TranslatorPortuguese (TranslatorAdapter_1_1_5)
TranslatorRomanian (TranslatorAdapter_1_2_1)
TranslatorSlovene (TranslatorAdapter_1_1_5)
TranslatorSwedish (TranslatorAdapter_1_0_0)
----------------------------------------------------------------------
Localized translators are expected to implement the following methods
(prototypes sorted aplhabetically):
QCString idLanguage()
QCString idLanguageCharset()
QCString latexLanguageSupportCommand()
QCString trAlphabeticalList()
QCString trAttention()
QCString trAuthor(bool first_capital, bool singular)
QCString trBug()
QCString trBugList()
QCString trBugsAndLimitations()
QCString trClass(bool first_capital, bool singular)
QCString trClassDiagram(const char *clName)
QCString trClassDocumentation()
QCString trClassHierarchy()
QCString trClassHierarchyDescription()
QCString trClasses()
QCString trCode()
QCString trCollaborationDiagram(const char *clName)
QCString trCompoundIndex()
QCString trCompoundList()
QCString trCompoundListDescription()
QCString trCompoundMembers()
QCString trCompoundMembersDescription(bool extractAll)
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trCompounds()
QCString trConstructorDocumentation()
QCString trDCOPMethods()
QCString trDate()
QCString trDefineDocumentation()
QCString trDefineValue()
QCString trDefinedAtLineInSourceFile()
QCString trDefinedIn()
QCString trDefinedInSourceFile()
QCString trDefines()
QCString trDeprecated()
QCString trDetailedDescription()
QCString trDocumentation()
QCString trEnumName()
QCString trEnumValue()
QCString trEnumerationTypeDocumentation()
QCString trEnumerationValueDocumentation()
QCString trEnumerationValues()
QCString trEnumerations()
QCString trExampleDocumentation()
QCString trExamples()
QCString trExamplesDescription()
QCString trExceptions()
QCString trField(bool first_capital, bool singular)
QCString trFile(bool first_capital, bool singular)
QCString trFileDocumentation()
QCString trFileIndex()
QCString trFileList()
QCString trFileListDescription(bool extractAll)
QCString trFileMembers()
QCString trFileMembersDescription(bool extractAll)
QCString trFileReference(const char *fileName)
QCString trForInternalUseOnly()
QCString trFriends()
QCString trFuncProtos()
QCString trFunctionDocumentation()
QCString trFunctionPrototypeDocumentation()
QCString trFunctions()
QCString trGeneratedAt(const char *date,const char *projName)
QCString trGeneratedAutomatically(const char *s)
QCString trGeneratedBy()
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)
QCString trGlobal(bool first_capital, bool singular)
QCString trGotoDocumentation()
QCString trGotoGraphicalHierarchy()
QCString trGotoSourceCode()
QCString trGotoTextualHierarchy()
QCString trGraphicalHierarchy()
QCString trGroup(bool first_capital, bool singular)
QCString trHeaderFiles()
QCString trHeaderFilesDescription()
QCString trHierarchicalIndex()
QCString trInclByDepGraph()
QCString trInclDepGraph(const char *fName)
QCString trIncludingInheritedMembers()
QCString trInheritedByList(int numEntries)
QCString trInheritsList(int numEntries)
QCString trInitialValue()
QCString trInterfaces()
QCString trInvariant()
QCString trLegend()
QCString trLegendDocs()
QCString trLegendTitle()
QCString trListOfAllMembers()
QCString trMainPage()
QCString trMember(bool first_capital, bool singular)
QCString trMemberDataDocumentation()
QCString trMemberEnumerationDocumentation()
QCString trMemberFunctionDocumentation()
QCString trMemberList()
QCString trMemberTypedefDocumentation()
QCString trModuleDocumentation()
QCString trModuleIndex()
QCString trModules()
QCString trModulesDescription()
QCString trMore()
QCString trNamespace(bool first_capital, bool singular)
QCString trNamespaceDocumentation()
QCString trNamespaceIndex()
QCString trNamespaceList()
QCString trNamespaceListDescription(bool extractAll)
QCString trNamespaceMemberDescription(bool extractAll)
QCString trNamespaceMembers()
QCString trNamespaceReference(const char *namespaceName)
QCString trNamespaces()
QCString trNoDescriptionAvailable()
QCString trNote()
QCString trPackage(const char *name)
QCString trPackageDocumentation()
QCString trPackageList()
QCString trPackageListDescription()
QCString trPackages()
QCString trPage(bool first_capital, bool singular)
QCString trPageAbbreviation()
QCString trPageDocumentation()
QCString trPageIndex()
QCString trParameters()
QCString trPostcondition()
QCString trPrecondition()
QCString trPrivateAttribs()
QCString trPrivateMembers()
QCString trPrivateSlots()
QCString trPrivateTypes()
QCString trProperties()
QCString trPropertyDocumentation()
QCString trProtectedAttribs()
QCString trProtectedMembers()
QCString trProtectedSlots()
QCString trProtectedTypes()
QCString trPublicAttribs()
QCString trPublicMembers()
QCString trPublicSlots()
QCString trPublicTypes()
QCString trRTFCharSet()
QCString trRTFGeneralIndex()
QCString trRTFansicp()
QCString trReferenceManual()
QCString trReferencedBy()
QCString trReimplementedForInternalReasons()
QCString trReimplementedFromList(int numEntries)
QCString trReimplementedInList(int numEntries)
QCString trRelatedFunctionDocumentation()
QCString trRelatedFunctions()
QCString trRelatedPages()
QCString trRelatedPagesDescription()
QCString trRelatedSubscript()
QCString trRemarks()
QCString trReturnValues()
QCString trReturns()
QCString trSearch()
QCString trSeeAlso()
QCString trSignals()
QCString trSince()
QCString trSources()
QCString trStaticPrivateAttribs()
QCString trStaticPrivateMembers()
QCString trStaticProtectedAttribs()
QCString trStaticProtectedMembers()
QCString trStaticPublicAttribs()
QCString trStaticPublicMembers()
QCString trTest()
QCString trTestList()
QCString trThisIsTheListOfAllMembers()
QCString trTodo()
QCString trTodoList()
QCString trTypedefDocumentation()
QCString trTypedefs()
QCString trVariableDocumentation()
QCString trVariables()
QCString trVersion()
QCString trWarning()
QCString trWriteList(int numEntries)
QCString trWrittenBy()
----------------------------------------------------------------------
Details related to specific translator classes follows.
Notice that the prototypes are recognized only when they
are the same as in the Translator class.
TranslatorBrazilian (TranslatorAdapter_1_2_6)
-------------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trFile(bool first_capital, bool singular)
QCString trGlobal(bool first_capital, bool singular)
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trClass(bool first_capital, bool singular)
QCString trRTFCharSet()
QCString trMember(bool first_capital, bool singular)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorChinese (TranslatorAdapter_1_2_1)
-----------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)
QCString trInterfaces()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool)
QCString trVerbatimText(const char *f)
TranslatorGerman (Translator)
----------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trPage(bool first_capital, bool singular)
QCString trFile(bool first_capital, bool singular)
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trNamespace(bool first_capital, bool singular)
QCString trClass(bool first_capital, bool singular)
QCString trMember(bool first_capital, bool singular)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString trAuthor(bool, bool singular)
QCString trClass(bool, bool singular)
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trField(bool, bool singular)
QCString trFile(bool, bool singular)
QCString trGroup(bool, bool singular)
QCString trMember(bool, bool singular)
QCString trNamespace(bool, bool singular)
QCString trPage(bool, bool singular)
TranslatorDanish (TranslatorAdapterCVS)
----------------
Missing methods (should be implemented):
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString trAuthor()
QCString trAuthors()
TranslatorSpanish (TranslatorAdapterCVS)
-----------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorFinnish (TranslatorAdapter_1_0_0)
-----------------
Missing methods (should be implemented):
QCString trGotoTextualHierarchy()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trSources()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trPrivateTypes()
QCString trDeprecated()
QCString trNote()
QCString trAlphabeticalList()
QCString trDefinedInSourceFile()
QCString trCode()
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trInitialValue()
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trDefinedAtLineInSourceFile()
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProtectedTypes()
QCString trTest()
QCString trConstructorDocumentation()
QCString trProtectedAttribs()
QCString trProperties()
QCString trReferencedBy()
QCString trPrecondition()
QCString trPrivateAttribs()
QCString trRemarks()
QCString trTodo()
QCString trBugList()
QCString trDCOPMethods()
QCString trStaticPublicAttribs()
QCString trMainPage()
QCString trGotoGraphicalHierarchy()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trPostcondition()
QCString trLegend()
QCString trPageAbbreviation()
QCString trPageIndex()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trCollaborationDiagram(const char *clName)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInvariant()
QCString trTodoList()
QCString trPublicTypes()
QCString idLanguageCharset()
QCString trAttention()
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)
QCString trInterfaces()
QCString trGotoSourceCode()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trNamespaces()
QCString trMember(bool first_capital, bool singular)
QCString trInclDepGraph(const char *fName)
QCString trDefineValue()
QCString trStaticProtectedAttribs()
QCString trInclByDepGraph()
QCString trReturnValues()
QCString trLegendTitle()
QCString trSince()
QCString trGotoDocumentation()
QCString trPublicAttribs()
QCString trLegendDocs()
QCString trStaticPrivateAttribs()
QCString trAuthor(bool first_capital, bool singular)
QCString trGraphicalHierarchy()
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trGeneratedFrom(const char *s,bool single)
QCString trVerbatimText(const char *f)
TranslatorFrench (TranslatorAdapter_1_2_0)
----------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trTest()
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInterfaces()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trIncludeFile()
QCString trVerbatimText(const char *f)
TranslatorCroatian (Translator)
------------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
Obsolete methods (should be removed):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
TranslatorHungarian (TranslatorAdapter_1_2_1)
-------------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInterfaces()
QCString trRTFCharSet()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorItalian (TranslatorAdapterCVS)
-----------------
Missing methods (should be implemented):
QCString trFile(bool first_capital, bool singular)
QCString trNamespace(bool first_capital, bool singular)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString trAuthor()
QCString trAuthors()
QCString trFile(bool first_capital, bool)
QCString trFiles()
QCString trNamespace(bool first_capital, bool)
QCString trVerbatimText(const char *f)
TranslatorJapanese (TranslatorAdapter_1_2_5)
------------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trBugList()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trClass(bool first_capital, bool singular)
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trMember(bool first_capital, bool singular)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool)
QCString trVerbatimText(const char *f)
TranslatorKorean (TranslatorAdapter_1_1_0)
----------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trPrivateTypes()
QCString trNote()
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProtectedTypes()
QCString trTest()
QCString trProtectedAttribs()
QCString trProperties()
QCString trReferencedBy()
QCString trPrivateAttribs()
QCString trRemarks()
QCString trTodo()
QCString trBugList()
QCString trDCOPMethods()
QCString trStaticPublicAttribs()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trLegend()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trTodoList()
QCString trPublicTypes()
QCString trAttention()
QCString trInterfaces()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trStaticProtectedAttribs()
QCString trInclByDepGraph()
QCString trLegendTitle()
QCString trSince()
QCString trPublicAttribs()
QCString trLegendDocs()
QCString trStaticPrivateAttribs()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorDutch (TranslatorAdapter_1_2_6)
---------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trFile(bool first_capital, bool singular)
QCString trGlobal(bool first_capital, bool singular)
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trClass(bool first_capital, bool singular)
QCString idLanguageCharset()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trMember(bool first_capital, bool singular)
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorNorwegian (TranslatorAdapter_1_2_2)
-------------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProperties()
QCString trBugList()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString idLanguageCharset()
QCString trInterfaces()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorPolish (TranslatorAdapter_1_2_1)
----------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString idLanguageCharset()
QCString trInterfaces()
QCString trRTFCharSet()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorPortuguese (TranslatorAdapter_1_1_5)
--------------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trTest()
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trLegend()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString idLanguageCharset()
QCString trInterfaces()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trLegendTitle()
QCString trLegendDocs()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trIncludeFile()
QCString trVerbatimText(const char *f)
TranslatorRomanian (TranslatorAdapter_1_2_1)
------------------
Missing methods (should be implemented):
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trNamespace(bool first_capital, bool singular)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInterfaces()
QCString trRTFCharSet()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorSwedish (TranslatorAdapter_1_0_0)
-----------------
Missing methods (should be implemented):
QCString trGotoTextualHierarchy()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trPrivateTypes()
QCString trDeprecated()
QCString trNote()
QCString trCode()
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trInitialValue()
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trProtectedTypes()
QCString trTest()
QCString trConstructorDocumentation()
QCString trProtectedAttribs()
QCString trProperties()
QCString trReferencedBy()
QCString trPrecondition()
QCString trPrivateAttribs()
QCString trRemarks()
QCString trTodo()
QCString trBugList()
QCString trDCOPMethods()
QCString trStaticPublicAttribs()
QCString trGotoGraphicalHierarchy()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trPostcondition()
QCString trLegend()
QCString trPageIndex()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trCollaborationDiagram(const char *clName)
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInvariant()
QCString trTodoList()
QCString trPublicTypes()
QCString idLanguageCharset()
QCString trAttention()
QCString trInterfaces()
QCString trGotoSourceCode()
QCString trRTFCharSet()
QCString latexLanguageSupportCommand()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trInclDepGraph(const char *fName)
QCString trDefineValue()
QCString trStaticProtectedAttribs()
QCString trInclByDepGraph()
QCString trLegendTitle()
QCString trSince()
QCString trGotoDocumentation()
QCString trPublicAttribs()
QCString trLegendDocs()
QCString trStaticPrivateAttribs()
QCString trAuthor(bool first_capital, bool singular)
QCString trGraphicalHierarchy()
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorSlovene (TranslatorAdapter_1_1_5)
-----------------
Missing methods (should be implemented):
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)
QCString trRTFGeneralIndex()
QCString trPage(bool first_capital, bool singular)
QCString trPackageListDescription()
QCString trFile(bool first_capital, bool singular)
QCString trBug()
QCString trGlobal(bool first_capital, bool singular)
QCString trPackageList()
QCString trField(bool first_capital, bool singular)
QCString trGroup(bool first_capital, bool singular)
QCString trPackage(const char *name)
QCString trTest()
QCString trProperties()
QCString trBugList()
QCString trDCOPMethods()
QCString trPackageDocumentation()
QCString trRTFansicp()
QCString trLegend()
QCString trNamespace(bool first_capital, bool singular)
QCString trTestList()
QCString trPropertyDocumentation()
QCString trClass(bool first_capital, bool singular)
QCString trInterfaces()
QCString trRTFCharSet()
QCString trPackages()
QCString trMember(bool first_capital, bool singular)
QCString trDefineValue()
QCString trLegendTitle()
QCString trLegendDocs()
QCString trAuthor(bool first_capital, bool singular)
QCString trClasses()
Obsolete methods (should be removed):
QCString latexBabelPackage()
QCString trAuthor()
QCString trAuthors()
QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool )
QCString trFiles()
QCString trVerbatimText(const char *f)
TranslatorSlovak (TranslatorAdapterCVS)
----------------
Missing methods (should be implemented):
QCString trAuthor(bool first_capital, bool singular)
Obsolete methods (should be removed):
QCString trAuthor()
QCString trAuthors()
QCString trFiles()
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<name>Test</name> <name>Test</name>
<filename>class_test.html</filename> <filename>class_test.html</filename>
<member kind="function"> <member kind="function">
<type>void</type>
<name>example</name> <name>example</name>
<anchor>a0</anchor> <anchor>a0</anchor>
<arglist>()</arglist> <arglist>()</arglist>
......
Name: doxygen Name: doxygen
Version: 1.2.8_20010715 Version: 1.2.8_20010723
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 3 Release: 3
Source: doxygen-%{version}.src.tar.gz Source: doxygen-%{version}.src.tar.gz
......
...@@ -127,15 +127,11 @@ QCString ClassDef::displayName() const ...@@ -127,15 +127,11 @@ QCString ClassDef::displayName() const
QCString n; QCString n;
if (Config_getBool("HIDE_SCOPE_NAMES")) if (Config_getBool("HIDE_SCOPE_NAMES"))
{ {
n=stripScope(name()); n=localName();
} }
else else
{ {
n=name(); n=qualifiedNameWithTemplateParameters();
}
if (m_tempArgs)
{
n+=tempArgListToString(m_tempArgs);
} }
return n; return n;
} }
...@@ -603,13 +599,48 @@ ArgumentList *ClassDef::outerTemplateArguments() const ...@@ -603,13 +599,48 @@ ArgumentList *ClassDef::outerTemplateArguments() const
return 0; return 0;
} }
static void searchTemplateSpecs(/*in*/ Definition *d,
/*out*/ QList<ArgumentList> &result,
/*out*/ QCString &name)
{
if (d->definitionType()==Definition::TypeClass)
{
if (d->getOuterScope())
{
searchTemplateSpecs(d->getOuterScope(),result,name);
}
ClassDef *cd=(ClassDef *)d;
if (!name.isEmpty()) name+="::";
name+=d->localName();
bool isSpecialization = d->localName().find('<')!=-1;
if (cd->templateArguments())
{
result.append(cd->templateArguments());
if (!isSpecialization)
{
name+=tempArgListToString(cd->templateArguments());
}
}
}
else
{
name+=d->qualifiedName();
}
}
static void writeTemplateSpec(OutputList &ol,ArgumentList *al, static void writeTemplateSpec(OutputList &ol,Definition *d,
const QCString &pageType,const QCString &name) const QCString &type)
{ {
if (al) // class is a template QList<ArgumentList> specs;
QCString name;
searchTemplateSpecs(d,specs,name);
if (specs.count()>0) // class has template scope specifiers
{ {
ol.startSubsubsection(); ol.startSubsubsection();
QListIterator<ArgumentList> spi(specs);
ArgumentList *al;
for (spi.toFirst();(al=spi.current());++spi)
{
ol.docify("template<"); ol.docify("template<");
Argument *a=al->first(); Argument *a=al->first();
while (a) while (a)
...@@ -628,7 +659,10 @@ static void writeTemplateSpec(OutputList &ol,ArgumentList *al, ...@@ -628,7 +659,10 @@ static void writeTemplateSpec(OutputList &ol,ArgumentList *al,
a=al->next(); a=al->next();
if (a) ol.docify(", "); if (a) ol.docify(", ");
} }
ol.docify("> "+pageType.lower()+" "+name); ol.docify(">");
ol.lineBreak();
}
ol.docify(type.lower()+" "+name);
ol.endSubsubsection(); ol.endSubsubsection();
ol.writeString("\n"); ol.writeString("\n");
} }
...@@ -735,7 +769,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -735,7 +769,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("CLASS_DIAGRAMS")) ol.disableAllBut(OutputGenerator::Man); if (Config_getBool("CLASS_DIAGRAMS")) ol.disableAllBut(OutputGenerator::Man);
// write subclasses // write super classes
int count; int count;
if ((count=m_inherits->count())>0) if ((count=m_inherits->count())>0)
{ {
...@@ -1005,7 +1039,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1005,7 +1039,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endGroupHeader(); ol.endGroupHeader();
ol.startTextBlock(); ol.startTextBlock();
writeTemplateSpec(ol,outerTempArgList,pageType,name()); writeTemplateSpec(ol,this,pageType);
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
...@@ -1046,9 +1080,11 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1046,9 +1080,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
else else
{ {
writeTemplateSpec(ol,outerTempArgList,pageType,name()); writeTemplateSpec(ol,this,pageType);
} }
typedefMembers.writeDocumentation(ol,name(),this, typedefMembers.writeDocumentation(ol,name(),this,
theTranslator->trMemberTypedefDocumentation()); theTranslator->trMemberTypedefDocumentation());
...@@ -1140,6 +1176,20 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1140,6 +1176,20 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
endFile(ol); endFile(ol);
// write inner classes after the parent, so the tag files contain
// the definition in proper order!
if (m_innerClasses)
{
ClassSDict::Iterator cli(*m_innerClasses);
ClassDef *innerCd;
for (cli.toFirst();(innerCd=cli.current());++cli)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
}
}
} }
// write the list of all (inherited) members for this class // write the list of all (inherited) members for this class
...@@ -2062,6 +2112,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, ...@@ -2062,6 +2112,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
//templateClass->setBriefDescription(briefDescription()); //templateClass->setBriefDescription(briefDescription());
//templateClass->setDocumentation(documentation()); //templateClass->setDocumentation(documentation());
templateClass->setTemplateMaster(this); templateClass->setTemplateMaster(this);
templateClass->setOuterScope(getOuterScope());
m_templateInstances->insert(templSpec,templateClass); m_templateInstances->insert(templSpec,templateClass);
freshInstance=TRUE; freshInstance=TRUE;
} }
...@@ -2149,3 +2200,64 @@ QCString ClassDef::getReference() const ...@@ -2149,3 +2200,64 @@ QCString ClassDef::getReference() const
} }
} }
void ClassDef::getTemplateParameterLists(QList<ArgumentList> &lists) const
{
Definition *d=getOuterScope();
if (d)
{
if (d->definitionType()==Definition::TypeClass)
{
ClassDef *cd=(ClassDef *)d;
cd->getTemplateParameterLists(lists);
}
}
if (templateArguments())
{
lists.append(templateArguments());
}
}
QCString ClassDef::qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams) const
{
QCString scName;
Definition *d=getOuterScope();
if (d)
{
if (d->definitionType()==Definition::TypeClass)
{
ClassDef *cd=(ClassDef *)d;
scName = cd->qualifiedNameWithTemplateParameters(actualParams);
}
else
{
scName = d->qualifiedName();
}
}
if (!scName.isEmpty()) scName+="::";
scName+=localName();
ArgumentList *al=0;
bool isSpecialization = localName().find('<')!=-1;
if (templateArguments())
{
if (actualParams && (al=actualParams->current()))
{
if (!isSpecialization)
{
scName+=tempArgListToString(al);
}
actualParams->next();
}
else
{
if (!isSpecialization)
{
scName+=tempArgListToString(templateArguments());
}
}
}
//printf("scope=%s qualifiedName=%s\n",name().data(),scName.data());
return scName;
}
...@@ -184,6 +184,16 @@ class ClassDef : public Definition ...@@ -184,6 +184,16 @@ class ClassDef : public Definition
*/ */
virtual Definition *findInnerCompound(const char *name); virtual Definition *findInnerCompound(const char *name);
/*! Returns the template parameter lists that form the template
* declaration of this class.
*
* Example: <code>template<class T> class TC {};</code>
* will return a list with one ArgumentList containing one argument
* with type="class" and name="T".
*/
void getTemplateParameterLists(QList<ArgumentList> &lists) const;
QCString qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams=0) const;
/* member lists by protection */ /* member lists by protection */
MemberList pubMembers; MemberList pubMembers;
......
...@@ -307,6 +307,7 @@ class ConfigBool : public ConfigOption ...@@ -307,6 +307,7 @@ class ConfigBool : public ConfigOption
QCString m_valueString; QCString m_valueString;
}; };
// some convenience macros
#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val) #define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val) #define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
#define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val) #define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val)
...@@ -319,6 +320,10 @@ class ConfigBool : public ConfigOption ...@@ -319,6 +320,10 @@ class ConfigBool : public ConfigOption
* read from a user-supplied configuration file. * read from a user-supplied configuration file.
* The static member instance() can be used to get * The static member instance() can be used to get
* a pointer to the one and only instance. * a pointer to the one and only instance.
*
* Set all variables to their default values by
* calling Config::instance()->init()
*
*/ */
class Config class Config
{ {
...@@ -479,11 +484,34 @@ class Config ...@@ -479,11 +484,34 @@ class Config
// internal API // internal API
///////////////////////////// /////////////////////////////
/*! Converts the string values read from the configuration file
* to real values for non-string type options (like int, and bools)
*/
void convertStrToVal(); void convertStrToVal();
/*! Replaces references to environment variable by the actual value
* of the environment variable.
*/
void substituteEnvironmentVars(); void substituteEnvironmentVars();
/*! Checks if the values of the variable are correct, adjusts them
* if needed, and report any errors.
*/
void check(); void check();
/*! Initialize config variables to their default value */
void init(); void init();
void parse(const QCString &config,const char *fn);
/*! Parse a configuration file with name \a fn.
* \returns TRUE if successful, FALSE if the file could not be
* opened or read.
*/
bool parse(const char *fn);
/*! Called from the constructor, will add doxygen's default options
* to the configuration object
*/
void create();
protected: protected:
Config() Config()
{ {
...@@ -498,7 +526,6 @@ class Config ...@@ -498,7 +526,6 @@ class Config
delete m_options; delete m_options;
delete m_dict; delete m_dict;
} }
void create();
private: private:
QList<ConfigOption> *m_options; QList<ConfigOption> *m_options;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
//#include <iostream.h> //#include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <stdarg.h>
#include <qfileinfo.h> #include <qfileinfo.h>
#include <qdir.h> #include <qdir.h>
...@@ -32,32 +33,33 @@ ...@@ -32,32 +33,33 @@
#include "config.h" #include "config.h"
#include "version.h" #include "version.h"
#ifdef DOXYWIZARD #undef Config_getString
#include <stdarg.h> #undef Config_getInt
void err(const char *fmt, ...) #undef Config_getList
#undef Config_getEnum
#undef Config_getBool
// use in-class definitions
#define Config_getString(val) getString(__FILE__,__LINE__,val)
#define Config_getInt(val) getInt(__FILE__,__LINE__,val)
#define Config_getList(val) getList(__FILE__,__LINE__,val)
#define Config_getEnum(val) getEnum(__FILE__,__LINE__,val)
#define Config_getBool(val) getBool(__FILE__,__LINE__,val)
void config_err(const char *fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
vfprintf(stderr, fmt, args); vfprintf(stderr, fmt, args);
va_end(args); va_end(args);
} }
void warn_cont(const char *fmt, ...) void config_warn(const char *fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
vfprintf(stderr, fmt, args); vfprintf(stderr, fmt, args);
va_end(args); va_end(args);
} }
void initWarningFormat()
{
}
#else
#include "doxygen.h"
#include "message.h"
#include "pre.h"
#include "version.h"
#include "language.h"
#endif
#define MAX_INCLUDE_DEPTH 10 #define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
...@@ -142,7 +144,7 @@ void ConfigInt::convertStrToVal() ...@@ -142,7 +144,7 @@ void ConfigInt::convertStrToVal()
int val = m_valueString.toInt(&ok); int val = m_valueString.toInt(&ok);
if (!ok || val<m_minVal || val>m_maxVal) if (!ok || val<m_minVal || val>m_maxVal)
{ {
warn_cont("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" config_warn("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n"
"Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value); "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value);
} }
m_value=val; m_value=val;
...@@ -164,7 +166,7 @@ void ConfigBool::convertStrToVal() ...@@ -164,7 +166,7 @@ void ConfigBool::convertStrToVal()
} }
else else
{ {
warn_cont("Warning: argument `%s' for option %s is not a valid boolean value\n" config_warn("Warning: argument `%s' for option %s is not a valid boolean value\n"
"Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO"); "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO");
} }
} }
...@@ -175,12 +177,12 @@ QCString &Config::getString(const char *fileName,int num,const char *name) const ...@@ -175,12 +177,12 @@ QCString &Config::getString(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name); ConfigOption *opt = m_dict->find(name);
if (opt==0) if (opt==0)
{ {
err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1); exit(1);
} }
else if (opt->kind()!=ConfigOption::O_String) else if (opt->kind()!=ConfigOption::O_String)
{ {
err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
exit(1); exit(1);
} }
return *((ConfigString *)opt)->valueRef(); return *((ConfigString *)opt)->valueRef();
...@@ -191,12 +193,12 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const ...@@ -191,12 +193,12 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name); ConfigOption *opt = m_dict->find(name);
if (opt==0) if (opt==0)
{ {
err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1); exit(1);
} }
else if (opt->kind()!=ConfigOption::O_List) else if (opt->kind()!=ConfigOption::O_List)
{ {
err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); config_err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
exit(1); exit(1);
} }
return *((ConfigList *)opt)->valueRef(); return *((ConfigList *)opt)->valueRef();
...@@ -207,12 +209,12 @@ QCString &Config::getEnum(const char *fileName,int num,const char *name) const ...@@ -207,12 +209,12 @@ QCString &Config::getEnum(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name); ConfigOption *opt = m_dict->find(name);
if (opt==0) if (opt==0)
{ {
err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1); exit(1);
} }
else if (opt->kind()!=ConfigOption::O_Enum) else if (opt->kind()!=ConfigOption::O_Enum)
{ {
err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
exit(1); exit(1);
} }
return *((ConfigEnum *)opt)->valueRef(); return *((ConfigEnum *)opt)->valueRef();
...@@ -223,12 +225,12 @@ int &Config::getInt(const char *fileName,int num,const char *name) const ...@@ -223,12 +225,12 @@ int &Config::getInt(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name); ConfigOption *opt = m_dict->find(name);
if (opt==0) if (opt==0)
{ {
err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1); exit(1);
} }
else if (opt->kind()!=ConfigOption::O_Int) else if (opt->kind()!=ConfigOption::O_Int)
{ {
err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
exit(1); exit(1);
} }
return *((ConfigInt *)opt)->valueRef(); return *((ConfigInt *)opt)->valueRef();
...@@ -239,12 +241,12 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const ...@@ -239,12 +241,12 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const
ConfigOption *opt = m_dict->find(name); ConfigOption *opt = m_dict->find(name);
if (opt==0) if (opt==0)
{ {
err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1); exit(1);
} }
else if (opt->kind()!=ConfigOption::O_Bool) else if (opt->kind()!=ConfigOption::O_Bool)
{ {
err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
exit(1); exit(1);
} }
return *((ConfigBool *)opt)->valueRef(); return *((ConfigBool *)opt)->valueRef();
...@@ -322,7 +324,7 @@ static FILE *tryPath(const char *path,const char *fileName) ...@@ -322,7 +324,7 @@ static FILE *tryPath(const char *path,const char *fileName)
if (fi.exists() && fi.isFile()) if (fi.exists() && fi.isFile())
{ {
FILE *f=fopen(absName,"r"); FILE *f=fopen(absName,"r");
if (!f) err("Error: could not open file %s for reading\n",absName.data()); if (!f) config_err("Error: could not open file %s for reading\n",absName.data());
return f; return f;
} }
return 0; return 0;
...@@ -348,7 +350,7 @@ static FILE *findFile(const char *fileName) ...@@ -348,7 +350,7 @@ static FILE *findFile(const char *fileName)
static void readIncludeFile(const char *incName) static void readIncludeFile(const char *incName)
{ {
if (includeDepth==MAX_INCLUDE_DEPTH) { if (includeDepth==MAX_INCLUDE_DEPTH) {
err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n", config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName); MAX_INCLUDE_DEPTH,incName);
exit(1); exit(1);
} }
...@@ -389,7 +391,7 @@ static void readIncludeFile(const char *incName) ...@@ -389,7 +391,7 @@ static void readIncludeFile(const char *incName)
} }
else else
{ {
err("Error: @INCLUDE = %s: not found!\n",inc.data()); config_err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1); exit(1);
} }
} }
...@@ -418,7 +420,7 @@ static void readIncludeFile(const char *incName) ...@@ -418,7 +420,7 @@ static void readIncludeFile(const char *incName)
ConfigOption *option = config->get(cmd); ConfigOption *option = config->get(cmd);
if (option==0) // oops not known if (option==0) // oops not known
{ {
err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data()); yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid); BEGIN(SkipInvalid);
} }
...@@ -464,7 +466,7 @@ static void readIncludeFile(const char *incName) ...@@ -464,7 +466,7 @@ static void readIncludeFile(const char *incName)
ConfigOption *option = config->get(cmd); ConfigOption *option = config->get(cmd);
if (option==0) // oops not known if (option==0) // oops not known
{ {
err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data()); yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid); BEGIN(SkipInvalid);
} }
...@@ -485,7 +487,7 @@ static void readIncludeFile(const char *incName) ...@@ -485,7 +487,7 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_String: case ConfigOption::O_String:
case ConfigOption::O_Int: case ConfigOption::O_Int:
case ConfigOption::O_Bool: case ConfigOption::O_Bool:
err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data()); yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid); BEGIN(SkipInvalid);
break; break;
...@@ -521,7 +523,7 @@ static void readIncludeFile(const char *incName) ...@@ -521,7 +523,7 @@ static void readIncludeFile(const char *incName)
} }
} }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } <Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
yyLineNr++; yyLineNr++;
...@@ -553,7 +555,7 @@ static void readIncludeFile(const char *incName) ...@@ -553,7 +555,7 @@ static void readIncludeFile(const char *incName)
elemStr+=tmpString; elemStr+=tmpString;
if (*yytext=='\n') if (*yytext=='\n')
{ {
err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++; yyLineNr++;
} }
BEGIN(lastState); BEGIN(lastState);
...@@ -572,7 +574,7 @@ static void readIncludeFile(const char *incName) ...@@ -572,7 +574,7 @@ static void readIncludeFile(const char *incName)
else else
{ {
*b=FALSE; *b=FALSE;
warn_cont("Warning: Invalid value `%s' for " config_warn("Warning: Invalid value `%s' for "
"boolean tag in line %d, file %s; use YES or NO\n", "boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr,yyFileName.data()); bs.data(),yyLineNr,yyFileName.data());
} }
...@@ -639,11 +641,7 @@ static void writeStringList(QTextStream &t,QStrList &l) ...@@ -639,11 +641,7 @@ static void writeStringList(QTextStream &t,QStrList &l)
void Config::writeTemplate(QFile *f,bool sl,bool upd) void Config::writeTemplate(QFile *f,bool sl,bool upd)
{ {
QTextStream t(f); QTextStream t(f);
#ifdef DOXYWIZARD
t << "# Doxygen configuration generated by Doxywizard version " << versionString << endl;
#else
t << "# Doxyfile " << versionString << endl << endl; t << "# Doxyfile " << versionString << endl << endl;
#endif
if (!sl) if (!sl)
{ {
t << "# This file describes the settings to be used by the documentation system\n"; t << "# This file describes the settings to be used by the documentation system\n";
...@@ -814,7 +812,7 @@ void Config::check() ...@@ -814,7 +812,7 @@ void Config::check()
// projectName[0]=toupper(projectName[0]); // projectName[0]=toupper(projectName[0]);
//} //}
QCString &warnFormat = getString(__FILE__,__LINE__,"WARN_FORMAT"); QCString &warnFormat = Config_getString("WARN_FORMAT");
if (warnFormat.isEmpty()) if (warnFormat.isEmpty())
{ {
warnFormat="$file:$line $text"; warnFormat="$file:$line $text";
...@@ -823,23 +821,22 @@ void Config::check() ...@@ -823,23 +821,22 @@ void Config::check()
{ {
if (warnFormat.find("$file")==-1) if (warnFormat.find("$file")==-1)
{ {
err("Error: warning format does not contain a $file tag!\n"); config_err("Error: warning format does not contain a $file tag!\n");
exit(1); exit(1);
} }
if (warnFormat.find("$line")==-1) if (warnFormat.find("$line")==-1)
{ {
err("Error: warning format does not contain a $line tag!\n"); config_err("Error: warning format does not contain a $line tag!\n");
exit(1); exit(1);
} }
if (warnFormat.find("$text")==-1) if (warnFormat.find("$text")==-1)
{ {
err("Error: wanring format foes not contain a $text tag!\n"); config_err("Error: wanring format foes not contain a $text tag!\n");
exit(1); exit(1);
} }
} }
initWarningFormat();
QCString &manExtension = getString(__FILE__,__LINE__,"MAN_EXTENSION"); QCString &manExtension = Config_getString("MAN_EXTENSION");
// set default man page extension if non is given by the user // set default man page extension if non is given by the user
if (manExtension.isEmpty()) if (manExtension.isEmpty())
...@@ -847,7 +844,7 @@ void Config::check() ...@@ -847,7 +844,7 @@ void Config::check()
manExtension=".3"; manExtension=".3";
} }
QCString &paperType = getEnum(__FILE__,__LINE__,"PAPER_TYPE"); QCString &paperType = Config_getEnum("PAPER_TYPE");
paperType=paperType.lower().stripWhiteSpace(); paperType=paperType.lower().stripWhiteSpace();
if (paperType.isEmpty()) if (paperType.isEmpty())
{ {
...@@ -856,31 +853,18 @@ void Config::check() ...@@ -856,31 +853,18 @@ void Config::check()
if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" &&
paperType!="legal" && paperType!="executive") paperType!="legal" && paperType!="executive")
{ {
err("Error: Unknown page type specified"); config_err("Error: Unknown page type specified");
} }
QCString &outputLanguage=getEnum(__FILE__,__LINE__,"OUTPUT_LANGUAGE"); QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
outputLanguage=outputLanguage.stripWhiteSpace(); outputLanguage=outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty()) if (outputLanguage.isEmpty())
{ {
outputLanguage = "English"; outputLanguage = "English";
#ifndef DOXYWIZARD
setTranslator("English");
#endif
}
else
{
#ifndef DOXYWIZARD
if (!setTranslator(outputLanguage))
{
err("Error: Output language %s not supported! Using English instead.\n",
outputLanguage.data());
}
#endif
} }
// expand the relative stripFromPath values // expand the relative stripFromPath values
QStrList &stripFromPath = getList(__FILE__,__LINE__,"STRIP_FROM_PATH"); QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
char *sfp = stripFromPath.first(); char *sfp = stripFromPath.first();
while (sfp) while (sfp)
{ {
...@@ -903,57 +887,54 @@ void Config::check() ...@@ -903,57 +887,54 @@ void Config::check()
// Test to see if HTML header is valid // Test to see if HTML header is valid
QCString &headerFile = getString(__FILE__,__LINE__,"HTML_HEADER"); QCString &headerFile = Config_getString("HTML_HEADER");
if (!headerFile.isEmpty()) if (!headerFile.isEmpty())
{ {
QFileInfo fi(headerFile); QFileInfo fi(headerFile);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag HTML_HEADER: header file `%s' " config_err("Error: tag HTML_HEADER: header file `%s' "
"does not exist\n",headerFile.data()); "does not exist\n",headerFile.data());
exit(1); exit(1);
} }
} }
// Test to see if HTML footer is valid // Test to see if HTML footer is valid
QCString &footerFile = getString(__FILE__,__LINE__,"HTML_FOOTER"); QCString &footerFile = Config_getString("HTML_FOOTER");
if (!footerFile.isEmpty()) if (!footerFile.isEmpty())
{ {
QFileInfo fi(footerFile); QFileInfo fi(footerFile);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag HTML_FOOTER: footer file `%s' " config_err("Error: tag HTML_FOOTER: footer file `%s' "
"does not exist\n",footerFile.data()); "does not exist\n",footerFile.data());
exit(1); exit(1);
} }
} }
// Test to see if LaTeX header is valid // Test to see if LaTeX header is valid
QCString &latexHeaderFile = getString(__FILE__,__LINE__,"LATEX_HEADER"); QCString &latexHeaderFile = Config_getString("LATEX_HEADER");
if (!latexHeaderFile.isEmpty()) if (!latexHeaderFile.isEmpty())
{ {
QFileInfo fi(latexHeaderFile); QFileInfo fi(latexHeaderFile);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag LATEX_HEADER: header file `%s' " config_err("Error: tag LATEX_HEADER: header file `%s' "
"does not exist\n",latexHeaderFile.data()); "does not exist\n",latexHeaderFile.data());
exit(1); exit(1);
} }
} }
// check include path // check include path
QStrList &includePath = getList(__FILE__,__LINE__,"INCLUDE_PATH"); QStrList &includePath = Config_getList("INCLUDE_PATH");
char *s=includePath.first(); char *s=includePath.first();
while (s) while (s)
{ {
QFileInfo fi(s); QFileInfo fi(s);
if (!fi.exists()) err("Warning: tag INCLUDE_PATH: include path `%s' " if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' "
"does not exist\n",s); "does not exist\n",s);
#ifndef DOXYWIZARD
addSearchDir(fi.absFilePath());
#endif
s=includePath.next(); s=includePath.next();
} }
// check aliases // check aliases
QStrList &aliasList = getList(__FILE__,__LINE__,"ALIASES"); QStrList &aliasList = Config_getList("ALIASES");
s=aliasList.first(); s=aliasList.first();
while (s) while (s)
{ {
...@@ -962,13 +943,13 @@ void Config::check() ...@@ -962,13 +943,13 @@ void Config::check()
alias=alias.stripWhiteSpace(); alias=alias.stripWhiteSpace();
if (alias.find(re)!=0) if (alias.find(re)!=0)
{ {
err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data()); config_err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data());
} }
s=aliasList.next(); s=aliasList.next();
} }
// check dot path // check dot path
QCString &dotPath = getString(__FILE__,__LINE__,"DOT_PATH"); QCString &dotPath = Config_getString("DOT_PATH");
if (!dotPath.isEmpty()) if (!dotPath.isEmpty())
{ {
if (dotPath.find('\\')!=-1) if (dotPath.find('\\')!=-1)
...@@ -992,7 +973,7 @@ void Config::check() ...@@ -992,7 +973,7 @@ void Config::check()
#endif #endif
if (!dp.exists() || !dp.isFile()) if (!dp.exists() || !dp.isFile())
{ {
err("Warning: the dot tool could not be found at %s\n",dotPath.data()); config_err("Warning: the dot tool could not be found at %s\n",dotPath.data());
dotPath=""; dotPath="";
} }
else else
...@@ -1010,10 +991,10 @@ void Config::check() ...@@ -1010,10 +991,10 @@ void Config::check()
} }
// check input // check input
QStrList &inputSources=getList(__FILE__,__LINE__,"INPUT"); QStrList &inputSources=Config_getList("INPUT");
if (inputSources.count()==0) if (inputSources.count()==0)
{ {
err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
exit(1); exit(1);
} }
else else
...@@ -1024,7 +1005,7 @@ void Config::check() ...@@ -1024,7 +1005,7 @@ void Config::check()
QFileInfo fi(s); QFileInfo fi(s);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag INPUT: input source `%s' does not exist\n",s); config_err("Error: tag INPUT: input source `%s' does not exist\n",s);
exit(1); exit(1);
} }
s=inputSources.next(); s=inputSources.next();
...@@ -1032,94 +1013,94 @@ void Config::check() ...@@ -1032,94 +1013,94 @@ void Config::check()
} }
// add default pattern if needed // add default pattern if needed
QStrList &filePatternList = getList(__FILE__,__LINE__,"FILE_PATTERNS"); QStrList &filePatternList = Config_getList("FILE_PATTERNS");
if (filePatternList.isEmpty()) if (filePatternList.isEmpty())
{ {
filePatternList.append("*"); filePatternList.append("*");
} }
// add default pattern if needed // add default pattern if needed
QStrList &examplePatternList = getList(__FILE__,__LINE__,"EXAMPLE_PATTERNS"); QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS");
if (examplePatternList.isEmpty()) if (examplePatternList.isEmpty())
{ {
examplePatternList.append("*"); examplePatternList.append("*");
} }
// add default pattern if needed // add default pattern if needed
//QStrList &imagePatternList = getList(__FILE__,__LINE__,"IMAGE_PATTERNS"); //QStrList &imagePatternList = Config_getList("IMAGE_PATTERNS");
//if (imagePatternList.isEmpty()) //if (imagePatternList.isEmpty())
//{ //{
// imagePatternList.append("*"); // imagePatternList.append("*");
//} //}
// more checks needed if and only if the search engine is enabled. // more checks needed if and only if the search engine is enabled.
if (getBool(__FILE__,__LINE__,"SEARCHENGINE")) if (Config_getBool("SEARCHENGINE"))
{ {
// check cgi name // check cgi name
QCString &cgiName = getString(__FILE__,__LINE__,"CGI_NAME"); QCString &cgiName = Config_getString("CGI_NAME");
if (cgiName.isEmpty()) if (cgiName.isEmpty())
{ {
err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n"); config_err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
exit(1); exit(1);
} }
// check cgi URL // check cgi URL
QCString &cgiURL = getString(__FILE__,__LINE__,"CGI_URL"); QCString &cgiURL = Config_getString("CGI_URL");
if (cgiURL.isEmpty()) if (cgiURL.isEmpty())
{ {
err("Error: tag CGI_URL: no URL to cgi directory specified.\n"); config_err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1); exit(1);
} }
else if (cgiURL.left(7)!="http://" && else if (cgiURL.left(7)!="http://" &&
cgiURL.left(8)!="https://" cgiURL.left(8)!="https://"
) )
{ {
err("Error: tag CGI_URL: URL to cgi directory is invalid (must " config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http:// or https://).\n"); "start with http:// or https://).\n");
exit(1); exit(1);
} }
// check documentation URL // check documentation URL
QCString &docURL = getString(__FILE__,__LINE__,"DOC_URL"); QCString &docURL = Config_getString("DOC_URL");
if (docURL.isEmpty()) if (docURL.isEmpty())
{ {
docURL = getString(__FILE__,__LINE__,"OUTPUT_DIRECTORY").copy().prepend("file://").append("html"); docURL = Config_getString("OUTPUT_DIRECTORY").copy().prepend("file://").append("html");
} }
else if (docURL.left(7)!="http://" && else if (docURL.left(7)!="http://" &&
docURL.left(8)!="https://" && docURL.left(8)!="https://" &&
docURL.left(7)!="file://" docURL.left(7)!="file://"
) )
{ {
err("Error: tag DOC_URL: URL to documentation is invalid or " config_err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n"); "not absolute.\n");
exit(1); exit(1);
} }
// check absolute documentation path // check absolute documentation path
QCString &docAbsPath = getString(__FILE__,__LINE__,"DOC_ABSPATH"); QCString &docAbsPath = Config_getString("DOC_ABSPATH");
if (docAbsPath.isEmpty()) if (docAbsPath.isEmpty())
{ {
docAbsPath = getString(__FILE__,__LINE__,"OUTPUT_DIRECTORY")+"/html"; docAbsPath = Config_getString("OUTPUT_DIRECTORY")+"/html";
} }
else if (docAbsPath[0]!='/' && docAbsPath[1]!=':') else if (docAbsPath[0]!='/' && docAbsPath[1]!=':')
{ {
err("Error: tag DOC_ABSPATH: path is not absolute!\n"); config_err("Error: tag DOC_ABSPATH: path is not absolute!\n");
exit(1); exit(1);
} }
// check path to doxysearch // check path to doxysearch
QCString &binAbsPath = getString(__FILE__,__LINE__,"BIN_ABSPATH"); QCString &binAbsPath = Config_getString("BIN_ABSPATH");
if (binAbsPath.isEmpty()) if (binAbsPath.isEmpty())
{ {
err("Error: tag BIN_ABSPATH: no absolute path to doxysearch " config_err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
"specified.\n"); "specified.\n");
exit(1); exit(1);
} }
else if (binAbsPath[0]!='/' && binAbsPath[1]!=':') else if (binAbsPath[0]!='/' && binAbsPath[1]!=':')
{ {
err("Error: tag BIN_ABSPATH: path is not absolute!\n"); config_err("Error: tag BIN_ABSPATH: path is not absolute!\n");
exit(1); exit(1);
} }
// check perl path // check perl path
bool found=FALSE; bool found=FALSE;
QCString &perlPath = getString(__FILE__,__LINE__,"PERL_PATH"); QCString &perlPath = Config_getString("PERL_PATH");
if (perlPath.isEmpty()) if (perlPath.isEmpty())
{ {
QFileInfo fi; QFileInfo fi;
...@@ -1144,7 +1125,7 @@ void Config::check() ...@@ -1144,7 +1125,7 @@ void Config::check()
QFileInfo fi(perlPath); QFileInfo fi(perlPath);
if (!fi.exists()) if (!fi.exists())
{ {
warn_cont("Warning: tag PERL_PATH: perl interpreter not found at default or" config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
"user specified (%s) location\n", "user specified (%s) location\n",
perlPath.data()); perlPath.data());
} }
...@@ -1152,12 +1133,12 @@ void Config::check() ...@@ -1152,12 +1133,12 @@ void Config::check()
} }
#undef PUTENV #undef PUTENV
#if defined(_WIN32) && !defined(__GNUC__) #if defined(_WIN32) && !defined(__GNUC__) && (__BORLANDC__ < 0x0550)
#define PUTENV _putenv #define PUTENV _putenv
#else #else
#define PUTENV putenv #define PUTENV putenv
#endif #endif
if (getBool(__FILE__,__LINE__,"HAVE_DOT")) PUTENV("DOTFONTPATH=."); if (Config_getBool("HAVE_DOT")) PUTENV("DOTFONTPATH=.");
} }
...@@ -1241,6 +1222,7 @@ void Config::create() ...@@ -1241,6 +1222,7 @@ void Config::create()
ce->addValue("Slovene"); ce->addValue("Slovene");
ce->addValue("Spanish"); ce->addValue("Spanish");
ce->addValue("Swedish"); ce->addValue("Swedish");
ce->addValue("Ukrainian");
cb = addBool( cb = addBool(
"EXTRACT_ALL", "EXTRACT_ALL",
"If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n" "If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n"
...@@ -1919,17 +1901,17 @@ void Config::create() ...@@ -1919,17 +1901,17 @@ void Config::create()
); );
cb->addDependency("GENERATE_MAN"); cb->addDependency("GENERATE_MAN");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
//addInfo( "XML","configuration options related to the XML output"); addInfo( "XML","configuration options related to the XML output");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
//addBool( "generateXML", cb = addBool(
// "GENERATE_XML", "GENERATE_XML",
// "FALSE", "If the GENERATE_XML tag is set to YES Doxygen will \n"
// "generate XML output", "generate an XML file that captures the structure of \n"
// "If the GENERATE_XML tag is set to YES Doxygen will \n" "the code including all documentation. Note that this \n"
// "generate an XML file that captures the structure of \n" "feature is still experimental and incomplete at the \n"
// "the code including all documentation. Warning: This feature \n" "moment. \n",
// "is still experimental and very incomplete.\n" FALSE
// ); );
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor "); addInfo( "Preprocessor","Configuration options related to the preprocessor ");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
...@@ -2184,10 +2166,29 @@ void Config::create() ...@@ -2184,10 +2166,29 @@ void Config::create()
} }
void Config::parse(const QCString &s,const char *fn) bool Config::parse(const char *fn)
{ {
QFileInfo fi( fn );
if (!fi.exists())
{
return FALSE;
}
QFile f( fn );
if (!f.open(IO_ReadOnly))
{
return FALSE;
}
// read file into a string buffer
int fsize = fi.size();
QCString contents(fsize+1); // add room for \0 terminator
if (f.readBlock(contents.data(),fsize)!=fsize)
{
return FALSE;
}
contents[fsize]='\0';
config = Config::instance(); config = Config::instance();
inputString = s; inputString = contents.data();
inputPosition = 0; inputPosition = 0;
yyLineNr = 1; yyLineNr = 1;
yyFileName=fn; yyFileName=fn;
...@@ -2197,6 +2198,8 @@ void Config::parse(const QCString &s,const char *fn) ...@@ -2197,6 +2198,8 @@ void Config::parse(const QCString &s,const char *fn)
configYYrestart( configYYin ); configYYrestart( configYYin );
BEGIN( Start ); BEGIN( Start );
configYYlex(); configYYlex();
inputString = 0;
return TRUE;
} }
//extern "C" { // some bogus code to keep the compiler happy //extern "C" { // some bogus code to keep the compiler happy
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "declinfo.h" #include "declinfo.h"
#include "util.h" #include "util.h"
#include "message.h"
#define YY_NO_UNPUT #define YY_NO_UNPUT
...@@ -157,6 +158,8 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) ...@@ -157,6 +158,8 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
sharpCount=0; sharpCount=0;
BEGIN(Template); BEGIN(Template);
} }
<Template>"<<" { name+="<<"; }
<Template>">>" { name+=">>"; }
<Template>"<" { <Template>"<" {
name+="<"; name+="<";
sharpCount++; sharpCount++;
...@@ -235,16 +238,29 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t, ...@@ -235,16 +238,29 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
name=name.left(nb); name=name.left(nb);
} }
cl=scope.copy(); #if 0
//printf("scope=`%s'\n",scope.data()); {
int il=0,ir=0; int l=scope.length();
if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments int i=0;
int skipCount=0;
cl.resize(0);
ctl.resize(0);
for (i=0;i<l;i++)
{ {
ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il+1)); char c=scope.at(i);
cl=cl.left(il)+cl.right(cl.length()-ir-1); if (c=='<')
skipCount++;
else if (c=='>')
skipCount--;
else if (skipCount==0)
cl+=c;
} }
//printf("cl=`%s' ctl=`%s'\n",cl.data(),ctl.data()); }
#endif
cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE);
ctl.resize(0);
n=removeRedundantWhiteSpace(name); n=removeRedundantWhiteSpace(name);
int il,ir;
if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1) if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
// TODO: handle cases like where n="operator<< <T>" // TODO: handle cases like where n="operator<< <T>"
{ {
...@@ -285,9 +301,9 @@ void dumpDecl(const char *s) ...@@ -285,9 +301,9 @@ void dumpDecl(const char *s)
QCString name; QCString name;
QCString args; QCString args;
QCString funcTNames; QCString funcTNames;
printf("-----------------------------------------\n"); msg("-----------------------------------------\n");
parseFuncDecl(s,className,classTNames,type,name,args,funcTNames); parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' " msg("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
"funcTemplateNames=`%s' args=`%s'\n", "funcTemplateNames=`%s' args=`%s'\n",
type.data(),className.data(),classTNames.data(), type.data(),className.data(),classTNames.data(),
name.data(),funcTNames.data(),args.data() name.data(),funcTNames.data(),args.data()
......
...@@ -120,7 +120,7 @@ class Definition ...@@ -120,7 +120,7 @@ class Definition
int getDefLine() const { return m_defLine; } int getDefLine() const { return m_defLine; }
virtual Definition *findInnerCompound(const char *name); virtual Definition *findInnerCompound(const char *name);
virtual Definition *getOuterScope() { return m_outerScope; } virtual Definition *getOuterScope() const { return m_outerScope; }
virtual void addInnerCompound(Definition *d); virtual void addInnerCompound(Definition *d);
virtual void setOuterScope(Definition *d) { m_outerScope = d; } virtual void setOuterScope(Definition *d) { m_outerScope = d; }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "ftvhelp.h" #include "ftvhelp.h"
#include "defargs.h" #include "defargs.h"
#include "rtfgen.h" #include "rtfgen.h"
//#include "xml.h" #include "xmlgen.h"
#include "reflist.h" #include "reflist.h"
#include "page.h" #include "page.h"
#include "packagedef.h" #include "packagedef.h"
...@@ -394,8 +394,7 @@ static void addRefItem(int todoId,int testId,int bugId,const char *prefix, ...@@ -394,8 +394,7 @@ static void addRefItem(int todoId,int testId,int bugId,const char *prefix,
static void buildGroupList(Entry *root) static void buildGroupList(Entry *root)
{ {
if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty() && if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty())
(Config_getBool("EXTRACT_ALL") || root->tagInfo))
{ {
//printf("Found group %s title=`%s'\n",root->name.data(),root->type.data()); //printf("Found group %s title=`%s'\n",root->name.data(),root->type.data());
...@@ -675,7 +674,7 @@ static Definition *findScope(Entry *root,int level=0) ...@@ -675,7 +674,7 @@ static Definition *findScope(Entry *root,int level=0)
static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n) static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n)
{ {
//printf("findScopeFromName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data()); //printf("findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data());
QCString name(n); QCString name(n);
if (startScope==0) startScope=Doxygen::globalScope; if (startScope==0) startScope=Doxygen::globalScope;
int i = name.find("::"); int i = name.find("::");
...@@ -684,25 +683,58 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr ...@@ -684,25 +683,58 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr
return startScope; return startScope;
} }
QCString scope; QCString scope=stripTemplateSpecifiersFromScope(name,FALSE);
while ((i = name.find("::"))!=-1) //printf("name=%s -> scope=%s\n",name.data(),scope.data());
while ((i = scope.find("::"))!=-1)
{ {
int ti = name.find('<'); //int ti = name.find('<');
if (ti!=-1 && ti<i) i=ti; // strip template specifiers //if (ti!=-1 && ti<i) i=ti; // strip template specifiers
QCString nestedNameSpecifier = name.left(i); QCString nestedNameSpecifier = scope.left(i);
//Definition *oldScope = startScope; //Definition *oldScope = startScope;
startScope = startScope->findInnerCompound(nestedNameSpecifier); startScope = startScope->findInnerCompound(nestedNameSpecifier);
//printf("Trying %s result=%p\n",nestedNameSpecifier.data(),startScope);
if (startScope==0) if (startScope==0)
{ {
//printf("name %s not found in scope %s\n",nestedNameSpecifier.data(),oldScope->name().data()); //printf("name %s not found in scope %s\n",nestedNameSpecifier.data(),oldScope->name().data());
return 0; return 0;
} }
name = name.right(name.length()-i-2); scope = scope.right(scope.length()-i-2);
//printf("scope=%s\n",scope.data());
} }
//printf("findScopeFromName() result=%s\n",startScope ? startScope->name().data() : 0); //printf("findScopeFromQualifiedName() result=%s\n",startScope ? startScope->name().data() : 0);
return startScope; return startScope;
} }
ArgumentList *getTemplateArgumentsFromName(
const QCString &name,
const QList<ArgumentList> *tArgLists)
{
if (tArgLists==0) return 0;
QListIterator<ArgumentList> ali(*tArgLists);
// for each scope fragment, check if it is a template and advance through
// the list if so.
int i,p=0;
while ((i=name.find("::",p))!=-1)
{
NamespaceDef *nd = Doxygen::namespaceDict[name.left(i)];
if (nd==0)
{
ClassDef *cd = getClass(name.left(i));
if (cd)
{
if (cd->templateArguments())
{
++ali;
}
}
}
p=i+2;
}
return ali.current();
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// build a list of all classes mentioned in the documentation // build a list of all classes mentioned in the documentation
// and all classes that have a documentation block before their definition. // and all classes that have a documentation block before their definition.
...@@ -725,7 +757,11 @@ static void buildClassList(Entry *root) ...@@ -725,7 +757,11 @@ static void buildClassList(Entry *root)
} }
else else
{ {
Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
fullName=stripAnonymousNamespaceScope(fullName); fullName=stripAnonymousNamespaceScope(fullName);
fullName=stripTemplateSpecifiersFromScope(fullName);
Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data()); Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
bool ambig; bool ambig;
...@@ -736,11 +772,11 @@ static void buildClassList(Entry *root) ...@@ -736,11 +772,11 @@ static void buildClassList(Entry *root)
if ((cd=getClass(fullName))) if ((cd=getClass(fullName)))
{ {
Debug::print(Debug::Classes,0," Existing class!\n",fullName.data()); Debug::print(Debug::Classes,0," Existing class!\n",fullName.data());
if (cd->templateArguments()==0) //if (cd->templateArguments()==0)
{ //{
//printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data()); // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
cd->setTemplateArguments(root->tArgList); // cd->setTemplateArguments(tArgList);
} //}
if (!root->doc.isEmpty() || !root->brief.isEmpty() || if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
(root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER")) (root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER"))
) )
...@@ -818,7 +854,8 @@ static void buildClassList(Entry *root) ...@@ -818,7 +854,8 @@ static void buildClassList(Entry *root)
case Entry::EXCEPTIONDOC_SEC: case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception; break; sec=ClassDef::Exception; break;
} }
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)!\n",fullName.data(),root->section); Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
QCString className; QCString className;
QCString namespaceName; QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName); extractNamespaceName(fullName,className,namespaceName);
...@@ -837,7 +874,13 @@ static void buildClassList(Entry *root) ...@@ -837,7 +874,13 @@ static void buildClassList(Entry *root)
cd->setDocumentation(root->doc); // copy docs to definition cd->setDocumentation(root->doc); // copy docs to definition
cd->setBriefDescription(root->brief); cd->setBriefDescription(root->brief);
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
cd->setTemplateArguments(root->tArgList);
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
//printf("class %s template args=%s\n",fullName.data(),
// tArgList ? tempArgListToString(tArgList).data() : "<none>");
cd->setTemplateArguments(tArgList);
cd->setProtection(root->protection); cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors); cd->addSectionsToDefinition(root->anchors);
...@@ -1663,6 +1706,7 @@ void buildVarList(Entry *root) ...@@ -1663,6 +1706,7 @@ void buildVarList(Entry *root)
mtype=MemberDef::Variable; mtype=MemberDef::Variable;
QCString classScope=stripAnonymousNamespaceScope(scope); QCString classScope=stripAnonymousNamespaceScope(scope);
classScope=stripTemplateSpecifiersFromScope(classScope,FALSE);
QCString annScopePrefix=scope.left(scope.length()-classScope.length()); QCString annScopePrefix=scope.left(scope.length()-classScope.length());
scope=classScope; scope=classScope;
if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope))) if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope)))
...@@ -1739,7 +1783,7 @@ static void buildMemberList(Entry *root) ...@@ -1739,7 +1783,7 @@ static void buildMemberList(Entry *root)
{ {
Debug::print(Debug::Functions,0, Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n" "FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #targs=%d #mtargs=%d mGrpId=%d memSpec=%d\n", " `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d\n",
root->type.data(), root->type.data(),
root->parent->name.data(), root->parent->name.data(),
root->name.data(), root->name.data(),
...@@ -1748,8 +1792,9 @@ static void buildMemberList(Entry *root) ...@@ -1748,8 +1792,9 @@ static void buildMemberList(Entry *root)
root->fileName.data(), root->fileName.data(),
root->startLine, root->startLine,
root->bodyLine, root->bodyLine,
root->tArgList ? (int)root->tArgList->count() : -1, root->tArgLists ? (int)root->tArgLists->count() : -1,
root->mtArgList ? (int)root->mtArgList->count() : -1, //root->tArgList ? (int)root->tArgList->count() : -1,
//root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId, root->mGrpId,
root->memSpec root->memSpec
); );
...@@ -1767,6 +1812,7 @@ static void buildMemberList(Entry *root) ...@@ -1767,6 +1812,7 @@ static void buildMemberList(Entry *root)
// root->parent->name.data(),getClass(root->parent->name), // root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0)); // root->type.find(re,0));
QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy()); QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy());
scope=stripTemplateSpecifiersFromScope(scope,FALSE);
bool isMember=FALSE; bool isMember=FALSE;
int memIndex=rname.find("::"); int memIndex=rname.find("::");
...@@ -1828,11 +1874,12 @@ static void buildMemberList(Entry *root) ...@@ -1828,11 +1874,12 @@ static void buildMemberList(Entry *root)
//printf("new member: %s member template args=`%s'\n", //printf("new member: %s member template args=`%s'\n",
// root->args.data(), // root->args.data(),
// argListToString(root->mtArgList).data()); // argListToString(root->mtArgList).data());
MemberDef *md=new MemberDef( MemberDef *md=new MemberDef(
root->fileName,root->startLine, root->fileName,root->startLine,
root->type,name,root->args,root->exception, root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,!root->relates.isEmpty(), root->protection,root->virt,root->stat,!root->relates.isEmpty(),
mtype,root->mtArgList,root->argList); mtype,root->tArgLists ? root->tArgLists->last() : 0,root->argList);
if (root->tagInfo) if (root->tagInfo)
{ {
md->setAnchor(root->tagInfo->anchor); md->setAnchor(root->tagInfo->anchor);
...@@ -1876,26 +1923,27 @@ static void buildMemberList(Entry *root) ...@@ -1876,26 +1923,27 @@ static void buildMemberList(Entry *root)
} }
else else
{ {
QCString qualScope = cd->qualifiedNameWithTemplateParameters();
if (!root->type.isEmpty()) if (!root->type.isEmpty())
{ {
if (root->argList) if (root->argList)
{ {
def=root->type+" "+scope+"::"+name; def=root->type+" "+qualScope+"::"+name;
} }
else else
{ {
def=root->type+" "+scope+"::"+name+root->args; def=root->type+" "+qualScope+"::"+name+root->args;
} }
} }
else else
{ {
if (root->argList) if (root->argList)
{ {
def=scope+"::"+name; def=qualScope+"::"+name;
} }
else else
{ {
def=scope+"::"+name+root->args; def=qualScope+"::"+name+root->args;
} }
} }
} }
...@@ -1907,7 +1955,7 @@ static void buildMemberList(Entry *root) ...@@ -1907,7 +1955,7 @@ static void buildMemberList(Entry *root)
" `%s' `%s'::`%s' `%s' proto=%d\n" " `%s' `%s'::`%s' `%s' proto=%d\n"
" def=`%s'\n", " def=`%s'\n",
root->type.data(), root->type.data(),
root->parent->name.data(), scope.data(),
rname.data(), rname.data(),
root->args.data(), root->args.data(),
root->proto, root->proto,
...@@ -2023,12 +2071,13 @@ static void buildMemberList(Entry *root) ...@@ -2023,12 +2071,13 @@ static void buildMemberList(Entry *root)
// root->type.data(),rname.data(),root->args.data(),root->bodyLine); // root->type.data(),rname.data(),root->args.data(),root->bodyLine);
// new global function // new global function
ArgumentList *tArgList = root->tArgLists ? root->tArgLists->last() : 0;
QCString name=removeRedundantWhiteSpace(rname); QCString name=removeRedundantWhiteSpace(rname);
MemberDef *md=new MemberDef( MemberDef *md=new MemberDef(
root->fileName,root->startLine, root->fileName,root->startLine,
root->type,name,root->args,root->exception, root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,FALSE, root->protection,root->virt,root->stat,FALSE,
MemberDef::Function,root->tArgList,root->argList); MemberDef::Function,tArgList,root->argList);
if (root->tagInfo) if (root->tagInfo)
{ {
md->setAnchor(root->tagInfo->anchor); md->setAnchor(root->tagInfo->anchor);
...@@ -2686,7 +2735,8 @@ static bool findClassRelation( ...@@ -2686,7 +2735,8 @@ static bool findClassRelation(
//printf("scopePrefix=`%s' bi->name=`%s'\n", //printf("scopePrefix=`%s' bi->name=`%s'\n",
// scopeName.left(scopeOffset).data(),bi->name.data()); // scopeName.left(scopeOffset).data(),bi->name.data());
QCString baseClassName=removeRedundantWhiteSpace(bi->name); QCString baseClassName=stripTemplateSpecifiersFromScope
(removeRedundantWhiteSpace(bi->name));
if (scopeOffset>0) if (scopeOffset>0)
{ {
baseClassName.prepend(scopeName.left(scopeOffset)+"::"); baseClassName.prepend(scopeName.left(scopeOffset)+"::");
...@@ -3002,6 +3052,7 @@ static void findInheritedTemplateInstances() ...@@ -3002,6 +3052,7 @@ static void findInheritedTemplateInstances()
ClassDef *cd; ClassDef *cd;
// strip any annonymous scopes first // strip any annonymous scopes first
QCString bName=stripAnonymousNamespaceScope(root->name); QCString bName=stripAnonymousNamespaceScope(root->name);
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Class %s : \n",bName.data()); Debug::print(Debug::Classes,0," Class %s : \n",bName.data());
if ((cd=getClass(bName))) if ((cd=getClass(bName)))
{ {
...@@ -3022,6 +3073,7 @@ static void findUsedTemplateInstances() ...@@ -3022,6 +3073,7 @@ static void findUsedTemplateInstances()
ClassDef *cd; ClassDef *cd;
// strip any annonymous scopes first // strip any annonymous scopes first
QCString bName=stripAnonymousNamespaceScope(root->name); QCString bName=stripAnonymousNamespaceScope(root->name);
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Class %s : \n",bName.data()); Debug::print(Debug::Classes,0," Class %s : \n",bName.data());
if ((cd=getClass(bName))) if ((cd=getClass(bName)))
{ {
...@@ -3041,6 +3093,7 @@ static void computeClassRelations() ...@@ -3041,6 +3093,7 @@ static void computeClassRelations()
ClassDef *cd; ClassDef *cd;
// strip any annonymous scopes first // strip any annonymous scopes first
QCString bName=stripAnonymousNamespaceScope(root->name); QCString bName=stripAnonymousNamespaceScope(root->name);
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Class %s : \n",bName.data()); Debug::print(Debug::Classes,0," Class %s : \n",bName.data());
if ((cd=getClass(bName))) if ((cd=getClass(bName)))
{ {
...@@ -3065,6 +3118,7 @@ static void computeTemplateClassRelations() ...@@ -3065,6 +3118,7 @@ static void computeTemplateClassRelations()
for (;(root=edi.current());++edi) for (;(root=edi.current());++edi)
{ {
QCString bName=stripAnonymousNamespaceScope(root->name); QCString bName=stripAnonymousNamespaceScope(root->name);
bName=stripTemplateSpecifiersFromScope(bName);
ClassDef *cd=getClass(bName); ClassDef *cd=getClass(bName);
// strip any annonymous scopes first // strip any annonymous scopes first
QDict<ClassDef> *templInstances = 0; QDict<ClassDef> *templInstances = 0;
...@@ -3607,92 +3661,74 @@ static bool findGlobalMember(Entry *root, ...@@ -3607,92 +3661,74 @@ static bool findGlobalMember(Entry *root,
return TRUE; return TRUE;
} }
static void substituteTemplateArgNames(ArgumentList *src, static void substituteTemplatesInArgList(
const QCString &s, const QList<ArgumentList> &srcTempArgLists,
ArgumentList *tempArgs, const QList<ArgumentList> &dstTempArgLists,
ArgumentList *src,
ArgumentList *dst) ArgumentList *dst)
{ {
ArgumentListIterator ali(*src); ArgumentListIterator sali(*src);
Argument *a=0; Argument *sa=0;
for (ali.toFirst();(a=ali.current());++ali) // for each member argument Argument *da=dst->first();
for (sali.toFirst();(sa=sali.current());++sali) // for each member argument
{ {
QCString type=a->type.copy(); QCString srcType = sa->type;
bool isReplaced=FALSE;
QRegExp re(idMask); QRegExp re(idMask);
int i,p=0,l,c=0; //printf("type=%s\n",sa->type.data());
while (!s.isEmpty() && (i=re.match(s,p,&l))!=-1) // for each template name found at the
// member definition
{
Argument *ta = c<(int)tempArgs->count() ? tempArgs->at(c) : 0;
if (ta) // get matching template argument of the class
{
QCString dstName=s.mid(i,l);
QCString srcName=ta->name.copy();
if (srcName.isEmpty()) srcName=ta->type.copy();
//printf("1.Template Name = `%s' -> `%s'\n",srcName.data(),dstName.data());
int bi;
if ((bi=srcName.findRev(' '))!=-1) // search for separator
{
// strip the type specifier (usually class or typename)
srcName=srcName.right(srcName.length()-bi-1);
}
//if (srcName.left(6)=="class ") srcName=srcName.right(srcName.length()-6); int i,p=0,l;
//if (srcName.left(9)=="typename ") srcName=srcName.right(srcName.length()-9); QCString dstType;
//printf("2.Template Name = `%s' -> `%s'\n",srcName.data(),dstName.data()); while ((i=re.match(srcType,p,&l))!=-1) // for each word in srcType
if (srcName!=dstName) /* we need to substitute */
{ {
int ti,tp=0; bool found=FALSE;
QCString result; dstType+=srcType.mid(p,i-p);
int sl=srcName.length(); QCString name=srcType.mid(i,l);
while ((ti=type.find(srcName,tp))!=-1)
QListIterator<ArgumentList> srclali(srcTempArgLists);
QListIterator<ArgumentList> dstlali(dstTempArgLists);
for (;srclali.current() && !found;++srclali,++dstlali)
{ {
result+=type.mid(tp,ti-tp); ArgumentListIterator tsali(*srclali.current());
if ( ArgumentListIterator tdali(*dstlali.current());
(ti==0 || !isId(type.at(ti-1))) && Argument *tsa =0,*tda=0;
(ti+sl==(int)type.length() || !isId(type.at(ti+sl)))
) /* idenitifier -> replace */ for (tsali.toFirst();(tsa=tsali.current()) && !found;++tsali)
{ {
result+=dstName; tda = tdali.current();
} if (tda && name==tsa->name)
else /* substring of an identifier */
{ {
result+=srcName; name=tda->name; // substitute
} found=TRUE;
tp=ti+sl;
} }
result+=type.right(type.length()-tp); if (tda) ++tdali;
type=result;
isReplaced = TRUE;
} }
} }
dstType+=name;
p=i+l; p=i+l;
c++;
} }
Argument *na = new Argument(*a); dstType+=srcType.right(srcType.length()-p);
if (isReplaced) if (da==0)
{ {
//printf("Template Arg: `%s' -> `%s'\n",na->type.data(),type.data()); da=new Argument(*sa);
na->type=type; dst->append(da);
da->type=dstType;
da=0;
} }
else else
{ {
//printf("Template Arg `%s' not changed\n",a->type.data()); da->type=dstType;
da=dst->next();
} }
dst->append(na);
} }
//printf("substituteTemplateArgNames(\nsrc=`%s',\ntempNameStr=`%s',\ntempArgs=`%s',\ndest=`%s'\n)\n",
// argListToString(src).data(),
// s.data(),
// argListToString(tempArgs).data(),
// argListToString(dst).data()
// );
dst->constSpecifier = src->constSpecifier; dst->constSpecifier = src->constSpecifier;
dst->volatileSpecifier = src->volatileSpecifier; dst->volatileSpecifier = src->volatileSpecifier;
dst->pureSpecifier = src->pureSpecifier; dst->pureSpecifier = src->pureSpecifier;
//printf("substituteTemplatesInArgList: replacing %s with %s\n",
// argListToString(src).data(),argListToString(dst).data());
} }
static QCString mergeScopes(const QCString &leftScope,const QCString &rightScope) static QCString mergeScopes(const QCString &leftScope,const QCString &rightScope)
{ {
// case leftScope=="A" rightScope=="A::B" => result = "A::B" // case leftScope=="A" rightScope=="A::B" => result = "A::B"
...@@ -3744,11 +3780,10 @@ static void findMember(Entry *root, ...@@ -3744,11 +3780,10 @@ static void findMember(Entry *root,
{ {
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d," "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p=\"%s\" mtArgList=%p=\"%s\" " "isFunc=%d mGrpId=%d tArgList=%p (#=%d) "
"scopeSpec=%s memberSpec=%s memSpec=%d\n", "scopeSpec=%s memberSpec=%s memSpec=%d\n",
root,funcDecl.data(),related.data(),overloaded,isFunc,root->mGrpId, root,funcDecl.data(),related.data(),overloaded,isFunc,root->mGrpId,
root->tArgList,tempArgListToString(root->tArgList).data(), root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0,
root->mtArgList,tempArgListToString(root->mtArgList).data(),
root->scopeSpec.data(),root->memberSpec.data(),root->memSpec root->scopeSpec.data(),root->memberSpec.data(),root->memSpec
); );
//if (Config::instance()->get("") && !root->body.isEmpty()) //if (Config::instance()->get("") && !root->body.isEmpty())
...@@ -3829,18 +3864,6 @@ static void findMember(Entry *root, ...@@ -3829,18 +3864,6 @@ static void findMember(Entry *root,
//printf("scopeName=`%s' funcType=`%s' funcName=`%s'\n", //printf("scopeName=`%s' funcType=`%s' funcName=`%s'\n",
// scopeName.data(),funcType.data(),funcName.data()); // scopeName.data(),funcType.data(),funcName.data());
//bool isSpecialization = !root->scopeSpec.isEmpty() &&
// root->scopeSpec != tempArgListToString(root->tArgList);
// if this is a member template inside non template class, the parser puts
// template specifier in scopeSepc, so we copy it to the right location here
if (scopeName.isEmpty() && !root->scopeSpec.isEmpty() &&
root->memberSpec.isEmpty() && funcTempList.isEmpty()
) // template specifier that was found is for a function
{
funcTempList = root->scopeSpec;
}
// the class name can also be a namespace name, we decide this later. // the class name can also be a namespace name, we decide this later.
// if a related class name is specified and the class name could // if a related class name is specified and the class name could
// not be derived from the function declaration, then use the // not be derived from the function declaration, then use the
...@@ -3862,6 +3885,7 @@ static void findMember(Entry *root, ...@@ -3862,6 +3885,7 @@ static void findMember(Entry *root,
!root->parent->name.isEmpty()) !root->parent->name.isEmpty())
{ {
scopeName = mergeScopes(root->parent->name,scopeName); scopeName = mergeScopes(root->parent->name,scopeName);
scopeName = stripTemplateSpecifiersFromScope(scopeName);
} }
// split scope into a namespace and a class part // split scope into a namespace and a class part
...@@ -3869,61 +3893,6 @@ static void findMember(Entry *root, ...@@ -3869,61 +3893,6 @@ static void findMember(Entry *root,
//printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n", //printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
// scopeName.data(),className.data(),namespaceName.data()); // scopeName.data(),className.data(),namespaceName.data());
#if 0
if (related.isEmpty() &&
root->parent &&
!root->parent->name.isEmpty()
) // prefix scope in which the member was found
{
Entry *p=root->parent;
while (p) // get full scope as class name
{
QCString sc = stripAnonymousNamespaceScope(p->name);
if ((p->section & Entry::SCOPE_MASK)
&& !sc.isEmpty() && sc[0]!='@'
)
{
QCString cn;
QCString nn;
extractNamespaceName(sc,cn,nn);
if (leftScopeMatch(nn,namespaceName) || namespaceName.isEmpty())
{
namespaceName=nn.copy();
}
if (leftScopeMatch(cn,className) || className.isEmpty())
{
className=cn.copy();
}
//printf("sc=`%s' cn=`%s' nn=`%s'\n",sc.data(),cn.data(),nn.data());
//printf("p->name=`%s' scopeName=`%s' classTempList=%s\n",
// p->name.data(),scopeName.data(),classTempList.data());
QCString tryClass;
if (className.find('<')==-1 && !classTempList.isEmpty())
tryClass=insertTemplateSpecifierInScope(className,classTempList);
else
tryClass=className.copy();
//printf("tryClass=%s\n",tryClass.data());
if (leftScopeMatch(tryClass,cn))
break; // scope already present, so stop now
// prepend name to scope
if (!scopeName.isEmpty()) scopeName.prepend("::");
scopeName.prepend(sc);
break;
}
p=p->parent;
}
//printf("3. scopeName=`%s'\n",scopeName.data());
//printf("result: scope=%s\n",scopeName.data());
}
#endif
namespaceName=removeAnonymousScopes(namespaceName); namespaceName=removeAnonymousScopes(namespaceName);
//printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data()); //printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data());
// merge class and namespace scopes again // merge class and namespace scopes again
...@@ -3945,54 +3914,15 @@ static void findMember(Entry *root, ...@@ -3945,54 +3914,15 @@ static void findMember(Entry *root,
} }
//printf("new scope=`%s'\n",scopeName.data()); //printf("new scope=`%s'\n",scopeName.data());
if (!scopeName.isEmpty() &&
scopeName.find('<')==-1 &&
classTempList.isEmpty()
)
{
ClassDef *cd=getClass(scopeName);
// class is a template, but no template name list found
if (root->tArgList && cd && cd->templateArguments())
{
classTempList = tempArgListToString(root->tArgList);
}
}
QCString tempScopeName=scopeName.copy(); QCString tempScopeName=scopeName.copy();
int ti=tempScopeName.find('<'); ClassDef *cd=getClass(scopeName);
if (ti==-1) if (cd)
{
int spi = namespaceName.isEmpty() ? 0 : namespaceName.length()+2;
if ((ti=tempScopeName.find("::",spi))!=-1 && !classTempList.isEmpty())
{
// insert template parameters after the first scope name
tempScopeName=tempScopeName.left(ti)+classTempList+
tempScopeName.right(tempScopeName.length()-ti);
}
else
{
tempScopeName+=classTempList;
}
}
if (root->tArgList==0 && root->mtArgList==0 && !classTempList.isEmpty())
{
// no template specifiers found during parsing (because \fn was used),
// but there are template names in the scope, so we build the template
// specifiers from that.
//printf("Building template list from `%s'\n",classTempList.data());
root->tArgList = new ArgumentList;
QRegExp re(idMask);
int i,p=0,l;
while ((i=re.match(classTempList,p,&l))!=-1) // for each template name found
{ {
Argument *a = new Argument; if (root->tArgLists) root->tArgLists->first();
a->type = "class "+classTempList.mid(i,l); tempScopeName=cd->qualifiedNameWithTemplateParameters(root->tArgLists);
root->tArgList->append(a);
p=i+l;
}
} }
//printf("scopeName=%s cd=%p root->tArgLists=%p result=%s\n",
// scopeName.data(),cd,root->tArgLists,tempScopeName.data());
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right). // rebuild the function declaration (needed to get the scope right).
...@@ -4100,58 +4030,69 @@ static void findMember(Entry *root, ...@@ -4100,58 +4030,69 @@ static void findMember(Entry *root,
{ {
ClassDef *cd=md->getClassDef(); ClassDef *cd=md->getClassDef();
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"3. member definition found scope needed=`%s' scope=`%s' args=`%s'\n", "3. member definition found, "
"scope needed=`%s' scope=`%s' args=`%s'\n",
scopeName.data(),cd ? cd->name().data() : "<none>", scopeName.data(),cd ? cd->name().data() : "<none>",
md->argsString()); md->argsString());
//printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data()); //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data());
ClassDef *tcd=0;
bool ambig; bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
NamespaceDef *nd=0; NamespaceDef *nd=0;
if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName); if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
tcd = findClassDefinition(fd,nd,scopeName,classTempList);
ClassDef *tcd=findClassDefinition(fd,nd,scopeName,classTempList);
if (cd && tcd==cd) // member's classes match if (cd && tcd==cd) // member's classes match
{ {
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"4. class definition %s found\n",cd->name().data()); "4. class definition %s found\n",cd->name().data());
int ci; //int ci;
ArgumentList *classTemplArgs = cd->templateArguments(); //ArgumentList *classTemplArgs = cd->templateArguments();
ArgumentList *funcTemplArgs = md->memberDefTemplateArguments(); //ArgumentList *funcTemplArgs = md->memberDefTemplateArguments();
if ((ci=cd->name().find("::"))!=-1) // nested class //if ((ci=cd->name().find("::"))!=-1) // nested class
//{
// ClassDef *parentClass = getClass(cd->name().left(ci));
// if (parentClass)
// classTemplArgs = parentClass->templateArguments();
//}
////printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(),
//// argListToString(classTemplArgs).data());
// get the template parameter lists found at the member declaration
QList<ArgumentList> declTemplArgs;
cd->getTemplateParameterLists(declTemplArgs);
if (md->templateArguments())
{ {
ClassDef *parentClass = getClass(cd->name().left(ci)); declTemplArgs.append(md->templateArguments());
if (parentClass)
classTemplArgs = parentClass->templateArguments();
} }
//printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(),
// argListToString(classTemplArgs).data());
ArgumentList *argList = 0; // get the template parameter lists found at the member definition
QList<ArgumentList> *defTemplArgs = root->tArgLists;
//printf("defTemplArgs=%p\n",defTemplArgs);
// do we replace the decl argument lists with the def argument lists?
bool substDone=FALSE; bool substDone=FALSE;
ArgumentList *argList=0;
/* substitute the occurrences of class template names in the /* substitute the occurrences of class template names in the
* argument list before matching * argument list before matching
*/ */
if (!classTempList.isEmpty() && if (declTemplArgs.count()>0 && defTemplArgs &&
classTemplArgs && declTemplArgs.count()==defTemplArgs->count() &&
md->argumentList() md->argumentList()
) )
{ {
/* the function definition has template arguments /* the function definition has template arguments
* and the class also has template arguments, so * and the class definition also has template arguments, so
* we must substitute the template names if they are * we must substitute the template names of the class by that
* different before doing the match * of the function definition before matching.
*/ */
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
substituteTemplateArgNames( substituteTemplatesInArgList(declTemplArgs,*defTemplArgs,
md->argumentList(), /* source argument list */ md->argumentList(),argList);
classTempList, /* template names source */
classTemplArgs, /* template names dest */
argList /* dest argument list */
);
substDone=TRUE; substDone=TRUE;
} }
else /* no template arguments, compare argument lists directly */ else /* no template arguments, compare argument lists directly */
...@@ -4159,29 +4100,6 @@ static void findMember(Entry *root, ...@@ -4159,29 +4100,6 @@ static void findMember(Entry *root,
argList = md->argumentList(); argList = md->argumentList();
} }
/* substitute the occurrences of member template names in the
* argument list before matching
*/
if (!funcTempList.isEmpty() &&
funcTemplArgs &&
md->argumentList()
)
{
ArgumentList *oldArgList = argList;
argList = new ArgumentList;
substituteTemplateArgNames(
oldArgList, /* source argument list */
funcTempList, /* template names source */
funcTemplArgs, /* template names dest */
argList /* dest argument list */
);
if (substDone) // delete old argument list
{
delete oldArgList;
}
substDone=TRUE;
}
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"5. matching `%s'<=>`%s' className=%s namespaceName=%s\n", "5. matching `%s'<=>`%s' className=%s namespaceName=%s\n",
argListToString(argList).data(),argListToString(root->argList).data(), argListToString(argList).data(),argListToString(root->argList).data(),
...@@ -4221,8 +4139,9 @@ static void findMember(Entry *root, ...@@ -4221,8 +4139,9 @@ static void findMember(Entry *root,
//printf("Setting member template argument of member %s to %s\n", //printf("Setting member template argument of member %s to %s\n",
// md->name().data(), argListToString(root->mtArgList).data() // md->name().data(), argListToString(root->mtArgList).data()
// ); // );
md->setScopeDefTemplateArguments(root->tArgList);
md->setMemberDefTemplateArguments(root->mtArgList); md->setDefinitionTemplateParameterLists(root->tArgLists);
//md->setMemberDefTemplateArguments(root->mtArgList);
md->setArgumentList(argList); md->setArgumentList(argList);
} }
else // no match -> delete argument list else // no match -> delete argument list
...@@ -4296,11 +4215,13 @@ static void findMember(Entry *root, ...@@ -4296,11 +4215,13 @@ static void findMember(Entry *root,
else mtype=MemberDef::Function; else mtype=MemberDef::Function;
// new overloaded member function // new overloaded member function
ArgumentList *tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
MemberDef *md=new MemberDef( MemberDef *md=new MemberDef(
root->fileName,root->startLine, root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions, funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,TRUE, root->protection,root->virt,root->stat,TRUE,
mtype,root->tArgList,root->argList); mtype,tArgList,root->argList);
if (root->tagInfo) if (root->tagInfo)
{ {
md->setAnchor(root->tagInfo->anchor); md->setAnchor(root->tagInfo->anchor);
...@@ -4362,7 +4283,7 @@ static void findMember(Entry *root, ...@@ -4362,7 +4283,7 @@ static void findMember(Entry *root,
if (!newMember && rmd) // member already exists as rmd -> add docs if (!newMember && rmd) // member already exists as rmd -> add docs
{ {
//printf("addMemberDocs for related member %s\n",root->name.data()); //printf("addMemberDocs for related member %s\n",root->name.data());
rmd->setMemberDefTemplateArguments(root->mtArgList); //rmd->setMemberDefTemplateArguments(root->mtArgList);
addMemberDocs(root,rmd,funcDecl,0,overloaded); addMemberDocs(root,rmd,funcDecl,0,overloaded);
} }
} }
...@@ -4380,11 +4301,13 @@ static void findMember(Entry *root, ...@@ -4380,11 +4301,13 @@ static void findMember(Entry *root,
mtype=MemberDef::Function; mtype=MemberDef::Function;
// new related (member) function // new related (member) function
ArgumentList *tArgList =
getTemplateArgumentsFromName(scopeName+"::"+funcName,root->tArgLists);
MemberDef *md=new MemberDef( MemberDef *md=new MemberDef(
root->fileName,root->startLine, root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions, funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,TRUE, root->protection,root->virt,root->stat,TRUE,
mtype,root->tArgList,root->argList); mtype,tArgList,root->argList);
if (root->tagInfo) if (root->tagInfo)
{ {
md->setAnchor(root->tagInfo->anchor); md->setAnchor(root->tagInfo->anchor);
...@@ -4443,7 +4366,7 @@ static void findMember(Entry *root, ...@@ -4443,7 +4366,7 @@ static void findMember(Entry *root,
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
md->setMemberDefTemplateArguments(root->mtArgList); //md->setMemberDefTemplateArguments(root->mtArgList);
mn->append(md); mn->append(md);
cd->insertMember(md); cd->insertMember(md);
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
...@@ -5229,8 +5152,12 @@ static void generateClassDocs() ...@@ -5229,8 +5152,12 @@ static void generateClassDocs()
for ( ; cli.current() ; ++cli ) for ( ; cli.current() ; ++cli )
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
if ( cd->isLinkableInProject() && cd->templateMaster()==0 ) if ( cd->isLinkableInProject() && cd->templateMaster()==0 &&
// skip external references, anonymous compounds and template instances (cd->getOuterScope()==0 ||
cd->getOuterScope()->definitionType()!=Definition::TypeClass
)
) // skip external references, anonymous compounds and
// template instances and nested classes
{ {
msg("Generating docs for compound %s...\n",cd->name().data()); msg("Generating docs for compound %s...\n",cd->name().data());
...@@ -6573,9 +6500,11 @@ void readConfiguration(int argc, char **argv) ...@@ -6573,9 +6500,11 @@ void readConfiguration(int argc, char **argv)
{ {
if (optind+4<argc) if (optind+4<argc)
{ {
QCString configFile=fileToString(argv[optind+4]); if (!Config::instance()->parse(argv[optind+4]))
if (configFile.isEmpty()) exit(1); {
Config::instance()->parse(fileToString(argv[optind+4]),argv[optind+4]); err("Error opening or reading configuration file %s!\n",argv[optind+4]);
exit(1);
}
Config::instance()->substituteEnvironmentVars(); Config::instance()->substituteEnvironmentVars();
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
Config::instance()->check(); Config::instance()->check();
...@@ -6611,9 +6540,11 @@ void readConfiguration(int argc, char **argv) ...@@ -6611,9 +6540,11 @@ void readConfiguration(int argc, char **argv)
{ {
if (optind+3<argc) // use config file to get settings if (optind+3<argc) // use config file to get settings
{ {
QCString configFile=fileToString(argv[optind+3]); if (!Config::instance()->parse(argv[optind+3]))
if (configFile.isEmpty()) exit(1); {
Config::instance()->parse(fileToString(argv[optind+3]),argv[optind+3]); err("Error opening or reading configuration file %s!\n",argv[optind+3]);
exit(1);
}
Config::instance()->substituteEnvironmentVars(); Config::instance()->substituteEnvironmentVars();
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
Config::instance()->check(); Config::instance()->check();
...@@ -6679,17 +6610,14 @@ void readConfiguration(int argc, char **argv) ...@@ -6679,17 +6610,14 @@ void readConfiguration(int argc, char **argv)
} }
QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile"); QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
QCString config;
if (optind>=argc) if (optind>=argc)
{ {
if (configFileInfo1.exists()) if (configFileInfo1.exists())
{ {
config=fileToString("Doxyfile");
configName="Doxyfile"; configName="Doxyfile";
} }
else if (configFileInfo2.exists()) else if (configFileInfo2.exists())
{ {
config=fileToString("doxyfile");
configName="doxyfile"; configName="doxyfile";
} }
else else
...@@ -6703,7 +6631,6 @@ void readConfiguration(int argc, char **argv) ...@@ -6703,7 +6631,6 @@ void readConfiguration(int argc, char **argv)
QFileInfo fi(argv[optind]); QFileInfo fi(argv[optind]);
if (fi.exists() || strcmp(argv[optind],"-")==0) if (fi.exists() || strcmp(argv[optind],"-")==0)
{ {
config=fileToString(argv[optind]);
configName=argv[optind]; configName=argv[optind];
} }
else else
...@@ -6713,7 +6640,11 @@ void readConfiguration(int argc, char **argv) ...@@ -6713,7 +6640,11 @@ void readConfiguration(int argc, char **argv)
} }
} }
Config::instance()->parse(config,configName); if (!Config::instance()->parse(configName))
{
err("Error: could not open or read configuration file %s!\n",configName);
exit(1);
}
if (updateConfig) if (updateConfig)
{ {
...@@ -6724,6 +6655,22 @@ void readConfiguration(int argc, char **argv) ...@@ -6724,6 +6655,22 @@ void readConfiguration(int argc, char **argv)
Config::instance()->substituteEnvironmentVars(); Config::instance()->substituteEnvironmentVars();
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
Config::instance()->check(); Config::instance()->check();
initWarningFormat();
QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
if (!outputLanguage.isEmpty() && !setTranslator(outputLanguage))
{
err("Error: Output language %s not supported! Using English instead.\n",
outputLanguage.data());
}
QStrList &includePath = Config_getList("INCLUDE_PATH");
char *s=includePath.first();
while (s)
{
QFileInfo fi(s);
addSearchDir(fi.absFilePath());
s=includePath.next();
}
} }
void parseInput() void parseInput()
...@@ -7075,7 +7022,7 @@ void parseInput() ...@@ -7075,7 +7022,7 @@ void parseInput()
msg("Searching for documented defines...\n"); msg("Searching for documented defines...\n");
findDefineDocumentation(root); findDefineDocumentation(root);
msg("Computing template instances..."); msg("Computing template instances...\n");
findClassEntries(root); findClassEntries(root);
findInheritedTemplateInstances(); findInheritedTemplateInstances();
findUsedTemplateInstances(); findUsedTemplateInstances();
...@@ -7089,7 +7036,7 @@ void parseInput() ...@@ -7089,7 +7036,7 @@ void parseInput()
// computeClassImplUsageRelations(); // computeClassImplUsageRelations();
//} //}
msg("Computing class relations..."); msg("Computing class relations...\n");
computeTemplateClassRelations(); computeTemplateClassRelations();
computeClassRelations(); computeClassRelations();
classEntries.clear(); classEntries.clear();
...@@ -7342,5 +7289,10 @@ void generateOutput() ...@@ -7342,5 +7289,10 @@ void generateOutput()
if (Config_getBool("GENERATE_HTML") && Config_getBool("DOT_CLEANUP")) removeDoxFont(Config_getString("HTML_OUTPUT")); if (Config_getBool("GENERATE_HTML") && Config_getBool("DOT_CLEANUP")) removeDoxFont(Config_getString("HTML_OUTPUT"));
if (Config_getBool("GENERATE_RTF") && Config_getBool("DOT_CLEANUP")) removeDoxFont(Config_getString("RTF_OUTPUT")); if (Config_getBool("GENERATE_RTF") && Config_getBool("DOT_CLEANUP")) removeDoxFont(Config_getString("RTF_OUTPUT"));
if (Config_getBool("GENERATE_XML"))
{
msg("Generating XML output...\n");
generateXML();
}
} }
...@@ -24,7 +24,7 @@ win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools ...@@ -24,7 +24,7 @@ win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools
win32-msvc:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib win32-msvc:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib win32-borland:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\lib win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools . INCLUDEPATH += ../qtools .
DESTDIR = ../bin DESTDIR = ../bin
......
...@@ -25,7 +25,7 @@ win32-mingw:LIBS += -L../lib -lqtools ...@@ -25,7 +25,7 @@ win32-mingw:LIBS += -L../lib -lqtools
win32-msvc:LIBS += qtools.lib shell32.lib win32-msvc:LIBS += qtools.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib shell32.lib win32-borland:LIBS += qtools.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\lib win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects OBJECTS_DIR = ../objects
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
#include "entry.h" #include "entry.h"
#include "util.h"
int Entry::num=0; int Entry::num=0;
...@@ -36,8 +37,8 @@ Entry::Entry() ...@@ -36,8 +37,8 @@ Entry::Entry()
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n"); //printf("Entry::Entry() tArgList=0\n");
tArgList = 0; tArgLists = 0;
mtArgList = 0; //mtArgList = 0;
mGrpId = -1; mGrpId = -1;
tagInfo = 0; tagInfo = 0;
groupdoctype = GROUPDOC_NORMAL; groupdoctype = GROUPDOC_NORMAL;
...@@ -90,8 +91,8 @@ Entry::Entry(const Entry &e) ...@@ -90,8 +91,8 @@ Entry::Entry(const Entry &e)
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) tArgList=0\n"); //printf("Entry::Entry(copy) tArgList=0\n");
tArgList = 0; tArgLists = 0;
mtArgList = 0; //mtArgList = 0;
groupdoctype = e.groupdoctype; groupdoctype = e.groupdoctype;
// deep copy of the child entry list // deep copy of the child entry list
...@@ -136,33 +137,25 @@ Entry::Entry(const Entry &e) ...@@ -136,33 +137,25 @@ Entry::Entry(const Entry &e)
argList->volatileSpecifier = e.argList->volatileSpecifier; argList->volatileSpecifier = e.argList->volatileSpecifier;
argList->pureSpecifier = e.argList->pureSpecifier; argList->pureSpecifier = e.argList->pureSpecifier;
// deep copy template argument list // deep copy template argument lists
if (e.tArgList) if (e.tArgLists)
{
tArgList = new ArgumentList;
tArgList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) new tArgList=%p\n",tArgList);
QListIterator<Argument> tali(*e.tArgList);
for (;(a=tali.current());++tali)
{ {
tArgList->append(new Argument(*a)); tArgLists = copyArgumentLists(e.tArgLists);
//printf("appending argument %s %s\n",a->type.data(),a->name.data());
}
} }
// deep copy template argument list // deep copy template argument list
if (e.mtArgList) //if (e.mtArgList)
{ //{
mtArgList = new ArgumentList; // mtArgList = new ArgumentList;
mtArgList->setAutoDelete(TRUE); // mtArgList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) new tArgList=%p\n",tArgList); // //printf("Entry::Entry(copy) new tArgList=%p\n",tArgList);
QListIterator<Argument> mtali(*e.mtArgList); // QListIterator<Argument> mtali(*e.mtArgList);
for (;(a=mtali.current());++mtali) // for (;(a=mtali.current());++mtali)
{ // {
mtArgList->append(new Argument(*a)); // mtArgList->append(new Argument(*a));
//printf("appending argument %s %s\n",a->type.data(),a->name.data()); // //printf("appending argument %s %s\n",a->type.data(),a->name.data());
} // }
} //}
} }
...@@ -175,8 +168,8 @@ Entry::~Entry() ...@@ -175,8 +168,8 @@ Entry::~Entry()
delete groups; delete groups;
delete anchors; delete anchors;
delete argList; delete argList;
delete tArgList; delete tArgLists;
delete mtArgList; //delete mtArgList;
delete tagInfo; delete tagInfo;
num--; num--;
} }
...@@ -244,8 +237,8 @@ void Entry::reset() ...@@ -244,8 +237,8 @@ void Entry::reset()
anchors->clear(); anchors->clear();
argList->clear(); argList->clear();
if (tagInfo) { delete tagInfo; tagInfo=0; } if (tagInfo) { delete tagInfo; tagInfo=0; }
if (tArgList) { delete tArgList; tArgList=0; } if (tArgLists) { delete tArgLists; tArgLists=0; }
if (mtArgList) { delete mtArgList; mtArgList=0; } //if (mtArgList) { delete mtArgList; mtArgList=0; }
} }
...@@ -296,7 +289,7 @@ int Entry::getSize() ...@@ -296,7 +289,7 @@ int Entry::getSize()
e=sublist->next(); e=sublist->next();
} }
Argument *a=argList->first(); Argument *a=argList->first();
while (e) while (a)
{ {
size+=sizeof(Argument); size+=sizeof(Argument);
size+=a->type.length()+1 size+=a->type.length()+1
...@@ -304,30 +297,36 @@ int Entry::getSize() ...@@ -304,30 +297,36 @@ int Entry::getSize()
+a->defval.length()+1; +a->defval.length()+1;
a=argList->next(); a=argList->next();
} }
if (tArgList) if (tArgLists)
{
a=tArgList->first();
while (e)
{ {
size+=sizeof(Argument); ArgumentList *al=tArgLists->first();
size+=a->type.length()+1 while (al)
+a->name.length()+1
+a->defval.length()+1;
a=tArgList->next();
}
}
if (mtArgList)
{ {
a=mtArgList->first(); size+=sizeof(ArgumentList);
while (e) a=al->first();
while (a)
{ {
size+=sizeof(Argument); size+=sizeof(Argument);
size+=a->type.length()+1 size+=a->type.length()+1
+a->name.length()+1 +a->name.length()+1
+a->defval.length()+1; +a->defval.length()+1;
a=mtArgList->next(); a=al->next();
}
al=tArgLists->next();
} }
} }
//if (mtArgList)
//{
// a=mtArgList->first();
// while (e)
// {
// size+=sizeof(Argument);
// size+=a->type.length()+1
// +a->name.length()+1
// +a->defval.length()+1;
// a=mtArgList->next();
// }
//}
return size; return size;
} }
......
...@@ -252,8 +252,9 @@ class Entry ...@@ -252,8 +252,9 @@ class Entry
QCString args; //!< member argument string QCString args; //!< member argument string
QCString bitfields; //!< member's bit fields QCString bitfields; //!< member's bit fields
ArgumentList *argList; //!< member arguments as a list ArgumentList *argList; //!< member arguments as a list
ArgumentList *tArgList; //!< template argument list QList<ArgumentList> *tArgLists; //!< template argument declarations
ArgumentList *mtArgList; //!< member template argument list //ArgumentList *tArgList; //!< template argument lists (for each scope)
//ArgumentList *mtArgList; //!< member template argument list
QCString scopeSpec; //!< template specialization of the scope QCString scopeSpec; //!< template specialization of the scope
QCString memberSpec; //!< template specialization of the member QCString memberSpec; //!< template specialization of the member
QCString program; //!< the program text QCString program; //!< the program text
......
...@@ -44,6 +44,7 @@ static const char *defaultStyleSheet = ...@@ -44,6 +44,7 @@ static const char *defaultStyleSheet =
"A.elRef { font-weight: bold }\n" "A.elRef { font-weight: bold }\n"
"A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n" "A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n"
"A.codeRef { font-weight: normal; color: #4444ee }\n" "A.codeRef { font-weight: normal; color: #4444ee }\n"
"A:hover { text-decoration: none; background-color: #f2f2ff }\n"
"DL.el { margin-left: -1cm }\n" "DL.el { margin-left: -1cm }\n"
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n" "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n" "DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
......
...@@ -2703,6 +2703,8 @@ void writeIndex(OutputList &ol) ...@@ -2703,6 +2703,8 @@ void writeIndex(OutputList &ol)
ol.startIndexSection(isTitlePageAuthor); ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy()); parseText(ol,theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor); ol.endIndexSection(isTitlePageAuthor);
ol.enable(OutputGenerator::Latex);
if (Doxygen::mainPage) if (Doxygen::mainPage)
{ {
ol.startIndexSection(isMainPage); ol.startIndexSection(isMainPage);
...@@ -2716,7 +2718,6 @@ void writeIndex(OutputList &ol) ...@@ -2716,7 +2718,6 @@ void writeIndex(OutputList &ol)
} }
ol.endIndexSection(isMainPage); ol.endIndexSection(isMainPage);
} }
ol.enable(OutputGenerator::Latex);
if (documentedPackages>0) if (documentedPackages>0)
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "translator_br.h" #include "translator_br.h"
#include "translator_dk.h" #include "translator_dk.h"
#include "translator_sk.h" #include "translator_sk.h"
#include "translator_ua.h"
#endif #endif
#define L_EQUAL(a) !stricmp(langName,a) #define L_EQUAL(a) !stricmp(langName,a)
...@@ -144,6 +145,10 @@ bool setTranslator(const char *langName) ...@@ -144,6 +145,10 @@ bool setTranslator(const char *langName)
{ {
theTranslator=new TranslatorSlovak; theTranslator=new TranslatorSlovak;
} }
else if (L_EQUAL("ukrainian"))
{
theTranslator=new TranslatorUkrainian;
}
#endif #endif
else // use the default language (i.e. english) else // use the default language (i.e. english)
{ {
......
...@@ -1239,6 +1239,7 @@ void LatexGenerator::docify(const char *str) ...@@ -1239,6 +1239,7 @@ void LatexGenerator::docify(const char *str)
static bool isJapanese = theTranslator->idLanguage()=="japanese"; static bool isJapanese = theTranslator->idLanguage()=="japanese";
static bool isKorean = theTranslator->idLanguage()=="korean"; static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian"; static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
if (str) if (str)
{ {
const unsigned char *p=(const unsigned char *)str; const unsigned char *p=(const unsigned char *)str;
...@@ -1321,7 +1322,7 @@ void LatexGenerator::docify(const char *str) ...@@ -1321,7 +1322,7 @@ void LatexGenerator::docify(const char *str)
t << (char)c; t << (char)c;
} }
} }
else if (isCzech || isRussian) else if (isCzech || isRussian || isUkrainian)
{ {
if (c>=128) if (c>=128)
{ {
......
...@@ -91,7 +91,8 @@ HEADERS = bufstr.h \ ...@@ -91,7 +91,8 @@ HEADERS = bufstr.h \
treeview.h \ treeview.h \
unistd.h \ unistd.h \
util.h \ util.h \
version.h version.h \
xmlgen.h
SOURCES = ce_lex.cpp \ SOURCES = ce_lex.cpp \
ce_parse.cpp \ ce_parse.cpp \
classdef.cpp \ classdef.cpp \
...@@ -141,9 +142,11 @@ SOURCES = ce_lex.cpp \ ...@@ -141,9 +142,11 @@ SOURCES = ce_lex.cpp \
tagreader.cpp \ tagreader.cpp \
translator.cpp \ translator.cpp \
util.cpp \ util.cpp \
version.cpp version.cpp \
xmlgen.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL -Zm200 win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
INCLUDEPATH += ../qtools INCLUDEPATH += ../qtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
DESTDIR = ../lib DESTDIR = ../lib
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
initDoxygen(); initDoxygen();
readConfiguration(argc,argv); readConfiguration(argc,argv);
parseInput(); parseInput();
generateOutput(); generateOutput();
......
...@@ -79,10 +79,10 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -79,10 +79,10 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
ol.endMemberDocName(); ol.endMemberDocName();
Argument *a=argList->first(); Argument *a=argList->first();
QCString cName; QCString cName;
if (md->scopeDefTemplateArguments()) //if (md->scopeDefTemplateArguments())
{ //{
cName=tempArgListToString(md->scopeDefTemplateArguments()); // cName=tempArgListToString(md->scopeDefTemplateArguments());
} //}
if (cd) if (cd)
{ {
cName=cd->name(); cName=cd->name();
...@@ -245,8 +245,9 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -245,8 +245,9 @@ MemberDef::MemberDef(const char *df,int dl,
enumFields=0; enumFields=0;
enumScope=0; enumScope=0;
enumDeclList=0; enumDeclList=0;
scopeTAL=0; //scopeTAL=0;
membTAL=0; //membTAL=0;
m_defTmpArgLists=0;
initLines=0; initLines=0;
type=t; type=t;
args=a; args=a;
...@@ -320,6 +321,7 @@ MemberDef::~MemberDef() ...@@ -320,6 +321,7 @@ MemberDef::~MemberDef()
delete enumFields; delete enumFields;
delete argList; delete argList;
delete tArgList; delete tArgList;
delete m_defTmpArgLists;
} }
void MemberDef::insertReimplementedBy(MemberDef *md) void MemberDef::insertReimplementedBy(MemberDef *md)
...@@ -385,38 +387,34 @@ QCString MemberDef::getOutputFileBase() const ...@@ -385,38 +387,34 @@ QCString MemberDef::getOutputFileBase() const
return "dummy"; return "dummy";
} }
static void copyArgumentList(const ArgumentList *src,ArgumentList *dst) //void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal)
{ //{
ArgumentListIterator tali(*src); // // copy function arguments (if any)
Argument *a; // if (tal)
for (;(a=tali.current());++tali) // {
{ // scopeTAL = new ArgumentList;
dst->append(new Argument(*a)); // scopeTAL->setAutoDelete(TRUE);
} // copyArgumentList(tal,scopeTAL);
dst->constSpecifier = src->constSpecifier; // }
dst->volatileSpecifier = src->volatileSpecifier; //}
dst->pureSpecifier = src->pureSpecifier; //
} //void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
//{
void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal) // // copy function arguments (if any)
{ // if (tal)
// copy function arguments (if any) // {
if (tal) // membTAL = new ArgumentList;
{ // membTAL->setAutoDelete(TRUE);
scopeTAL = new ArgumentList; // copyArgumentList(tal,membTAL);
scopeTAL->setAutoDelete(TRUE); // }
copyArgumentList(tal,scopeTAL); //}
}
}
void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal) void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists)
{ {
// copy function arguments (if any) if (lists)
if (tal)
{ {
membTAL = new ArgumentList; if (m_defTmpArgLists) delete m_defTmpArgLists;
membTAL->setAutoDelete(TRUE); m_defTmpArgLists = copyArgumentLists(lists);
copyArgumentList(tal,membTAL);
} }
} }
...@@ -633,10 +631,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -633,10 +631,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (tArgList) if (tArgList)
{ {
writeTemplatePrefix(ol,tArgList); writeTemplatePrefix(ol,tArgList);
} ol.lineBreak();
else if (membTAL)
{
writeTemplatePrefix(ol,membTAL);
} }
QCString ltype(type); QCString ltype(type);
...@@ -979,43 +974,50 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -979,43 +974,50 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
ClassDef *cd=getClassDef(); ClassDef *cd=getClassDef();
ArgumentList *scopeAl=scopeDefTemplateArguments();
if (scopeAl==0 && cd) scopeAl=cd->templateArguments();
ArgumentList *membAl=memberDefTemplateArguments();
if (membAl==0) membAl=templateArguments();
if (!Config_getBool("HIDE_SCOPE_NAMES")) if (!Config_getBool("HIDE_SCOPE_NAMES"))
{ {
if (scopeAl && !related) // class template prefix bool first=TRUE;
if (m_defTmpArgLists)
// definition has explicate template parameter declarations
{ {
ol.startMemberDocPrefixItem(); QListIterator<ArgumentList> ali(*m_defTmpArgLists);
writeTemplatePrefix(ol,scopeAl); ArgumentList *tal;
ol.endMemberDocPrefixItem(); for (ali.toFirst();(tal=ali.current());++ali)
}
if (scopeAl && membAl) ol.docify(" ");
if (membAl) // function template prefix
{ {
if (tal->count()>0)
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem(); ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,membAl); writeTemplatePrefix(ol,tal);
ol.endMemberDocPrefixItem(); ol.endMemberDocPrefixItem();
} }
}
}
else
{
if (cd) if (cd)
{ {
QCString cName=cd->name(); QList<ArgumentList> tempParamLists;
int il=cName.find('<'); cd->getTemplateParameterLists(tempParamLists);
int ir=cName.findRev('>'); //printf("#tempParamLists=%d\n",tempParamLists.count());
if (il!=-1 && ir!=-1 && ir>il) QListIterator<ArgumentList> ali(tempParamLists);
ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali)
{ {
ldef=addTemplateNames(ldef, if (tal->count()>0)
cName.left(il), /* class without template spec */ {
cName.mid(il,ir-il+1) /* templ spec */ if (!first) ol.docify(" ");
); ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tal);
ol.endMemberDocPrefixItem();
} }
else if (scopeAl) }
}
if (tArgList) // function template prefix
{ {
ldef=addTemplateNames(ldef,cName,tempArgListToString(scopeAl)); ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tArgList);
ol.endMemberDocPrefixItem();
} }
} }
} }
...@@ -1492,6 +1494,7 @@ QCString MemberDef::getScopeString() const ...@@ -1492,6 +1494,7 @@ QCString MemberDef::getScopeString() const
QCString MemberDef::anchor() const QCString MemberDef::anchor() const
{ {
if (m_templateMaster) return m_templateMaster->anchor();
if (enumScope) return enumScope->anchor()+anc; if (enumScope) return enumScope->anchor()+anc;
return anc; return anc;
} }
......
...@@ -101,7 +101,6 @@ class MemberDef : public Definition ...@@ -101,7 +101,6 @@ class MemberDef : public Definition
Specifier virtualness() const { return virt; } Specifier virtualness() const { return virt; }
MemberType memberType() const { return mtype; } MemberType memberType() const { return mtype; }
// convenience methods // convenience methods
bool isSignal() const { return mtype==Signal; } bool isSignal() const { return mtype==Signal; }
bool isSlot() const { return mtype==Slot; } bool isSlot() const { return mtype==Slot; }
...@@ -197,10 +196,13 @@ class MemberDef : public Definition ...@@ -197,10 +196,13 @@ class MemberDef : public Definition
argList = al; argList = al;
} }
ArgumentList *templateArguments() const { return tArgList; } ArgumentList *templateArguments() const { return tArgList; }
void setScopeDefTemplateArguments(ArgumentList *t); //void setScopeDefTemplateArguments(ArgumentList *t);
ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; } //ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
void setMemberDefTemplateArguments(ArgumentList *t); //void setMemberDefTemplateArguments(ArgumentList *t);
ArgumentList *memberDefTemplateArguments() const { return membTAL; } //ArgumentList *memberDefTemplateArguments() const { return membTAL; }
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
QList<ArgumentList> *definitionTemplateParameterLists() const
{ return m_defTmpArgLists; }
// namespace related members // namespace related members
void setNamespace(NamespaceDef *nd); void setNamespace(NamespaceDef *nd);
...@@ -275,8 +277,9 @@ class MemberDef : public Definition ...@@ -275,8 +277,9 @@ class MemberDef : public Definition
MemberDef *annMemb; MemberDef *annMemb;
ArgumentList *argList; // argument list of this member ArgumentList *argList; // argument list of this member
ArgumentList *tArgList; // template argument list of function template ArgumentList *tArgList; // template argument list of function template
ArgumentList *scopeTAL; // template argument list of class template //ArgumentList *scopeTAL; // template argument list of class template
ArgumentList *membTAL; // template argument list of class template //ArgumentList *membTAL; // template argument list of class template
QList<ArgumentList> *m_defTmpArgLists;
int grpId; // group id int grpId; // group id
MemberGroup *memberGroup; // group's member definition MemberGroup *memberGroup; // group's member definition
......
...@@ -1519,8 +1519,9 @@ BN [ \t\r\n] ...@@ -1519,8 +1519,9 @@ BN [ \t\r\n]
g_defVarArgs = yytext[yyleng-1]=='.'; g_defVarArgs = yytext[yyleng-1]=='.';
if (g_defVarArgs) // strip ellipsis if (g_defVarArgs) // strip ellipsis
{ {
argName=argName.left(argName.length()-3).stripWhiteSpace(); argName=argName.left(argName.length()-3);
} }
argName = argName.stripWhiteSpace();
g_defArgsStr+=yytext; g_defArgsStr+=yytext;
g_argDict->insert(argName,new int(g_defArgs)); g_argDict->insert(argName,new int(g_defArgs));
g_defArgs++; g_defArgs++;
......
...@@ -1085,7 +1085,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1085,7 +1085,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
if (logoFilename) if (logoFilename)
{ {
t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << logoFilename; t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << logoFilename;
t << " \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n"; t << " \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
} }
if (company) if (company)
{ {
...@@ -2110,7 +2110,7 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d, ...@@ -2110,7 +2110,7 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
t << Rtf_Style_Reset << endl; t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif"; t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
} }
...@@ -2200,7 +2200,7 @@ void RTFGenerator::startImage(const char *name,const char *,bool) ...@@ -2200,7 +2200,7 @@ void RTFGenerator::startImage(const char *name,const char *,bool)
t << Rtf_Style_Reset << endl; t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << name; t << name;
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
} }
...@@ -2551,7 +2551,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) ...@@ -2551,7 +2551,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
t << Rtf_Style_Reset << endl; t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif"; t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
} }
...@@ -2570,7 +2570,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -2570,7 +2570,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
t << Rtf_Style_Reset << endl; t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif"; t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
} }
......
...@@ -362,6 +362,39 @@ static void setContext() ...@@ -362,6 +362,39 @@ static void setContext()
insideJava = fileName.right(5)==".java"; insideJava = fileName.right(5)==".java";
} }
static void prependScope()
{
if (current_root->section & Entry::SCOPE_MASK)
{
//printf("--- prependScope %s to %s\n",current_root->name.data(),current->name.data());
current->name.prepend(current_root->name+"::");
if (current_root->tArgLists)
{
if (current->tArgLists==0)
{
current->tArgLists = new QList<ArgumentList>;
current->tArgLists->setAutoDelete(TRUE);
}
//printf("prependScope #=%d #current=%d\n",current_root->tArgLists->count(),current->tArgLists->count());
QListIterator<ArgumentList> talsi(*current_root->tArgLists);
ArgumentList *srcAl=0;
for (talsi.toLast();(srcAl=talsi.current());--talsi)
{
ArgumentList *dstAl = new ArgumentList;
dstAl->setAutoDelete(TRUE);
QListIterator<Argument> tali(*srcAl);
Argument *a;
for (;(a=tali.current());++tali)
{
dstAl->append(new Argument(*a));
//printf("appending argument %s %s\n",a->type.data(),a->name.data());
}
current->tArgLists->insert(0,dstAl);
}
}
}
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
#undef YY_INPUT #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -793,15 +826,15 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -793,15 +826,15 @@ TITLE [tT][iI][tT][lL][eE]
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
if (current->mtArgList) // transfer template arguments //if (current->mtArgList) // transfer template arguments
{ //{
if (current->tArgList) // if (current->tArgList)
{ // {
delete current->tArgList; // delete current->tArgList;
} // }
current->tArgList = current->mtArgList; // current->tArgList = current->mtArgList;
current->mtArgList = 0; // current->mtArgList = 0;
} //}
lineCount() ; lineCount() ;
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
...@@ -813,15 +846,15 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -813,15 +846,15 @@ TITLE [tT][iI][tT][lL][eE]
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
if (current->mtArgList) // transfer template arguments //if (current->mtArgList) // transfer template arguments
{ //{
if (current->tArgList) // if (current->tArgList)
{ // {
delete current->tArgList; // delete current->tArgList;
} // }
current->tArgList = current->mtArgList; // current->tArgList = current->mtArgList;
current->mtArgList = 0; // current->mtArgList = 0;
} //}
lineCount() ; lineCount() ;
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
...@@ -870,18 +903,27 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -870,18 +903,27 @@ TITLE [tT][iI][tT][lL][eE]
//if (current->tArgList /*|| (current_root->section&Entry::COMPOUND_MASK)*/) //if (current->tArgList /*|| (current_root->section&Entry::COMPOUND_MASK)*/)
//{ //{
// printf("-------> member template \n"); // printf("-------> member template \n");
if (current->mtArgList) if (current->tArgLists==0)
{ {
if (current->tArgList) current->tArgLists = new QList<ArgumentList>;
{ current->tArgLists->setAutoDelete(TRUE);
delete current->tArgList;
}
current->tArgList = current->mtArgList;
current->mtArgList = 0;
} }
current->mtArgList = new ArgumentList; ArgumentList *al = new ArgumentList;
current->mtArgList->setAutoDelete(TRUE); al->setAutoDelete(TRUE);
currentArgumentList = current->mtArgList; current->tArgLists->append(al);
currentArgumentList = al;
//if (current->mtArgList)
// {
// if (current->tArgList)
// {
// delete current->tArgList;
// }
// current->tArgList = current->mtArgList;
// current->mtArgList = 0;
// }
// current->mtArgList = new ArgumentList;
// current->mtArgList->setAutoDelete(TRUE);
// currentArgumentList = current->mtArgList;
//} //}
//else // class template specifier //else // class template specifier
//{ //{
...@@ -961,11 +1003,11 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -961,11 +1003,11 @@ TITLE [tT][iI][tT][lL][eE]
sharpCount=0; sharpCount=0;
lineCount(); lineCount();
addType( current ); addType( current );
if (current->mtArgList && current->tArgList==0) //if (current->mtArgList && current->tArgList==0)
{ //{
current->tArgList=current->mtArgList; // current->tArgList=current->mtArgList;
current->mtArgList=0; // current->mtArgList=0;
} //}
current->name=yytext; current->name=yytext;
current->name=current->name.stripWhiteSpace(); current->name=current->name.stripWhiteSpace();
current->scopeSpec.resize(0); current->scopeSpec.resize(0);
...@@ -1039,12 +1081,12 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1039,12 +1081,12 @@ TITLE [tT][iI][tT][lL][eE]
// correct for misinterpreting return type as scope name: example: A<T> func() // correct for misinterpreting return type as scope name: example: A<T> func()
//printf("YY_START=%d current->tArgList=%p current->mtArgList=%p\n", //printf("YY_START=%d current->tArgList=%p current->mtArgList=%p\n",
// YY_START,current->tArgList,current->mtArgList); // YY_START,current->tArgList,current->mtArgList);
if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0) //if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0)
{ //{
current->mtArgList=current->tArgList; // current->mtArgList=current->tArgList;
current->tArgList=0; // current->tArgList=0;
current->scopeSpec.resize(0); // current->scopeSpec.resize(0);
} //}
lineCount(); lineCount();
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0) if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
{ {
...@@ -1563,10 +1605,10 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1563,10 +1605,10 @@ TITLE [tT][iI][tT][lL][eE]
QCString &cn = current->name; QCString &cn = current->name;
QCString rn = current_root->name.copy(); QCString rn = current_root->name.copy();
//printf("cn=`%s' rn=`%s'\n",cn.data(),rn.data()); //printf("cn=`%s' rn=`%s'\n",cn.data(),rn.data());
if (!cn.isEmpty() && !rn.isEmpty() && if (!cn.isEmpty() && !rn.isEmpty())
(current_root->section & Entry::SCOPE_MASK))
{ {
cn.prepend(rn+"::"); prependScope();
//cn.prepend(rn+"::");
} }
if (isTypedef && cn.isEmpty()) if (isTypedef && cn.isEmpty())
{ {
...@@ -1608,10 +1650,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1608,10 +1650,7 @@ TITLE [tT][iI][tT][lL][eE]
current->program+=","; // add field terminator current->program+=","; // add field terminator
} }
current->name=yytext; current->name=yytext;
if (current_root->section & Entry::SCOPE_MASK) prependScope();
{
current->name.prepend(current_root->name+"::");
}
current->args = current->args.simplifyWhiteSpace(); current->args = current->args.simplifyWhiteSpace();
current->type = current->type.simplifyWhiteSpace(); current->type = current->type.simplifyWhiteSpace();
//printf("Adding compound %s %s %s\n",current->type.data(),current->name.data(),current->args.data()); //printf("Adding compound %s %s %s\n",current->type.data(),current->name.data(),current->args.data());
...@@ -2934,20 +2973,14 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2934,20 +2973,14 @@ TITLE [tT][iI][tT][lL][eE]
<ClassDocArg1>{SCOPENAME}/"<" { <ClassDocArg1>{SCOPENAME}/"<" {
current->name = yytext; current->name = yytext;
// prepend outer scope name // prepend outer scope name
if (current_root->section & Entry::SCOPE_MASK) prependScope();
{
current->name.prepend(current_root->name+"::");
}
lastClassTemplSpecContext = ClassDocArg2; lastClassTemplSpecContext = ClassDocArg2;
BEGIN( ClassTemplSpec ); BEGIN( ClassTemplSpec );
} }
<ClassDocArg1>{SCOPENAME} { <ClassDocArg1>{SCOPENAME} {
current->name = yytext; current->name = yytext;
// prepend outer scope name // prepend outer scope name
if (current_root->section & Entry::SCOPE_MASK) prependScope();
{
current->name.prepend(current_root->name+"::");
}
BEGIN( ClassDocArg2 ); BEGIN( ClassDocArg2 );
} }
<ClassDocArg1>"\\"{B}*"\n" { yyLineNr++; } <ClassDocArg1>"\\"{B}*"\n" { yyLineNr++; }
...@@ -3045,10 +3078,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3045,10 +3078,7 @@ TITLE [tT][iI][tT][lL][eE]
} }
<EnumDocArg1>{SCOPEID} { <EnumDocArg1>{SCOPEID} {
current->name = yytext; current->name = yytext;
if (current_root->section & Entry::SCOPE_MASK) prependScope();
{
current->name.prepend(current_root->name+"::");
}
newDocState(); newDocState();
} }
<EnumDocArg1>"\\"{B}*"\n" { yyLineNr++; } <EnumDocArg1>"\\"{B}*"\n" { yyLineNr++; }
...@@ -3859,16 +3889,6 @@ static void parseCompounds(Entry *rt) ...@@ -3859,16 +3889,6 @@ static void parseCompounds(Entry *rt)
memberGroupId = NOGROUP; memberGroupId = NOGROUP;
// rebuild compound's group context
//QCString *s = ce->groups->first();
//if (s)
//{
// lastDefGroup=*s;
// startGroup();
//}
//current->mGrpId = memberGroupId = ce->mGrpId;
scanYYlex() ; scanYYlex() ;
delete current; current=0; delete current; current=0;
ce->program.resize(0); ce->program.resize(0);
......
...@@ -146,7 +146,8 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -146,7 +146,8 @@ class TagFileParser : public QXmlDefaultHandler
InGroup, InGroup,
InPage, InPage,
InMember, InMember,
InPackage InPackage,
InTempArgList
}; };
class StartElementHandler class StartElementHandler
{ {
...@@ -290,6 +291,7 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -290,6 +291,7 @@ class TagFileParser : public QXmlDefaultHandler
m_stateStack.push(new State(m_state)); m_stateStack.push(new State(m_state));
m_state = InMember; m_state = InMember;
} }
void endMember() void endMember()
{ {
m_state = *m_stateStack.pop(); m_state = *m_stateStack.pop();
...@@ -303,6 +305,8 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -303,6 +305,8 @@ class TagFileParser : public QXmlDefaultHandler
default: err("Error: Unexpected tag `member' found\n"); break; default: err("Error: Unexpected tag `member' found\n"); break;
} }
} }
void endDocAnchor() void endDocAnchor()
{ {
switch(m_state) switch(m_state)
...@@ -663,22 +667,22 @@ class TagFileErrorHandler : public QXmlErrorHandler ...@@ -663,22 +667,22 @@ class TagFileErrorHandler : public QXmlErrorHandler
/*! Dumps the internal structures. For debugging only! */ /*! Dumps the internal structures. For debugging only! */
void TagFileParser::dump() void TagFileParser::dump()
{ {
printf("Result:\n"); msg("Result:\n");
QListIterator<TagClassInfo> lci(m_tagFileClasses); QListIterator<TagClassInfo> lci(m_tagFileClasses);
//============== CLASSES //============== CLASSES
TagClassInfo *cd; TagClassInfo *cd;
for (;(cd=lci.current());++lci) for (;(cd=lci.current());++lci)
{ {
printf("class `%s'\n",cd->name.data()); msg("class `%s'\n",cd->name.data());
printf(" filename `%s'\n",cd->filename.data()); msg(" filename `%s'\n",cd->filename.data());
if (cd->bases) if (cd->bases)
{ {
QListIterator<BaseInfo> bii(*cd->bases); QListIterator<BaseInfo> bii(*cd->bases);
BaseInfo *bi; BaseInfo *bi;
for ( bii.toFirst() ; (bi=bii.current()) ; ++bii) for ( bii.toFirst() ; (bi=bii.current()) ; ++bii)
{ {
printf( " base: %s \n", bi->name.data() ); msg( " base: %s \n", bi->name.data() );
} }
} }
...@@ -686,11 +690,11 @@ void TagFileParser::dump() ...@@ -686,11 +690,11 @@ void TagFileParser::dump()
TagMemberInfo *md; TagMemberInfo *md;
for (;(md=mci.current());++mci) for (;(md=mci.current());++mci)
{ {
printf(" member:\n"); msg(" member:\n");
printf(" kind: `%s'\n",md->kind.data()); msg(" kind: `%s'\n",md->kind.data());
printf(" name: `%s'\n",md->name.data()); msg(" name: `%s'\n",md->name.data());
printf(" anchor: `%s'\n",md->anchor.data()); msg(" anchor: `%s'\n",md->anchor.data());
printf(" arglist: `%s'\n",md->arglist.data()); msg(" arglist: `%s'\n",md->arglist.data());
} }
} }
//============== NAMESPACES //============== NAMESPACES
...@@ -698,24 +702,24 @@ void TagFileParser::dump() ...@@ -698,24 +702,24 @@ void TagFileParser::dump()
TagNamespaceInfo *nd; TagNamespaceInfo *nd;
for (;(nd=lni.current());++lni) for (;(nd=lni.current());++lni)
{ {
printf("namespace `%s'\n",nd->name.data()); msg("namespace `%s'\n",nd->name.data());
printf(" filename `%s'\n",nd->filename.data()); msg(" filename `%s'\n",nd->filename.data());
QStringList::Iterator it; QStringList::Iterator it;
for ( it = nd->classList.begin(); for ( it = nd->classList.begin();
it != nd->classList.end(); ++it ) it != nd->classList.end(); ++it )
{ {
printf( " class: %s \n", (*it).latin1() ); msg( " class: %s \n", (*it).latin1() );
} }
QListIterator<TagMemberInfo> mci(nd->members); QListIterator<TagMemberInfo> mci(nd->members);
TagMemberInfo *md; TagMemberInfo *md;
for (;(md=mci.current());++mci) for (;(md=mci.current());++mci)
{ {
printf(" member:\n"); msg(" member:\n");
printf(" kind: `%s'\n",md->kind.data()); msg(" kind: `%s'\n",md->kind.data());
printf(" name: `%s'\n",md->name.data()); msg(" name: `%s'\n",md->name.data());
printf(" anchor: `%s'\n",md->anchor.data()); msg(" anchor: `%s'\n",md->anchor.data());
printf(" arglist: `%s'\n",md->arglist.data()); msg(" arglist: `%s'\n",md->arglist.data());
} }
} }
//============== FILES //============== FILES
...@@ -723,29 +727,29 @@ void TagFileParser::dump() ...@@ -723,29 +727,29 @@ void TagFileParser::dump()
TagFileInfo *fd; TagFileInfo *fd;
for (;(fd=lfi.current());++lfi) for (;(fd=lfi.current());++lfi)
{ {
printf("file `%s'\n",fd->name.data()); msg("file `%s'\n",fd->name.data());
printf(" filename `%s'\n",fd->filename.data()); msg(" filename `%s'\n",fd->filename.data());
QStringList::Iterator it; QStringList::Iterator it;
for ( it = fd->namespaceList.begin(); for ( it = fd->namespaceList.begin();
it != fd->namespaceList.end(); ++it ) it != fd->namespaceList.end(); ++it )
{ {
printf( " namespace: %s \n", (*it).latin1() ); msg( " namespace: %s \n", (*it).latin1() );
} }
for ( it = fd->classList.begin(); for ( it = fd->classList.begin();
it != fd->classList.end(); ++it ) it != fd->classList.end(); ++it )
{ {
printf( " class: %s \n", (*it).latin1() ); msg( " class: %s \n", (*it).latin1() );
} }
QListIterator<TagMemberInfo> mci(fd->members); QListIterator<TagMemberInfo> mci(fd->members);
TagMemberInfo *md; TagMemberInfo *md;
for (;(md=mci.current());++mci) for (;(md=mci.current());++mci)
{ {
printf(" member:\n"); msg(" member:\n");
printf(" kind: `%s'\n",md->kind.data()); msg(" kind: `%s'\n",md->kind.data());
printf(" name: `%s'\n",md->name.data()); msg(" name: `%s'\n",md->name.data());
printf(" anchor: `%s'\n",md->anchor.data()); msg(" anchor: `%s'\n",md->anchor.data());
printf(" arglist: `%s'\n",md->arglist.data()); msg(" arglist: `%s'\n",md->arglist.data());
} }
} }
...@@ -754,44 +758,44 @@ void TagFileParser::dump() ...@@ -754,44 +758,44 @@ void TagFileParser::dump()
TagGroupInfo *gd; TagGroupInfo *gd;
for (;(gd=lgi.current());++lgi) for (;(gd=lgi.current());++lgi)
{ {
printf("group `%s'\n",gd->name.data()); msg("group `%s'\n",gd->name.data());
printf(" filename `%s'\n",gd->filename.data()); msg(" filename `%s'\n",gd->filename.data());
QStringList::Iterator it; QStringList::Iterator it;
for ( it = gd->namespaceList.begin(); for ( it = gd->namespaceList.begin();
it != gd->namespaceList.end(); ++it ) it != gd->namespaceList.end(); ++it )
{ {
printf( " namespace: %s \n", (*it).latin1() ); msg( " namespace: %s \n", (*it).latin1() );
} }
for ( it = gd->classList.begin(); for ( it = gd->classList.begin();
it != gd->classList.end(); ++it ) it != gd->classList.end(); ++it )
{ {
printf( " class: %s \n", (*it).latin1() ); msg( " class: %s \n", (*it).latin1() );
} }
for ( it = gd->fileList.begin(); for ( it = gd->fileList.begin();
it != gd->fileList.end(); ++it ) it != gd->fileList.end(); ++it )
{ {
printf( " file: %s \n", (*it).latin1() ); msg( " file: %s \n", (*it).latin1() );
} }
for ( it = gd->subgroupList.begin(); for ( it = gd->subgroupList.begin();
it != gd->subgroupList.end(); ++it ) it != gd->subgroupList.end(); ++it )
{ {
printf( " subgroup: %s \n", (*it).latin1() ); msg( " subgroup: %s \n", (*it).latin1() );
} }
for ( it = gd->pageList.begin(); for ( it = gd->pageList.begin();
it != gd->pageList.end(); ++it ) it != gd->pageList.end(); ++it )
{ {
printf( " page: %s \n", (*it).latin1() ); msg( " page: %s \n", (*it).latin1() );
} }
QListIterator<TagMemberInfo> mci(gd->members); QListIterator<TagMemberInfo> mci(gd->members);
TagMemberInfo *md; TagMemberInfo *md;
for (;(md=mci.current());++mci) for (;(md=mci.current());++mci)
{ {
printf(" member:\n"); msg(" member:\n");
printf(" kind: `%s'\n",md->kind.data()); msg(" kind: `%s'\n",md->kind.data());
printf(" name: `%s'\n",md->name.data()); msg(" name: `%s'\n",md->name.data());
printf(" anchor: `%s'\n",md->anchor.data()); msg(" anchor: `%s'\n",md->anchor.data());
printf(" arglist: `%s'\n",md->arglist.data()); msg(" arglist: `%s'\n",md->arglist.data());
} }
} }
//============== PAGES //============== PAGES
...@@ -799,9 +803,9 @@ void TagFileParser::dump() ...@@ -799,9 +803,9 @@ void TagFileParser::dump()
TagPageInfo *pd; TagPageInfo *pd;
for (;(pd=lpi.current());++lpi) for (;(pd=lpi.current());++lpi)
{ {
printf("page `%s'\n",pd->name.data()); msg("page `%s'\n",pd->name.data());
printf(" title `%s'\n",pd->title.data()); msg(" title `%s'\n",pd->title.data());
printf(" filename `%s'\n",pd->filename.data()); msg(" filename `%s'\n",pd->filename.data());
} }
} }
...@@ -973,14 +977,17 @@ void TagFileParser::buildLists(Entry *root) ...@@ -973,14 +977,17 @@ void TagFileParser::buildLists(Entry *root)
} }
if (tci->templateArguments) if (tci->templateArguments)
{ {
if (ce->tArgList==0) ce->tArgList = new ArgumentList; if (ce->tArgLists==0) ce->tArgLists = new QList<ArgumentList>;
ArgumentList *al = new ArgumentList;
ce->tArgLists->append(al);
QListIterator<QString> sli(*tci->templateArguments); QListIterator<QString> sli(*tci->templateArguments);
QString *argName; QString *argName;
for (;(argName=sli.current());++sli) for (;(argName=sli.current());++sli)
{ {
Argument *a = new Argument; Argument *a = new Argument;
a->name = *argName; a->name = *argName;
ce->tArgList->append(a); al->append(a);
} }
} }
......
/*! \file translator.cpp
* \brief Implementation of generally used translator methods.
*
* This file contains implementation of the translator methods that
* are not expected to be reimplemented by derived translator classes.
* It also contains static data tables used by the methods.
*
*/
#include "translator.h" #include "translator.h"
const char Translator::WinToISOTab[] = /*! The translation table used by Win1250ToISO88592() method. */
const char Translator::Win1250ToISO88592Tab[] =
{ {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC', '\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC',
...@@ -22,7 +31,8 @@ const char Translator::WinToISOTab[] = ...@@ -22,7 +31,8 @@ const char Translator::WinToISOTab[] =
}; };
const char Translator::ISOToWinTab[] = { /*! The translation table used by ISO88592ToWin1250() method. */
const char Translator::ISO88592ToWin1250Tab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F', '\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
...@@ -42,7 +52,9 @@ const char Translator::ISOToWinTab[] = { ...@@ -42,7 +52,9 @@ const char Translator::ISOToWinTab[] = {
'\0' '\0'
}; };
Q_UINT16 Translator::koi8_r[128] =
/*! The translation table used by Koi8RToWindows1251() method. */
Q_UINT16 Translator::Koi8RToWindows1251Tab[128] =
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248, 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
...@@ -62,7 +74,8 @@ Q_UINT16 Translator::koi8_r[128] = ...@@ -62,7 +74,8 @@ Q_UINT16 Translator::koi8_r[128] =
}; };
Q_UINT16 Translator::windows_1251[128] = /*! The translation table used by Windows1251ToKoi8R() method. */
Q_UINT16 Translator::Windows1251ToKoi8RTab[128] =
{ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
...@@ -82,3 +95,99 @@ Q_UINT16 Translator::windows_1251[128] = ...@@ -82,3 +95,99 @@ Q_UINT16 Translator::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
* conditional compilation in Unix/MS Windows environments
* (both use different encoding). Later, the translator_hr.h
* (by Boris Bralo) used and improved the same style. As the
* method with the translation table was the same, the
* decision to move it to this base class was made. The same
* holds for ISO88592ToWin1250() method.
*
* Alexandr Chelpanov used the same approach for
* Koi8RToWindows1251() and Windows1251ToKoi8R() methods. Notice,
* that he uses Unicode tables.
*
* It is recommended for possibly other similar methods in future.
*/
QCString Translator::Win1250ToISO88592(const QCString & sInput)
{
// The conversion table for characters >127
//
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? Win1250ToISO88592Tab[c & 0x7F] : c;
}
return result;
}
/*! returns the string converted from iso-8859-2 to windows-1250 */
/* See the comments of the Win1250ToISO88592() method for details. */
QCString Translator::ISO88592ToWin1250(const QCString & sInput)
{
// The conversion table for characters >127
//
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? ISO88592ToWin1250Tab[c & 0x7F] : c;
}
return result;
}
/*! Returns the string converted from koi8-r to windows-1251. */
/* The method was designed initially for translator_cz.h.
It is used for on-line encoding conversion related to conditional
compilation in Unix/MS Windows environments (both use different
encoding). Encoding table got from QT:qtextcodec.cpp
*/
QCString Translator::Koi8RToWindows1251( const QCString & sInput )
{
QString result;
int len = sInput.length();
result.setUnicode(0, len);
QChar* uc = (QChar*)result.unicode(); // const_cast
const unsigned char * c = (const unsigned char *)(const char*)sInput;
for( int i=0; i<len; i++ ) {
if ( c[i] > 127 )
uc[i] = Koi8RToWindows1251Tab[c[i]-128];
else
uc[i] = c[i];
}
return result.local8Bit();
}
/*! returns the string converted from Windows-1251 to koi8-r */
/* See the comments of the Koi8RToWindows1251() method for details.
Encoding table got from QT:qtextcodec.cpp */
QCString Translator::Windows1251ToKoi8R( const QCString & sInput )
{
QString result;
int len = sInput.length();
result.setUnicode(0, len);
QChar* uc = (QChar*)result.unicode(); // const_cast
const unsigned char * c = (const unsigned char *)(const char*)sInput;
for( int i=0; i<len; i++ ) {
if ( c[i] > 127 )
uc[i] = Windows1251ToKoi8RTab[c[i]-128];
else
uc[i] = c[i];
}
return result.local8Bit();
}
...@@ -25,103 +25,25 @@ ...@@ -25,103 +25,25 @@
class Translator class Translator
{ {
private:
/* Tables for encoding conversions. */
static const char Win1250ToISO88592Tab[];
static const char ISO88592ToWin1250Tab[];
static Q_UINT16 Koi8RToWindows1251Tab[128];
static Q_UINT16 Windows1251ToKoi8RTab[128];
protected: protected:
static const char WinToISOTab[];
static const char ISOToWinTab[];
static Q_UINT16 koi8_r[128];
static Q_UINT16 windows_1251[128];
/*! Returns the string converted from windows-1250 to iso-8859-2. */ /*! Returns the string converted from windows-1250 to iso-8859-2. */
/* The method was designed initially for translator_cz.h. QCString Win1250ToISO88592(const QCString & sInput);
* It is used for on-line encoding conversion related to
* conditional compilation in Unix/MS Windows environments /*! Returns the string converted from iso-8859-2 to windows-1250. */
* (both use different encoding). Later, the translator_hr.h QCString ISO88592ToWin1250(const QCString & sInput);
* (by Boris Bralo) used and improved the same style. As the
* method with the translation table was the same, the
* decision to move it to this base class was made. The same
* holds for ISO88592ToWin1250() method.
*
* Alexandr Chelpanov used the same approach for
* Koi8RToWindows1251() and Windows1251ToKoi8R() methods. Notice,
* that he uses Unicode tables.
*
* It is recommended for possibly other similar methods in future.
*/
QCString Win1250ToISO88592(const QCString & sInput)
{
// The conversion table for characters >127
//
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? WinToISOTab[c & 0x7F] : c;
}
return result;
}
/*! returns the string converted from iso-8859-2 to windows-1250 */
/* See the comments of the Win1250ToISO88592() method for details. */
QCString ISO88592ToWin1250(const QCString & sInput)
{
// The conversion table for characters >127
//
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? ISOToWinTab[c & 0x7F] : c;
}
return result;
}
/*! Returns the string converted from koi8-r to windows-1251. */ /*! Returns the string converted from koi8-r to windows-1251. */
/* The method was designed initially for translator_cz.h. QCString Koi8RToWindows1251( const QCString & sInput );
It is used for on-line encoding conversion related to conditional
compilation in Unix/MS Windows environments (both use different /*! Returns the string converted from windows-1251 to koi8-r. */
encoding). QCString Windows1251ToKoi8R( const QCString & sInput );
Encoding table got from QT:qtextcodec.cpp
*/
QCString Koi8RToWindows1251( const QCString & sInput )
{
QString result;
int len = sInput.length();
result.setUnicode(0, len);
QChar* uc = (QChar*)result.unicode(); // const_cast
const unsigned char * c = (const unsigned char *)(const char*)sInput;
for( int i=0; i<len; i++ ) {
if ( c[i] > 127 )
uc[i] = koi8_r[c[i]-128];
else
uc[i] = c[i];
}
return result.local8Bit();
}
/*! returns the string converted from Windows-1251 to koi8-r */
/* See the comments of the Koi8RToWindows1251() method for details.
Encoding table got from QT:qtextcodec.cpp */
QCString Windows1251ToKoi8R( const QCString & sInput )
{
QString result;
int len = sInput.length();
result.setUnicode(0, len);
QChar* uc = (QChar*)result.unicode(); // const_cast
const unsigned char * c = (const unsigned char *)(const char*)sInput;
for( int i=0; i<len; i++ ) {
if ( c[i] > 127 )
uc[i] = windows_1251[c[i]-128];
else
uc[i] = c[i];
}
return result.local8Bit();
}
public: public:
...@@ -134,19 +56,15 @@ class Translator ...@@ -134,19 +56,15 @@ class Translator
// --- Language control methods ------------------- // --- Language control methods -------------------
/*! Used for identification of the language. May resemble /*! Used for identification of the language.
* the string returned by latexBabelPackage(), but it is not used * See the comment for the translator_en.h method implementation
* for the same purpose. The identification should not be translated. * for details.
* It should be replaced by the name of the language in English
* (e.g. Czech, Japanese, Russian, etc.). It should be equal to
* the identification in language.cpp.
*/ */
virtual QCString idLanguage() = 0; virtual QCString idLanguage() = 0;
/*! Used to get the command(s) for the language support. This method /*! Used to get the command(s) for the language support.
* was designed for languages which do not prefer babel package. * See the comment for the translator_en.h method implementation
* If this methods returns empty string, then the latexBabelPackage() * for details.
* method is used to generate the command for using the babel package.
*/ */
virtual QCString latexLanguageSupportCommand() = 0; virtual QCString latexLanguageSupportCommand() = 0;
......
...@@ -125,6 +125,10 @@ ...@@ -125,6 +125,10 @@
// - The trReimplementedInList() updated to fit the context better. // - The trReimplementedInList() updated to fit the context better.
// - The trReimplementedFromList() updated to fit the context better. // - The trReimplementedFromList() updated to fit the context better.
// //
// 2001/07/16
// - trClassDocumentation() updated as in the English translator.
//
//
// Todo // Todo
// ---- // ----
// - The trReimplementedFromList() should pass the kind of the // - The trReimplementedFromList() should pass the kind of the
...@@ -508,7 +512,16 @@ class TranslatorCzech : public Translator ...@@ -508,7 +512,16 @@ class TranslatorCzech : public Translator
* the documentation of all classes, structs and unions. * the documentation of all classes, structs and unions.
*/ */
virtual QCString trClassDocumentation() virtual QCString trClassDocumentation()
{ return decode("Dokumentace tøíd"); } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode("Dokumentace datových struktur");
}
else
{
return decode("Dokumentace tøíd");
}
}
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files. * the documentation of all files.
......
...@@ -15,22 +15,60 @@ ...@@ -15,22 +15,60 @@
* *
* The translation into Portuguese was provided by * The translation into Portuguese was provided by
* Rui Godinho Lopes <ruiglopes@yahoo.com> * Rui Godinho Lopes <ruiglopes@yahoo.com>
*
* VERSION HISTORY
* ---------------
* 001 20 july 2001
* - Updated for doxygen v1.2.8.1
* 000 ?
* - Initial translation for doxygen v1.1.5
*/ */
#ifndef TRANSLATOR_PT_H #ifndef TRANSLATOR_PT_H
#define TRANSLATOR_PT_H #define TRANSLATOR_PT_H
#include "translator_adapter.h" class TranslatorPortuguese : public Translator
class TranslatorPortuguese : public TranslatorAdapter_1_1_5
{ {
public: public:
// --- Language control methods -------------------
/*! Used for identification of the language. The identification
* should not be translated. It should be replaced by the name
* of the language in English using lower-case characters only
* (e.g. "czech", "japanese", "russian", etc.). It should be equal to
* the identification used in language.cpp.
*/
QCString idLanguage() QCString idLanguage()
{ return "portuguese"; } { return "portuguese"; }
/*! Used to get the LaTeX command(s) for the language support.
* This method should return string with commands that switch
* LaTeX to the desired language. For example
* <pre>"\\usepackage[german]{babel}\n"
* </pre>
* or
* <pre>"\\usepackage{polski}\n"
* "\\usepackage[latin2]{inputenc}\n"
* "\\usepackage[T1]{fontenc}\n"
* </pre>
*
* The English LaTeX does not use such commands. Because of this
* the empty string is returned in this implementation.
*/
virtual QCString latexLanguageSupportCommand()
{ return "Portuguese"; }
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "portuguese"; } { return "portuguese"; }
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{ return "iso-8859-1"; }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */ /*! used in the compound documentation before a list of related functions. */
QCString trRelatedFunctions() QCString trRelatedFunctions()
{ return "Funções associadas"; } { return "Funções associadas"; }
...@@ -45,11 +83,11 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -45,11 +83,11 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! header that is put before the list of typedefs. */ /*! header that is put before the list of typedefs. */
QCString trMemberTypedefDocumentation() QCString trMemberTypedefDocumentation()
{ return "Documentação de tipos definidos"; } { return "Documentação das definições de tipo"; }
/*! header that is put before the list of enumerations. */ /*! header that is put before the list of enumerations. */
QCString trMemberEnumerationDocumentation() QCString trMemberEnumerationDocumentation()
{ return "Documentação da enumerações"; } { return "Documentação das enumerações"; }
/*! header that is put before the list of member functions. */ /*! header that is put before the list of member functions. */
QCString trMemberFunctionDocumentation() QCString trMemberFunctionDocumentation()
...@@ -57,7 +95,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -57,7 +95,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! header that is put before the list of member attributes. */ /*! header that is put before the list of member attributes. */
QCString trMemberDataDocumentation() QCString trMemberDataDocumentation()
{ return "Documentação dos dados"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Documentação dos campos e atributos";
}
else
{
return "Documentação dos dados membro";
}
}
/*! this is the text of a link put after brief descriptions. */ /*! this is the text of a link put after brief descriptions. */
QCString trMore() QCString trMore()
...@@ -101,14 +148,6 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -101,14 +148,6 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
QCString trDefinedIn() QCString trDefinedIn()
{ return "definido em"; } { return "definido em"; }
/*! put as in introduction in the verbatim header file of a class.
* parameter f is the name of the include file.
*/
QCString trIncludeFile()
{ return "Ficheiro incluído"; }
QCString trVerbatimText(const char *f)
{ return (QCString)"Este texto foi originado pelo ficheiro incluído "+f+"."; }
// quick reference sections // quick reference sections
/*! This is put above each page as a link to the list of all groups of /*! This is put above each page as a link to the list of all groups of
...@@ -123,27 +162,54 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -123,27 +162,54 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! This is put above each page as a link to the list of annotated classes */ /*! This is put above each page as a link to the list of annotated classes */
QCString trCompoundList() QCString trCompoundList()
{ return "Lista de componentes"; {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Estruturas de dados";
}
else
{
return "Lista de componentes";
}
}
/*! This is put above each page as a link to the list of documented files */} /*! This is put above each page as a link to the list of documented files */
QCString trFileList() QCString trFileList()
{ return "Lista de ficheiros"; } { return "Lista de ficheiros"; }
/*! This is put above each page as a link to the list of all verbatim headers */ /*! This is put above each page as a link to the list of all verbatim headers */
QCString trHeaderFiles() QCString trHeaderFiles()
{ return "Ficheiros Incluídos"; } { return "Ficheiros incluídos"; }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
QCString trCompoundMembers() QCString trCompoundMembers()
{ return "Componentes"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Campos de dados";
}
else
{
return "Componentes membro";
}
}
/*! This is put above each page as a link to all members of files. */ /*! This is put above each page as a link to all members of files. */
QCString trFileMembers() QCString trFileMembers()
{ return "Declarações"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Globais";
}
else
{
return "Ficheiros membro";
}
}
/*! This is put above each page as a link to all related pages. */ /*! This is put above each page as a link to all related pages. */
QCString trRelatedPages() QCString trRelatedPages()
{ return "Paginas relacionadas"; } { return "Páginas relacionadas"; }
/*! This is put above each page as a link to all examples. */ /*! This is put above each page as a link to all examples. */
QCString trExamples() QCString trExamples()
...@@ -168,28 +234,78 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -168,28 +234,78 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! This is an introduction to the annotated compound list. */ /*! This is an introduction to the annotated compound list. */
QCString trCompoundListDescription() QCString trCompoundListDescription()
{ return "Lista da classes, estruturas, uniões e interfaces com uma breve descrição:"; {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Lista das estruturas de dados com uma breve descrição:";
}
else
{
return "Lista de classes, estruturas, uniões e interfaces com uma breve descrição:";
}
} }
/*! This is an introduction to the page with all class members. */ /*! This is an introduction to the page with all class members. */
QCString trCompoundMembersDescription(bool extractAll) QCString trCompoundMembersDescription(bool extractAll)
{ {
QCString result="Lista de todas as funções membro "; QCString result="Lista de todas as";
if (!extractAll) result+="documentadas "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result+="com links para "; {
if (extractAll) result+="a documentação da classe correspondente:"; result+=" estruturas e campos de uniões";
else result+="o ficheiro a que pertencem:"; }
else
{
result+=" classes membro";
}
if (!extractAll)
{
result+=" documentadas";
}
result+=" com links para ";
if (extractAll)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="a respectiva documentação:";
}
else
{
result+="a documentação de cada membro:";
}
}
else
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="as estruturas/uniões a que pertencem:";
}
else
{
result+="as classes a que pertencem:";
}
}
return result; return result;
} }
/*! This is an introduction to the page with all file members. */ /*! This is an introduction to the page with all file members. */
QCString trFileMembersDescription(bool extractAll) QCString trFileMembersDescription(bool extractAll)
{ {
QCString result="Lista de todas as funções membro "; QCString result="Lista de todas as ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="funções, variáveis, definições, enumerações e definições de tipo ";
if (!extractAll) result+="documentadas "; if (!extractAll) result+="documentadas ";
}
else
{
result+="ficheiros membro";
if (!extractAll) result+="documentados ";
}
result+="com links para "; result+="com links para ";
if (extractAll) result+="a documentação correspondente:"; if (extractAll)
else result+="os ficheiros onde foram definidas:"; result+="os ficheiro a que pertecem:";
else
result+="a respectiva documentação:";
return result; return result;
} }
...@@ -238,7 +354,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -238,7 +354,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
* annotated compound index. * annotated compound index.
*/ */
QCString trCompoundIndex() QCString trCompoundIndex()
{ return "Índice dos componentes"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Índice das estruturas de dados";
}
else
{
return "Índice dos componentes";
}
}
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* list of all files. * list of all files.
...@@ -296,7 +421,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -296,7 +421,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
* list of typedefs * list of typedefs
*/ */
QCString trTypedefs() QCString trTypedefs()
{ return "Definição de tipos"; } { return "Definições de tipos"; }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of enumerations * list of enumerations
...@@ -330,25 +455,25 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -330,25 +455,25 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
* documentation blocks for defines * documentation blocks for defines
*/ */
QCString trDefineDocumentation() QCString trDefineDocumentation()
{ return "Documentação da macro"; } { return "Documentação das macros"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes * of documentation blocks for function prototypes
*/ */
QCString trFunctionPrototypeDocumentation() QCString trFunctionPrototypeDocumentation()
{ return "Documentação do protótipo da função"; } { return "Documentação dos protótipos de funções"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs * of documentation blocks for typedefs
*/ */
QCString trTypedefDocumentation() QCString trTypedefDocumentation()
{ return "Documentação do tipo"; } { return "Documentação dos tipos"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types * of documentation blocks for enumeration types
*/ */
QCString trEnumerationTypeDocumentation() QCString trEnumerationTypeDocumentation()
{ return "Documentação do tipo de enumeração"; } { return "Documentação dos valores da enumeração"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values * of documentation blocks for enumeration values
...@@ -360,19 +485,28 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -360,19 +485,28 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
* of documentation blocks for functions * of documentation blocks for functions
*/ */
QCString trFunctionDocumentation() QCString trFunctionDocumentation()
{ return "Documentação da função"; } { return "Documentação das funções"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables * of documentation blocks for variables
*/ */
QCString trVariableDocumentation() QCString trVariableDocumentation()
{ return "Documentação da variável"; } { return "Documentação das variáveis"; }
/*! This is used in the documentation of a file/namespace/group before /*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds * the list of links to documented compounds
*/ */
QCString trCompounds() QCString trCompounds()
{ return "Componentes"; } {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Estruturas de Dados";
}
else
{
return "Componentes";
}
}
/*! This is used in the documentation of a group before the list of /*! This is used in the documentation of a group before the list of
* links to documented files * links to documented files
...@@ -409,7 +543,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -409,7 +543,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! this text is generated when the \\reimp command is used. */ /*! this text is generated when the \\reimp command is used. */
QCString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
{ return "Redefinido por razões internas; o interface não é afectado"; { return "Redefinido por razões internas; A interface não foi afectada.";
} }
/*! this text is generated when the \\warning command is used. */ /*! this text is generated when the \\warning command is used. */
...@@ -452,8 +586,11 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -452,8 +586,11 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
QCString trGeneratedBy() QCString trGeneratedBy()
{ return "Gerado por"; } { return "Gerado por"; }
// new since 0.49-990307 //////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList() virtual QCString trNamespaceList()
{ return "Lista de namespaces"; } { return "Lista de namespaces"; }
...@@ -480,7 +617,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -480,7 +617,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
* related classes * related classes
*/ */
virtual QCString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
{ return "Documentação das funções relacionadas e classes amigas"; } { return "Documentação das classes amigas e funções relacionadas"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990425 // new since 0.49-990425
...@@ -491,7 +628,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -491,7 +628,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
ClassDef::CompoundType compType, ClassDef::CompoundType compType,
bool isTemplate) bool isTemplate)
{ {
QCString result="Referencia "; QCString result="Referência ";
switch(compType) switch(compType)
{ {
case ClassDef::Class: result+="à classe "; break; case ClassDef::Class: result+="à classe "; break;
...@@ -500,10 +637,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -500,10 +637,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
case ClassDef::Interface: result+="ao interface "; break; case ClassDef::Interface: result+="ao interface "; break;
case ClassDef::Exception: result+="à excepção "; break; case ClassDef::Exception: result+="à excepção "; break;
} }
if (isTemplate) result+="Template ";
if (isTemplate)
result+="<template> ";
result+=(QCString)clName; result+=(QCString)clName;
return result; return result;
} }
...@@ -511,7 +645,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -511,7 +645,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! used as the title of the HTML page of a file */ /*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName) virtual QCString trFileReference(const char *fileName)
{ {
QCString result= "Referencia ao ficheiro "; QCString result= "Referência ao ficheiro ";
result += fileName; result += fileName;
return result; return result;
} }
...@@ -519,7 +653,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -519,7 +653,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! used as the title of the HTML page of a namespace */ /*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName) virtual QCString trNamespaceReference(const char *namespaceName)
{ {
QCString result= "Referencia ao namespace "; QCString result= "Referência ao namespace ";
result += namespaceName; result += namespaceName;
return result; return result;
} }
...@@ -565,7 +699,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -565,7 +699,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
if (i<numEntries-2) // not the fore last entry if (i<numEntries-2) // not the fore last entry
result+=", "; result+=", ";
else // the fore last entry else // the fore last entry
result+=", e "; result+=" e ";
} }
} }
return result; return result;
...@@ -614,8 +748,10 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -614,8 +748,10 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
if (extractAll) result+="de todos os "; if (extractAll) result+="de todos os ";
else result+="de toda a documentação dos "; else result+="de toda a documentação dos ";
result+="membros do namespace com links para "; result+="membros do namespace com links para ";
if (extractAll) result+="a documentação de cada membro:"; if (extractAll)
else result+="o namespace correspondente:"; result+="a documentação de cada membro:";
else
result+="o namespace correspondente:";
return result; return result;
} }
...@@ -738,7 +874,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -738,7 +874,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
/*! header that is put before the list of constructor/destructors. */ /*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation() virtual QCString trConstructorDocumentation()
{ {
return "Documentação do Construtor & Destrutor"; return "Documentação dos Construtores & Destrutor";
} }
/*! Used in the file documentation to point to the corresponding sources. */ /*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode() virtual QCString trGotoSourceCode()
...@@ -805,9 +941,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -805,9 +941,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
return "Tipos Públicos"; return "Tipos Públicos";
} }
virtual QCString trPublicAttribs() virtual QCString trPublicAttribs()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Campos de Dados";
}
else
{ {
return "Atributos Públicos"; return "Atributos Públicos";
} }
}
virtual QCString trStaticPublicAttribs() virtual QCString trStaticPublicAttribs()
{ {
return "Atributos Públicos Estáticos"; return "Atributos Públicos Estáticos";
...@@ -870,12 +1013,340 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5 ...@@ -870,12 +1013,340 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
} }
virtual QCString trInclByDepGraph() virtual QCString trInclByDepGraph()
{ {
return "Este gráfico mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:"; return "Este grafo mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:";
} }
virtual QCString trSince() virtual QCString trSince()
{ {
return "Desde"; return "Desde";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.1.5
//////////////////////////////////////////////////////////////////////////
/*! title of the graph legend page */
virtual QCString trLegendTitle()
{
return "Legenda do grafo";
}
/*! page explaining how the dot graph's should be interpreted */
virtual QCString trLegendDocs()
{
return
"Esta página explica como interpretar os grafos gerados pelo doxygen.<p>\n"
"Considere o seguinte exemplo:\n"
"\\code\n"
"/*! Esta classe vai estar escondida devido à truncação */\n"
"class Invisible { };\n\n"
"/*! Esta classe tem a relação de herança escondida */\n"
"class Truncated : public Invisible { };\n\n"
"/* Classe não documentada por comentários doxygen */\n"
"class Undocumented { };\n\n"
"/*! Classe derivada usando derivação pública */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! Classe derivada usando derivação protegida */\n"
"class ProtectedBase { };\n\n"
"/*! Classe derivada usando derivação privada */\n"
"class PrivateBase { };\n\n"
"/*! Classe usada pela classe Inherited */\n"
"class Used { };\n\n"
"/*! Super classe que deriva de várias classes */\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
" public Undocumented\n"
"{\n"
" private:\n"
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
"Se no ficheiro de configuração estiver a tag \\c MAX_DOT_GRAPH_HEIGHT "
"com o valor de 200 então o seguinte grafo será gerado:"
"<p><center><img src=\"graph_legend.gif\"></center>\n"
"<p>\n"
"As caixas no grafo anterior têm as seguintes interpretações:\n"
"<ul>\n"
"<li>Uma caixa inteiramente preta representa a estrutura ou a classe para "
"a qual o grafo foi gerado.\n"
"<li>Uma caixa com borda preta representa uma estrutura ou classe documentada.\n"
"<li>Uma caixa com borda cinzenta representa uma estrutura ou classe não documentada.\n"
"<li>Uma caixa com borda vermelha representa uma estrutura ou classe documentada onde "
"nem todas as relações de herança/encapsulamento são exibidas. Um grafo é truncado "
"quando não cabe na sua área predefinida.\n"
"</ul>\n"
"As setas têm a seguinte interpretação:\n"
"<ul>\n"
"<li>Uma seta azul escura representa uma relação de herança pública entre duas classes.\n"
"<li>Uma seta verde escura representa uma relação de herança protegida.\n"
"<li>Uma seta vermelha escura representa uma relação de herança privada.\n"
"<li>Uma seta rocha em tracejado representa uma relação de encapsulamento ou uso por "
"parte de outra classe. A legenda da seta contém o nome da variável ou variáveis da "
"relação. A seta aponta da classe que estabelece a relação para a classe ou estrutura que "
"é acessível.\n"
"</ul>\n";
}
/*! text for the link to the legend page */
virtual QCString trLegend()
{
return "legenda";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "Teste";
}
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return "Lista de teste";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.1
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for KDE-2 IDL methods */
virtual QCString trDCOPMethods()
{
return "Métodos DCOP";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.2
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
return "Propriedades";
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
return "Documentação das propriedades";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return "Interfaces";
}
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Estruturas de dados";
}
else
{
return "Classes";
}
}
/*! Used as the title of a Java package */
virtual QCString trPackage(const char *name)
{
return (QCString)"Pacote "+name;
}
/*! Title of the package index page */
virtual QCString trPackageList()
{
return "Lista de pacotes";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "Lista de pacotes com uma breve descrição (se disponível):";
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
{
return "Pacotes";
}
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return "Documentação do pacote";
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
return "Valor:";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return "Bug";
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
return "Lista de Bugs";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.6
//////////////////////////////////////////////////////////////////////////
/*! Used as ansicpg for RTF file
*
* The following table shows the correlation of Charset name, Charset Value and
* <pre>
* Codepage number:
* Charset Name Charset Value(hex) Codepage number
* ------------------------------------------------------
* DEFAULT_CHARSET 1 (x01)
* SYMBOL_CHARSET 2 (x02)
* OEM_CHARSET 255 (xFF)
* ANSI_CHARSET 0 (x00) 1252
* RUSSIAN_CHARSET 204 (xCC) 1251
* EE_CHARSET 238 (xEE) 1250
* GREEK_CHARSET 161 (xA1) 1253
* TURKISH_CHARSET 162 (xA2) 1254
* BALTIC_CHARSET 186 (xBA) 1257
* HEBREW_CHARSET 177 (xB1) 1255
* ARABIC _CHARSET 178 (xB2) 1256
* SHIFTJIS_CHARSET 128 (x80) 932
* HANGEUL_CHARSET 129 (x81) 949
* GB2313_CHARSET 134 (x86) 936
* CHINESEBIG5_CHARSET 136 (x88) 950
* </pre>
*
*/
virtual QCString trRTFansicp()
{
return "1252";
}
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
*/
virtual QCString trRTFCharSet()
{
return "0";
}
/*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
return "Índice";
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trClass(bool first_capital, bool singular)
{
QCString result((first_capital ? "Classe" : "classe"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trFile(bool first_capital, bool singular)
{
QCString result((first_capital ? "Ficheiro" : "ficheiro"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trNamespace(bool first_capital, bool singular)
{
QCString result((first_capital ? "Namespace" : "namespace"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGroup(bool first_capital, bool singular)
{
QCString result((first_capital ? "Grupo" : "grupo"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trPage(bool first_capital, bool singular)
{
QCString result((first_capital ? "Página" : "página"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trMember(bool first_capital, bool singular)
{
QCString result((first_capital ? "Membro" : "membro"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "Campo" : "campo"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Globa" : "globa"));
result+= singular? "l" : "ais";
return result;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.7
//////////////////////////////////////////////////////////////////////////
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
{
QCString result((first_capital ? "Autor" : "autor"));
if (!singular) result+="es";
return result;
}
}; };
#endif #endif
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
* The translation into Ukrainian was provided by
* Olexij Tkatchenko (olexij.tkatchenko@parcs.de)
*/
#ifndef TRANSLATOR_UA_H
#define TRANSLATOR_UA_H
class TranslatorUkrainian : public Translator
{
private:
/*! The Decode() inline assumes the source written in the
Koi8-U encoding (maintainer dependent).
*/
inline QCString decode(const QCString & sInput)
{
#ifdef _WIN32
return Koi8RToWindows1251(sInput);
#else
return sInput;
#endif
}
public:
/*! Used for identification of the language. */
virtual QCString idLanguage()
{ return "ukrainian"; }
/* Used to get the command(s) for the language support. */
virtual QCString latexLanguageSupportCommand()
#ifdef _WIN32
{ return "\\usepackage[cp1251]{inputenc}\n\\usepackage[ukrainian]{babel}\n"; }
#else
{ return "\\usepackage[koi8-u]{inputenc}\n\\usepackage[ukrainian]{babel}\n"; }
#endif
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
#ifdef _WIN32
{ return "Windows-1251"; }
#else
{ return "koi8-u"; }
#endif
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
{ return decode("óÐÏÒ¦ÄÎÅΦ ÆÕËæ§"); }
/*! subscript for the related functions. */
virtual QCString trRelatedSubscript()
{ return decode("(ÎÅ ÍÅÔÏÄÉ ËÏÍÐÏÎÅÎÔ)"); }
/*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
{ return decode("äÅÔÁÌØÎÉÊ ÏÐÉÓ"); }
/*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
{ return decode("ïÐÉÓ ÔÉÐ¦× ËÏÒÉÓÔÕ×ÁÞÁ"); }
/*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
{ return decode("ïÐÉÓ ÐÅÒÅÌ¦Ë¦× ËÏÒÉÓÔÕ×ÁÞÁ"); }
/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{ return decode("ïÐÉÓ ÍÅÔÏÄ¦× ËÏÍÐÏÎÅÎÔ"); }
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "ðÏÌÑ" );
}
else
{
return decode( "ëÏÍÐÏÎÅÎÔΦ ÄÁΦ" );
}
}
/*! this is the text of a link put after brief descriptions. */
virtual QCString trMore()
{ return decode("äÅÔÁÌØΦÛÅ..."); }
/*! put in the class documentation */
/* Dosn't use when optimization for C is on. */
virtual QCString trListOfAllMembers()
{
return decode( "óÐÉÓÏË ×Ó¦È ÅÌÅÍÅÎÔ¦×" );
}
/*! used as the title of the "list of all members" page of a class */
/* Dosn't use when optimization for C is on. */
virtual QCString trMemberList()
{
return decode( "CÐÉÓÏË ÅÌÅÍÅÎÔ¦×" );
}
/*! this is the first part of a sentence that is followed by a class name */
/* Dosn't use when optimization for C is on. */
virtual QCString trThisIsTheListOfAllMembers()
{ return decode("ðÏ×ÎÉÊ ÓÐÉÓÏË ÅÌÅÍÅÎÔ¦×"); }
/*! this is the remainder of the sentence after the class name */
/* Dosn't use when optimization for C is on. */
virtual QCString trIncludingInheritedMembers()
{ return decode(", ×ËÌÀÞÁÀÞÉ ×Ó¦ ÕÓÐÁÄËÏ×ÁΦ ÅÌÅÍÅÎÔÉ"); }
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
virtual QCString trGeneratedAutomatically(const char *s)
{ QCString result=decode("á×ÔÏÍÁÔÉÞÎÏ ÓÔ×ÏÒÅÎÏ ÚÁ ÄÏÐÏÍÏÇÏÀ Doxygen");
if (s) result+=decode(" ÄÌÑ ")+s;
result+=decode(" Ú ÔÅËÓÔÕ ÐÒÏÇÒÁÍÉ.");
return result;
}
/*! put after an enum name in the list of all members */
virtual QCString trEnumName()
{ return decode("ðÅÒÅ̦Ë"); }
/*! put after an enum value in the list of all members */
virtual QCString trEnumValue()
{ return decode("åÌÅÍÅÎÔ ÐÅÒÅ̦ËÕ"); }
/*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn()
{ return decode("×ÉÚÎÁÞÅÎÏ × "); }
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
* compounds or files (see the \\group command).
*/
virtual QCString trModules()
{ return decode("ðÒÏÇÒÁÍΦ ÍÏÄÕ̦"); }
/*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy()
{ return decode("¶¤ÒÁÒÈ¦Ñ ËÌÁÓ¦×"); }
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ" );
}
else
{
return decode( "ëÌÁÓÉ" );
}
}
/*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
{ return decode("æÁÊÌÉ"); }
/*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return decode("úÁÇÏÌÏ×ÏÞΦ ÆÁÊÌÉ"); }
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "ðÏÌÑ ÓÔÒÕËÔÕÒ" );
}
else
{
return decode( "åÌÅÍÅÎÔÉ ËÌÁÓ¦×" );
}
}
/*! This is put above each page as a link to all members of files. */
/*??*/
virtual QCString trFileMembers()
{
return decode( "åÌÅÍÅÎÔÉ ÆÁÊÌÕ" );
}
/*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages()
/* ?? ÷ÁÒÉÁÎÔ ÐÅÒÅ×ÏÄÁ "óÍ. ÔÁËÖÅ: " ÂÏÌÅÅ ÕÄÁÞÎÙÊ, ÎÏ ÎÅ × ÚÁÇÏÌÏ×ËÅ,
ËÁË × ÄÁÎÎÏÍ ÓÌÕÞÁÅ. */
{ return decode("äÏÄÁÔËÏ×Á ¦ÎÆÏÒÍÁæÑ"); }
/*! This is put above each page as a link to all examples. */
virtual QCString trExamples()
{ return decode("ðÒÉËÌÁÄÉ"); }
/*! This is put above each page as a link to the search engine. */
virtual QCString trSearch()
{ return decode("ðÏÛÕË"); }
/*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription()
{ return decode("óÐÉÓÏË ÕÓÐÁÄËÕ×ÁÎØ ×ÐÏÒÑÄËÏ×ÁÎÏ ÎÁÂÌÉÖÅÎÏ ÄÏ ÁÌÆÁצÔÕ"); }
/*! This is an introduction to the list with all files. */
virtual QCString trFileListDescription(bool extractAll)
{
QCString result="ðÏ×ÎÉÊ ÓÐÉÓÏË ";
if (!extractAll) result+="ÄÏËÕÍÅÎÔÏ×ÁÎÉÈ ";
result+="ÆÁÊ̦×.";
return decode(result);
}
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ Ú ËÏÒÏÔËÉÍ ÏÐÉÓÏÍ." );
}
else
{
return decode( "ëÌÁÓÉ, ÓÔÒÕËÔÕÒÉ, ÏÂ'¤ÄÎÁÎÎÑ ÔÁ ¦ÎÔÅÒÆÅÊÓÉ Ú ËÏÒÏÔËÉÍ ÏÐÉÓÏÍ." );
}
}
/*! This is an introduction to the page with all class members. */
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="óÐÉÓÏË ×Ó¦È ";
if(!extractAll) result+="ÄÏËÕÍÅÎÔÏÁÎÉÈ ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result+="ÅÌÅÍÅÎÔ¦× ÓÔÒÕËÔÕÒ ÄÁÎÉÈ Ú ÐÏÓÉÌÁÎÎÑÍ ÎÁ ";
else
result+="ÅÌÅÍÅÎÔ¦× ËÌÁÓ¦× ÄÁÎÉÈ Ú ÐÏÓÉÌÁÎÎÑÍ ÎÁ ";
if(extractAll)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result+="ÄÏËÕÍÅÎÔÁæÀ ÐÏ ÓÔÒÕËÔÕÒ¦/ÏÂ'¤ÄÎÁÎÎÀ ËÏÖÎÏÇÏ ÅÌÅÍÅÎÔÕ.";
else
result+="ÄÏËÕÍÅÎÔÁæÀ ÐÏ ËÌÁÓÕ ËÏÖÎÏÇÏ ÅÌÅÍÅÎÔÕ.";
}
else
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result += "צÄÐÏצÄΦ ÓÔÒÕËÔÕÒÉ";
else
result += "צÄÐÏצÄΦ ËÌÁÓÉ";
result+=", ÄÏ ÑËÉÈ ×ÏÎÉ ÎÁÌÅÖÁÔØ.";
}
return decode( result );
}
/*! This is an introduction to the page with all file members. */
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="óÐÉÓÏË ×Ó¦È ";
if (!extractAll) result+="ÄÏËÕÍÅÎÔÏ×ÁÎÉÈ ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="ÆÕÎËæÊ, ÚͦÎÎÉÈ, ÍÁËÒÏÏÚÎÁÞÅÎØ, "
"ÐÅÒÅÌ¦Ë¦× ¦ ÏÚÎÁÞÅÎØ ÔÉЦ×";
}
else
{
result+="ÅÌÅÍÅÎÔ¦× ÆÁÊÌ¦× ";
}
result+=" Ú ÐÏÓÉÌÁÎÑÍ ÎÁ ";
if (extractAll)
result+="ÆÁÊÌÉ, ÄÏ ÑËÉÈ ×ÏÎÉ ÎÁÌÅÖÁÔØ.";
else
result+="ÄÏËÕÍÅÎÔÁæÀ.";
return decode( result );
}
/*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return decode("ðÏ×ÎÉÊ ÓÐÉÓÏË ÚÁÇÏÌÏ×ÏÞÎÉÈ ÆÁÊ̦×."); }
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return decode("ðÏ×ÎÉÊ ÓÐÉÓÏË ÐÒÉËÌÁĦ×."); }
/*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
{ return decode("ðÏÌÎÙÊ ÓÐÉÓÏË ÄÏÄÁÔËÏ×ÉÈ ÏÐÉÓ¦×."); }
/*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription()
{ return decode("ðÏÌÎÙÊ ÓÐÉÓÏË ÍÏÄÕ̦×."); }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return decode("ïÐÉÓ ×¦ÄÓÕÔΦÊ"); }
// index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{ return decode("äÏËÕÍÅÎÔÁæÑ"); }
/*! This is used in LaTeX as the title of the chapter with the
* index of all groups.
*/
virtual QCString trModuleIndex()
{ return decode("áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË ÍÏÄÕ̦×"); }
/*! This is used in LaTeX as the title of the chapter with the
* class hierarchy.
*/
virtual QCString trHierarchicalIndex()
{ return decode("¶¤ÒÁÒȦÞÎÉÊ ÐÏËÁÖÞÉË ËÌÁÓ¦×"); }
/*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
virtual QCString trCompoundIndex()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË ÓÔÒÕËÔÕÒ ÄÁÎÉÈ" );
}
else
{
return decode( "áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË ËÌÁÓ¦×" );
}
}
/*! This is used in LaTeX as the title of the chapter with the
* list of all files.
*/
virtual QCString trFileIndex()
{ return decode( "ðÏËÁÖÞÉË ÆÁÊÌ×" ); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups.
*/
virtual QCString trModuleDocumentation()
{ return decode("ðÒÏÇÒÁÍΦ íÏÄÕ̦"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
*/
virtual QCString trClassDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ" );
}
else
{
return decode( "ëÌÁÓÉ" );
}
}
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
*/
virtual QCString trFileDocumentation()
{ return decode("æÁÊÌÉ"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
virtual QCString trExampleDocumentation()
{ return decode("ðÒÉËÌÁÄÉ"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
virtual QCString trPageDocumentation()
{ return decode("äÏËÕÍÅÎÔÁÃ¦Ñ ÐÏ ÔÅͦ"); }
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return decode("äÏצÄËÏ×ÉÊ ÐÏÓ¦ÂÎÉË"); }
/*! This is used in the documentation of a file as a header before the
* list of defines
*/
virtual QCString trDefines()
{ return decode("íÁËÒÏÏÚÎÁÞÅÎÎÑ"); }
/*! This is used in the documentation of a file as a header before the
* list of function prototypes
*/
virtual QCString trFuncProtos()
{ return decode("ðÒÏÔÏÔÉÐÉ ÆÕËæÊ"); }
/*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
virtual QCString trTypedefs()
{ return decode("ïÚÎÁÞÅÎÎÑ ÔÉЦ×"); }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
virtual QCString trEnumerations()
{ return decode("ðÅÒÅ̦ËÉ"); }
/*! This is used in the documentation of a file as a header before the
* list of (global) functions
*/
virtual QCString trFunctions()
{ return decode("æÕÎËæ§"); }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trVariables()
{ return decode("úͦÎΦ"); }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trEnumerationValues()
{ return decode("åÌÅÍÅÎÔÉ ÐÅÒÅ̦˦×"); }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
virtual QCString trDefineDocumentation()
{ return decode("ïÐÉÓ ÍÁËÒÏÏÚÎÁÞÅÎØ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes
*/
virtual QCString trFunctionPrototypeDocumentation()
{ return decode("ïÐÉÓ ÐÒÏÔÏÔÉÐ¦× ÆÕÎËæÊ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
virtual QCString trTypedefDocumentation()
{ return decode("ïÐÉÓ ÏÚÎÁÞÅÎØ ÔÉЦ×"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
{ return decode("ïÐÉÓ ÐÅÒÅ̦˦×"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return decode("ïÐÉÓ ÅÌÅÍÅÎÔ¦× ÐÅÒÅ̦ËÕ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
{ return decode("ïÐÉÓ ÆÕÎËæÊ"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
virtual QCString trVariableDocumentation()
{ return decode("ïÐÉÓ ÚͦÎÎÉÈ"); }
/*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
*/
virtual QCString trCompounds()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ" );
}
else
{
return decode( "ëÌÁÓÉ" );
}
}
/*! This is used in the documentation of a group before the list of
* links to documented files
*/
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
virtual QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=decode("äÏËÕÍÅÎÔÁÃ¦Ñ ");
if (projName) result+=decode("ÄÏ ")+projName;
result+=decode(" ÓÔ×ÏÒÅÎÁ ")+date;
result+=decode(" ÓÉÓÔÅÍÏÀ");
return result;
}
/*! This is part of the sentence used in the standard footer of each page.
*/
virtual QCString trWrittenBy()
{
return decode("á×ÔÏÒ:");
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName)
{
return decode("óÈÅÍÁ ÕÓÐÁÄËÕ×ÁÎØ ÄÌÑ ")+clName;
}
/*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
{ return decode("ô¦ÌØËÉ ÄÌÑ ×ÎÕÔÒ¦ÛÎØÏÇÏ ËÏÒÉÓÔÕ×ÁÎÎÑ"); }
/*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
/*??*/
{ return decode("úͦÎÅÎÏ Ú ×ÎÕÔÒ¦ÛÎ¦È ÐÒÉÞÉÎ. úͦÎÉ ÎÅ ÔÏÒËÁÀÔØÓÑ API.");
}
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return decode("úÁÓÔÅÒÅÖÅÎÎÑ"); }
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return decode("ðÏÍÉÌËÉ ÔÁ ÏÂÍÅÖÅÎÎÑ ÚÁÓÔÏÓÕ×ÁÎÎÑ"); }
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return decode("÷ÅÒÓ¦Ñ"); }
/*! this text is generated when the \\date command is used. */
virtual QCString trDate()
{ return decode("äÁÔÁ"); }
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return decode("ðÏ×ÅÒÔÁ¤"); }
/*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
{ return decode("äÉ×. ÔÁËÏÖ"); }
/*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
{ return decode("áÒÇÕÍÅÎÔÉ"); }
/*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
{ return decode("ïÂÒÏÂËÁ ×ÉÎÑÔËÏ×ÉÈ ÓÉÔÕÁæÊ"); }
/*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
{ return decode("óÔ×ÏÒÅÎÏ ÓÉÓÔÅÍÏÀ"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
{ return decode("ðÒÏÓÔ¦Ò ¦ÍÅÎ"); }
/*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll)
{
QCString result="ðÏ×ÎÉÊ ÐÅÒÅÌ¦Ë ";
if (!extractAll) result+="ÄÏËÕÍÅÎÔÏ×ÁÎÉÈ ";
result+="ÐÒÏÓÔÏÒ¦× ¦ÍÅÎ.";
return decode(result);
}
/*! used in the class documentation as a header before the list of all
* friends of a class
*/
virtual QCString trFriends()
{ return decode("äÒÕÖΦ ËÌÁÓÉ"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
/*! used in the class documentation as a header before the list of all
* related classes
*/
virtual QCString trRelatedFunctionDocumentation()
{ return decode("äÏËÕÍÅÎÔÁÃÉÑ ÄÏ ÄÒÕÖÎ¦È ËÌÁÓ¦× ÔÁ צÄÐÏצÄÎÉÈ ÆÕÎËæÊ"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
QCString result;
if (isTemplate)
{
result="ûÁÂÌÏÎ ";
switch(compType)
{
case ClassDef::Class: result+="ËÌÁÓÕ"; break;
case ClassDef::Struct: result+="ÓÔÒÕËÔÕÒÉ"; break;
case ClassDef::Union: result+="ÏÂ'¤ÄÎÁÎÎÑ"; break;
case ClassDef::Interface: result+="¦ÎÔÅÒÆÅÊÓÕ"; break;
case ClassDef::Exception: result+="÷ÉÎÑÔÏË"; break;
}
}
else
{
switch(compType)
{
case ClassDef::Class: result+="ëÌÁÓ"; break;
case ClassDef::Struct: result+="óÔÒÕËÔÕÒÁ"; break;
case ClassDef::Union: result+="ïÂ'¤ÄÎÁÎÎÑ"; break;
case ClassDef::Interface: result+="¶ÎÔÅÒÆÅÊÓ"; break;
case ClassDef::Exception: result+="÷ÉÎÑÔÏË"; break;
}
}
result+=" ";
return decode(result)+clName;
}
/*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
return decode("æÁÊÌ ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
return decode("ðÒÏÓÔ¦Ò ¦ÍÅÎ ")+namespaceName;
}
virtual QCString trPublicMembers()
{ return decode("úÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÅÌÅÍÅÎÔÉ"); }
virtual QCString trPublicSlots()
{ return decode("úÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÓÌÏÔÉ"); }
virtual QCString trSignals()
{ return decode("óÉÇÎÁÌÉ"); }
virtual QCString trStaticPublicMembers()
{ return decode("úÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÓÔÁÔÉÞΦ ÅÌÅÍÅÎÔÉ"); }
virtual QCString trProtectedMembers()
{ return decode("úÁÈÉÝÅΦ ÅÌÅÍÅÎÔÉ"); }
virtual QCString trProtectedSlots()
{ return decode("úÁÈÉÝÅΦ ÓÌÏÔÉ"); }
virtual QCString trStaticProtectedMembers()
{ return decode("úÁÈÉÝÅΦ ÓÔÁÔÉÞΦ ÅÌÅÍÅÎÔÉ"); }
virtual QCString trPrivateMembers()
{ return decode("ðÒÉ×ÁÔΦ ÅÌÅÍÅÎÔÉ"); }
virtual QCString trPrivateSlots()
{ return decode("ðÒÉ×ÁÔΦ ÓÌÏÔÉ"); }
virtual QCString trStaticPrivateMembers()
{ return decode("ðÒÉ×ÁÔΦ ÓÔÁÔÉÞΦ ÅÌÅÍÅÎÔÉ"); }
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
virtual QCString trWriteList(int numEntries)
{
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=decode( " ¦ " );
}
}
return result;
}
/*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritsList(int numEntries)
{
return decode("õÓÐÁÄËÏ×Õ¤ ËÌÁÓ ")+trWriteList(numEntries)+".";
}
/*! used in class documentation to produce a list of super classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritedByList(int numEntries)
{
return decode("õÓÐÁÄËÏ×ÁÎÏ ËÌÁÓÁÍÉ ")+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
virtual QCString trReimplementedFromList(int numEntries)
{
return decode("ðÅÒÅÏÚÎÁÞÅÎÎÑ Ú ")+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* all member that overwrite the implementation of this member.
*/
virtual QCString trReimplementedInList(int numEntries)
{
return decode("ðÅÒÅÏÚÎÁÞÁ¤ÔØÓÑ × ")+trWriteList(numEntries)+".";
}
/*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
{ return decode("åÌÅÍÅÎÔÉ ÐÒÏÓÔÏÒÕ ¦ÍÅÎ"); }
/*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="ðÏ×ÎÉÊ ÐÅÒÅÌ¦Ë ";
if (!extractAll) result+="ÄÏËÕÍÅÎÔÏ×ÁÎÉÈ ";
result+="ÅÌÅÍÅÔ¦× ÐÒÏÓÔÏÒÕ ¦ÍÅÎ Ú ÐÏÓÉÌÁÎÎÑÍ ";
if (extractAll)
result+="ÎÁ ÄÏËÕÍÅÎÔÁæÀ ÄÌÑ ËÏÖÎÏÇÏ ÅÌÅÍÅÎÔÕ:";
else
result+="ÎÁ ÐÒÏÓÔ¦Ò ¦ÍÅÎ ÄÏ ÑËÏÇÏ ×ÏÎÉ ÎÁÌÅÖÁÔØ:";
return decode(result);
}
/*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
virtual QCString trNamespaceIndex()
{ return decode("áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË ÐÒÏÓÔÏÒÕ ¦ÍÅÎ"); }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
virtual QCString trNamespaceDocumentation()
{ return decode("ïÐÉÓ ÐÒÏÓÔÏÒÕ ¦ÍÅÎ"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
/*! This is used in the documentation before the list of all
* namespaces in a file.
*/
virtual QCString trNamespaces()
{ return decode( "ðÒÏÓÔÏÒÉ ¦ÍÅÎ" ); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990728
//////////////////////////////////////////////////////////////////////////
/*! This is put at the bottom of a class documentation page and is
* followed by a list of files that were used to generate the page.
*/
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
QCString result=(QCString)"äÏËÕÍÅÎÔÁÃ¦Ñ ";
switch(compType)
{
case ClassDef::Class:
if (single) result+="ÃØÏÇÏ ËÌÁÓÕ"; else result+="ÃÉÈ ËÌÁÓ¦×";
break;
case ClassDef::Struct:
if (single) result+="椧 ÓÔÒÕËÔÕÒÉ"; else result+="ÃÉÈ ÓÔÒÕËÔÕÒ";
break;
case ClassDef::Union:
if (single) result+="ÃØÏÇÏ ÏÂ'¤ÄÎÁÎÎÑ"; else result+="ÃÉÈ ÏÂ'¤ÄÎÁÎØ";
break;
case ClassDef::Interface:
if (single) result+="ÃØÏÇÏ ¦ÎÔÅÒÆÅÊÓÕ"; else result+="ÃÉÈ ¦ÎÔÅÒÆÅÊÓ¦×";
break;
case ClassDef::Exception:
if (single) result+="ÃØÏÇÏ ×ÉÎÑÔËÕ"; else result+="ÃÉÈ ×ÉÎÑÔ˦×";
break;
}
result+=" ÂÕÌÁ ÓÔ×ÏÒÅÎÁ Ú ÆÁÊÌ";
if (single) result+="Õ:"; else result+="¦×:";
return decode(result);
}
/*! This is in the (quick) index as a link to the alphabetical compound
* list.
*/
virtual QCString trAlphabeticalList()
{ return decode("áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË"); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990901
//////////////////////////////////////////////////////////////////////////
/*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues()
{ return decode("úÎÁÞÅÎÉÑ, ÝÏ ÐÏ×ÅÒÔÁÀÔØÓÑ"); }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
virtual QCString trMainPage()
{ return decode("ôÉÔÕÌØÎÁ ÓÔÏÒ¦ÎËÁ"); }
/*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
virtual QCString trPageAbbreviation()
{ return decode("ÓÔÏÒ."); }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991106
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return decode("÷ÉȦÄΦ ÔÅËÓÔÉ.");
}
virtual QCString trDefinedAtLineInSourceFile()
{
return decode("äÉ×. ÏÚÎÁÞÅÎÎÑ × ÆÁÊ̦ @1, ÒÑÄÏË @0");
}
virtual QCString trDefinedInSourceFile()
{
return decode("äÉ×. ÏÚÎÁÞÅÎÎÑ × ÆÁÊ̦ @0");
}
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991205
//////////////////////////////////////////////////////////////////////////
virtual QCString trDeprecated()
{
return decode("îÅ ÒÅËÏÍÅÎÄÏ×ÁÎÏ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.0.0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const char *clName)
{
return (QCString)decode("ä¦ÁÇÒÁÍÁ Ú×'ÑÚË¦× ËÌÁÓÕ ")+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName)
{
return decode("ä¦ÁÇÒÁÍÁ ×ËÌÀÞÅÎÉÈ ÚÁÇÏÌÏ×ÏÞÎÉÈ ÆÁÊÌ¦× ÄÌÑ ")+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return decode("ëÏÎÓÔÒÕËÔÏÒ(É)");
}
/*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
{
return decode("äÉ×. ×ÉȦÄΦ ÔÅËÓÔÉ.");
}
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
return decode("äÉ×. ÄÏËÕÍÅÎÔÁæÀ.");
}
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return decode("ðÅÒÅÄÕÍÏ×É");
}
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return decode("ð¦ÓÌÑÕÍÏ×É");
}
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return decode("¶Î×ÁÒ¦ÁÎÔ");
}
/*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue()
{
return decode("ðÏÞÁÔËÏצ ÚÎÁÞÅÎÎÑ");
}
/*! Text used the source code in the file index */
virtual QCString trCode()
{
return decode("÷ÉȦÄΦ ÔÅËÓÔÉ");
}
virtual QCString trGraphicalHierarchy()
{
return decode("çÒÁƦÞÎÁ ¦¤ÒÁÒÈ¦Ñ ËÌÁÓ¦×");
}
virtual QCString trGotoGraphicalHierarchy()
{
return decode("ÄÉ×. ÇÒÁƦÞÎÕ ¦¤ÒÁÒȦÀ");
}
virtual QCString trGotoTextualHierarchy()
{
return decode("ÄÉ×. ÔÅËÓÔÏ×Õ ¦¤ÒÁÒȦÀ");
}
virtual QCString trPageIndex()
{
return decode("áÌÆÁצÔÎÉÊ ÐÏËÁÖÞÉË ÔÅÍÁÔÉÞÎÉÈ ÏÐÉÓ¦×");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.0
//////////////////////////////////////////////////////////////////////////
virtual QCString trNote()
{
return decode("îÏÔÁÔËÉ");
}
virtual QCString trPublicTypes()
{
return decode("úÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÔÉÐÉ");
}
virtual QCString trPublicAttribs()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "ðÏÌÑ ÄÁÎÉÈ" );
}
else
{
return decode( "úÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÁÔÒÉÂÕÔÉ" );
}
}
virtual QCString trStaticPublicAttribs()
{
return decode("óÔÁÔÉÞΦ ÚÁÇÁÌØÎÏÄÏÓÔÕÐΦ ÄÁÎΦ");
}
virtual QCString trProtectedTypes()
{
return decode("úÁÈÉÝÅΦ ÔÉÐÉ");
}
virtual QCString trProtectedAttribs()
{
return decode("úÁÈÉÝÅΦ ÄÁΦ");
}
virtual QCString trStaticProtectedAttribs()
{
return decode("óÔÁÔÉÞΦ ÚÁÈÉÝÅΦ ÄÁΦ");
}
virtual QCString trPrivateTypes()
{
return decode("ðÒÉ×ÁÔΦ ÔÉÐÉ");
}
virtual QCString trPrivateAttribs()
{
return decode("ðÒÉ×ÁÔΦ ÄÁΦ");
}
virtual QCString trStaticPrivateAttribs()
{
return decode("ðÒÉ×ÁÔΦ ÓÔÁÔÉÞΦ ÄÁΦ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.3
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */
virtual QCString trTodo()
/*??*/
{
return decode("îÅÏÂȦÄÎÏ ÚÒÏÂÉÔÉ");
}
/*! Used as the header of the todo list */
virtual QCString trTodoList()
/*??*/
{
return decode("ðÅÒÅÌ¦Ë ÚÁ×ÄÁÎØ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trReferencedBy()
{
return decode("÷ÖÉ×Á¤ÔØÓÑ ×");
}
virtual QCString trRemarks()
{
return decode("ðÒÉÍ.");
}
virtual QCString trAttention()
{
return decode("õ×ÁÇÁ");
}
virtual QCString trInclByDepGraph()
{
return decode("çÒÁÆ ÆÁÊÌÏ×, Ñ˦ ×ËÌÀÞÁÀÔØ ÃÅÊ ÆÁÊÌ:");
}
virtual QCString trSince()
/*??*/
{
return decode("ðÏÞÉÎÁÀÞÉ Ú");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.5
//////////////////////////////////////////////////////////////////////////
/*! title of the graph legend page */
virtual QCString trLegendTitle()
{
return decode("ìÅÇÅÎÄÁ");
}
/*! page explaining how the dot graph's should be interpreted */
virtual QCString trLegendDocs()
{
return decode(
"ðÏÚÎÁÞÅÎÎÑ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØÓÑ Õ ÇÒÁÆÁÈ.<p>\n"
"òÏÚÇÌÑÎÅÍÏ ÎÁÓÔÕÐÎÉÊ ÐÒÉËÌÁÄ:\n"
"\\code\n"
"/*! îÅ×ÉÄÉÍÙÊ ËÌÁÓÓ ÉÚ-ÚÁ ÕÓÅÞÅÎÉÑ */\n"
"class Invisible { };\n\n"
"/*! ïÂÍÅÖÅÎÉÊ ËÌÁÓ, צÄÎÏÛÅÎÎÑ ÕÓÐÁÄËÕ×ÁÎÎÑ ÐÒÉÈÏ×ÁÎÅ */\n"
"class Truncated : public Invisible { };\n\n"
"/* îÅÄÏËÕÍÅÎÔÏ×ÁÎÉÊ ËÌÁÓÓ */\n"
"class Undocumented { };\n\n"
"/*! úÁÇÁÌØÎÏÄÏÓÔÕÐÎÅ ÕÓÐÁÄËÕ×ÁÎÎÑ */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! úÁÈÉÝÅÎÅ ÕÓÐÁÄËÕ×ÁÎÎÑ */\n"
"class ProtectedBase { };\n\n"
"/*! ðÒÉ×ÁÔÎÅ ÕÓÐÁÄËÕ×ÁÎÎÑ */\n"
"class PrivateBase { };\n\n"
"/*! ëÌÁÓ, ÝÏ ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ ËÌÁÓÏÍ Inherited */\n"
"class Used { };\n\n"
"/*! ëÌÁÓ, ÝÏ ÕÓÐÁÄËÏ×Õ¤ ¦ÎÛ¦ ËÌÁÓÉ */\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
" public Undocumented\n"
"{\n"
" private:\n"
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
"ñËÝÏ \\c MAX_DOT_GRAPH_HEIGHT × ËÏÎƦÇÕÒÁæÊÎÏÍÕ ÆÁÊ̦ "
"ÕÓÔÁÎÏ×ÌÅÎÅ ÎÁ 200, ÏÔÒÉÍÁ¤ÍÏ ÎÁÓÔÕÐÎÉÊ ÇÒÁÆ:"
"<p><center><img src=\"graph_legend.gif\"></center>\n"
"<p>\n"
"ðÒÑÍÏËÕÔÎÉËÉ × ÃØÏÍÕ ÇÒÁƦ ÍÁÀÔØ ÎÁÓÔÕÐÎÉÊ ÚͦÓÔ:\n"
"<ul>\n"
"<li>úÁÐÏ×ÎÅÎÉÊ ÞÏÒÎÉÊ ÐÒÑÍÏËÕÔÎÉË ×¦ÄÏÂÒÁÖÁ¤ ÓÔÒÕËÔÕÒÕ ÁÂÏ ËÌÁÓ, "
"ÄÌÑ ÑËÏÇÏ ÓÔ×ÏÒÅÎÏ ÇÒÁÆ.\n"
"<li>ðÒÑÍÏËÕÔÎÉË Ú ÞÏÒÎÏÀ ÍÅÖÅÀ צÄÏÂÒÁÖÁ¤ ÄÏËÕÍÅÎÔÏ×ÁÎÕ ÓÔÒÕËÔÕÒÕ ÁÂÏ ËÌÁÓ.\n"
"<li>ðÒÑÍÏËÕÔÎÉË Ú Ó¦ÒÏÀ ÍÅÖÅÀ צÄÏÂÒÁÖÁ¤ ÎÅÄÏËÕÍÅÎÔÏ×ÁÎÕ ÓÔÒÕËÔÕÒÕ ÁÂÏ ËÌÁÓ.\n"
"<li>ðÒÑÍÏËÕÔÎÉË Ú ÞÅÒ×ÏÎÏÀ ÍÅÖÅÀ צÄÏÂÒÁÖÁ¤ ÄÏËÕÍÅÎÔÏ×ÁÎÕ ÓÔÒÕËÔÕÒÕ ÁÂÏ ËÌÁÓ, ÄÌÑ ÑËÉÈ\n"
" ÎÅ ×Ó¦ ÓЦ×צÄÎÏÛÅÎÎÑ ÕÓÐÁÄËÕ×ÁÎÎÑ/ÚͦÓÔÕ ÐÏËÁÚÁΦ. çÒÁÆ ÚÒ¦ÚÁÎÉê, "
"ÑËÝÏ ×¦Î ÎÅ ×ͦÝÁ¤ÔØÓÑ Õ ×ËÁÚÁΦ ÍÅÖ¦."
"</ul>\n"
"óÔÒ¦ÌËÉ ÍÁÀÔØ ÎÁÓÔÕÐÎÉÊ ÚͦÓÔ:\n"
"<ul>\n"
"<li>ôÅÍÎÏÓÉÎÑ ÓÔÒ¦ÌËÁ צÄÏÂÒÁÖÁ¤ צÄÎÏÛÅÎÎÑ ÚÁÇÁÌØÎÏÄÏÓÔÕÐÎÏÇÏ ÕÓÐÁÄËÕ×ÁÎÎÑ "
"Í¦Ø Ä×ÏÍÁ ËÌÁÓÁÍÉ.\n"
"<li>ôÅÍÎÏÚÅÌÅÎÁ ÓÔÒ¦ÌËÁ ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ ÐÒÉ ÚÁÈÉÝÅÎÏÍÕ ÕÓÐÁÄËÕ×ÁÎΦ.\n"
"<li>ôÅÍÎÏÞÅÒ×ÏÎÁ ÓÔÒ¦ÌËÁ ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ ÐÒÉ ÐÒÉ×ÁÔÎÏÍÕ ÕÓÐÁÄËÕ×ÁÎΦ.\n"
"<li>ðÕÒÐÕÒÎÁ ÓÔÒ¦ÌËÁ ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ, ÑËÝÏ ËÌÁÓ Í¦ÓÔÉÔØÓÑ ×"
"¦ÎÛÏÍÕ ËÌÁÓ¦ ÁÂÏ ÎÉÍ ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ."
"óÔÒ¦ÌËÁ ÅÔÉËÅÔÕ¤ÔØÓÑ ÚͦÎÎÏÀ, "
"ÞÅÒÅÚ ÑËÕ ×¦ÄÂÕ×Á¤ÔØÓÑ ÄÏÓÔÕÐ ÄÏ ×ËÁÚÁÎϧ ÓÔÒÕËÔÕÒÉ ÁÂÏ ËÌÁÓÕ. \n"
"</ul>\n");
}
/*! text for the link to the legend page */
virtual QCString trLegend()
{
return decode("ÄÉ×. ÌÅÇÅÎÄÕ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return decode("ôÅÓÔ");
}
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return decode("ðÅÒÅÌ¦Ë ÔÅÓÔ¦×");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.1
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for KDE-2 IDL methods */
virtual QCString trDCOPMethods()
{
return decode("DCOP íÅÔÏÄÉ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.2
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
return decode("÷ÌÁÓÔÉ×ÏÓÔ¦");
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
return decode("ðÏ×ÎÉÊ ÐÅÒÅÌ¦Ë ×ÌÁÓÔÉ×ÏÓÔÅÊ");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return decode("¶ÎÔÅÒÆÅÊÓÉ");
}
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return decode( "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ" );
}
else
{
return decode( "ëÌÁÓÉ" );
}
}
/*! Used as the title of a Java package */
virtual QCString trPackage(const char *name)
{
return decode("ðÁËÅÔ ")+name;
}
/*! Title of the package index page */
virtual QCString trPackageList()
{
return decode("ðÏ×ÎÉÊ ÐÅÒÅÌ¦Ë ÐÁËÅÔ¦×");
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return decode("ðÏ×ÎÉÊ ÐÅÒÅÌ¦Ë ÄÏËÕÍÅÎÔÏ×ÁÎÉÈ ÐÁËÅÔ¦×.");
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
{
return decode("ðÁËÅÔÉ");
}
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return decode("ïÐÉÓ ÐÁËÅÔ¦×");
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
return decode("íÁËÒÏÏÚÎÁÞÅÎÎÑ:");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return decode("äÅÆÅËÔ");
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
return decode("ðÅÒÅÌ¦Ë ÄÅÆÅËÔ¦×");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.6
//////////////////////////////////////////////////////////////////////////
/*! Used as ansicpg for RTF file */
virtual QCString trRTFansicp()
{
return "1251";
}
/*! Used as ansicpg for RTF fcharset */
virtual QCString trRTFCharSet()
{
return "204";
}
/*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
return decode("ðÒÅÄÍÅÔÎÉÊ ÐÏËÁÖÞÉË");
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trClass(bool first_capital, bool singular)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
QCString result((first_capital ? "óÔÒÕËÔÕÒÉ ÄÁÎÉÈ" : "ÓÔÒÕËÔÕÒÉ ÄÁÎÉÈ"));
return decode(result);
}
else
{
QCString result((first_capital ? "ëÌÁÓ" : "ËÌÁÓ"));
if(!singular) result+="É";
return decode(result);
}
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trFile(bool first_capital, bool singular)
{
QCString result((first_capital ? "æÁÊÌ" : "ÆÁÊÌ"));
if (!singular) result+="É";
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trNamespace(bool first_capital, bool singular)
{
QCString result((first_capital ? "ðÒÏÓÔ" : "ÐÒÏÓÔ"));
result+=(singular?"¦Ò ¦ÍÅÎ":"ÏÒÉ ¦ÍÅÎ");
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGroup(bool first_capital, bool singular)
{
QCString result((first_capital ? "çÒÕÐ" : "ÇÒÕÐ"));
result+=(singular ? "Á" : "É");
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trPage(bool first_capital, bool singular)
{
QCString result((first_capital ? "óÔÏÒ¦ÎË" : "ÓÔÏÒ¦ÎË"));
result+=(singular ? "Á" : "É");
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trMember(bool first_capital, bool singular)
{
QCString result((first_capital ? "åÌÅÍÅÎÔ" : "ÅÌÅÍÅÎÔ"));
if (!singular) result+="É";
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "ðÏÌ" : "ÐÏÌ"));
result+=(singular ? "Å" : "Ñ");
return decode(result);
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "çÌÏÂÁÌØÎ" : "ÇÌÏÂÁÌØÎ"));
result+=(singular ? "ÉÊ" : "¦");
return decode(result);
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.7
//////////////////////////////////////////////////////////////////////////
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
{
QCString result((first_capital ? "á×ÔÏÒ" : "Á×ÔÏÒ"));
if (!singular) result+="É";
return decode(result);
}
};
#endif
...@@ -1248,6 +1248,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -1248,6 +1248,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{ {
if (!isspace(dstAType.at(dstPos))) // maybe the names differ if (!isspace(dstAType.at(dstPos))) // maybe the names differ
{ {
if (!dstA->name.isEmpty()) // dst has its name separated from its type
{
NOMATCH
return FALSE;
}
while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++; while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
if (dstPos!=dstAType.length()) if (dstPos!=dstAType.length())
{ {
...@@ -1270,6 +1275,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -1270,6 +1275,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{ {
if (!isspace(srcAType.at(srcPos))) // maybe the names differ if (!isspace(srcAType.at(srcPos))) // maybe the names differ
{ {
if (!srcA->name.isEmpty()) // src has its name separated from its type
{
NOMATCH
return FALSE;
}
while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++; while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
if (srcPos!=srcAType.length()) if (srcPos!=srcAType.length())
{ {
...@@ -2860,7 +2870,7 @@ QCString substituteTemplateArgumentsInString( ...@@ -2860,7 +2870,7 @@ QCString substituteTemplateArgumentsInString(
{ {
if (formalArgs==0) return name; if (formalArgs==0) return name;
QCString result; QCString result;
static QRegExp re("[a-z_A-Z][:a-z_A-Z0-9]*"); static QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*");
int p=0,l,i; int p=0,l,i;
// for each identifier in the base class name (e.g. B<T> -> B and T) // for each identifier in the base class name (e.g. B<T> -> B and T)
while ((i=re.match(name,p,&l))!=-1) while ((i=re.match(name,p,&l))!=-1)
...@@ -2901,4 +2911,90 @@ QCString substituteTemplateArgumentsInString( ...@@ -2901,4 +2911,90 @@ QCString substituteTemplateArgumentsInString(
} }
/*! Makes a deep copy of argument list \a src. Will allocate memory, that
* is owned by the caller.
*/
ArgumentList *copyArgumentList(const ArgumentList *src)
{
ASSERT(src!=0);
ArgumentList *dst = new ArgumentList;
dst->setAutoDelete(TRUE);
ArgumentListIterator tali(*src);
Argument *a;
for (;(a=tali.current());++tali)
{
dst->append(new Argument(*a));
}
dst->constSpecifier = src->constSpecifier;
dst->volatileSpecifier = src->volatileSpecifier;
dst->pureSpecifier = src->pureSpecifier;
return dst;
}
/*! Makes a deep copy of the list of argument lists \a srcLists.
* Will allocate memory, that is owned by the caller.
*/
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists)
{
ASSERT(srcLists!=0);
QList<ArgumentList> *dstLists = new QList<ArgumentList>;
dstLists->setAutoDelete(TRUE);
QListIterator<ArgumentList> sli(*srcLists);
ArgumentList *sl;
for (;(sl=sli.current());++sli)
{
dstLists->append(copyArgumentList(sl));
}
return dstLists;
}
/*! Strips template specifiers from scope \a fullName, except those
* that make up specialized classes. The switch \a parentOnly
* determines whether or not a template "at the end" of a scope
* should be considered, e.g. with \a parentOnly is \c TRUE, A<T>::B<S> will
* try to strip <T> and not <S>, while \a parentOnly is \c FALSE will
* strip both unless A<T> or B<S> are specialized template classes.
*/
QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
bool parentOnly)
{
QCString result;
int p=0;
int l=fullName.length();
int i=fullName.find('<');
int si= i==-1 ? -1 : fullName.find("::",i);
while (i!=-1 && (!parentOnly || i<si))
{
result+=fullName.mid(p,i-p);
//printf("1:result+=%s\n",fullName.mid(p,i-p).data());
int e=i+1;
bool done=FALSE;
int count=1;
while (e<l && !done)
{
char c=fullName.at(e++);
if (c=='<')
{
count++;
}
else if (c=='>')
{
count--;
done = count==0;
}
}
//printf(" trying %s\n",(result+fullName.mid(i,e-i)).data());
if (getClass(result+fullName.mid(i,e-i))!=0)
{
result+=fullName.mid(i,e-i);
//printf("2:result+=%s\n",fullName.mid(i,e-i-1).data());
}
p=e;
i=fullName.find('<',p);
si= i==-1 ? -1 : fullName.find("::",i);
}
result+=fullName.right(l-p);
//printf("3:result+=%s\n",fullName.right(l-p).data());
return result;
}
...@@ -153,5 +153,10 @@ bool extractClassNameFromType(const QCString &type,int &pos, ...@@ -153,5 +153,10 @@ bool extractClassNameFromType(const QCString &type,int &pos,
QCString substituteTemplateArgumentsInString( QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs); const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs);
ArgumentList *copyArgumentList(const ArgumentList *src);
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists);
QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
bool parentOnly=TRUE);
#endif #endif
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <stdlib.h>
#include "qtbc.h"
#include "xmlgen.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "util.h"
#include "defargs.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
static void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
}
static void writeXMLLink(QTextStream &t,const char *compoundId,const char *memId,
const char *text)
{
if (memId==0)
{
t << "<compoundref idref=\"" << compoundId << "\">";
writeXMLString(t,text);
t << "</compoundref>";
}
else
{
t << "<memberref idref=\"" << compoundId << "_1" << memId << "\">";
writeXMLString(t,text);
t << "</memberref>";
}
}
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
TextGeneratorXMLImpl(QTextStream &t): m_t(t) {}
void writeString(const char *s) const
{
writeXMLString(m_t,s);
}
void writeBreak() const {}
void writeLink(const char *extRef,const char *file,
const char *anchor,const char *text
) const
{
if (extRef==0)
{ writeXMLLink(m_t,file,anchor,text); }
else // external references are not supported for XML
{ writeXMLString(m_t,text); }
}
private:
QTextStream &m_t;
};
void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
{
if (md->memberType()==MemberDef::EnumValue) return;
QCString scopeName;
if (md->getClassDef())
scopeName=md->getClassDef()->name();
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
t << " <memberdef kind=\"";
//enum { define_t,variable_t,typedef_t,enum_t,function_t } xmlType = function_t;
QCString memType;
bool isFunc=FALSE;
switch (md->memberType())
{
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
case MemberDef::Function: memType="function"; isFunc=TRUE; break;
case MemberDef::Signal: memType="signal"; isFunc=TRUE; break;
case MemberDef::Prototype: memType="prototype"; isFunc=TRUE; break;
case MemberDef::Friend: memType="friend"; isFunc=TRUE; break;
case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break;
case MemberDef::Slot: memType="slot"; isFunc=TRUE; break;
}
t << memType << "\" id=\"";
t << def->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< md->anchor();
t << "\"";
t << " virt=\"";
switch (md->virtualness())
{
case Normal: t << "normal"; break;
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
default: ASSERT(0);
}
t << "\" prot=\"";
switch(md->protection())
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\">" << endl;
if (md->memberType()!=MemberDef::Define &&
md->memberType()!=MemberDef::Enumeration
)
{
QCString typeStr = replaceAnonymousScopes(md->typeString());
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
t << "</type>" << endl;
}
t << " <name>";
writeXMLString(t,md->name());
t << "</name>" << endl;
if (isFunc) //function
{
ArgumentList *declAl = new ArgumentList;
ArgumentList *defAl = md->argumentList();
stringToArgumentList(md->argsString(),declAl);
if (declAl->count()>0)
{
ArgumentListIterator declAli(*declAl);
ArgumentListIterator defAli(*defAl);
Argument *a;
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
t << " <param>" << endl;
if (!a->attrib.isEmpty())
{
t << " <attributes>";
writeXMLString(t,a->attrib);
t << "</attributes>" << endl;
}
if (!a->type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
{
t << " <declname>";
writeXMLString(t,a->name);
t << "</declname>" << endl;
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
{
t << " <defname>";
writeXMLString(t,defArg->name);
t << "</defname>" << endl;
}
if (!a->array.isEmpty())
{
t << " <array>";
writeXMLString(t,a->array);
t << "</array>" << endl;
}
if (!a->defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->defval);
t << "</defval>" << endl;
}
t << " </param>" << endl;
if (defArg) ++defAli;
}
}
delete declAl;
}
else if (md->memberType()==MemberDef::Define &&
md->argsString()!=0) // define
{
ArgumentListIterator ali(*md->argumentList());
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
t << " <param><defname>" << a->type << "</defname></param>" << endl;
}
}
if (!md->initializer().isEmpty())
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),md->initializer());
t << "</initializer>" << endl;
}
// TODO: exceptions, const volatile
if (md->memberType()==MemberDef::Enumeration) // enum
{
if (md->enumFieldList())
{
MemberListIterator emli(*md->enumFieldList());
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
t << " <enumvalue>" << endl;
t << " <name>";
writeXMLString(t,emd->name());
t << "</name>" << endl;
if (!emd->initializer().isEmpty())
{
t << " <initializer>";
writeXMLString(t,emd->initializer());
t << "</initializer>" << endl;
}
t << " </enumvalue>" << endl;
}
}
}
t << " </memberdef>" << endl;
}
void generateXMLClassSection(ClassDef *cd,QTextStream &t,MemberList *ml,const char *kind)
{
if (ml->count()>0)
{
t << " <sectiondef kind=\"" << kind << "\">" << endl;
//t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateXMLForMember(md,t,cd);
}
//t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void generateXMLForClass(ClassDef *cd,QTextStream &t)
{
// brief description
// detailed description
// template arguments
// include files
// inheritance diagram
// list of direct super classes
// list of direct sub classes
// collaboration diagram
// list of all members
// user defined member sections
// standard member sections
// detailed documentation
// detailed member documentation
if (cd->name().find('@')!=-1) return; // skip anonymous compounds
t << " <compounddef id=\""
<< cd->getOutputFileBase() << "\" kind=\""
<< cd->compoundTypeString() << "\">" << endl;
t << " <compoundname>";
writeXMLString(t,cd->name());
t << "</compoundname>" << endl;
if (cd->baseClasses()->count()>0)
{
//t << " <basecompoundlist>" << endl;
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <basecompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
t << "\"/>" << endl;
}
//t << " </basecompoundlist>" << endl;
}
if (cd->subClasses()->count()>0)
{
//t << " <derivedcompoundlist>" << endl;
BaseClassListIterator bcli(*cd->subClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <derivedcompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
}
t << "\"/>" << endl;
}
//t << " </derivedcompoundlist>" << endl;
}
int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+
cd->pubStaticMembers.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+
cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
if (numMembers>0)
{
//t << " <sectionlist>" << endl;
generateXMLClassSection(cd,t,&cd->pubTypes,"public-type");
generateXMLClassSection(cd,t,&cd->pubMembers,"public-func");
generateXMLClassSection(cd,t,&cd->pubAttribs,"public-attrib");
generateXMLClassSection(cd,t,&cd->pubSlots,"public-slot");
generateXMLClassSection(cd,t,&cd->signals,"signal");
generateXMLClassSection(cd,t,&cd->dcopMethods,"dcop-func");
generateXMLClassSection(cd,t,&cd->properties,"property");
generateXMLClassSection(cd,t,&cd->pubStaticMembers,"public-static-func");
generateXMLClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib");
generateXMLClassSection(cd,t,&cd->proTypes,"protected-type");
generateXMLClassSection(cd,t,&cd->proMembers,"protected-func");
generateXMLClassSection(cd,t,&cd->proAttribs,"protected-attrib");
generateXMLClassSection(cd,t,&cd->proSlots,"protected-slot");
generateXMLClassSection(cd,t,&cd->proStaticMembers,"protected-static-func");
generateXMLClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib");
generateXMLClassSection(cd,t,&cd->priTypes,"private-type");
generateXMLClassSection(cd,t,&cd->priMembers,"private-func");
generateXMLClassSection(cd,t,&cd->priAttribs,"private-attrib");
generateXMLClassSection(cd,t,&cd->priSlots,"private-slot");
generateXMLClassSection(cd,t,&cd->priStaticMembers,"private-static-func");
generateXMLClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib");
generateXMLClassSection(cd,t,&cd->friends,"signal");
generateXMLClassSection(cd,t,&cd->related,"related");
//t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
void generateXMLFileSection(FileDef *fd,QTextStream &t,MemberList *ml,const char *kind)
{
if (ml->count()>0)
{
t << " <sectiondef kind=\"" << kind << "\">" << endl;
//t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateXMLForMember(md,t,fd);
}
//t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void generateXMLForFile(FileDef *fd,QTextStream &t)
{
t << " <compounddef id=\""
<< fd->getOutputFileBase() << "\" kind=\"file\">" << endl;
t << " <compoundname>";
writeXMLString(t,fd->name());
t << "</compoundname>" << endl;
int numMembers = fd->decDefineMembers.count()+fd->decProtoMembers.count()+
fd->decTypedefMembers.count()+fd->decEnumMembers.count()+
fd->decFuncMembers.count()+fd->decVarMembers.count();
if (numMembers>0)
{
//t << " <sectionlist>" << endl;
generateXMLFileSection(fd,t,&fd->decDefineMembers,"define");
generateXMLFileSection(fd,t,&fd->decProtoMembers,"prototype");
generateXMLFileSection(fd,t,&fd->decTypedefMembers,"typedef");
generateXMLFileSection(fd,t,&fd->decEnumMembers,"enum");
generateXMLFileSection(fd,t,&fd->decFuncMembers,"func");
generateXMLFileSection(fd,t,&fd->decVarMembers,"var");
//t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
void generateXML()
{
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
else
{
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else if (!Config_getBool("QUIET"))
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
}
outputDirectory=dir.absPath();
}
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Cannot create directory %s\n",outputDirectory.data());
return;
}
}
QDir xmlDir(outputDirectory+"/xml");
if (!xmlDir.exists() && !xmlDir.mkdir(outputDirectory+"/xml"))
{
err("Could not create xml directory in %s\n",outputDirectory.data());
return;
}
QCString fileName=outputDirectory+"/xml/doxygen.xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>" << endl;
//t << "<!DOCTYPE doxygen SYSTEM \"doxygen.dtd\">" << endl;
t << "<doxygen>" << endl;
if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0)
{
//t << " <compoundlist>" << endl;
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
generateXMLForClass(cd,t);
}
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
generateXMLForFile(fd,t);
}
}
//t << " </compoundlist>" << endl;
}
t << "</doxygen>" << endl;
}
...@@ -12,65 +12,9 @@ ...@@ -12,65 +12,9 @@
* *
*/ */
#ifndef _DOXWIZARD_H #ifndef XMLGEN_H
#define _DOXWIZARD_H #define XMLGEN_H
#include <qmainwindow.h> void generateXML();
class QToolBar;
class ConfigFile;
class InputBool;
class InputString;
class InputStrList;
class InputFile;
class InputDir;
class InputInt;
class Wizard : public QMainWindow
{
Q_OBJECT
public:
Wizard(int argc,char **argv);
~Wizard(){};
void loadFile(const char *s);
private slots:
void newFile();
void loadFile();
void saveFile();
void saveAsFile();
void quit();
void changed();
void about();
void runDoxygen(); // Micha
signals:
private:
void refreshCaption();
QToolBar *fileTools;
bool hasChanged;
ConfigFile *cw;
};
class ConfigFile : public QWidget
{
Q_OBJECT
public:
ConfigFile(QWidget *parent=0);
~ConfigFile();
void init();
signals:
void changed();
private slots:
#CONFIG WidgetSlots
private:
#CONFIG WidgetVars
};
#endif #endif
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