Commit cd76bda7 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.7-20010524

parent 9b3aec93
DOXYGEN Version 1.2.7-20010517
DOXYGEN Version 1.2.7-20010524
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (17 May 2001)
Dimitri van Heesch (24 May 2001)
DOXYGEN Version 1.2.7_20010517
DOXYGEN Version 1.2.7_20010524
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (17 May 2001)
Dimitri van Heesch (24 May 2001)
1.2.7-20010517
1.2.7-20010524
......@@ -493,10 +493,10 @@ void generateXML()
t << "<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>" << endl;
t << "<!DOCTYPE doxygen SYSTEM \"doxygen.dtd\">" << endl;
t << "<doxygen>" << endl;
if (Doxygen::classList.count()+Doxygen::inputNameList.count()>0)
if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0)
{
t << " <compoundlist>" << endl;
ClassListIterator cli(Doxygen::classList);
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
......
......@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
all: language.doc FORCE
all: FORCE
DOXYGEN_DOCDIR=$(DOXYDOCS); \
export DOXYGEN_DOCDIR; \
VERSION=$(VERSION) ; \
......@@ -28,6 +28,8 @@ all: language.doc FORCE
clean:
rm -rf ../html ../latex language.doc
language: language.doc language.tpl translator.pl
language.doc: language.tpl FORCE
$(PERL) translator.pl
......
......@@ -26,5 +26,11 @@ all: FORCE
clean:
del /s /q ..\html ..\latex
del translator_report.txt *.bak
language: language.doc language.tpl translator.pl
language.doc: language.tpl FORCE
$(PERL) translator.pl
FORCE:
......@@ -127,6 +127,7 @@ documentation:
<li> \refitem cmdverbinclude \verbinclude
<li> \refitem cmdversion \version
<li> \refitem cmdwarning \warning
<li> \refitem cmdweakgroup \weakgroup
<li> \refitem cmddollar \$
<li> \refitem cmdat \@
<li> \refitem cmdbackslash \\
......@@ -150,10 +151,14 @@ Doxygen. Unrecognized commands are treated as normal text.
Structural indicators
\htmlonly --- </center>\endhtmlonly</h2>
\subsection cmdaddtogroup \addtogroup <name>
\subsection cmdaddtogroup \addtogroup <name> [(title)]
\addindex \addtogroup
Add extra documentation to a group \<name\> that was previously defined
using \\defgroup. This command can also be used to add a number of
Defines a group just like \ref cmddefgroup "\\defgroup", but in contrast to
that command using the same \<name\> more than once will not result in a warning,
but rather one group with a merged documentation and the first title found in
any of the commands.
The title is optional, so this command can also be used to add a number of
entities to an existing group using \@{ and \@} like this:
\verbatim
......@@ -177,7 +182,8 @@ Doxygen. Unrecognized commands are treated as normal text.
/*! @} */
\endverbatim
See also \ref cmddefgroup "\\defgroup" and \ref cmdingroup "\\ingroup".
\sa page \ref grouping "Grouping", sections \ref cmddefgroup "\\defgroup", \ref cmdingroup "\\ingroup" and
\ref cmdweakgroup "\\weakgroup".
\subsection cmdclass \class <name> [<header-file>] [<header-name>]
......@@ -225,9 +231,10 @@ Doxygen. Unrecognized commands are treated as normal text.
categories. You can also use groups as members of other groups,
thus building a hierarchy of groups.
The \<name\> argument should an single word identifier.
The \<name\> argument should be a single word identifier.
\sa section \ref cmdingroup "\\ingroup"
\sa page \ref grouping "Grouping", sections \ref cmdingroup "\\ingroup", \ref cmdaddtogroup "\\addtogroup",
\ref cmdweakgroup "\\weakgroup".
<hr>
......@@ -348,7 +355,8 @@ Doxygen. Unrecognized commands are treated as normal text.
class, file or namespace, then it will be added to the group or
groups identified by \<groupname\>.
\sa section \ref cmddefgroup "\\defgroup".
\sa page \ref grouping "Grouping", sections \ref cmddefgroup "\\defgroup",
\ref cmdaddtogroup "\\addtogroup" and \ref cmdweakgroup "\\weakgroup"
<hr>
\subsection cmdinterface \interface
......@@ -555,6 +563,15 @@ Public/Protected/Private/... section.
\sa section \ref cmdfn "\\fn" and \ref cmdtypedef "\\typedef".
<hr>
\subsection cmdweakgroup \weakgroup <name> [(title)]
\addindex \addtogroup
Can be used exactly like \ref cmdaddtogroup "\\addtogroup", but has
a lower priority when it comes to resolving conflicting grouping
definitions.
\sa page \ref grouping "Grouping" and \ref cmdaddtogroup "\\addtogroup".
<hr>
<h2>\htmlonly <center> --- \endhtmlonly
......
......@@ -142,6 +142,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_latex_output LATEX_OUTPUT
<li> \refitem cfg_macro_expansion MACRO_EXPANSION
<li> \refitem cfg_man_extension MAN_EXTENSION
<li> \refitem cfg_man_links MAN_LINKS
<li> \refitem cfg_man_output MAN_OUTPUT
<li> \refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT
<li> \refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH
......@@ -997,6 +998,16 @@ EXTRA_PACKAGES = times
\addindex MAX_EXTENSION
The \c MAN_EXTENSION tag determines the extension that is added to
the generated man pages (default is the subroutine's section .3)
\anchor cfg_man_links
<dt>\c MAN_LINKS <dd>
\addindex MAN_LINKS
If the \c MAN_LINKS tag is set to \c YES and Doxygen generates man output,
then it will generate one additional man file for each entity documented in
the real man page(s). These additional files only source the real man page,
but without them the man command would be unable to find the correct page.
The default is \c NO.
</dl>
\subsection config_prepro Preprocessor related options
......@@ -1138,22 +1149,22 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\anchor cfg_include_graph
<dt>\c INCLUDE_GRAPH <dd>
\addindex INCLUDE_GRAPH
If the \c ENABLE_PREPROCESSING, \c INCLUDE_GRAPH, and \c HAVE_DOT tags are
set to \c YES then doxygen will generate a graph for each documented file
If the \c ENABLE_PREPROCESSING, \c SEARCH_INCLUDES, \c INCLUDE_GRAPH, and \c HAVE_DOT
tags are set to \c YES then doxygen will generate a graph for each documented file
showing the direct and indirect include dependencies of the file with other
documented files.
\anchor cfg_included_by_graph
<dt>\c INCLUDED_BY_GRAPH <dd>
\addindex INCLUDED_BY_GRAPH
If the \c ENABLE_PREPROCESSING, \c INCLUDED_BY_GRAPH, and \c HAVE_DOT tags are
set to \c YES then doxygen will generate a graph for each documented header
file showing the documented files that directly or indirectly include this
file.
If the \c ENABLE_PREPROCESSING, \c SEARCH_INCLUDES, \c INCLUDED_BY_GRAPH, and
\c HAVE_DOT tags are set to \c YES then doxygen will generate a graph for each
documented header file showing the documented files that directly or indirectly
include this file.
\anchor cfg_graphical_hierarchy
<dt>\c GRAPHICAL_HIERARCHY <dd>
\addindex GRAPHICAL_HIERATCHY
\addindex GRAPHICAL_HIERARCHY
If the \c GRAPHICAL_HIERARCHY and \c HAVE_DOT tags are set to \c YES then
doxygen will graphical hierarchy of all classes instead of a textual one.
......
......@@ -17,7 +17,7 @@
/*! \page faq Frequently Asked Questions
<ol>
<li><b>How do get information on the index page in HTML?</b>
<li><b>How to get information on the index page in HTML?</b>
<p>
You should use the \\mainpage command inside a comment block like this:
\verbatim
......
......@@ -34,6 +34,7 @@ command in a special comment block. The first argument of the command
is a label that should uniquely identify the group. You can make an
entity a member of a specific group by putting
a \ref cmdingroup "\\ingroup" command inside its documentation block.
The second argument is the title of the group.
To avoid putting \ref cmdingroup "\\ingroup" commands in the documentation
of each member you can also group members together by the
......@@ -44,11 +45,75 @@ documentation block.
Groups can also be nested using these grouping markers.
You will get an error message when you use the same group label more than once.
If you don't want doxygen to enforce
unique labels, then you can use \ref cmdaddtogroup "\\addtogroup" instead of
\ref cmddefgroup "\\defgroup". It can be used exactly like \ref cmddefgroup "\\defgroup",
but when the group has been defined already, then it silently merges the existing documentation
with the new one.
The title of the group is optional for this command, so you can use
\verbatim
/** \addtogroup <label> */
/*\@{*/
/*\@}*/
\endverbatim
to add members to a group that is defined in more detail elsewhere.
Note that compound entities (like classes, files and namespaces) can
be put into multiple groups, but members (like variable, functions, typedefs
and enums) can only be a member of one group
(this restriction is to avoid ambiguous linking targets).
Doxygen will put members into that group where the grouping definition had
the highest priority: f.i. \ref cmdingroup "\\ingroup" overrides any automatic
grouping definition via <code>\@{</code> <code>\@}</code>. Conflicting grouping
definitions with the same priority trigger a warning, unless one definition
was for a member without any explicit documentation. The following example
puts VarInA into group A and silently resolves the conflict for IntegerVariable by
putting it into group IntVariables, because the second instance of IntegerVariable
is undocumented:
\verbatim
/**
* \ingroup A
*/
extern int VarInA;
/**
* \defgroup IntVariables Global integer variables
*/
/*@{*/
/** an integer variable */
extern int IntegerVariable;
/*@}*/
....
/**
* \defgroup Variables Global variables
*/
/*@{*/
/** a variable in group A */
int VarInA;
int IntegerVariable;
/*@}*/
\endverbatim
The priorities of grouping definitions are (from highest to lowest):
\ref cmdingroup "\\ingroup", \ref cmddefgroup "\\defgroup",
\ref cmdaddtogroup "\\addtogroup", \ref cmdweakgroup "\\weakgroup".
The last command is exactly like \ref cmdaddtogroup "\\addtogroup"
with a lower priority. It was added to allow "lazy" grouping
definitions: you can use commands with a higher priority in your .h
files to define the hierarchy and \ref cmdweakgroup "\\weakgroup"
in .c files without having to duplicate the hierarchy exactly.
\par Example:
\verbinclude group.cpp
......
......@@ -421,6 +421,10 @@ Here is what is required:
to produce PDF output instead of DVI, or the PDF can be produced
from PostScript using the utility <code>ps2pdf</code>.
If you want to use MikTeX then you need to download the
fancyhdr package separately. You can find it at:
ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyhdr/
<li>If you want to generate compressed HTML help
(see \ref cfg_generate_htmlhelp "GENERATE_HTMLHELP") in the
config file, then you need the Microsoft HTML help workshop.
......
/******************************************************************************
* <notice>This is the template for generating language.doc. Edit this file,
* not the language.doc.</notice>
* <notice>This is the template for generating language.doc.
* Edit manually this file, not the language.doc!</notice>
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
......@@ -23,7 +23,8 @@ Doxygen has support for multiple languages. This means
that the text fragments that doxygen generates can changed into languages
other than English (the default) at configuration time.
<p>
Currently, $numlang languages are supported (sorted alphabetically):
Currently (version $version), $numlang languages
are supported (sorted alphabetically):
$languages.
The table of information related to the supported languages follows.
......@@ -33,7 +34,6 @@ when the translator was updated.
<p>
$information_table
Have a look at <code>doxygen/doc/translator.txt</code> for more details.
<p>
Most people on the list have indicated that they were also busy
......
......@@ -15,7 +15,7 @@ Petr P&rcaron;ikryl: prikrylp@skil.cz
Vlastimil Havran: havran@fel.cvut.cz
Danish
Erik Se Srensen: erik@mail.nu
Erik S&oslash;e S&oslash;rensen: erik@mail.nu
Dutch
Dimitri van Heesch: dimitri@stack.nl
......
:start
call perl -w translator.pl
pause
goto start
\ No newline at end of file
@call perl -w translator.pl
......@@ -4,6 +4,8 @@
# This is a Perl script for Doxygen developers.
# Its main purpose is to extract the information from sources
# related to internationalization (the translator classes).
# It uses the information to generate documentation (language.doc,
# translator_report.txt) from templates (language.tpl, maintainers.txt).
#
# Petr Prikryl (prikrylp@skil.cz)
# History:
......@@ -11,10 +13,26 @@
# 2001/04/27
# - First version of the script.
#
# 2002/05/02
# 2001/05/02
# - Update to accept updateNeededMessage() in the Translator class.
# - First version that generates doc/language.doc.
#
# 2001/05/07
# - Environment variable $doxygenrootdir now points to the
# Doxygen's root directory.
#
# 2001/05/11
# - Updated to reflect using TranslatorAdapterCVS as the base
# 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
# was already used before.
# - $version mark can be used in the language.tpl template.
#
# 2001/05/18
# - Character entity &oslash; recognized in maintainers.txt.
#
################################################################
require 5.005;
......@@ -23,14 +41,21 @@ use Carp;
# Global variables
#
my $doxygenrootdir = "..";
my $srcdir = "$doxygenrootdir/src";
my $docdir = "$doxygenrootdir/doc";
my $doxygenrootdir = 'directory set at the beginning of the body';
my $srcdir = 'directory set at the beginning of the body';
my $docdir = 'directory set at the beginning of the body';
my $doxversion = 'set at the beginning of the body';
# Names of the output files.
#
my $ftxt = "translator_report.txt";
my $fdoc = "language.doc";
my $ftranslatortxt = "translator_report.txt";
my $flangdoc = "language.doc";
# Names of the template files and other intput files.
#
my $flangtpl = "language.tpl"; # template for language.doc
my $fmaintainers = "maintainers.txt"; # database of local lang. maintainers
################################################################
......@@ -199,7 +224,7 @@ sub GetInfoFrom ##{{{
################################################################
# GenerateLanguageDoc takes document templates and code sources
# generates the content as expected in the language.doc file (the
# generates the content as expected in the $flangdoc file (the
# part of the Doxygen documentation), and returns the result as a
# string.
#
......@@ -250,7 +275,8 @@ xxxTABLE_FOOTxxx
\latexonly
\begin{tabular}{|l|l|l|l|}
\hline
{\bf Language} & {\bf Maintainer} & {Contact address} & {Status} \\
{\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
\hline
xxxTABLE_HEADxxx
my $latexTableRow = <<'xxxTABLE_ROWxxx';
......@@ -267,7 +293,7 @@ xxxTABLE_FOOTxxx
# Read the template of the documentation, and join the content
# to a single string. #{{{
#
my $fin = "$docdir/language.tpl";
my $fin = "$docdir/$flangtpl";
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
......@@ -304,7 +330,7 @@ xxxTABLE_FOOTxxx
# Read the information related to maintainers into the
# string using suitable separators -- one line, one language. #{{{
#
$fin = "$docdir/maintainers.txt";
$fin = "$docdir/$fmaintainers";
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @maintainers = <FIN>;
close FIN;
......@@ -374,13 +400,17 @@ xxxTABLE_FOOTxxx
foreach my $lang (sort keys %language) {
# Read the line with info for the language and separate
# the information of status. #{{{
# the status. #{{{
#
my @list = split(/<msep\/>/, $language{$lang});
my $status = shift @list;
my $i = $status =~ s{^Translator$}{up-to-date};
if ($i == 0) {
$i = $status =~ s{^TranslatorAdapterCVS}{almost up-to-date};
}
if ($i == 0) {
$i = $status =~ s{^TranslatorAdapter_(\d)_(\d)_(\d)}
{$1.$2.$3}x;
......@@ -479,9 +509,9 @@ xxxTABLE_FOOTxxx
##}}}
# Finish the tables, and substitute the mark in the doc
# template by the contatenation of the tables. Add NOSPAM to
# email addresses in the HTML table. Replace the special
# character sequences. #{{{
# 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. #{{{
#
$tableHTML .= $htmlTableFoot;
$tableLATEX .= $latexTableFoot;
......@@ -493,16 +523,26 @@ xxxTABLE_FOOTxxx
$tableLATEX =~ s/&aacute;/\\'{a}/sg;
$tableLATEX =~ s/&auml;/\\"{a}/sg;
$tableLATEX =~ s/&ouml;/\\"{o}/sg;
$tableLATEX =~ s/&oslash;/\\o{}/sg;
$tableLATEX =~ s/_/\\_/sg;
$output =~ s{\$information_table}{$tableHTML$tableLATEX};
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$notice};
$output =~ s{\$version}{$doxversion};
##}}}
# Replace the introduction notice in the output. #{{{
#
$output =~ s{<notice>.+?</notice>}
{Warning: this file was generated from the language.tpl template
* Do not edit this file. Edit the template!}sx;
{Warning: this file was generated from the $flangtpl template
* and the $fmaintainers files by the $0 script.
*
* Do not edit this file. Edit the above mentioned files!}sx;
##}}}
# Return the content of the generated output file.
......@@ -516,6 +556,24 @@ xxxTABLE_FOOTxxx
# Body
#
{
# Set the content of global variables using the environment
# variables. #{{{
#
$docdir = (defined $ENV{'DOXYGEN_DOCDIR'})
? $ENV{'DOXYGEN_DOCDIR'} : '.';
$docdir =~ s{\\}{/}g;
$docdir =~ s{/$}{};
$doxygenrootdir = ($docdir eq '.') ? '..' : $docdir;
$doxygenrootdir =~ s{/doc$}{};
$srcdir = "$doxygenrootdir/src";
$doxversion = (defined $ENV{'VERSION'}) ? $ENV{'VERSION'} : 'unknown';
##}}}
# The translator base class must be present. Exit otherwise. #{{{
#
if (!-f "$srcdir/translator.h")
......@@ -635,7 +693,7 @@ xxxTABLE_FOOTxxx
# Generate the textual output file.
#
my $fout = "$docdir/$ftxt";
my $fout = "$docdir/$ftranslatortxt";
# Open it first.
#
......@@ -655,24 +713,37 @@ xxxTABLE_FOOTxxx
# If there are up-to-date translators, list them. #{{{
#
my @list = sort grep { $cb{$_} =~ m/^Translator$/ } keys %cb;
my @list = sort grep { $cb{$_} =~ m/^Translator(AdapterCVS)?$/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are up-to-date "
. "(sorted alphabetically).\n"
. "This means that they derive from the Translator class. "
. "However, there still\n"
. "may be some details listed below "
. "for them. Please, check it.\n\n";
. "If the translator\n"
. "derives from TranslatorAdapterCVS, it is considered "
. "to be almost up-to-date.\n"
. "In other words, it is newer than the last official "
. "release. Anyway, there\n"
. "still may be some details listed even for "
. "the up-to-date translators.\n"
. "Please, check the text below.\n\n";
foreach (@list) { print FOUT " $_\n"; }
foreach (@list) {
print FOUT " $_";
# For almost up-to-date translators, show also the base class.
#
if ($cb{$_} ne 'Translator') { print FOUT "\t($cb{$_})"; }
print FOUT "\n";
}
}
##}}}
# If there are obsolete translators, list them. #{{{
#
@list = sort grep { $cb{$_} =~ m/^TranslatorAdapter/ } keys %cb;
@list = sort grep { $cb{$_} =~ m/^TranslatorAdapter_/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
......@@ -732,7 +803,7 @@ xxxTABLE_FOOTxxx
# Generate the language.doc file.
#
$fout = "$docdir/$fdoc";
$fout = "$docdir/$flangdoc";
# Open it first for the output.
#
......
Name: doxygen
Version: 1.2.7_20010517
Version: 1.2.7_20010524
Summary: documentation system for C, C++ and IDL
Release: 2
Source: doxygen_%{version}.src.tar.gz
Release: 3
Source: doxygen-%{version}.src.tar.gz
Copyright: GPL
Group: unsorted
URL: http://www.stack.nl/~dimitri/doxygen
Packager: Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
BuildRoot: /var/tmp/doxygen_%{version}.root
BuildRoot: /var/tmp/doxygen-%{version}.root
# requires Perl for tmake (Troll's make)
BuildPrereq: perl tetex
......@@ -33,7 +33,7 @@ den Quellen extrahiert. Doxygen wird auf einer Linux-Plattform
entwickelt, funktioniert aber genauso auf den meisten andern Unix
Dialekten. Das Programm ist auch fr Windows 95/NT erhltlich.
Author:
Autor:
--------
Dimitri van Heesch <dimitri@stack.nl>
......@@ -41,13 +41,14 @@ Author:
%setup -n doxygen-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix /do_we_need_this_usr --with-doxywizard
CFLAGS="$RPM_OPT_FLAGS" ./configure --with-doxywizard
make
%install
rm -rf $RPM_BUILD_ROOT
make install INSTALL=$RPM_BUILD_ROOT/usr DOCDIR=$RPM_BUILD_ROOT%{_docdir}/doxygen
install -m 644 LICENSE LANGUAGE.HOWTO PLATFORMS README VERSION $RPM_BUILD_ROOT%{_docdir}/doxygen
find $RPM_BUILD_ROOT -name CVS -type d -depth -exec rm -r {} \;
%files
%defattr(-,root,root)
......
......@@ -626,7 +626,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
pageType+=cType;
pageTitle+=pageType+" Reference";
if (outerTempArgList) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),pageTitle);
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trCompoundReference(name(),m_compType,outerTempArgList!=0));
endTitle(ol,getOutputFileBase(),name());
......@@ -1096,7 +1096,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n");
ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor());
parseText(ol,theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.popGeneratorState();
......@@ -1121,7 +1121,8 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,m_memListFileName,theTranslator->trMemberList());
startFile(ol,m_memListFileName,m_memListFileName,
theTranslator->trMemberList());
startTitle(ol,0);
parseText(ol,name()+" "+theTranslator->trMemberList());
endTitle(ol,0,0);
......@@ -1891,7 +1892,7 @@ QCString ClassDef::getSourceFileBase() const
return convertNameToFile(m_fileName+"-source");
}
void ClassDef::setGroupDefForAllMembers(GroupDef *gd)
void ClassDef::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs)
{
gd->addClass(this);
//printf("ClassDef::setGroupDefForAllMembers(%s)\n",gd->name().data());
......@@ -1904,10 +1905,10 @@ void ClassDef::setGroupDefForAllMembers(GroupDef *gd)
for (mnii.toFirst();(mi=mnii.current());++mnii)
{
MemberDef *md=mi->memberDef;
md->setGroupDef(gd);
md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
gd->insertMember(md,TRUE);
ClassDef *innerClass = md->getClassDefOfAnonymousType();
if (innerClass) innerClass->setGroupDefForAllMembers(gd);
if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
}
}
}
......
......@@ -228,7 +228,7 @@ class ClassDef : public Definition
void determineIntfUsageRelation();
void setSubGrouping(bool enabled) { m_subGrouping = enabled; }
void setProtection(Protection p) { m_prot=p; }
void setGroupDefForAllMembers(GroupDef *g);
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d);
void setIsTemplateBaseClass(int num) { m_isTemplBaseClass = num; }
void initTemplateMapping();
......
......@@ -8,16 +8,32 @@
#include <qlist.h>
#include <qtextstream.h>
/*! \brief Abstract base class for any configuration option.
*
*/
class ConfigOption
{
friend class Config;
public:
enum OptionType { O_Info, O_List, O_Enum, O_String, O_Int, O_Bool };
enum { MAX_OPTION_LENGTH = 23 };
/*! The type of option */
enum OptionType
{
O_Info, //<! A section header
O_List, //<! A list of items
O_Enum, //<! A fixed set of items
O_String, //<! A single item
O_Int, //<! An integer value
O_Bool //<! A boolean value
};
enum
{
/*! Maximum length of an option in the config file. Used for
* alignment purposes.
*/
MAX_OPTION_LENGTH = 23
};
ConfigOption(OptionType t) : m_kind(t)
{
m_spaces.fill(' ',40);
......@@ -25,20 +41,23 @@ class ConfigOption
virtual ~ConfigOption()
{
}
/*! returns the kind of option this is. */
OptionType kind() const { return m_kind; }
QCString name() const { return m_name; }
QCString docs() const { return m_doc; }
QCString dependsOn() const { return m_dependency; }
void addDependency(const char *dep)
{
m_dependency = dep;
}
OptionType kind() const { return m_kind; }
protected:
virtual void writeTemplate(QTextStream &t,bool sl) = 0;
virtual void convertStrToVal() {}
virtual void substEnvVars() {}
virtual void init() {}
QCString name() const { return m_name; }
QCString docs() const { return m_doc; }
QCString dependsOn() const { return m_dependency; }
protected:
QCString convertToComment(const QCString &s)
{
......@@ -340,48 +359,90 @@ class ConfigBool : public ConfigOption
* The static member instance() can be used to get
* a pointer to the one and only instance.
*/
struct Config
class Config
{
public:
/////////////////////////////
// public API
/////////////////////////////
/*! Returns the one and only instance of this class */
static Config *instance()
{
if (m_instance==0) m_instance = new Config;
return m_instance;
}
void writeTemplate(QFile *f,bool shortIndex);
void convertStrToVal();
void substituteEnvironmentVars();
void check();
void init();
void parse(const QCString &config,const char *fn);
/*! Returns an iterator that can by used to iterate over the
* configuration options.
*/
QListIterator<ConfigOption> iterator()
{
return QListIterator<ConfigOption>(*m_options);
}
////////////////////////
// get functions
////////////////////////
/*!
* @name Getting configuration values.
* @{
*/
/*! Returns the value of the string option with name \a fileName.
* The arguments \a num and \a name are for debugging purposes only.
* There is a convenience function Config_getString() for this.
*/
QCString &getString(const char *fileName,int num,const char *name) const;
/*! Returns the value of the list option with name \a fileName.
* The arguments \a num and \a name are for debugging purposes only.
* There is a convenience function Config_getList() for this.
*/
QStrList &getList(const char *fileName,int num,const char *name) const;
/*! Returns the value of the enum option with name \a fileName.
* The arguments \a num and \a name are for debugging purposes only.
* There is a convenience function Config_getEnum() for this.
*/
QCString &getEnum(const char *fileName,int num,const char *name) const;
/*! Returns the value of the integer option with name \a fileName.
* The arguments \a num and \a name are for debugging purposes only.
* There is a convenience function Config_getInt() for this.
*/
int &getInt(const char *fileName,int num,const char *name) const;
/*! Returns the value of the boolean option with name \a fileName.
* The arguments \a num and \a name are for debugging purposes only.
* There is a convenience function Config_getBool() for this.
*/
bool &getBool(const char *fileName,int num,const char *name) const;
/*! Returns the ConfigOption corresponding with \a name or 0 if
* the option is not supported.
*/
ConfigOption *get(const char *name) const
{
return m_dict->find(name);
}
/* @} */
/*!
* @name Adding configuration options.
* @{
*/
////////////////////////
// add functions
////////////////////////
/*! Starts a new configuration section with \a name and description \a doc.
* \returns An object representing the option.
*/
ConfigInfo *addInfo(const char *name,const char *doc)
{
ConfigInfo *result = new ConfigInfo(name,doc);
m_options->append(result);
return result;
}
/*! Adds a new string option with \a name and documentation \a doc.
* \returns An object representing the option.
*/
ConfigString *addString(const char *name,
const char *doc)
{
......@@ -390,6 +451,11 @@ struct Config
m_dict->insert(name,result);
return result;
}
/*! Adds a new enumeration option with \a name and documentation \a doc
* and initial value \a defVal.
* \returns An object representing the option.
*/
ConfigEnum *addEnum(const char *name,
const char *doc,
const char *defVal)
......@@ -399,6 +465,10 @@ struct Config
m_dict->insert(name,result);
return result;
}
/*! Adds a new string option with \a name and documentation \a doc.
* \returns An object representing the option.
*/
ConfigList *addList(const char *name,
const char *doc)
{
......@@ -407,6 +477,12 @@ struct Config
m_dict->insert(name,result);
return result;
}
/*! Adds a new integer option with \a name and documentation \a doc.
* The integer has a range between \a minVal and \a maxVal and a
* default value of \a defVal.
* \returns An object representing the option.
*/
ConfigInt *addInt(const char *name,
const char *doc,
int minVal,int maxVal,int defVal)
......@@ -416,6 +492,11 @@ struct Config
m_dict->insert(name,result);
return result;
}
/*! Adds a new boolean option with \a name and documentation \a doc.
* The boolean has a default value of \a defVal.
* \returns An object representing the option.
*/
ConfigBool *addBool(const char *name,
const char *doc,
bool defVal)
......@@ -425,6 +506,23 @@ struct Config
m_dict->insert(name,result);
return result;
}
/*! @} */
/*! Writes a template configuration file to \a f. If \a shortIndex
* is \c TRUE the description of each configuration option will
* be omitted.
*/
void writeTemplate(QFile *f,bool shortIndex);
/////////////////////////////
// internal API
/////////////////////////////
void convertStrToVal();
void substituteEnvironmentVars();
void check();
void init();
void parse(const QCString &config,const char *fn);
protected:
Config()
{
......
......@@ -555,7 +555,8 @@ void Config::writeTemplate(QFile *f,bool sl)
#endif
if (!sl)
{
t << "# This file describes the settings to be used by doxygen for a project\n";
t << "# This file describes the settings to be used by the documentation system\n";
t << "# doxygen (www.doxygen.org) for a project\n";
t << "#\n";
t << "# All text after a hash (#) is considered a comment and will be ignored\n";
t << "# The format is:\n";
......@@ -1728,7 +1729,7 @@ void Config::create()
"If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \n"
"The RTF output is optimised for Word 97 and may not look very pretty with \n"
"other RTF readers or editors.\n",
TRUE
FALSE
);
cs = addString(
"RTF_OUTPUT",
......@@ -1781,7 +1782,7 @@ void Config::create()
"GENERATE_MAN",
"If the GENERATE_MAN tag is set to YES (the default) Doxygen will \n"
"generate man pages \n",
TRUE
FALSE
);
cs = addString(
"MAN_OUTPUT",
......@@ -1799,6 +1800,16 @@ void Config::create()
);
cs->setDefaultValue(".3");
cs->addDependency("GENERATE_MAN");
cb = addBool(
"MAN_LINKS",
"If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n"
"then it will generate one additional man file for each entity\n"
"documented in the real man page(s). These additional files\n"
"only source the real man page, but without them the man command\n"
"would be unable to find the correct page. The default is NO.\n",
FALSE
);
cb->addDependency("GENERATE_MAN");
//-----------------------------------------------------------------------------------------------
//addInfo( "XML","configuration options related to the XML output");
//-----------------------------------------------------------------------------------------------
......@@ -1938,18 +1949,19 @@ void Config::create()
cb->addDependency("HAVE_DOT");
cb = addBool(
"INCLUDE_GRAPH",
"If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to \n"
"YES then doxygen will generate a graph for each documented file showing \n"
"the direct and indirect include dependencies of the file with other \n"
"documented files. \n",
"If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \n"
"tags are set to YES then doxygen will generate a graph for each documented \n"
"file showing the direct and indirect include dependencies of the file with \n"
"other documented files. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"INCLUDED_BY_GRAPH",
"If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to \n"
"YES then doxygen will generate a graph for each documented header file showing \n"
"the documented files that directly or indirectly include this file \n",
"If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and \n"
"HAVE_DOT tags are set to YES then doxygen will generate a graph for each \n"
"documented header file showing the documented files that directly or \n"
"indirectly include this file. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
......
......@@ -1432,7 +1432,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->endDescList();
currentListIndent.pop();
}
<DocScan>{CMD}"author"{BN}+ {
<DocScan>{CMD}"author"[s]?{BN}+ {
endArgumentList();
if (!inAuthorBlock)
{
......@@ -1441,7 +1441,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trAuthors()+": ");
bool singular = ((QString)yytext).find('s')==-1;
scanString(theTranslator->trAuthor(TRUE,singular)+": ");
outDoc->endBold();
outDoc->endDescTitle();
outDoc->writeDescItem();
......
......@@ -270,11 +270,11 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
static void addRelatedPage(Entry *root)
{
GroupDef *gd=0;
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s])) break;
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname])) break;
}
addRelatedPage(root->name,root->args,root->doc,root->anchors,
root->fileName,root->startLine,root->todoId,
......@@ -393,10 +393,30 @@ static void buildGroupList(Entry *root)
if ((gd=Doxygen::groupDict[root->name]))
{
warn(root->fileName,root->startLine,
"Warning: group %s already documented. "
"Skipping documentation.",
root->name.data());
if ( root->groupdoctype==Entry::GROUPDOC_NORMAL )
{
warn(root->fileName,root->startLine,
"Warning: group %s already documented. "
"Skipping documentation.",
root->name.data());
}
else
{
if ( !gd->hasGroupTitle() )
gd->setGroupTitle( root->type );
else if ( root->type.length() > 0 && root->name != root->type && gd->groupTitle() != root->type )
warn( root->fileName,root->startLine,
"group %s: ignoring title \"%s\" that does not match old title \"%s\"\n",
root->name.data(), root->type.data(), gd->groupTitle() );
if ( gd->briefDescription().isEmpty() )
gd->setBriefDescription(root->brief);
if ( !root->doc.stripWhiteSpace().isEmpty() )
gd->setDocumentation( gd->documentation().isEmpty() ? root->doc :
gd->documentation() + "\n\n" + root->doc );
gd->addSectionsToDefinition(root->anchors);
gd->setRefItems(root->todoId,root->testId,root->bugId);
addGroupToGroups(root,gd);
}
}
else
{
......@@ -440,30 +460,6 @@ static void organizeSubGroups(Entry *root)
}
}
static void addToGroupSections(Entry *root)
{
if (root->section==Entry::ADDGRPDOC_SEC && !root->name.isEmpty())
{
GroupDef *gd = Doxygen::groupDict[root->name];
if (gd)
{
gd->setDocumentation(gd->documentation()+"<p>"+root->brief+root->doc);
}
else
{
warn(root->fileName,root->startLine,
"Warning: ignoring addtogroup command for undefined "
"group `%s'.",root->name.data());
}
}
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
{
addToGroupSections(e);
}
}
//----------------------------------------------------------------------
static void buildFileList(Entry *root)
......@@ -496,12 +492,12 @@ static void buildFileList(Entry *root)
fd->setBriefDescription(root->brief);
fd->addSectionsToDefinition(root->anchors);
fd->setRefItems(root->todoId,root->testId,root->bugId);
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]))
{
gd->addFile(fd);
//printf("File %s: in group %s\n",fd->name().data(),s->data());
......@@ -709,7 +705,7 @@ static void buildClassList(Entry *root)
!root->name.isEmpty()
)
{
QCString fullName=root->name.copy();
QCString fullName=removeRedundantWhiteSpace(root->name);
if (fullName.isEmpty())
{
// this should not be called
......@@ -1103,12 +1099,12 @@ static void findUsingDirectives(Entry *root)
nd->setBriefDescription(root->brief);
nd->addSectionsToDefinition(root->anchors);
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]))
gd->addNamespace(nd);
}
......@@ -1448,12 +1444,12 @@ static MemberDef *addVariableToFile(
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first())
{
GroupDef *gd=Doxygen::groupDict[root->groups->first()->data()];
md->setGroupDef(gd);
GroupDef *gd=Doxygen::groupDict[root->groups->first()->groupname.data()];
md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, root->doc.length() != 0);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
{
root->groups->append(new QCString(md->getGroupDef()->name()));
root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri()));
}
}
}
......@@ -1999,12 +1995,12 @@ static void buildMemberList(Entry *root)
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first())
{
GroupDef *gd=Doxygen::groupDict[root->groups->first()->data()];
md->setGroupDef(gd);
GroupDef *gd=Doxygen::groupDict[root->groups->first()->groupname.data()];
md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, root->doc.length() != 0);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
{
root->groups->append(new QCString(md->getGroupDef()->name()));
root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri()));
}
}
}
......@@ -5103,9 +5099,7 @@ static void generatePageDocs()
else
pageName=pi->name.lower();
startFile(*outputList,pageName,pi->title);
startFile(*outputList,pageName,pi->title);
startFile(*outputList,pageName,pageName,pi->title);
// save old generator state and write title only to Man generator
outputList->pushGeneratorState();
......@@ -5190,7 +5184,7 @@ static void generateExampleDocs()
{
msg("Generating docs for example %s...\n",pi->name.data());
QCString n=convertNameToFile(pi->name+"-example");
startFile(*outputList,n,"Example Documentation");
startFile(*outputList,n,n,"Example Documentation");
startTitle(*outputList,n);
outputList->docify(pi->name);
endTitle(*outputList,n,0);
......@@ -5380,7 +5374,7 @@ static void generateSearchIndex()
//outputList->generateExternalIndex();
outputList->pushGeneratorState();
outputList->disableAllBut(OutputGenerator::Html);
startFile(*outputList,"header.html","Search Engine",TRUE);
startFile(*outputList,"header.html",0,"Search Engine",TRUE);
outputList->endPlainFile();
outputList->startPlainFile("footer.html");
endFile(*outputList,TRUE);
......@@ -6483,7 +6477,6 @@ void parseInput()
msg("Building group list...\n");
buildGroupList(root);
organizeSubGroups(root);
addToGroupSections(root);
msg("Building namespace list...\n");
buildNamespaceList(root);
......
......@@ -29,7 +29,7 @@ Entry::Entry()
sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>;
extends->setAutoDelete(TRUE);
groups = new QList<QCString>;
groups = new QList<Grouping>;
groups->setAutoDelete(TRUE);
anchors = new QList<QCString>;
anchors->setAutoDelete(TRUE);
......@@ -40,6 +40,7 @@ Entry::Entry()
mtArgList = 0;
mGrpId = -1;
tagInfo = 0;
groupdoctype = GROUPDOC_NORMAL;
reset();
}
......@@ -82,7 +83,7 @@ Entry::Entry(const Entry &e)
sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>;
extends->setAutoDelete(TRUE);
groups = new QList<QCString>;
groups = new QList<Grouping>;
groups->setAutoDelete(TRUE);
anchors = new QList<QCString>;
anchors->setAutoDelete(TRUE);
......@@ -91,6 +92,7 @@ Entry::Entry(const Entry &e)
//printf("Entry::Entry(copy) tArgList=0\n");
tArgList = 0;
mtArgList = 0;
groupdoctype = e.groupdoctype;
// deep copy of the child entry list
QListIterator<Entry> eli(*e.sublist);
......@@ -109,14 +111,15 @@ Entry::Entry(const Entry &e)
}
// deep copy group list
QListIterator<QCString> sli(*e.groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*e.groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
groups->append(new QCString(*s));
groups->append(new Grouping(*g));
}
QListIterator<QCString> sli2(*e.anchors);
QCString *s;
for (;(s=sli2.current());++sli2)
{
anchors->append(new QCString(*s));
......@@ -234,6 +237,7 @@ void Entry::reset()
memSpec = 0;
subGrouping = TRUE;
protection = Public;
groupdoctype = GROUPDOC_NORMAL;
sublist->clear();
extends->clear();
groups->clear();
......@@ -270,14 +274,15 @@ int Entry::getSize()
size+=bi->name.length()+1+sizeof(bi->prot)+sizeof(bi->virt);
bi=extends->next();
}
QCString *s=groups->first();
while (s)
Grouping *g=groups->first();
while (g)
{
size+=sizeof(QLNode);
size+=s->length()+1;
s=groups->next();
size+=g->groupname.length()+1;
size+=sizeof(g->pri);
g=groups->next();
}
s=anchors->first();
QCString *s=anchors->first();
while (s)
{
size+=sizeof(QLNode);
......
......@@ -121,6 +121,53 @@ struct TagInfo
QCString anchor;
};
struct Grouping {
typedef enum {
GROUPING_LOWEST,
GROUPING_AUTO_WEAK =
GROUPING_LOWEST, //!< membership in group was defined via @weakgroup @{ @}
GROUPING_AUTO_ADD, //!< membership in group was defined via @add[to]group @{ @}
GROUPING_AUTO_DEF, //!< membership in group was defined via @defgroup @{ @}
GROUPING_AUTO_HIGHEST =
GROUPING_AUTO_DEF,
GROUPING_INGROUP, //!< membership in group was defined by @ingroup
GROUPING_HIGHEST =
GROUPING_INGROUP
} GroupPri_t;
static const char *getGroupPriName( GroupPri_t priority )
{
switch( priority )
{
case GROUPING_AUTO_WEAK:
return "@weakgroup";
break;
case GROUPING_AUTO_ADD:
return "@addtogroup";
break;
case GROUPING_AUTO_DEF:
return "@defgroup";
break;
case GROUPING_INGROUP:
return "@ingroup";
break;
default:
return "???";
break;
}
}
Grouping( const char *gn, GroupPri_t p ) :
groupname(gn),
pri(p) {}
Grouping( const Grouping &g ) :
groupname(g.groupname),
pri(g.pri) {}
QCString groupname; //!< name of the group
GroupPri_t pri; //!< priority of this definition
};
/*! \brief Represents an unstructured piece of information, about an
* entity found in the sources.
*
......@@ -176,8 +223,7 @@ class Entry
MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000,
ADDGRPDOC_SEC = 0x01600000
PACKAGE_SEC = 0x01500000
};
enum MemberSpecifier
{
......@@ -231,8 +277,8 @@ class Entry
int endBodyLine; //!< line number where the definition ends
int mGrpId; //!< member group id
QList<Entry> *sublist; //!< entries that are children of this one
QList<BaseInfo> *extends; //!< list of base classes
QList<QCString> *groups; //!< list of groups this entry belongs to
QList<BaseInfo> *extends; //!< list of base classes
QList<Grouping> *groups; //!< list of groups this entry belongs to
QList<QCString> *anchors; //!< list of anchors defined in this entry
QCString fileName; //!< file this entry was extracted from
int startLine; //!< start line of entry in the source
......@@ -241,6 +287,47 @@ class Entry
int bugId; //!< id of the bug list item of this entry
TagInfo *tagInfo; //!< tag file info
static int num; //!< counts the total number of entries
enum {
GROUPDOC_NORMAL, //<! @defgroup
GROUPDOC_ADD, //<! @addgroup
GROUPDOC_WEAK //<! @weakgroup
} groupdoctype; //!< kind of group
/// return the command name used to define GROUPDOC_SEC
const char *groupdoccmd() const
{
switch( this->groupdoctype ) {
case GROUPDOC_NORMAL:
return "\\defgroup";
break;
case GROUPDOC_ADD:
return "\\addgroup";
break;
case GROUPDOC_WEAK:
return "\\weakgroup";
break;
default:
return "unknown group command";
}
}
Grouping::GroupPri_t groupingpri() const
{
if( this->section != GROUPDOC_SEC ) {
return Grouping::GROUPING_LOWEST;
}
switch( this->groupdoctype ) {
case GROUPDOC_NORMAL:
return Grouping::GROUPING_AUTO_DEF;
break;
case GROUPDOC_ADD:
return Grouping::GROUPING_AUTO_ADD;
break;
case GROUPDOC_WEAK:
return Grouping::GROUPING_AUTO_WEAK;
break;
default:
return Grouping::GROUPING_LOWEST;
}
}
private:
Entry &operator=(const Entry &);
} ;
......
......@@ -117,7 +117,7 @@ void FileDef::writeDocumentation(OutputList &ol)
//printf("WriteDocumentation diskname=%s\n",diskname.data());
QCString pageTitle=name()+" File Reference";
startFile(ol,getOutputFileBase(),pageTitle);
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trFileReference(docname));
endTitle(ol,getOutputFileBase(),docName());
......@@ -393,7 +393,7 @@ void FileDef::writeDocumentation(OutputList &ol)
// write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor());
parseText(ol,theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.enableAll();
......@@ -411,7 +411,7 @@ void FileDef::writeDocumentation(OutputList &ol)
void FileDef::writeSource(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,getSourceFileBase(),docname+" Source File");
startFile(ol,getSourceFileBase(),0,docname+" Source File");
startTitle(ol,0);
parseText(ol,docname);
endTitle(ol,0,0);
......
......@@ -174,7 +174,7 @@ void FormulaList::generateBitmaps(const char *path)
#ifdef _WIN32
char gsArgs[256];
sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
"-sOutputFile=%s.pnm -DNOPAUSE -- %s.ps",
"-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
formBase.data(),formBase.data()
);
......@@ -210,7 +210,7 @@ void FormulaList::generateBitmaps(const char *path)
#else
char gsArgs[4096];
sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
"-sOutputFile=%s.pnm -DNOPAUSE -- %s.ps",
"-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
formBase.data(),formBase.data()
);
......
......@@ -44,14 +44,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
exampleDict = new PageSDict(257);
allMemberList = new MemberList;
allMemberNameInfoDict = new MemberNameInfoDict(1009);
if (t)
title = t;
else
{
title = na;
title.at(0)=toupper(title.at(0));
}
fileName = (QCString)"group_"+na;
setGroupTitle( t );
memberGroupList = new MemberGroupList;
memberGroupList->setAutoDelete(TRUE);
memberGroupDict = new MemberGroupDict(1009);
......@@ -90,6 +84,22 @@ GroupDef::~GroupDef()
delete memberGroupDict;
}
void GroupDef::setGroupTitle( const char *t )
{
if ( t && strlen(t) )
{
title = t;
titleSet = TRUE;
}
else
{
title = name();
title.at(0)=toupper(title.at(0));
titleSet = FALSE;
}
}
void GroupDef::distributeMemberGroupDocumentation()
{
MemberGroupListIterator mgli(*memberGroupList);
......@@ -158,7 +168,7 @@ void GroupDef::addMembersToMemberGroup()
void GroupDef::insertMember(MemberDef *md,bool docOnly)
{
//printf("GroupDef::insertMember(%s)\n",md->name().data());
// fprintf(stderr, "GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data());
MemberNameInfo *mni=0;
if ((mni=(*allMemberNameInfoDict)[md->name()]))
{ // member with this name already found
......@@ -237,6 +247,70 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly)
//addMemberToGroup(md,groupId);
}
void GroupDef::removeMember(MemberDef *md)
{
// fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", title.data(), md->name().data());
MemberNameInfo *mni = allMemberNameInfoDict->find(md->name());
if (mni)
{
MemberNameInfoIterator mnii(*mni);
while( mnii.current() )
{
if( mnii.current()->memberDef == md )
{
mni->remove(mnii.current());
break;
}
++mnii;
}
if( mni->isEmpty() )
{
allMemberNameInfoDict->remove(md->name());
delete mni;
}
allMemberList->remove(md);
switch(md->memberType())
{
case MemberDef::Variable:
decVarMembers.remove(md);
docVarMembers.remove(md);
break;
case MemberDef::Function:
decFuncMembers.remove(md);
docFuncMembers.remove(md);
break;
case MemberDef::Typedef:
decTypedefMembers.remove(md);
docTypedefMembers.remove(md);
break;
case MemberDef::Enumeration:
decEnumMembers.remove(md);
docEnumMembers.remove(md);
break;
case MemberDef::EnumValue:
decEnumValMembers.remove(md);
docEnumValMembers.remove(md);
break;
case MemberDef::Prototype:
decProtoMembers.remove(md);
docProtoMembers.remove(md);
break;
case MemberDef::Define:
decDefineMembers.remove(md);
docDefineMembers.remove(md);
break;
default:
err("GroupDef::removeMember(): unexpected member remove in file!\n");
}
}
}
bool GroupDef::containsGroup(const GroupDef *def)
{
return groupList->find(def) >= 0;
}
void GroupDef::addGroup(const GroupDef *def)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
......@@ -280,7 +354,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
ol.pushGeneratorState();
//ol.disable(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),title);
startFile(ol,getOutputFileBase(),name(),title);
startTitle(ol,getOutputFileBase());
ol.docify(title);
endTitle(ol,getOutputFileBase(),title);
......@@ -510,12 +584,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
void addClassToGroups(Entry *root,ClassDef *cd)
{
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]))
{
gd->addClass(cd);
//printf("Compound %s: in group %s\n",cd->name().data(),s->data());
......@@ -526,13 +600,13 @@ void addClassToGroups(Entry *root,ClassDef *cd)
void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
{
//printf("root->groups->count()=%d\n",root->groups->count());
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
//printf("group `%s'\n",s->data());
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]))
{
gd->addNamespace(nd);
//printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
......@@ -542,12 +616,13 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
void addGroupToGroups(Entry *root,GroupDef *subGroup)
{
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]) &&
!gd->containsGroup(subGroup) )
{
gd->addGroup(subGroup);
subGroup->addParentGroup(gd);
......@@ -555,34 +630,87 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup)
}
}
/*! Add a member to all groups it is contained in */
/*! Add a member to the group with the highest priority */
void addMemberToGroups(Entry *root,MemberDef *md)
{
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
//printf(" Root 0x%p = %s, md 0x%p %s\n", root, root->name.data(), md, md->name().data() );
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
// Search entry's group list for group with highest pri.
Grouping::GroupPri_t pri = Grouping::GROUPING_LOWEST;
GroupDef *fgd=0;
for (;(g=gli.current());++gli)
{
//printf("addMemberToGroups(group=%s,member=%s)\n",s->data(),md->name().data());
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
GroupDef *gd;
if (!g->groupname.isEmpty() &&
(gd=Doxygen::groupDict[g->groupname]) &&
g->pri >= pri)
{
GroupDef *mgd = md->getGroupDef();
if (mgd==0)
if( fgd && g->pri == pri ) {
warn(root->fileName.data(), root->startLine,
"Warning: Member %s found in multiple %s groups! "
"The member will be put in group %s, and not in group %s",
md->name().data(), Grouping::getGroupPriName( pri ),
gd->name().data(), fgd->name().data()
);
}
fgd = gd;
pri = g->pri;
}
}
// put member into group defined by this entry?
if( fgd )
{
GroupDef *mgd = md->getGroupDef();
bool insertit = FALSE;
if (mgd==0)
insertit = TRUE;
else if (mgd!=fgd)
{
bool moveit = FALSE;
// move member from one group to another if
// - the new one has a higher priority
// - the new entry has the same priority, but with docs where the old one had no docs
if( md->getGroupPri() < pri )
moveit = TRUE;
else
{
gd->insertMember(md);
md->setGroupDef(gd);
ClassDef *cd = md->getClassDefOfAnonymousType();
if (cd) cd->setGroupDefForAllMembers(gd);
if( md->getGroupPri() == pri )
{
if( root->doc.length() != 0 && !md->getGroupHasDocs() )
moveit = TRUE;
else if( root->doc.length() != 0 && md->getGroupHasDocs() )
{
warn(md->getGroupFileName(),md->getGroupStartLine(),
"Warning: Member documentation for %s found several times in %s groups!\n"
"%s:%d: The member will remain in group %s, and won't be put into group %s",
md->name().data(), Grouping::getGroupPriName( pri ),
root->fileName.data(), root->startLine,
mgd->name().data(),
fgd->name().data()
);
}
}
}
else if (mgd!=gd)
if( moveit )
{
warn(mgd->getDefFileName(),mgd->getDefLine(),
"Warning: Member %s found in multiple groups.!\n"
"The member will be put in group %s, and not in group %s",
md->name().data(),mgd->name().data(),gd->name().data()
);
mgd->removeMember(md);
insertit = TRUE;
}
//printf("Member %s: in group %s\n",md->name().data(),s->data());
}
if( insertit )
{
fgd->insertMember(md);
md->setGroupDef(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
ClassDef *cd = md->getClassDefOfAnonymousType();
if (cd) cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
}
}
}
......@@ -590,12 +718,12 @@ void addMemberToGroups(Entry *root,MemberDef *md)
void addExampleToGroups(Entry *root,PageInfo *eg)
{
QListIterator<QCString> sli(*root->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
if (!g->groupname.isEmpty() && (gd=Doxygen::groupDict[g->groupname]))
{
gd->addExample(eg);
//printf("Example %s: in group %s\n",eg->name().data(),s->data());
......
......@@ -48,6 +48,8 @@ class GroupDef : public Definition
DefType definitionType() { return TypeGroup; }
QCString getOutputFileBase() const;
const char *groupTitle() const { return title; }
void setGroupTitle( const char *newtitle );
bool hasGroupTitle( ) { return titleSet; }
void addFile(const FileDef *def);
void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def);
......@@ -56,6 +58,8 @@ class GroupDef : public Definition
void addPage(PageInfo *def); // pages in this group
void addExample(const PageInfo *def); // examples in this group
void insertMember(MemberDef *def,bool docOnly=FALSE);
void removeMember(MemberDef *md);
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject()
......@@ -82,6 +86,7 @@ class GroupDef : public Definition
private:
QCString title; // title of the group
bool titleSet; // true if title is not the same as the name
QCString fileName; // base name of the generated file
FileList *fileList; // list of files in the group
ClassSDict *classSDict; // list of classes in the group
......@@ -115,7 +120,6 @@ class GroupDef : public Definition
/* user defined member groups */
MemberGroupList *memberGroupList; // list of member groups in this group
MemberGroupDict *memberGroupDict;
};
class GroupList : public QList<GroupDef>
......
......@@ -101,7 +101,7 @@ static void writeDefaultHeaderFile(QTextStream &t,const char *title,
bool external)
{
t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
"<html><head><meta name=\"robots\" content=\"noindex\">\n"
"<html><head>" /*"<meta name=\"robots\" content=\"noindex\">\n"*/
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset="
<< theTranslator->idLanguageCharset() << "\">\n"
"<title>" << title << "</title>\n";
......@@ -151,7 +151,8 @@ void HtmlGenerator::writeFooterFile(QFile &file)
}
void HtmlGenerator::startFile(const char *name,const char *title,bool external)
void HtmlGenerator::startFile(const char *name,const char *,
const char *title,bool external)
{
QCString fileName=name;
lastTitle=title;
......
......@@ -45,7 +45,8 @@ class HtmlGenerator : public OutputGenerator
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
//void generateExternalIndex();
void startFile(const char *name,const char *title,bool external);
void startFile(const char *name,const char *manName,
const char *title,bool external);
void writeFooter(int,bool);
void endFile();
void clearBuffer();
......
......@@ -300,9 +300,10 @@ void endTitle(OutputList &ol,const char *fileName,const char *name)
ol.endTitleHead(fileName,name);
}
void startFile(OutputList &ol,const char *name,const char *title,bool external)
void startFile(OutputList &ol,const char *name,const char *manName,
const char *title,bool external)
{
ol.startFile(name,title,external);
ol.startFile(name,manName,title,external);
if (!Config_getBool("DISABLE_INDEX")) writeQuickLinks(ol,TRUE,external);
}
......@@ -634,7 +635,7 @@ void writeHierarchicalIndex(OutputList &ol)
if (hierarchyClasses==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"hierarchy","Hierarchical Index");
startFile(ol,"hierarchy",0,"Hierarchical Index");
startTitle(ol,0);
QCString title = theTranslator->trClassHierarchy();
QCString htmlHelpTitle = title;
......@@ -684,7 +685,7 @@ void writeGraphicalClassHierarchy(OutputList &ol)
{
if (hierarchyClasses==0) return;
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"inherits","Graphical Class Hierarchy");
startFile(ol,"inherits",0,"Graphical Class Hierarchy");
startTitle(ol,0);
QCString title = theTranslator->trGraphicalHierarchy();
QCString htmlHelpTitle = title;
......@@ -763,7 +764,7 @@ void writeFileIndex(OutputList &ol)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
if (documentedFiles==0) ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"files","File Index");
startFile(ol,"files",0,"File Index");
startTitle(ol,0);
QCString title = theTranslator->trFileList();
QCString htmlHelpTitle = title;
......@@ -982,7 +983,7 @@ void writeNamespaceIndex(OutputList &ol)
if (documentedNamespaces==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"namespaces","Namespace Index");
startFile(ol,"namespaces",0,"Namespace Index");
startTitle(ol,0);
QCString title = theTranslator->trNamespaceList();
QCString htmlHelpTitle = title;
......@@ -1324,7 +1325,7 @@ void writeAlphabeticalIndex(OutputList &ol)
if (annotatedClasses==0) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"classes.html","Alphabetical index");
startFile(ol,"classes.html",0,"Alphabetical index");
startTitle(ol,0);
parseText(ol,Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex());
endTitle(ol,0,0);
......@@ -1345,7 +1346,7 @@ void writeAnnotatedIndex(OutputList &ol)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"annotated","Annotated Index");
startFile(ol,"annotated",0,"Annotated Index");
startTitle(ol,0);
QCString title = theTranslator->trCompoundList();
QCString htmlHelpTitle = title;
......@@ -1396,7 +1397,7 @@ void writePackageIndex(OutputList &ol)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"packages","Package Index");
startFile(ol,"packages",0,"Package Index");
startTitle(ol,0);
QCString title = theTranslator->trPackageList();
QCString htmlHelpTitle = title;
......@@ -1588,7 +1589,7 @@ void writeMemberIndex(OutputList &ol)
if (documentedMembers==0) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"functions","Compound Member Index");
startFile(ol,"functions",0,"Compound Member Index");
QCString title = theTranslator->trCompoundMembers();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
......@@ -1845,7 +1846,7 @@ void writeFileMemberIndex(OutputList &ol)
if (documentedFunctions==0) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"globals","File Member Index");
startFile(ol,"globals",0,"File Member Index");
QCString title = theTranslator->trFileMembers();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
......@@ -1884,7 +1885,7 @@ void writeNamespaceMemberIndex(OutputList &ol)
if (documentedNamespaceMembers==0) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"namespacemembers","Namespace Member Index");
startFile(ol,"namespacemembers",0,"Namespace Member Index");
QCString title = theTranslator->trNamespaceMembers();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
......@@ -1923,7 +1924,7 @@ void writeExampleIndex(OutputList &ol)
if (Doxygen::exampleSDict->count()==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"examples","Example Index");
startFile(ol,"examples",0,"Example Index");
startTitle(ol,0);
QCString title = theTranslator->trExamples();
QCString htmlHelpTitle = title;
......@@ -2028,7 +2029,7 @@ void writePageIndex(OutputList &ol)
if (indexedPages==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"pages","Page Index");
startFile(ol,"pages",0,"Page Index");
startTitle(ol,0);
QCString title = theTranslator->trRelatedPages();
QCString htmlHelpTitle = title;
......@@ -2132,7 +2133,7 @@ void writeGraphInfo(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
generateGraphLegend(Config_getString("HTML_OUTPUT"));
startFile(ol,"graph_legend","Graph Legend");
startFile(ol,"graph_legend",0,"Graph Legend");
startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle());
endTitle(ol,0,0);
......@@ -2523,7 +2524,7 @@ void writeGroupIndex(OutputList &ol)
if (documentedGroups==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,"modules","Module Index");
startFile(ol,"modules",0,"Module Index");
startTitle(ol,0);
QCString title = theTranslator->trModules();
QCString htmlHelpTitle = title;
......@@ -2607,7 +2608,7 @@ void writeIndex(OutputList &ol)
QCString indexName="index";
if (Config_getBool("GENERATE_TREEVIEW")) indexName="main";
ol.startFile(indexName,title,FALSE);
ol.startFile(indexName,0,title,FALSE);
bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
......@@ -2655,7 +2656,7 @@ void writeIndex(OutputList &ol)
ol.enable(OutputGenerator::Latex);
ol.enable(OutputGenerator::RTF);
ol.startFile("refman",0,FALSE);
ol.startFile("refman",0,0,FALSE);
ol.startIndexSection(isTitlePageStart);
if (!Config_getString("LATEX_HEADER").isEmpty())
{
......@@ -2780,7 +2781,7 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
ol.disable(OutputGenerator::Man);
startFile(ol,Doxygen::mainPage->name,Doxygen::mainPage->title);
startFile(ol,Doxygen::mainPage->name,0,Doxygen::mainPage->title);
//SectionInfo *si=0;
//if (!Doxygen::mainPage->title.isEmpty() && !Doxygen::mainPage->name.isEmpty() &&
// (si=Doxygen::sectionDict[Doxygen::mainPage->name])!=0)
......
......@@ -86,7 +86,8 @@ extern int documentedPackages;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name,const char *title,bool external=FALSE);
void startFile(OutputList &ol,const char *name,const char *manName,
const char *title,bool external=FALSE);
void endFile(OutputList &ol,bool external=FALSE);
#endif
......@@ -17,8 +17,10 @@
#include "message.h"
#include "language.h"
#include "translator.h"
#include "translator_en.h"
#if !defined(ENGLISH_ONLY)
#include "translator_adapter.h"
#include "translator_nl.h"
#include "translator_se.h"
#include "translator_cz.h"
......
......@@ -408,7 +408,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
writeDefaultStyleSheetPart3(t);
}
void LatexGenerator::startFile(const char *name,const char *,bool)
void LatexGenerator::startFile(const char *name,const char *,const char *,bool)
{
QCString fileName=name;
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
......
......@@ -42,7 +42,8 @@ class LatexGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Latex && active); }
OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; }
void startFile(const char *name,const char *title, bool external);
void startFile(const char *name,const char *manName,
const char *title, bool external);
void writeFooter(int,bool) {}
void endFile();
void clearBuffer();
......
......@@ -142,9 +142,10 @@ SOURCES = ce_lex.cpp \
util.cpp \
version.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32:TMAKE_CXXFLAGS += -DQT_NODLL -Zm200
INCLUDEPATH += ../qtools
win32:INCLUDEPATH += .
DESTDIR = ../lib
TARGET = doxygen
OBJECTS_DIR = ../objects
......@@ -27,6 +27,7 @@
#include "config.h"
#include "util.h"
#include "doxygen.h"
#include <string.h>
static QCString getExtension()
{
......@@ -94,10 +95,11 @@ void ManGenerator::init()
}
}
void ManGenerator::startFile(const char *name,const char *,bool)
static QCString buildFileName(const char *name)
{
QCString fileName=name;
#if 0
// TODO: do something sensible here.
if (fileName.left(6)=="class_")
{
......@@ -129,11 +131,20 @@ void ManGenerator::startFile(const char *name,const char *,bool)
{
fileName=fileName.left(i);
}
#endif
if (convertToQCString(fileName.right(2))!=Config_getString("MAN_EXTENSION"))
{
fileName+=Config_getString("MAN_EXTENSION");
}
startPlainFile(fileName);
return fileName;
}
void ManGenerator::startFile(const char *,const char *manName,
const char *,bool)
{
startPlainFile( buildFileName( manName ) );
firstCol=TRUE;
}
......@@ -361,6 +372,46 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
paragraph=FALSE;
}
void ManGenerator::startDoxyAnchor(const char *fname,const char *,
const char *name)
{
const char *basename;
// something to be done?
if( !Config_getBool("MAN_LINKS") )
{
return; // no
}
// truncate after an (optional) ::
basename = strrchr( name, ':' );
if ( !basename )
{
basename = name;
}
else
{
basename++;
}
// only create file when it doesn't exist
QCString fileName=dir+"/"+buildFileName( basename );
QFile linkfile( fileName );
if ( !linkfile.open( IO_ReadOnly ) )
{
if ( linkfile.open( IO_WriteOnly ) )
{
QTextStream linkstream;
linkstream.setDevice(&linkfile);
#if QT_VERSION >= 200
linkstream.setEncoding(QTextStream::Latin1);
#endif
linkstream << ".so man" << getExtension() << "/" << buildFileName( fname ) << endl;
}
}
linkfile.close();
}
void ManGenerator::endMemberDoc()
{
t << "\"";
......
......@@ -40,7 +40,8 @@ class ManGenerator : public OutputGenerator
OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; }
static void init();
void startFile(const char *name,const char *title,bool external);
void startFile(const char *name,const char *manName,
const char *title,bool external);
void writeFooter(int,bool) {}
void endFile();
void clearBuffer();
......@@ -125,7 +126,7 @@ class ManGenerator : public OutputGenerator
void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc();
void startDoxyAnchor(const char *,const char *,const char *) {}
void startDoxyAnchor(const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
......
......@@ -1468,8 +1468,12 @@ QCString MemberDef::anchor() const
return anc;
}
void MemberDef::setGroupDef(GroupDef *gd)
void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs)
{
printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data());
//printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data());
group=gd;
grouppri=pri;
groupFileName=fileName;
groupStartLine=startLine;
groupHasDocs=hasDocs;
}
......@@ -84,11 +84,17 @@ class MemberDef : public Definition
// scope query members
ClassDef *getClassDef() const { return classDef; }
GroupDef *getGroupDef() const { return group; }
FileDef *getFileDef() const { return fileDef; }
NamespaceDef* getNamespaceDef() const { return nspace; }
//Definition *getCompoundDef() const;
// querying the grouping definition
GroupDef *getGroupDef() const { return group; }
Grouping::GroupPri_t getGroupPri() const { return grouppri; }
const char *getGroupFileName() const { return groupFileName; }
int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; }
// direct kind info
Protection protection() const { return prot; }
Specifier virtualness() const { return virt; }
......@@ -137,7 +143,7 @@ class MemberDef : public Definition
void setMaxInitLines(int lines) { userInitLines=lines; }
void setMemberClass(ClassDef *cd) { classDef=cd; }
void setSectionList(MemberList *sl) { section=sl; }
void setGroupDef(GroupDef *gd);
void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void setExplicitExternal(bool b) { explExt=b; }
void makeRelated() { related=TRUE; }
......@@ -274,6 +280,11 @@ class MemberDef : public Definition
// as its type then this is computed by
// getClassDefOfAnonymousType() and
// cached here.
Grouping::GroupPri_t grouppri; // priority of this definition
QCString groupFileName; // file where this grouping was defined
int groupStartLine; // line " " " " "
bool groupHasDocs; // true if the entry that caused the grouping was documented
// disable copying of member defs
......
......@@ -75,7 +75,7 @@ void MemberGroup::insertMember(MemberDef *md)
GroupDef *gd;
if (firstMd && (gd=firstMd->getGroupDef()))
{
md->setGroupDef(gd);
md->setGroupDef(gd, firstMd->getGroupPri(), firstMd->getGroupFileName(), firstMd->getGroupStartLine(), firstMd->getGroupHasDocs());
gd->insertMember(md);
}
}
......
......@@ -210,7 +210,7 @@ void NamespaceDef::computeAnchors()
void NamespaceDef::writeDocumentation(OutputList &ol)
{
QCString pageTitle=name()+" Namespace Reference";
startFile(ol,getOutputFileBase(),pageTitle);
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
//ol.docify(pageTitle);
parseText(ol,theTranslator->trNamespaceReference(name()));
......@@ -320,7 +320,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor());
parseText(ol,theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
......
......@@ -289,7 +289,8 @@ class OutputGenerator : public BaseOutputDocInterface
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
virtual void startFile(const char *name,const char *title,bool ext) = 0;
virtual void startFile(const char *name,const char *manName,
const char *title,bool ext) = 0;
virtual void writeFooter(int,bool) = 0;
virtual void endFile() = 0;
virtual void startIndexSection(IndexSections) = 0;
......
......@@ -275,6 +275,7 @@ FORALL3(const char *a1,const char *a2,const char *a3,a1,a2,a3)
FORALL3(const char *a1,const char *a2,bool a3,a1,a2,a3)
FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3)
FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,bool a4,a1,a2,a3,a4)
//--------------------------------------------------------------------------
......@@ -82,8 +82,9 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endProjectNumber); }
void writeStyleInfo(int part)
{ forall(&OutputGenerator::writeStyleInfo,part); }
void startFile(const char *name,const char *title,bool external)
{ forall(&OutputGenerator::startFile,name,title,external); }
void startFile(const char *name,const char *manName,
const char *title,bool external)
{ forall(&OutputGenerator::startFile,name,manName,title,external); }
void writeFooter(int fase,bool external)
{ forall(&OutputGenerator::writeFooter,fase,external); }
void endFile()
......@@ -458,6 +459,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO3(const char *,const char *,const char *);
FORALLPROTO3(ClassDiagram &,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,bool);
OutputList(const OutputList &ol);
QList<OutputGenerator> *outputs;
......
......@@ -53,7 +53,7 @@ void PackageDef::writeDocumentation(OutputList &ol)
QCString title = theTranslator->trPackage(name());
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),title);
startFile(ol,getOutputFileBase(),name(),title);
startTitle(ol,getOutputFileBase());
ol.docify(title);
endTitle(ol,getOutputFileBase(),title);
......
......@@ -857,7 +857,8 @@ void RTFGenerator::beginRTFSection()
t << Rtf_Style["Heading2"]->reference << "\n";
}
void RTFGenerator::startFile(const char *name,const char *, bool )
void RTFGenerator::startFile(const char *name,const char *,
const char *, bool )
{
QCString fileName=name;
......
......@@ -42,7 +42,8 @@ class RTFGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==RTF && active); }
OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
void startFile(const char *name,const char *title, bool external);
void startFile(const char *name,const char *manName,
const char *title, bool external);
void writeFooter(int,bool) {}
void endFile();
void clearBuffer();
......
......@@ -142,8 +142,8 @@ static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
static QCString *pCopyQuotedString;
static QCString *pSkipDoc;
static QStack<QCString> autoGroupNameStack;
static QCString lastDefGroup;
static QStack<Grouping> autoGroupStack;
static Grouping lastDefGroup( "", Grouping::GROUPING_LOWEST );
static bool insideFormula;
static bool insideTryBlock=FALSE;
......@@ -168,7 +168,7 @@ static void initParser()
virt = Normal;
baseVirt = Normal;
isTypedef = FALSE;
autoGroupNameStack.clear();
autoGroupStack.clear();
insideTryBlock = FALSE;
insideIDL = FALSE;
}
......@@ -180,38 +180,35 @@ static void initEntry()
current->virt = virt;
current->stat = gstat;
current->mGrpId = memberGroupId;
if (!autoGroupNameStack.isEmpty())
if (!autoGroupStack.isEmpty())
{
current->groups->append(new QCString(*autoGroupNameStack.top()));
current->groups->append(new Grouping(*autoGroupStack.top()));
}
}
//-----------------------------------------------------------------------------
/// remove old group name (if given) and add new one (if given)
static void setCurrentGroup( QCString *oldgroup, QCString *newgroup )
/// remove any automatic grouping and add new one (if given)
static void setCurrentGroup( QCString *newgroup, Grouping::GroupPri_t pri )
{
if (oldgroup)
/* remove auto group name from current entry and discard it */
Grouping *g = current->groups->first();
int i=0;
while (g)
{
/* remove auto group name from current entry and discard it */
QCString *s = current->groups->first();
int i=0;
while (s)
{
if (*s==*oldgroup)
{
current->groups->remove(i);
break;
}
s=current->groups->next();
i++;
}
if (g->pri <= Grouping::GROUPING_AUTO_DEF)
{
current->groups->remove(i);
i--;
}
g=current->groups->next();
i++;
}
/* use new group name instead? */
if ( newgroup )
{
current->groups->append(new QCString(*newgroup));
current->groups->append(new Grouping(*newgroup, pri));
}
}
......@@ -474,7 +471,6 @@ TITLE [tT][iI][tT][lL][eE]
%x DocBaseClass
%x CppQuote
%x EndCppQuote
%x AddGroupDocArg1
%x GroupDocArg1
%x GroupDocArg2
%x GroupName
......@@ -1689,11 +1685,11 @@ TITLE [tT][iI][tT][lL][eE]
varEntry->mGrpId = current->mGrpId;
// deep copy group list
QListIterator<QCString> sli(*current->groups);
QCString *s;
for (;(s=sli.current());++sli)
QListIterator<Grouping> gli(*current->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
varEntry->groups->append(new QCString(*s));
varEntry->groups->append(new Grouping(*g));
}
//printf("Add: type=`%s',name=`%s',args=`%s'\n",
......@@ -2684,13 +2680,22 @@ TITLE [tT][iI][tT][lL][eE]
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->groupdoctype = Entry::GROUPDOC_NORMAL;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ {
current->section = Entry::ADDGRPDOC_SEC;
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
BEGIN( AddGroupDocArg1 );
current->groupdoctype = Entry::GROUPDOC_ADD;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ {
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->groupdoctype = Entry::GROUPDOC_WEAK;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"namespace"{B}+ {
current->section = Entry::NAMESPACEDOC_SEC;
......@@ -2753,7 +2758,7 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( ExampleDocArg1 );
}
<LineDoc>{CMD}"name"[^\n]*\n {
lastDefGroup.resize(0);
lastDefGroup.groupname.resize(0);
memberGroupHeader=&yytext[5];
memberGroupHeader=memberGroupHeader.stripWhiteSpace();
current->section = Entry::MEMBERGRP_SEC;
......@@ -2763,7 +2768,7 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( lastDocContext );
}
<Doc,JavaDoc>{CMD}"name"{B}+ {
lastDefGroup.resize(0);
lastDefGroup.groupname.resize(0);
current->section = Entry::MEMBERGRP_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
......@@ -2946,30 +2951,10 @@ TITLE [tT][iI][tT][lL][eE]
yyLineNr++;
}
<AddGroupDocArg1>{ID} {
current->name = yytext;
lastDefGroup = yytext;
newDocState();
}
<AddGroupDocArg1>"\n" {
warn(yyFileName,yyLineNr,
"Warning: missing argument after "
"\\addtogroup."
);
yyLineNr++;
BEGIN( Doc );
}
<GroupDocArg2>"*/" {
unput('/');unput('*');
warn(yyFileName,yyLineNr,
"Warning: missing argument after "
"\\addtogroup."
);
BEGIN( Doc );
}
<GroupDocArg1>{ID}(".html"?) {
current->name = yytext;
lastDefGroup = yytext;
lastDefGroup.groupname = yytext;
lastDefGroup.pri = current->groupingpri();
// the .html stuff is for Qt compatibility
if (current->name.right(5)==".html")
current->name=current->name.left(current->name.length()-5);
......@@ -2978,25 +2963,29 @@ TITLE [tT][iI][tT][lL][eE]
<GroupDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<GroupDocArg1>"\n" {
warn(yyFileName,yyLineNr,
"Warning: missing argument after "
"\\defgroup."
"Warning: missing group name after %s",
current->groupdoccmd()
);
yyLineNr++;
BEGIN( Doc );
}
<GroupDocArg2>{B}*"*/" {
// fake input for end of title rule
yyLineNr--;
unput('/');unput('*');unput('\n');
}
<GroupDocArg2>"\\"{B}*"\n" { yyLineNr++; }
<GroupDocArg2>[^\n\*]+ {
current->type += yytext;
current->type = current->type.stripWhiteSpace();
}
<GroupDocArg2>. {
current->type += yytext;
}
<GroupDocArg2>"\\"{B}*"\n" { yyLineNr++; }
<GroupDocArg2>"*/" {
unput('/');unput('*');
newDocState();
}
<GroupDocArg2>"\n" {
if( current->groupdoctype == Entry::GROUPDOC_NORMAL &&
current->type.length() == 0 )
warn(yyFileName,yyLineNr,
"Warning: missing title after "
"\\defgroup %s", current->name.data()
);
yyLineNr++;
newDocState();
}
......@@ -3240,11 +3229,11 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( GroupName );
}
<ClassDoc,Doc,JavaDoc>{CMD}"{" {
if (current->section==Entry::GROUPDOC_SEC ||
current->section==Entry::ADDGRPDOC_SEC
)
if (current->section==Entry::GROUPDOC_SEC )
{
autoGroupNameStack.push(new QCString(current->name));
autoGroupStack.push(new Grouping(current->name,
current->groupingpri()
));
}
else if (current->section == Entry::MEMBERGRP_SEC)
{
......@@ -3392,7 +3381,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<GroupName>{ID} {
current->groups->append(
new QCString(yytext)
new Grouping(yytext, Grouping::GROUPING_INGROUP)
);
}
<GroupName>\n {
......@@ -3745,18 +3734,17 @@ static void startGroup()
warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. "
"Previous command was found at line %d.",lastMemberGroupLine);
}
else if (!lastDefGroup.isEmpty())
else if (!lastDefGroup.groupname.isEmpty())
{
setCurrentGroup( autoGroupNameStack.top(), &lastDefGroup);
autoGroupNameStack.push(new QCString(lastDefGroup));
lastDefGroup.resize(0);
setCurrentGroup( &lastDefGroup.groupname, lastDefGroup.pri );
autoGroupStack.push(new Grouping(lastDefGroup));
lastDefGroup.groupname.resize(0);
}
else
{
if (memberGroupHeader.isEmpty())
{
//warn("Warning: member group does not have a header "
// "at line %d of %s.\n",yyLineNr,yyFileName);
// warn( yyFileName, yyLineNr, "Warning: member group does not have a header" );
memberGroupHeader="[NOHEADER]";
}
memberGroupId = newMemberGroupId();
......@@ -3767,7 +3755,7 @@ static void startGroup()
static void endGroup()
{
if (memberGroupId==NOGROUP && autoGroupNameStack.isEmpty())
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: end of group without matching begin.");
......@@ -3788,11 +3776,16 @@ static void endGroup()
memberGroupHeader.resize(0);
memberGroupDocs.resize(0);
}
else if (!autoGroupNameStack.isEmpty()) // end of group
else if (!autoGroupStack.isEmpty()) // end of group
{
QCString *oldName = autoGroupNameStack.pop();
setCurrentGroup(oldName,autoGroupNameStack.top());
delete oldName;
Grouping *current = autoGroupStack.pop();
Grouping *parent = autoGroupStack.top();
if( parent ) {
setCurrentGroup( &parent->groupname, parent->pri );
} else {
setCurrentGroup( NULL, Grouping::GROUPING_LOWEST );
}
delete current;
}
}
......
......@@ -431,9 +431,6 @@ class Translator
*/
virtual QCString trEnumerationValues() = 0;
/*! This is used in man pages as the author section. */
virtual QCString trAuthor() = 0;
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
......@@ -504,9 +501,6 @@ class Translator
/*! this text is generated when the \\date command is used. */
virtual QCString trDate() = 0;
/*! this text is generated when the \\author command is used. */
virtual QCString trAuthors() = 0;
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns() = 0;
......@@ -688,13 +682,13 @@ class Translator
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation() = 0;
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition() = 0;
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition() = 0;
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant() = 0;
/*! Text shown before a multi-line variable/enum initialization */
......@@ -846,6 +840,17 @@ class Translator
virtual QCString trMember(bool first_capital, bool singular) = 0;
virtual QCString trField(bool first_capital, bool singular) = 0;
virtual QCString trGlobal(bool first_capital, bool singular) = 0;
//////////////////////////////////////////////////////////////////////////
// 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) = 0;
};
#endif
This diff is collapsed.
......@@ -24,7 +24,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_6
{
public:
// --- Language contol methods -------------------
// --- Language control methods -------------------
/*! Used for identification of the language. May resemble
* the string returned by latexBabelPackage(), but it is not used
......@@ -630,9 +630,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_6
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
virtual QCString trPublicMembers()
{ return "Métodos Públicos"; }
virtual QCString trPublicSlots()
......@@ -653,7 +651,6 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_6
{ return "Slots Privados"; }
virtual QCString trStaticPrivateMembers()
{ return "Métodos Privados Estáticos"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -858,17 +855,17 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_6
{
return "Vá para a documentação deste arquivo.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Pré-Condição";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Pós-Condição";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariável";
......
......@@ -504,17 +504,17 @@ class TranslatorChinese : public TranslatorAdapter_1_2_1
{
return "浏览该文件的文档。";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "前置条件";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "后置条件";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "不变性";
......
This diff is collapsed.
This diff is collapsed.
......@@ -37,9 +37,7 @@
#ifndef TRANSLATOR_DK_H
#define TRANSLATOR_DK_H
#include "translator.h"
class TranslatorDanish : public Translator
class TranslatorDanish : public TranslatorAdapterCVS
{
public:
......@@ -879,17 +877,17 @@ class TranslatorDanish : public Translator
{
return "Hop til denne fils dokumentation.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Precondition";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Postcondition";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
......
......@@ -18,7 +18,26 @@
#ifndef TRANSLATOR_EN_H
#define TRANSLATOR_EN_H
#include "translator.h"
// When defining a translator class for the new language, follow
// the description in the documentation. One of the steps says
// that you should copy the translator_en.h (this) file to your
// translator_xx.h new file. Your new language should use the
// Translator class as the base class. This means that you need to
// implement exactly the same (pure virtual) methods as the
// TranslatorEnglish does. Because of this, it is a good idea to
// start with the copy of TranslatorEnglish and replace the strings
// one by one.
//
// It is not necessary to include "translator.h" or
// "translator_adapter.h" here. The files are included in the
// language.cpp correctly. Not including any of the mentioned
// files frees the maintainer from thinking about whether the
// first, the second, or both files should be included or not, and
// why. This holds namely for localized translators because their
// base class is changed occasionaly to adapter classes when the
// Translator class changes the interface, or back to the
// Translator class (by the local maintainer) when the localized
// translator is made up-to-date again.
class TranslatorEnglish : public Translator
{
......@@ -35,8 +54,19 @@ class TranslatorEnglish : public Translator
virtual QCString idLanguage()
{ return "english"; }
/*! Used to get the LaTeX command(s) for the language support. This method
* was designed for languages which do wish to use a babel package.
/*! 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()
{
......@@ -434,9 +464,6 @@ class TranslatorEnglish : public Translator
{ return "Enumeration values"; }
/*! This is used in man pages as the author section. */
virtual QCString trAuthor()
{ return "Author"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
......@@ -542,9 +569,6 @@ class TranslatorEnglish : public Translator
{ return "Date"; }
/*! this text is generated when the \\author command is used. */
virtual QCString trAuthors()
{ return "Author(s)"; }
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return "Returns"; }
......@@ -1179,6 +1203,7 @@ class TranslatorEnglish : public Translator
/*! 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
* ------------------------------------------------------
......@@ -1197,6 +1222,7 @@ class TranslatorEnglish : public Translator
* HANGEUL_CHARSET 129 (x81) 949
* GB2313_CHARSET 134 (x86) 936
* CHINESEBIG5_CHARSET 136 (x88) 950
* </pre>
*
*/
virtual QCString trRTFansicp()
......@@ -1204,6 +1230,7 @@ class TranslatorEnglish : public Translator
return "1252";
}
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
*/
......@@ -1225,7 +1252,6 @@ class TranslatorEnglish : public Translator
virtual QCString trClass(bool first_capital, bool singular)
{
QCString result((first_capital ? "Class" : "class"));
if (first_capital) toupper(result.at(0));
if (!singular) result+="es";
return result;
}
......@@ -1306,7 +1332,20 @@ class TranslatorEnglish : public Translator
if (!singular) result+="s";
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 ? "Author" : "author"));
if (!singular) result+="s";
return result;
}
};
#endif
......@@ -530,9 +530,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_1_5
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
virtual QCString trPublicMembers()
{ return "Métodos públicos"; }
virtual QCString trPublicSlots()
......@@ -553,7 +551,6 @@ class TranslatorSpanish : public TranslatorAdapter_1_1_5
{ return "Slots privados"; }
virtual QCString trStaticPrivateMembers()
{ return "Métodos privados estáticos"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -756,17 +753,17 @@ class TranslatorSpanish : public TranslatorAdapter_1_1_5
{
return "Ir a la documentación de este archivo.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Precondición";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Postcondicón";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariante";
......
......@@ -532,9 +532,7 @@ class TranslatorFrench : public TranslatorAdapter_1_2_0
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
virtual QCString trPublicMembers()
{ return "Membres publics"; }
virtual QCString trPublicSlots()
......@@ -555,7 +553,6 @@ class TranslatorFrench : public TranslatorAdapter_1_2_0
{ return "Connecteurs privés"; }
virtual QCString trStaticPrivateMembers()
{ return "Membres privés statiques"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -760,17 +757,17 @@ class TranslatorFrench : public TranslatorAdapter_1_2_0
{
return "Aller à la documentation de ce fichier.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Précondition";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Postcondition";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
......
......@@ -535,17 +535,17 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_6
{
return "Dokumenacija za ovu datoteku.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Preduvjeti";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Postuvjeti";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invarijanta";
......
......@@ -24,7 +24,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_2_1
{
public:
// --- Language contol methods -------------------
// --- Language control methods -------------------
QCString idLanguage()
{ return "hungarian"; }
/*! Used to get the command(s) for the language support. This method
......@@ -543,9 +543,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_2_1
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
QCString trPublicMembers()
{ return "Publikus metódusok"; }
QCString trPublicSlots()
......@@ -566,7 +564,6 @@ class TranslatorHungarian : public TranslatorAdapter_1_2_1
{ return "Privát adatok"; }
QCString trStaticPrivateMembers()
{ return "Statikus privát metódusok"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -769,17 +766,17 @@ class TranslatorHungarian : public TranslatorAdapter_1_2_1
{
return "Ugrás a fájl dokumentációjához.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Elõfeltétel";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Utófeltétel";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invariáns";
......
......@@ -57,9 +57,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
#include "translator.h"
class TranslatorItalian : public Translator
class TranslatorItalian : public TranslatorAdapterCVS
{
public:
......@@ -676,9 +674,7 @@ class TranslatorItalian : public Translator
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
QCString trPublicMembers()
{ return "Membri pubblici"; }
QCString trPublicSlots()
......@@ -699,7 +695,6 @@ class TranslatorItalian : public Translator
{ return "Slot privati"; }
QCString trStaticPrivateMembers()
{ return "Membri privati statici"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -903,17 +898,17 @@ class TranslatorItalian : public Translator
{
return "Vai alla documentazione di questo file.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Precondizione";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Postcondizione";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invariante";
......
......@@ -520,9 +520,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
QCString trPublicMembers()
{ return "公開メンバ"; }
QCString trPublicSlots()
......@@ -543,7 +541,6 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5
{ return "非公開スロット"; }
QCString trStaticPrivateMembers()
{ return "静的非公開メンバ"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -745,17 +742,17 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_5
{
return "このファイルの解説を見る。";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "事前条件";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "事後条件";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invariant";
......
......@@ -530,9 +530,7 @@ class TranslatorKorean : public TranslatorAdapter_1_1_0
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
QCString trPublicMembers()
{ return "공용 메소드"; }
QCString trPublicSlots()
......@@ -553,7 +551,6 @@ class TranslatorKorean : public TranslatorAdapter_1_1_0
{ return "Private Slots"; }
QCString trStaticPrivateMembers()
{ return "정적 프라이베이트 메소드"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -757,17 +754,17 @@ class TranslatorKorean : public TranslatorAdapter_1_1_0
{
return "이 파일의 문서화로 가시오";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "전제 조건";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "후미 조건"; // "후치조건"
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "변하지 않는";
......
......@@ -501,17 +501,17 @@ class TranslatorDutch : public TranslatorAdapter_1_2_6
{
return "Ga naar de documentatie van deze file.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Preconditie";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Postconditie";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invariant";
......
......@@ -571,17 +571,17 @@ class TranslatorNorwegian : public TranslatorAdapter_1_2_2
{
return "G til dokumentasjonen for denne filen.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Fr-kondisjon";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Etter-kondisjon";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
......
......@@ -24,7 +24,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_1
{
public:
// --- Language contol methods -------------------
// --- Language control methods -------------------
/*! Used for identification of the language. May resemble
* the string returned by latexBabelPackage(), but it is not used
......@@ -545,9 +545,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_1
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
QCString trPublicMembers()
{ return "Metody Publiczne"; }
QCString trPublicSlots()
......@@ -568,7 +566,6 @@ class TranslatorPolish : public TranslatorAdapter_1_2_1
{ return "Sloty Prywatne"; }
QCString trStaticPrivateMembers()
{ return "Statyczne Metody Prywatne"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -770,17 +767,17 @@ class TranslatorPolish : public TranslatorAdapter_1_2_1
{
return "Id¼ do dokumentacji tego pliku.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Warunek wstêpny";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Warunek koñcowy";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Inwariant";
......
......@@ -524,9 +524,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
virtual QCString trPublicMembers()
{ return "Membros públicos"; }
virtual QCString trPublicSlots()
......@@ -547,7 +545,6 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
{ return "Slots privados"; }
virtual QCString trStaticPrivateMembers()
{ return "Membros privados estáticos"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -753,17 +750,17 @@ class TranslatorPortuguese : public TranslatorAdapter_1_1_5
{
return "Ir para a documentação deste ficheiro.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Precondição";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Poscondição";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariante";
......
......@@ -38,7 +38,7 @@ class TranslatorRomanian: public TranslatorAdapter_1_2_1
{
public:
// --- Language contol methods -------------------
// --- Language control methods -------------------
/*! Used for identification of the language. May resemble
* the string returned by latexBabelPackage(), but it is not used
......@@ -571,9 +571,7 @@ class TranslatorRomanian: public TranslatorAdapter_1_2_1
return result;
}
/*! \mgroup Class sections
* these are for the member sections of a class, struct or union
*/
/* these are for the member sections of a class, struct or union */
virtual QCString trPublicMembers()
{ return "Metode Publice"; }
virtual QCString trPublicSlots()
......@@ -594,7 +592,6 @@ class TranslatorRomanian: public TranslatorAdapter_1_2_1
{ return "Sloturi Private"; }
virtual QCString trStaticPrivateMembers()
{ return "Metode Statice Private"; }
/*! \endmgroup */
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
......@@ -797,17 +794,17 @@ class TranslatorRomanian: public TranslatorAdapter_1_2_1
{
return "Vezi documentaþia.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Precondiþie";
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Postcondiþie";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
......
......@@ -48,9 +48,7 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
#include "translator.h"
class TranslatorRussian : public Translator
class TranslatorRussian : public TranslatorAdapterCVS
{
private:
/*! The Decode() inline assumes the source written in the
......@@ -921,17 +919,17 @@ class TranslatorRussian : public Translator
{
return decode(". .");
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return decode("");
}
/*! Text for the \post command */
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return decode("");
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return decode("");
......
......@@ -528,17 +528,17 @@ class TranslatorSlovene : public TranslatorAdapter_1_1_5
{
return "dokumenacija tekoe datoteke.";
}
/*! Text for the \pre command */
/*! Text for the \\pre command */
QCString trPrecondition()
{
return "Predpogoji (preconditions)";
}
/*! Text for the \post command */
/*! Text for the \\post command */
QCString trPostcondition()
{
return "Naknadni pogoji (posconditions)";
}
/*! Text for the \invariant command */
/*! Text for the \\invariant command */
QCString trInvariant()
{
return "Invarianta";
......
......@@ -460,7 +460,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=' ';
result+=s.at(i);
}
else if (c!=' ' ||
else if (!isspace(c) ||
( i!=0 && i!=l-1 &&
(isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
isId(s.at(i+1))
......
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