Commit 7703ff62 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.8-20010723

parent 89f2a610
DOXYGEN Version 1.2.8-20010715
DOXYGEN Version 1.2.8-20010723
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
cd latex & $(MAKE)
src\version.cpp: Makefile
echo char versionString[]="$(VERSION)"; > src\version.cpp
echo char versionString[]="""$(VERSION)"""; > src\version.cpp
FORCE:
DOXYGEN Version 1.2.8_20010715
DOXYGEN Version 1.2.8_20010723
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (15 July 2001)
Dimitri van Heesch (dimitri@stack.nl) (23 July 2001)
1.2.8-20010715
1.2.8-20010723
......@@ -10,15 +10,9 @@
# See the GNU General Public License for more details.
#
all: config.l config.h Makefile.doxywizard
all: 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
$(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
......@@ -29,7 +23,7 @@ clean: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard clean
distclean: clean
$(RM) Makefile.doxywizard config.l config.h config.cpp
$(RM) Makefile.doxywizard
install:
$(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 )
);
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::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
// 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();
f.close();
return TRUE;
}
......@@ -322,7 +313,7 @@ void Wizard::about()
"<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>"
"<center>(c) 2000-2001</center></qt>"
);
}
......
......@@ -12,7 +12,8 @@
# project file for the doxywizard project
# special template configuration file because we use flex
TEMPLATE = doxywizard.t
unix:TEMPLATE = app.t
win32:TEMPLATE = doxywizard.t
# executable to generate
TARGET = ../../bin/doxywizard
......@@ -28,8 +29,8 @@ HEADERS = doxywizard.h \
inputbool.h \
inputstrlist.h \
inputint.h \
config.h \
pixmaps.h
win32:HEADERS += config.h
# source flle for the project
SOURCES = doxywizard.cpp \
......@@ -39,8 +40,8 @@ SOURCES = doxywizard.cpp \
inputbool.cpp \
inputstrlist.cpp \
inputint.cpp \
config.cpp \
pixmaps.cpp
win32:SOURCES += config.cpp
# where to put the objects
OBJECTS_DIR = obj
......@@ -49,7 +50,12 @@ OBJECTS_DIR = obj
MOC_DIR = moc
# extra C++ compiler options
TMAKE_CXXFLAGS += -DDOXYWIZARD
win32:TMAKE_CXXFLAGS += -I. -DQT_DLL
win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
INCLUDEPATH += ../../src
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_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:
language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl
$(PERL) translator.pl
$(ENV) VERSION=$(VERSION) DOXYGEN_DOCDIR=. $(PERL) translator.pl
FORCE:
......@@ -31,6 +31,6 @@ clean:
language: language.doc
language.doc: maintainers.txt language.tpl translator.pl
$(PERL) translator.pl
set DOXYGEN_DOCDIR=. & set VERSION=$(VERSION) & $(PERL) translator.pl
FORCE:
......@@ -31,6 +31,8 @@ clean:
language: language.doc
language.doc: maintainers.txt language.tpl translator.pl
set DOXYGEN_DOCDIR=.
set VERSION=$(VERSION)
$(PERL) translator.pl
FORCE:
......@@ -210,9 +210,6 @@ generator -> gen
At the time I was looking into lex and yacc, where a lot of things start with
"yy", so the "y" slipped in and made things pronouncable.
I realized later that doxygen could also be read as Dimitri's oxygen,
which could be seen as something I need to live :-)
</ol>
\htmlonly
......
......@@ -24,20 +24,19 @@
Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
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):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
Hungarian, Italian, Japanese, Korean, Norwegian,
Polish, Portuguese, Romanian, Russian, Slovak,
Slovene, Spanish, and Swedish.
Slovene, Spanish, Swedish, and Ukrainian.
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
was generated from sources and shows approximately the last version
when the translator was updated.
<p>
\htmlonly
<TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0>
......@@ -151,7 +150,7 @@ when the translator was updated.
<TD>Portuguese</TD>
<TD>Rui Godinho Lopes</TD>
<TD>ruiglopes@NOSPAM.yahoo.com</TD>
<TD>1.1.5</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Romanian</TD>
......@@ -189,6 +188,12 @@ when the translator was updated.
<TD>sahag96@NOSPAM.nts.mh.se<br>xet@NOSPAM.hem.passagen.se</TD>
<TD>1.0.0</TD>
</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>
</TD>
</TR>
......@@ -235,7 +240,7 @@ when the translator was updated.
\hline
Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\
\hline
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.1.5 \\
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\
\hline
Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\
\hline
......@@ -250,19 +255,19 @@ when the translator was updated.
Swedish & Samuel H\"{a}agglund & {\tt sahag96@nts.mh.se} & 1.0.0 \\
& XeT Erixon & {\tt xet@hem.passagen.se} & \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & up-to-date \\
\hline
\end{tabular}
\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
doing other things, so if you want to help to speed things up please
let them (or me) know.
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>
......@@ -306,9 +311,9 @@ Just follow these steps:
To enter special characters (with accents) you can:
<ul>
<li> Enter them directly if your keyboard supports that and you are
using a Latin-1 font.
Doxygen will translate the characters to proper LateX and
leave the Html and man output for what it is (which is fine, if
using a Latin-1 font. Doxygen will translate the
characters to proper \f$\mbox{\LaTeX}\f$ and leave the
HTML and man output for what it is (which is fine, if
idLanguageCharset() is set correctly).
<li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;).
See the HTML specification for the codes.
......@@ -451,17 +456,23 @@ the minimal number of translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl
script was developed (located in \c doxygen/doc directory).
It is able to extract the important information about obsolete and
new methods from the source files for each of the languages -- see
the reference to the <em>translator report</em> ASCII file below
the table of supported languages shown earlier. Looking at the base
class of the language translator, the script guesses also the status
of the translator -- see the last column of the mentioned table.
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.
It extracts the important information about obsolete and
new methods from the source files for each of the languages.
The information is stored in the <em>translator report</em> ASCII file
(<code>doxygen/doc/translator_report.txt</code>). \htmlonly If you compiled this documentation
from sources and if you have also doxygen sources available the
link <a href="../doc/translator_report.txt">
<code>doxygen/doc/translator_report.txt</code></a> should be valid.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
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
should be the language maintainer, or you should let him/her know
......
......@@ -22,7 +22,7 @@
Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
<p>
Currently (version $version), $numlang languages
are supported (sorted alphabetically):
$languages.
......@@ -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
was generated from sources and shows approximately the last version
when the translator was updated.
<p>
$information_table
<p>
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
let them (or me) know.
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>
......@@ -85,9 +84,9 @@ Just follow these steps:
To enter special characters (with accents) you can:
<ul>
<li> Enter them directly if your keyboard supports that and you are
using a Latin-1 font.
Doxygen will translate the characters to proper LateX and
leave the Html and man output for what it is (which is fine, if
using a Latin-1 font. Doxygen will translate the
characters to proper \f$\mbox{\LaTeX}\f$ and leave the
HTML and man output for what it is (which is fine, if
idLanguageCharset() is set correctly).
<li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;).
See the HTML specification for the codes.
......@@ -230,17 +229,22 @@ the minimal number of translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl
script was developed (located in \c doxygen/doc directory).
It is able to extract the important information about obsolete and
new methods from the source files for each of the languages -- see
the reference to the <em>translator report</em> ASCII file below
the table of supported languages shown earlier. Looking at the base
class of the language translator, the script guesses also the status
of the translator -- see the last column of the mentioned table.
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.
It extracts the important information about obsolete and
new methods from the source files for each of the languages.
The information is stored in the <em>translator report</em> ASCII file
($translator_report_file_name). \htmlonly If you compiled this documentation
from sources and if you have also doxygen sources available the
link $translator_report_link should be valid.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
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
should be the language maintainer, or you should let him/her know
......
......@@ -74,3 +74,5 @@ Swedish
Samuel H&auml;agglund: sahag96@nts.mh.se
XeT Erixon: xet@hem.passagen.se
Ukrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de
......@@ -26,7 +26,7 @@
# class for "almost up-to-date" translators.
# - $doxygenrootdir and other global variables for storing
# directories determined from DOXYGEN_DOCDIR environment
# variable. The change was done because the DOXYGEN_DOCDIR
# variable. The change was done because the DOXYGEN_DOCDIR
# was already used before.
# - $version mark can be used in the language.tpl template.
#
......@@ -41,9 +41,23 @@
# 2001/06/11
# - 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 Carp;
......@@ -561,9 +575,9 @@ xxxTABLE_FOOTxxx
##}}}
# Finish the tables, and substitute the mark in the doc
# template by the contatenation of the tables and the notice
# about $ftranslatortxt. Add NOSPAM to email addresses in the
# HTML table. Replace the special character sequences. #{{{
# template by the contatenation of the tables. Add NOSPAM to
# email addresses in the HTML table. Replace the special
# character sequences. #{{{
#
$tableHTML .= $htmlTableFoot;
$tableLATEX .= $latexTableFoot;
......@@ -580,14 +594,21 @@ xxxTABLE_FOOTxxx
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/_/\\_/sg;
my $notice = "\nHave a look at <a href=\"../doc/$ftranslatortxt\"\n>"
. "<code>doxygen/doc/$ftranslatortxt</code></a> "
. "for more details.";
$output =~ s{\$information_table}{$tableHTML$tableLATEX};
$output =~ s{\$information_table}{$tableHTML$tableLATEX$notice};
##}}}
# Replace the other symbols in the template by the expected
# information. ##{{{
#
$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. #{{{
......@@ -624,6 +645,13 @@ xxxTABLE_FOOTxxx
$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';
##}}}
......
This diff is collapsed.
......@@ -3,6 +3,7 @@
<name>Test</name>
<filename>class_test.html</filename>
<member kind="function">
<type>void</type>
<name>example</name>
<anchor>a0</anchor>
<arglist>()</arglist>
......
Name: doxygen
Version: 1.2.8_20010715
Version: 1.2.8_20010723
Summary: documentation system for C, C++ and IDL
Release: 3
Source: doxygen-%{version}.src.tar.gz
......
......@@ -127,15 +127,11 @@ QCString ClassDef::displayName() const
QCString n;
if (Config_getBool("HIDE_SCOPE_NAMES"))
{
n=stripScope(name());
n=localName();
}
else
{
n=name();
}
if (m_tempArgs)
{
n+=tempArgListToString(m_tempArgs);
n=qualifiedNameWithTemplateParameters();
}
return n;
}
......@@ -603,32 +599,70 @@ ArgumentList *ClassDef::outerTemplateArguments() const
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,
const QCString &pageType,const QCString &name)
static void writeTemplateSpec(OutputList &ol,Definition *d,
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.docify("template<");
Argument *a=al->first();
while (a)
QListIterator<ArgumentList> spi(specs);
ArgumentList *al;
for (spi.toFirst();(al=spi.current());++spi)
{
ol.docify(a->type);
if (!a->name.isEmpty())
ol.docify("template<");
Argument *a=al->first();
while (a)
{
ol.docify(" ");
ol.docify(a->name);
ol.docify(a->type);
if (!a->name.isEmpty())
{
ol.docify(" ");
ol.docify(a->name);
}
if (a->defval.length()!=0)
{
ol.docify(" = ");
ol.docify(a->defval);
}
a=al->next();
if (a) ol.docify(", ");
}
if (a->defval.length()!=0)
{
ol.docify(" = ");
ol.docify(a->defval);
}
a=al->next();
if (a) ol.docify(", ");
ol.docify(">");
ol.lineBreak();
}
ol.docify("> "+pageType.lower()+" "+name);
ol.docify(type.lower()+" "+name);
ol.endSubsubsection();
ol.writeString("\n");
}
......@@ -735,7 +769,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("CLASS_DIAGRAMS")) ol.disableAllBut(OutputGenerator::Man);
// write subclasses
// write super classes
int count;
if ((count=m_inherits->count())>0)
{
......@@ -1005,7 +1039,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endGroupHeader();
ol.startTextBlock();
writeTemplateSpec(ol,outerTempArgList,pageType,name());
writeTemplateSpec(ol,this,pageType);
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
......@@ -1046,8 +1080,10 @@ void ClassDef::writeDocumentation(OutputList &ol)
}
else
{
writeTemplateSpec(ol,outerTempArgList,pageType,name());
writeTemplateSpec(ol,this,pageType);
}
typedefMembers.writeDocumentation(ol,name(),this,
theTranslator->trMemberTypedefDocumentation());
......@@ -1140,6 +1176,20 @@ void ClassDef::writeDocumentation(OutputList &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
......@@ -2062,6 +2112,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
//templateClass->setBriefDescription(briefDescription());
//templateClass->setDocumentation(documentation());
templateClass->setTemplateMaster(this);
templateClass->setOuterScope(getOuterScope());
m_templateInstances->insert(templSpec,templateClass);
freshInstance=TRUE;
}
......@@ -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
*/
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 */
MemberList pubMembers;
......
......@@ -307,6 +307,7 @@ class ConfigBool : public ConfigOption
QCString m_valueString;
};
// some convenience macros
#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
#define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val)
......@@ -319,6 +320,10 @@ class ConfigBool : public ConfigOption
* read from a user-supplied configuration file.
* The static member instance() can be used to get
* a pointer to the one and only instance.
*
* Set all variables to their default values by
* calling Config::instance()->init()
*
*/
class Config
{
......@@ -479,11 +484,34 @@ class Config
// 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();
/*! Replaces references to environment variable by the actual value
* of the environment variable.
*/
void substituteEnvironmentVars();
/*! Checks if the values of the variable are correct, adjusts them
* if needed, and report any errors.
*/
void check();
/*! Initialize config variables to their default value */
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:
Config()
{
......@@ -498,7 +526,6 @@ class Config
delete m_options;
delete m_dict;
}
void create();
private:
QList<ConfigOption> *m_options;
......
This diff is collapsed.
......@@ -27,6 +27,7 @@
#include "declinfo.h"
#include "util.h"
#include "message.h"
#define YY_NO_UNPUT
......@@ -157,6 +158,8 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
sharpCount=0;
BEGIN(Template);
}
<Template>"<<" { name+="<<"; }
<Template>">>" { name+=">>"; }
<Template>"<" {
name+="<";
sharpCount++;
......@@ -235,16 +238,29 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
name=name.left(nb);
}
cl=scope.copy();
//printf("scope=`%s'\n",scope.data());
int il=0,ir=0;
if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments
#if 0
{
ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il+1));
cl=cl.left(il)+cl.right(cl.length()-ir-1);
int l=scope.length();
int i=0;
int skipCount=0;
cl.resize(0);
ctl.resize(0);
for (i=0;i<l;i++)
{
char c=scope.at(i);
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);
int il,ir;
if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
// TODO: handle cases like where n="operator<< <T>"
{
......@@ -285,9 +301,9 @@ void dumpDecl(const char *s)
QCString name;
QCString args;
QCString funcTNames;
printf("-----------------------------------------\n");
msg("-----------------------------------------\n");
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",
type.data(),className.data(),classTNames.data(),
name.data(),funcTNames.data(),args.data()
......
......@@ -120,7 +120,7 @@ class Definition
int getDefLine() const { return m_defLine; }
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 setOuterScope(Definition *d) { m_outerScope = d; }
......
This diff is collapsed.
......@@ -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:TMAKE_LFLAGS += /LIBPATH:..\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
INCLUDEPATH += ../qtools .
DESTDIR = ../bin
......
......@@ -25,7 +25,7 @@ win32-mingw:LIBS += -L../lib -lqtools
win32-msvc:LIBS += qtools.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\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
INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects
......
......@@ -16,6 +16,7 @@
*/
#include "entry.h"
#include "util.h"
int Entry::num=0;
......@@ -36,8 +37,8 @@ Entry::Entry()
argList = new ArgumentList;
argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n");
tArgList = 0;
mtArgList = 0;
tArgLists = 0;
//mtArgList = 0;
mGrpId = -1;
tagInfo = 0;
groupdoctype = GROUPDOC_NORMAL;
......@@ -90,8 +91,8 @@ Entry::Entry(const Entry &e)
argList = new ArgumentList;
argList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) tArgList=0\n");
tArgList = 0;
mtArgList = 0;
tArgLists = 0;
//mtArgList = 0;
groupdoctype = e.groupdoctype;
// deep copy of the child entry list
......@@ -136,33 +137,25 @@ Entry::Entry(const Entry &e)
argList->volatileSpecifier = e.argList->volatileSpecifier;
argList->pureSpecifier = e.argList->pureSpecifier;
// deep copy template argument list
if (e.tArgList)
// deep copy template argument lists
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));
//printf("appending argument %s %s\n",a->type.data(),a->name.data());
}
tArgLists = copyArgumentLists(e.tArgLists);
}
// deep copy template argument list
if (e.mtArgList)
{
mtArgList = new ArgumentList;
mtArgList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) new tArgList=%p\n",tArgList);
QListIterator<Argument> mtali(*e.mtArgList);
for (;(a=mtali.current());++mtali)
{
mtArgList->append(new Argument(*a));
//printf("appending argument %s %s\n",a->type.data(),a->name.data());
}
}
//if (e.mtArgList)
//{
// mtArgList = new ArgumentList;
// mtArgList->setAutoDelete(TRUE);
// //printf("Entry::Entry(copy) new tArgList=%p\n",tArgList);
// QListIterator<Argument> mtali(*e.mtArgList);
// for (;(a=mtali.current());++mtali)
// {
// mtArgList->append(new Argument(*a));
// //printf("appending argument %s %s\n",a->type.data(),a->name.data());
// }
//}
}
......@@ -175,8 +168,8 @@ Entry::~Entry()
delete groups;
delete anchors;
delete argList;
delete tArgList;
delete mtArgList;
delete tArgLists;
//delete mtArgList;
delete tagInfo;
num--;
}
......@@ -244,8 +237,8 @@ void Entry::reset()
anchors->clear();
argList->clear();
if (tagInfo) { delete tagInfo; tagInfo=0; }
if (tArgList) { delete tArgList; tArgList=0; }
if (mtArgList) { delete mtArgList; mtArgList=0; }
if (tArgLists) { delete tArgLists; tArgLists=0; }
//if (mtArgList) { delete mtArgList; mtArgList=0; }
}
......@@ -296,7 +289,7 @@ int Entry::getSize()
e=sublist->next();
}
Argument *a=argList->first();
while (e)
while (a)
{
size+=sizeof(Argument);
size+=a->type.length()+1
......@@ -304,30 +297,36 @@ int Entry::getSize()
+a->defval.length()+1;
a=argList->next();
}
if (tArgList)
{
a=tArgList->first();
while (e)
{
size+=sizeof(Argument);
size+=a->type.length()+1
+a->name.length()+1
+a->defval.length()+1;
a=tArgList->next();
}
}
if (mtArgList)
if (tArgLists)
{
a=mtArgList->first();
while (e)
ArgumentList *al=tArgLists->first();
while (al)
{
size+=sizeof(Argument);
size+=a->type.length()+1
+a->name.length()+1
+a->defval.length()+1;
a=mtArgList->next();
size+=sizeof(ArgumentList);
a=al->first();
while (a)
{
size+=sizeof(Argument);
size+=a->type.length()+1
+a->name.length()+1
+a->defval.length()+1;
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;
}
......
......@@ -252,8 +252,9 @@ class Entry
QCString args; //!< member argument string
QCString bitfields; //!< member's bit fields
ArgumentList *argList; //!< member arguments as a list
ArgumentList *tArgList; //!< template argument list
ArgumentList *mtArgList; //!< member template argument list
QList<ArgumentList> *tArgLists; //!< template argument declarations
//ArgumentList *tArgList; //!< template argument lists (for each scope)
//ArgumentList *mtArgList; //!< member template argument list
QCString scopeSpec; //!< template specialization of the scope
QCString memberSpec; //!< template specialization of the member
QCString program; //!< the program text
......
......@@ -44,6 +44,7 @@ static const char *defaultStyleSheet =
"A.elRef { font-weight: bold }\n"
"A.code { text-decoration: none; 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"
"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"
......
......@@ -2703,6 +2703,8 @@ void writeIndex(OutputList &ol)
ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor);
ol.enable(OutputGenerator::Latex);
if (Doxygen::mainPage)
{
ol.startIndexSection(isMainPage);
......@@ -2716,7 +2718,6 @@ void writeIndex(OutputList &ol)
}
ol.endIndexSection(isMainPage);
}
ol.enable(OutputGenerator::Latex);
if (documentedPackages>0)
......
......@@ -43,6 +43,7 @@
#include "translator_br.h"
#include "translator_dk.h"
#include "translator_sk.h"
#include "translator_ua.h"
#endif
#define L_EQUAL(a) !stricmp(langName,a)
......@@ -144,6 +145,10 @@ bool setTranslator(const char *langName)
{
theTranslator=new TranslatorSlovak;
}
else if (L_EQUAL("ukrainian"))
{
theTranslator=new TranslatorUkrainian;
}
#endif
else // use the default language (i.e. english)
{
......
......@@ -1235,10 +1235,11 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str)
{
static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese";
static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese";
static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
if (str)
{
const unsigned char *p=(const unsigned char *)str;
......@@ -1321,7 +1322,7 @@ void LatexGenerator::docify(const char *str)
t << (char)c;
}
}
else if (isCzech || isRussian)
else if (isCzech || isRussian || isUkrainian)
{
if (c>=128)
{
......
......@@ -91,7 +91,8 @@ HEADERS = bufstr.h \
treeview.h \
unistd.h \
util.h \
version.h
version.h \
xmlgen.h
SOURCES = ce_lex.cpp \
ce_parse.cpp \
classdef.cpp \
......@@ -141,9 +142,11 @@ SOURCES = ce_lex.cpp \
tagreader.cpp \
translator.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
win32:INCLUDEPATH += .
DESTDIR = ../lib
......
......@@ -31,6 +31,7 @@
int main(int argc,char **argv)
{
initDoxygen();
readConfiguration(argc,argv);
parseInput();
generateOutput();
......
......@@ -79,10 +79,10 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
ol.endMemberDocName();
Argument *a=argList->first();
QCString cName;
if (md->scopeDefTemplateArguments())
{
cName=tempArgListToString(md->scopeDefTemplateArguments());
}
//if (md->scopeDefTemplateArguments())
//{
// cName=tempArgListToString(md->scopeDefTemplateArguments());
//}
if (cd)
{
cName=cd->name();
......@@ -245,8 +245,9 @@ MemberDef::MemberDef(const char *df,int dl,
enumFields=0;
enumScope=0;
enumDeclList=0;
scopeTAL=0;
membTAL=0;
//scopeTAL=0;
//membTAL=0;
m_defTmpArgLists=0;
initLines=0;
type=t;
args=a;
......@@ -320,6 +321,7 @@ MemberDef::~MemberDef()
delete enumFields;
delete argList;
delete tArgList;
delete m_defTmpArgLists;
}
void MemberDef::insertReimplementedBy(MemberDef *md)
......@@ -385,38 +387,34 @@ QCString MemberDef::getOutputFileBase() const
return "dummy";
}
static void copyArgumentList(const ArgumentList *src,ArgumentList *dst)
{
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;
}
//void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal)
//{
// // copy function arguments (if any)
// if (tal)
// {
// scopeTAL = new ArgumentList;
// scopeTAL->setAutoDelete(TRUE);
// copyArgumentList(tal,scopeTAL);
// }
//}
//
//void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
//{
// // copy function arguments (if any)
// if (tal)
// {
// membTAL = new ArgumentList;
// membTAL->setAutoDelete(TRUE);
// copyArgumentList(tal,membTAL);
// }
//}
void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal)
void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists)
{
// copy function arguments (if any)
if (tal)
if (lists)
{
scopeTAL = new ArgumentList;
scopeTAL->setAutoDelete(TRUE);
copyArgumentList(tal,scopeTAL);
}
}
void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
{
// copy function arguments (if any)
if (tal)
{
membTAL = new ArgumentList;
membTAL->setAutoDelete(TRUE);
copyArgumentList(tal,membTAL);
if (m_defTmpArgLists) delete m_defTmpArgLists;
m_defTmpArgLists = copyArgumentLists(lists);
}
}
......@@ -633,10 +631,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (tArgList)
{
writeTemplatePrefix(ol,tArgList);
}
else if (membTAL)
{
writeTemplatePrefix(ol,membTAL);
ol.lineBreak();
}
QCString ltype(type);
......@@ -979,43 +974,50 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
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 (scopeAl && !related) // class template prefix
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,scopeAl);
ol.endMemberDocPrefixItem();
}
if (scopeAl && membAl) ol.docify(" ");
if (membAl) // function template prefix
bool first=TRUE;
if (m_defTmpArgLists)
// definition has explicate template parameter declarations
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,membAl);
ol.endMemberDocPrefixItem();
QListIterator<ArgumentList> ali(*m_defTmpArgLists);
ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali)
{
if (tal->count()>0)
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tal);
ol.endMemberDocPrefixItem();
}
}
}
if (cd)
else
{
QCString cName=cd->name();
int il=cName.find('<');
int ir=cName.findRev('>');
if (il!=-1 && ir!=-1 && ir>il)
if (cd)
{
ldef=addTemplateNames(ldef,
cName.left(il), /* class without template spec */
cName.mid(il,ir-il+1) /* templ spec */
);
QList<ArgumentList> tempParamLists;
cd->getTemplateParameterLists(tempParamLists);
//printf("#tempParamLists=%d\n",tempParamLists.count());
QListIterator<ArgumentList> ali(tempParamLists);
ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali)
{
if (tal->count()>0)
{
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
QCString MemberDef::anchor() const
{
if (m_templateMaster) return m_templateMaster->anchor();
if (enumScope) return enumScope->anchor()+anc;
return anc;
}
......
......@@ -101,7 +101,6 @@ class MemberDef : public Definition
Specifier virtualness() const { return virt; }
MemberType memberType() const { return mtype; }
// convenience methods
bool isSignal() const { return mtype==Signal; }
bool isSlot() const { return mtype==Slot; }
......@@ -197,10 +196,13 @@ class MemberDef : public Definition
argList = al;
}
ArgumentList *templateArguments() const { return tArgList; }
void setScopeDefTemplateArguments(ArgumentList *t);
ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
void setMemberDefTemplateArguments(ArgumentList *t);
ArgumentList *memberDefTemplateArguments() const { return membTAL; }
//void setScopeDefTemplateArguments(ArgumentList *t);
//ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
//void setMemberDefTemplateArguments(ArgumentList *t);
//ArgumentList *memberDefTemplateArguments() const { return membTAL; }
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
QList<ArgumentList> *definitionTemplateParameterLists() const
{ return m_defTmpArgLists; }
// namespace related members
void setNamespace(NamespaceDef *nd);
......@@ -275,8 +277,9 @@ class MemberDef : public Definition
MemberDef *annMemb;
ArgumentList *argList; // argument list of this member
ArgumentList *tArgList; // template argument list of function template
ArgumentList *scopeTAL; // template argument list of class template
ArgumentList *membTAL; // template argument list of class template
//ArgumentList *scopeTAL; // template argument list of class template
//ArgumentList *membTAL; // template argument list of class template
QList<ArgumentList> *m_defTmpArgLists;
int grpId; // group id
MemberGroup *memberGroup; // group's member definition
......
......@@ -1519,8 +1519,9 @@ BN [ \t\r\n]
g_defVarArgs = yytext[yyleng-1]=='.';
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_argDict->insert(argName,new int(g_defArgs));
g_defArgs++;
......
......@@ -1085,7 +1085,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
if (logoFilename)
{
t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << logoFilename;
t << " \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
t << " \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
}
if (company)
{
......@@ -2110,7 +2110,7 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
......@@ -2200,7 +2200,7 @@ void RTFGenerator::startImage(const char *name,const char *,bool)
t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << name;
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
......@@ -2551,7 +2551,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
......@@ -2570,7 +2570,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
t << Rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".gif";
t << " \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
......
......@@ -362,6 +362,39 @@ static void setContext()
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
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
......@@ -793,15 +826,15 @@ TITLE [tT][iI][tT][lL][eE]
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
if (current->mtArgList) // transfer template arguments
{
if (current->tArgList)
{
delete current->tArgList;
}
current->tArgList = current->mtArgList;
current->mtArgList = 0;
}
//if (current->mtArgList) // transfer template arguments
//{
// if (current->tArgList)
// {
// delete current->tArgList;
// }
// current->tArgList = current->mtArgList;
// current->mtArgList = 0;
//}
lineCount() ;
BEGIN( CompoundName ) ;
}
......@@ -813,15 +846,15 @@ TITLE [tT][iI][tT][lL][eE]
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
if (current->mtArgList) // transfer template arguments
{
if (current->tArgList)
{
delete current->tArgList;
}
current->tArgList = current->mtArgList;
current->mtArgList = 0;
}
//if (current->mtArgList) // transfer template arguments
//{
// if (current->tArgList)
// {
// delete current->tArgList;
// }
// current->tArgList = current->mtArgList;
// current->mtArgList = 0;
//}
lineCount() ;
BEGIN( CompoundName ) ;
}
......@@ -870,18 +903,27 @@ TITLE [tT][iI][tT][lL][eE]
//if (current->tArgList /*|| (current_root->section&Entry::COMPOUND_MASK)*/)
//{
// printf("-------> member template \n");
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;
if (current->tArgLists==0)
{
current->tArgLists = new QList<ArgumentList>;
current->tArgLists->setAutoDelete(TRUE);
}
ArgumentList *al = new ArgumentList;
al->setAutoDelete(TRUE);
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
//{
......@@ -961,11 +1003,11 @@ TITLE [tT][iI][tT][lL][eE]
sharpCount=0;
lineCount();
addType( current );
if (current->mtArgList && current->tArgList==0)
{
current->tArgList=current->mtArgList;
current->mtArgList=0;
}
//if (current->mtArgList && current->tArgList==0)
//{
// current->tArgList=current->mtArgList;
// current->mtArgList=0;
//}
current->name=yytext;
current->name=current->name.stripWhiteSpace();
current->scopeSpec.resize(0);
......@@ -1039,12 +1081,12 @@ TITLE [tT][iI][tT][lL][eE]
// correct for misinterpreting return type as scope name: example: A<T> func()
//printf("YY_START=%d current->tArgList=%p current->mtArgList=%p\n",
// YY_START,current->tArgList,current->mtArgList);
if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0)
{
current->mtArgList=current->tArgList;
current->tArgList=0;
current->scopeSpec.resize(0);
}
//if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0)
//{
// current->mtArgList=current->tArgList;
// current->tArgList=0;
// current->scopeSpec.resize(0);
//}
lineCount();
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
{
......@@ -1563,10 +1605,10 @@ TITLE [tT][iI][tT][lL][eE]
QCString &cn = current->name;
QCString rn = current_root->name.copy();
//printf("cn=`%s' rn=`%s'\n",cn.data(),rn.data());
if (!cn.isEmpty() && !rn.isEmpty() &&
(current_root->section & Entry::SCOPE_MASK))
if (!cn.isEmpty() && !rn.isEmpty())
{
cn.prepend(rn+"::");
prependScope();
//cn.prepend(rn+"::");
}
if (isTypedef && cn.isEmpty())
{
......@@ -1608,10 +1650,7 @@ TITLE [tT][iI][tT][lL][eE]
current->program+=","; // add field terminator
}
current->name=yytext;
if (current_root->section & Entry::SCOPE_MASK)
{
current->name.prepend(current_root->name+"::");
}
prependScope();
current->args = current->args.simplifyWhiteSpace();
current->type = current->type.simplifyWhiteSpace();
//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]
<ClassDocArg1>{SCOPENAME}/"<" {
current->name = yytext;
// prepend outer scope name
if (current_root->section & Entry::SCOPE_MASK)
{
current->name.prepend(current_root->name+"::");
}
prependScope();
lastClassTemplSpecContext = ClassDocArg2;
BEGIN( ClassTemplSpec );
}
<ClassDocArg1>{SCOPENAME} {
current->name = yytext;
// prepend outer scope name
if (current_root->section & Entry::SCOPE_MASK)
{
current->name.prepend(current_root->name+"::");
}
prependScope();
BEGIN( ClassDocArg2 );
}
<ClassDocArg1>"\\"{B}*"\n" { yyLineNr++; }
......@@ -3045,10 +3078,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<EnumDocArg1>{SCOPEID} {
current->name = yytext;
if (current_root->section & Entry::SCOPE_MASK)
{
current->name.prepend(current_root->name+"::");
}
prependScope();
newDocState();
}
<EnumDocArg1>"\\"{B}*"\n" { yyLineNr++; }
......@@ -3859,16 +3889,6 @@ static void parseCompounds(Entry *rt)
memberGroupId = NOGROUP;
// rebuild compound's group context
//QCString *s = ce->groups->first();
//if (s)
//{
// lastDefGroup=*s;
// startGroup();
//}
//current->mGrpId = memberGroupId = ce->mGrpId;
scanYYlex() ;
delete current; current=0;
ce->program.resize(0);
......
This diff is collapsed.
/*! \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"
const char Translator::WinToISOTab[] =
/*! The translation table used by Win1250ToISO88592() method. */
const char Translator::Win1250ToISO88592Tab[] =
{
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC',
......@@ -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',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
......@@ -42,7 +52,9 @@ const char Translator::ISOToWinTab[] = {
'\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,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
......@@ -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,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
......@@ -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();
}
This diff is collapsed.
......@@ -124,6 +124,10 @@
// - Updated misleading information in trLegendDocs().
// - The trReimplementedInList() 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
// ----
......@@ -508,7 +512,16 @@ class TranslatorCzech : public Translator
* the documentation of all classes, structs and unions.
*/
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
* the documentation of all files.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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