Commit 7e4d434c authored by Dimitri van Heesch's avatar Dimitri van Heesch

Doxygen-1.2.12-20011209

parent 79959c79
DOXYGEN Version 1.2.12-20011125
DOXYGEN Version 1.2.12-20011209
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (25 November 2001)
Dimitri van Heesch (09 December 2001)
DOXYGEN Version 1.2.12_20011125
DOXYGEN Version 1.2.12_20011209
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (25 November 2001)
Dimitri van Heesch (dimitri@stack.nl) (09 December 2001)
1.2.12-20011125
1.2.12-20011209
......@@ -216,27 +216,29 @@ if test "$f_plf_auto" = NO; then
fi
#- check for qt --------------------------------------------------------------
#
# echo -n " Checking for Qt..."
# if test -z "$QTDIR"; then
# echo "QTDIR not set!"
# echo
# echo "tmake requires the QTDIR environment variable to be set."
# echo "check your Qt installation!"
# exit 2
# else
# if test ! -d "$QTDIR/lib"; then
# echo "QTDIR is set, but library directory does not exist!"
# exit 2
# fi
# if test ! -d "$QTDIR/include"; then
# echo "QTDIR is set, but include directory does not exist!"
# exit 2
# fi
# echo " headers $QTDIR/include,"
# echo " libraries $QTDIR/lib"
# fi
#
if test "$f_wizard" = YES; then
echo -n " Checking for Qt..."
if test -z "$QTDIR"; then
echo "QTDIR not set!"
echo
echo "tmake requires the QTDIR environment variable to be set."
echo "check your Qt installation!"
exit 2
else
if test ! -d "$QTDIR/lib"; then
echo "QTDIR is set, but library directory does not exist!"
exit 2
fi
if test ! -d "$QTDIR/include"; then
echo "QTDIR is set, but include directory does not exist!"
exit 2
fi
echo " headers $QTDIR/include,"
echo " libraries $QTDIR/lib"
fi
fi
# - check for make ------------------------------------------------------------
echo -n " Checking for GNU make tool... "
......@@ -275,10 +277,12 @@ if test "$f_insttool" = NO; then
for i in $install_names; do
for j in $install_dirs; do
if test -x "$j/$i"; then
if test -n "`$j/$i --version 2>/dev/null | grep fileutils`"; then
install_found=YES
install_prog="$j/$i"
break 2
fi
fi
done
done
f_insttool="$install_prog"
......
......@@ -377,8 +377,10 @@ doxygen. Unrecognized commands are treated as normal text.
\subsection cmdinternal \internal
\addindex \internal
This command writes the message `For internal use only' to the output.
All text after a \c \internal command is ignored.
This command writes the message `For internal use only' to the output and
all text \e after a \c \\internal command is ignored.
You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file
to show or hide the internal documentation.
<hr>
\subsection cmdmainpage \mainpage [(title)]
......
......@@ -318,7 +318,7 @@ followed by the descriptions of the tags grouped by category.
<dt>\c INTERNAL_DOCS <dd>
\addindex INTERNAL_DOCS
The \c INTERNAL_DOCS tag determines if documentation
that is typed after a \\internal command is included. If the tag is set
that is typed after a \ref cmdinternal "\\internal" command is included. If the tag is set
to \c NO (the default) then the documentation will be excluded.
Set it to \c YES to include the internal documentation.
......@@ -540,7 +540,7 @@ followed by the descriptions of the tags grouped by category.
Separate the files or directories with spaces.<br>
\b Note:
This tag (and only this tag) is \e required.
If this tag is empty the current directory is searched.
\anchor cfg_file_patterns
<dt>\c FILE_PATTERNS <dd>
......@@ -1090,7 +1090,7 @@ EXTRA_PACKAGES = times
\anchor cfg_expand_as_defined
<dt>\c EXPAND_AS_DEFINED <dd>
\addindex EXPAND_AS_DEFINED
If the \c MACRO_EXPANSION and \c EXPAND_PREDEF_ONLY tags are set to \c YES then
If the \c MACRO_EXPANSION and \c EXPAND_ONLY_PREDEF tags are set to \c YES then
this tag can be used to specify a list of macro names that should be expanded.
The macro definition that is found in the sources will be used.
Use the \c PREDEFINED tag if you want to use a different macro definition.
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.11-20011111), 24 languages
Currently (version 1.2.12-20011125), 24 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
......@@ -53,8 +53,8 @@ when the translator was updated.
<TR BGCOLOR="#ffffff">
<TD>Brazilian</TD>
<TD>Fabio "FJTC" Jun Takada Chino</TD>
<TD>chino@NOSPAM.grad.icmc.sc.usp.br</TD>
<TD>1.2.11</TD>
<TD>chino@NOSPAM.icmc.sc.usp.br</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Chinese</TD>
......@@ -66,7 +66,7 @@ when the translator was updated.
<TD>Croatian</TD>
<TD>Boris Bralo</TD>
<TD>boris.bralo@NOSPAM.zg.tel.hr</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Czech</TD>
......@@ -84,7 +84,7 @@ when the translator was updated.
<TD>Dutch</TD>
<TD>Dimitri van Heesch</TD>
<TD>dimitri@NOSPAM.stack.nl</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>English</TD>
......@@ -102,13 +102,13 @@ when the translator was updated.
<TD>French</TD>
<TD>Xavier Outhier</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>German</TD>
<TD>Jens Seidel<br>Jens Breitenstein</TD>
<TD>jensseidel@NOSPAM.users.sf.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Hungarian</TD>
......@@ -120,7 +120,7 @@ when the translator was updated.
<TD>Italian</TD>
<TD>Ahmed Aldo Faisal<br>Alessandro Falappa</TD>
<TD>aaf23@NOSPAM.cam.ac.uk<br>a.falappa@NOSPAM.flashnet.it</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Japanese</TD>
......@@ -132,7 +132,7 @@ when the translator was updated.
<TD>Korean</TD>
<TD>Richard Kim</TD>
<TD>ryk@NOSPAM.dspwiz.com</TD>
<TD>1.1.0</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Norwegian</TD>
......@@ -150,7 +150,7 @@ when the translator was updated.
<TD>Portuguese</TD>
<TD>Rui Godinho Lopes</TD>
<TD>ruiglopes@NOSPAM.yahoo.com</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Romanian</TD>
......@@ -174,7 +174,7 @@ when the translator was updated.
<TD>Slovene</TD>
<TD>Matjaz Ostroversnik</TD>
<TD>matjaz.ostroversnik@NOSPAM.zrs-tk.si</TD>
<TD>1.2.11</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Spanish</TD>
......@@ -184,8 +184,8 @@ when the translator was updated.
</TR>
<TR BGCOLOR="#ffffff">
<TD>Swedish</TD>
<TD>Samuel H&auml;agglund<br>XeT Erixon</TD>
<TD>sahag96@NOSPAM.nts.mh.se<br>xet@NOSPAM.hem.passagen.se</TD>
<TD>XeT Erixon</TD>
<TD>xet@NOSPAM.hem.passagen.se</TD>
<TD>1.0.0</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -205,42 +205,42 @@ when the translator was updated.
{\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
\hline
\hline
Brazilian & Fabio "FJTC" Jun Takada Chino & {\tt chino@grad.icmc.sc.usp.br} & 1.2.11 \\
Brazilian & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\
\hline
Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.11 \\
& Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\
\hline
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & 1.2.11 \\
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\
\hline
Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & 1.2.7 \\
\hline
Dutch & Dimitri van Heesch & {\tt dimitri@stack.nl} & 1.2.11 \\
Dutch & Dimitri van Heesch & {\tt dimitri@stack.nl} & up-to-date \\
\hline
English & Dimitri van Heesch & {\tt dimitri@stack.nl} & up-to-date \\
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & 1.0.0 \\
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.2.11 \\
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.2.11 \\
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
& Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & 1.2.11 \\
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & up-to-date \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} & \\
\hline
Japanese & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & 1.2.5 \\
\hline
Korean & Richard Kim & {\tt ryk@dspwiz.com} & 1.1.0 \\
Korean & Richard Kim & {\tt ryk@dspwiz.com} & up-to-date \\
\hline
Norwegian & Lars Erik Jordet & {\tt larsej@stud.ifd.hibu.no} & 1.2.2 \\
\hline
Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\
\hline
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.2.11 \\
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\
\hline
Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\
\hline
......@@ -248,12 +248,11 @@ when the translator was updated.
\hline
Slovak & Stanislav Kudl\'{a}\v{c} & {\tt qwerty1@pobox.sk} & 1.2.11 \\
\hline
Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & 1.2.11 \\
Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & up-to-date \\
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.2.7 \\
\hline
Swedish & Samuel H\"{a}agglund & {\tt sahag96@nts.mh.se} & 1.0.0 \\
& XeT Erixon & {\tt xet@hem.passagen.se} & \\
Swedish & XeT Erixon & {\tt xet@hem.passagen.se} & 1.0.0 \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\
\hline
......
......@@ -37,8 +37,8 @@ Hungarian
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari@diatronltd.com
Italian
Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Alessandro Falappa: a.falappa@flashnet.it
Japanese
Kenji Nagamatsu: naga@joyful.club.ne.jp
......@@ -71,7 +71,6 @@ Spanish
Francisco Oltra Thennet: foltra@puc.cl
Swedish
Samuel H&auml;agglund: sahag96@nts.mh.se
XeT Erixon: xet@hem.passagen.se
Ukrainian
......
......@@ -61,20 +61,20 @@ Makefile. It contains of a number of assignments (tags) of the form:
<tt>TAGNAME = VALUE1 VALUE2 ... </tt><br>
You can probably leave the values of most tags in a generated template
configuration file to their default value.
The \ref cfg_input "INPUT" tag is the only tag for which you are required to
provide a value. See section \ref config for more details about the
configuration file. For a small project consisting of a few C and/or C++ source
and header files, you can add the names of the files after the
\ref cfg_input "INPUT" tag.
If you have a larger project consisting of a source directory or tree this may
become tiresome. In this case you should put the root directory or
configuration file to their default value. See section \ref config for
more details about the configuration file.
For a small project consisting of a few C and/or C++ source
and header files, you can leave
\ref cfg_input "INPUT" tag empty and doxygen will search for sources in
the current directory.
If you have a larger project consisting of a source directory or tree
you should put the root directory or
directories after the \ref cfg_input "INPUT" tag, and add one or more file
patterns to the \ref cfg_file_patterns "FILE_PATTERNS" tag
(for instance <code>*.cpp *.h</code>). Only files that match one of the
patterns will be parsed (if the patterns are omitted all files will be parsed).
patterns will be parsed (if the patterns are omitted a list of
source extensions is used).
For recursive parsing of a source tree you must set
the \ref cfg_recursive "RECURSIVE" tag to \c YES. To further fine-tune the
list of files that is parsed the \ref cfg_exclude "EXCLUDE" and
......@@ -85,8 +85,9 @@ documentation that doxygen is aware of), you can still get an idea of
what the documented result would be. To do so, you must set
the \ref cfg_extract_all "EXTRACT_ALL" tag in the configuration file
to \c YES. Then, doxygen will pretend everything in your sources is documented.
Please note that warnings of undocumented members will not be generated as
long as \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES.
Please note that as a consequence warnings about undocumented members
will not be generated as long as \ref cfg_extract_all "EXTRACT_ALL" is
set to \c YES.
To analyse an existing piece of software it is useful to cross-reference
a (documented) entity with its definition in the source files. Doxygen will
......
Name: doxygen
Version: 1.2.12_20011125
Version: 1.2.12_20011209
Summary: documentation system for C, C++ and IDL
Release: 4
Source: doxygen-%{version}.src.tar.gz
......
/****************************************************************************
** $Id$
**
**
** QArray class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QDict and QDictIterator class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QIntDict and QIntDictIterator class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QList and QListIterator class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QPtrDict and QPtrDictIterator class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QSortedList documentation
**
......
/****************************************************************************
** $Id$
**
**
** QStack class documentation
**
......
/****************************************************************************
** $Id$
**
*****************************************************************************/
//typedef QListIterator<char> QStrListIterator;
/****************************************************************************
** $Id$
**
**
** Qt template library classes documentation
**
......
/****************************************************************************
** $Id$
**
**
** QValueList and QValueListIterator class documentation
**
......
/****************************************************************************
** $Id$
**
**
** QVector class documentation
**
......
......@@ -1219,6 +1219,7 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
innerCd->writeDocumentation(ol);
innerCd->writeMemberList(ol);
}
innerCd->writeDocumentationForInnerClasses(ol);
}
}
}
......
......@@ -299,6 +299,8 @@ class ClassDef : public Definition
/*! Destroys a compound definition. */
~ClassDef();
ClassSDict *getInnerClasses() { return m_innerClasses; }
bool visited;
protected:
......
......@@ -699,9 +699,11 @@ static bool getLink(const char *className,
g_anchorCount++;
}
}
Definition *d=0;
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
//Definition *d=0;
//if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
......
......@@ -1527,7 +1527,7 @@ void Config::create()
"If the value of the INPUT tag contains directories, you can use the \n"
"FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
"and *.h) to filter out the source-files in the directories. If left \n"
"blank file matching one of the following patterns are included: \n"
"blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
"*.h++ *.idl \n"
);
......@@ -1931,11 +1931,11 @@ void Config::create()
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",
"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");
......@@ -1951,6 +1951,18 @@ void Config::create()
"moment. \n",
FALSE
);
//--------------------------------------------------------------------------
addInfo( "DEF","configuration options for the AutoGen Definitions output");
//--------------------------------------------------------------------------
cb = addBool("GENERATE_AUTOGEN_DEF",
"If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will \n"
"generate an AutoGen Definitions (see autogen.sf.net) file \n"
"that captures the structure of the code including all \n"
"documentation. Note that this feature is still experimental \n"
"and incomplete at the moment. \n",
FALSE );
//-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor ");
//-----------------------------------------------------------------------------------------------
......
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <stdlib.h>
#include "qtbc.h"
#include "defgen.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "util.h"
#include "defargs.h"
#include "outputgen.h"
#include "doc.h"
#include "dot.h"
#include "code.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#define DEF_DB(x)
inline void writeDEFString(QTextStream &t,const char *s)
{
const char* p=s;
char c;
t << '\'';
while ((c = *(p++)))
{
if (c == '\'')
t << '\\';
t << c;
}
t << '\'';
}
void generateDEFForMember(MemberDef *md,
QTextStream &t,
Definition *def,
const char* Prefix)
{
QCString memPrefix;
// + declaration
// - reimplements
// - reimplementedBy
// - exceptions
// - const/volatile specifiers
// - examples
// + source definition
// - source references
// - source referenced by
// - include code
if (md->memberType()==MemberDef::EnumValue) return;
QCString scopeName;
if (md->getClassDef())
scopeName=md->getClassDef()->name();
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
t << " " << Prefix << "-member = {" << endl;
memPrefix = " ";
memPrefix.append( Prefix );
memPrefix.append( "-mem-" );
QCString memType;
bool isFunc=FALSE;
switch (md->memberType())
{
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
case MemberDef::Function: memType="function"; isFunc=TRUE; break;
case MemberDef::Signal: memType="signal"; isFunc=TRUE; break;
case MemberDef::Prototype: memType="prototype"; isFunc=TRUE; break;
case MemberDef::Friend: memType="friend"; isFunc=TRUE; break;
case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break;
case MemberDef::Slot: memType="slot"; isFunc=TRUE; break;
}
t << memPrefix << "kind = '" << memType << "';" << endl;
t << memPrefix << "id = '"
<< def->getOutputFileBase() << "_1" << md->anchor()
<< "';" << endl;
t << memPrefix << "virt = ";
switch (md->virtualness())
{
case Normal: t << "normal;" << endl; break;
case Virtual: t << "virtual;" << endl; break;
case Pure: t << "pure-virtual;" << endl; break;
default: ASSERT(0);
}
t << memPrefix << "prot = ";
switch(md->protection())
{
case Public: t << "public;" << endl; break;
case Protected: t << "protected;" << endl; break;
case Private: t << "private;" << endl; break;
}
if (md->memberType()!=MemberDef::Define &&
md->memberType()!=MemberDef::Enumeration
)
{
QCString typeStr = replaceAnonymousScopes(md->typeString());
t << memPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl << typeStr << endl
<< "_EnD_oF_dEf_TeXt_;" << endl;
}
t << memPrefix << "name = '" << md->name() << "';" << endl;
if (isFunc) //function
{
ArgumentList *declAl = new ArgumentList;
ArgumentList *defAl = md->argumentList();
stringToArgumentList(md->argsString(),declAl);
QCString fcnPrefix = " " + memPrefix + "param-";
if (declAl->count()>0)
{
ArgumentListIterator declAli(*declAl);
ArgumentListIterator defAli(*defAl);
Argument *a;
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
t << memPrefix << "param = {" << endl;
if (!a->attrib.isEmpty())
{
t << fcnPrefix << "attributes = ";
writeDEFString(t,a->attrib);
t << ';' << endl;
}
if (!a->type.isEmpty())
{
t << fcnPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl
<< a->type << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
if (!a->name.isEmpty())
{
t << fcnPrefix << "declname = ";
writeDEFString(t,a->name);
t << ';' << endl;
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
{
t << fcnPrefix << "defname = ";
writeDEFString(t,defArg->name);
t << ';' << endl;
}
if (!a->array.isEmpty())
{
t << fcnPrefix << "array = ";
writeDEFString(t,a->array);
t << ';' << endl;
}
if (!a->defval.isEmpty())
{
t << fcnPrefix << "defval = <<_EnD_oF_dEf_TeXt_" << endl
<< a->defval << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
if (defArg) ++defAli;
t << " }; /*" << fcnPrefix << "-param */" << endl;
}
}
delete declAl;
}
else if ( md->memberType()==MemberDef::Define
&& md->argsString()!=0)
{
ArgumentListIterator ali(*md->argumentList());
Argument *a;
QCString defPrefix = " " + memPrefix + "def-";
for (ali.toFirst();(a=ali.current());++ali)
{
t << memPrefix << "param = {" << endl;
t << defPrefix << "name = '" << a->type << "';" << endl;
t << " }; /*" << defPrefix << "-param */" << endl;
}
}
if (!md->initializer().isEmpty())
{
t << memPrefix << "initializer = <<_EnD_oF_dEf_TeXt_" << endl
<< md->initializer() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
// TODO: exceptions, const volatile
if (md->memberType()==MemberDef::Enumeration) // enum
{
if (md->enumFieldList())
{
MemberListIterator emli(*md->enumFieldList());
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
t << memPrefix << "enum = { enum-name = " << emd->name() << ';';
if (!emd->initializer().isEmpty())
{
t << " enum-value = ";
writeDEFString(t,emd->initializer());
t << ';';
}
t << " };" << endl;
}
}
}
t << memPrefix << "desc-file = '" << md->getDefFileName() << "';" << endl;
t << memPrefix << "desc-line = '" << md->getDefLine() << "';" << endl;
t << memPrefix << "briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
<< md->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << memPrefix << "documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< md->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
if (md->getReferencesMembers())
{
MemberSDict::Iterator mdi(*md->getReferencesMembers());
MemberDef *rmd;
QCString refPrefix = " " + memPrefix + "ref-";
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
t << memPrefix << "referenceto = {" << endl;
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor() << "';" << endl;
t << refPrefix << "line = '"
<< rmd->getStartBodyLine() << "';" << endl;
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
if (!scope.isEmpty() && scope!=def->name())
{
name.prepend(scope+"::");
}
t << refPrefix << "name = ";
writeDEFString(t,name);
t << ';' << endl << " };" << endl;
}
} /* for (mdi.toFirst...) */
}
if (md->getReferencedByMembers())
{
MemberSDict::Iterator mdi(*md->getReferencedByMembers());
MemberDef *rmd;
QCString refPrefix = " " + memPrefix + "ref-";
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
t << memPrefix << "referenceby = {" << endl;
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor() << "';" << endl;
t << refPrefix << "line = '"
<< rmd->getStartBodyLine() << "';" << endl;
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
if (!scope.isEmpty() && scope!=def->name())
{
name.prepend(scope+"::");
}
t << refPrefix << "name = ";
writeDEFString(t,name);
t << ';' << endl << " };" << endl;
}
} /* for (mdi.toFirst...) */
}
t << " }; /* " << Prefix << "-member */" << endl;
}
void generateDEFClassSection(ClassDef *cd,
QTextStream &t,
MemberList *ml,
const char *kind)
{
if (ml->count()>0)
{
t << " cp-section = {" << endl;
t << " sec-kind = '" << kind << "';" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateDEFForMember(md,t,cd,"sec");
}
t << " }; /* cp-section */" << endl;
}
}
void generateDEFForClass(ClassDef *cd,QTextStream &t)
{
// + brief description
// + detailed description
// - template arguments
// - include files
// + inheritance diagram
// + list of direct super classes
// + list of direct sub classes
// + collaboration diagram
// - list of all members
// + user defined member sections
// + standard member sections
// + detailed member documentation
// - examples
if (cd->isReference()) return; // skip external references.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
t << cd->compoundTypeString() << " = {" << endl;
t << " cp-id = '" << cd->getOutputFileBase() << "';" << endl;
t << " cp-name = '" << cd->name() << "';" << endl;
if (cd->baseClasses()->count()>0)
{
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " cp-ref = {" << endl << " ref-type = base;" << endl;
t << " ref-id = '"
<< bcd->classDef->getOutputFileBase() << "';" << endl;
t << " ref-prot = ";
switch (bcd->prot)
{
case Public: t << "public;" << endl; break;
case Protected: t << "protected;" << endl; break;
case Private: t << "private;" << endl; break;
}
t << " ref-virt = ";
switch(bcd->virt)
{
case Normal: t << "non-virtual;"; break;
case Virtual: t << "virtual;"; break;
case Pure: t << "pure-virtual;"; break;
}
t << endl << " };" << endl;
}
}
if (cd->subClasses()->count()>0)
{
BaseClassListIterator bcli(*cd->subClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " cp-ref = {" << endl << " ref-type = derived;" << endl;
t << " ref-id = '"
<< bcd->classDef->getOutputFileBase() << "';" << endl;
t << " ref-prot = ";
switch (bcd->prot)
{
case Public: t << "public;" << endl; break;
case Protected: t << "protected;" << endl; break;
case Private: t << "private;" << endl; break;
}
t << " ref-virt = ";
switch(bcd->virt)
{
case Normal: t << "non-virtual;"; break;
case Virtual: t << "virtual;"; break;
case Pure: t << "pure-virtual;"; break;
}
t << endl << " };" << endl;
}
}
int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+
cd->pubStaticMembers.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+
cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
if (numMembers>0)
{
generateDEFClassSection(cd,t,&cd->pubTypes,"public-type");
generateDEFClassSection(cd,t,&cd->pubMembers,"public-func");
generateDEFClassSection(cd,t,&cd->pubAttribs,"public-attrib");
generateDEFClassSection(cd,t,&cd->pubSlots,"public-slot");
generateDEFClassSection(cd,t,&cd->signals,"signal");
generateDEFClassSection(cd,t,&cd->dcopMethods,"dcop-func");
generateDEFClassSection(cd,t,&cd->properties,"property");
generateDEFClassSection(cd,t,&cd->pubStaticMembers,"public-static-func");
generateDEFClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib");
generateDEFClassSection(cd,t,&cd->proTypes,"protected-type");
generateDEFClassSection(cd,t,&cd->proMembers,"protected-func");
generateDEFClassSection(cd,t,&cd->proAttribs,"protected-attrib");
generateDEFClassSection(cd,t,&cd->proSlots,"protected-slot");
generateDEFClassSection(cd,t,&cd->proStaticMembers,"protected-static-func");
generateDEFClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib");
generateDEFClassSection(cd,t,&cd->priTypes,"private-type");
generateDEFClassSection(cd,t,&cd->priMembers,"private-func");
generateDEFClassSection(cd,t,&cd->priAttribs,"private-attrib");
generateDEFClassSection(cd,t,&cd->priSlots,"private-slot");
generateDEFClassSection(cd,t,&cd->priStaticMembers,"private-static-func");
generateDEFClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib");
generateDEFClassSection(cd,t,&cd->friends,"signal");
generateDEFClassSection(cd,t,&cd->related,"related");
}
t << " cp-filename = '" << cd->getDefFileName() << "';" << endl;
t << " cp-fileline = '" << cd->getDefLine() << "';" << endl;
t << " cp-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
<< cd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
if (!inheritanceGraph.isTrivial())
{
t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
inheritanceGraph.writeDEF(t);
t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
if (!collaborationGraph.isTrivial())
{
t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
collaborationGraph.writeDEF(t);
t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
t << "}; /* " << cd->compoundTypeString() << " */" << endl;
}
void generateDEFSection(Definition *d,
QTextStream &t,
MemberList *ml,
const char *kind)
{
if (ml->count()>0)
{
t << " " << kind << " = {" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateDEFForMember(md,t,d,kind);
}
t << " };" << endl;
}
}
void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t)
{
if (nd->isReference()) return; // skip external references
t << " namespace = {" << endl;
t << " ns-id = '" << nd->getOutputFileBase() << "';" << endl;
t << " ns-name = ";
writeDEFString(t,nd->name());
t << ';' << endl;
generateDEFSection(nd,t,&nd->decDefineMembers,"define");
generateDEFSection(nd,t,&nd->decProtoMembers,"prototype");
generateDEFSection(nd,t,&nd->decTypedefMembers,"typedef");
generateDEFSection(nd,t,&nd->decEnumMembers,"enum");
generateDEFSection(nd,t,&nd->decFuncMembers,"func");
generateDEFSection(nd,t,&nd->decVarMembers,"var");
t << " ns-filename = '" << nd->getDefFileName() << "';" << endl;
t << " ns-fileline = '" << nd->getDefLine() << "';" << endl;
t << " ns-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
<< nd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << " ns-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< nd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << " };" << endl;
}
void generateDEFForFile(FileDef *fd,QTextStream &t)
{
if (fd->isReference()) return; // skip external references
t << "file = {" << endl;
t << " file-id = '" << fd->getOutputFileBase() << "';" << endl;
t << " file-name = ";
writeDEFString(t,fd->name());
t << ';' << endl;
generateDEFSection(fd,t,&fd->decDefineMembers,"define");
generateDEFSection(fd,t,&fd->decProtoMembers,"prototype");
generateDEFSection(fd,t,&fd->decTypedefMembers,"typedef");
generateDEFSection(fd,t,&fd->decEnumMembers,"enum");
generateDEFSection(fd,t,&fd->decFuncMembers,"func");
generateDEFSection(fd,t,&fd->decVarMembers,"var");
t << " file-full-name = '" << fd->getDefFileName() << "';" << endl;
t << " file-first-line = '" << fd->getDefLine() << "';" << endl;
t << " file-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
<< fd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << " file-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< fd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
t << "}; /* file */" << endl;
}
void generateDEF()
{
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
else
{
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else if (!Config_getBool("QUIET"))
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
}
outputDirectory=dir.absPath();
}
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Cannot create directory %s\n",outputDirectory.data());
return;
}
}
QDir defDir(outputDirectory+"/def");
if (!defDir.exists() && !defDir.mkdir(outputDirectory+"/def"))
{
err("Could not create def directory in %s\n",outputDirectory.data());
return;
}
QCString fileName=outputDirectory+"/def/doxygen.def";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << "AutoGen Definitions dummy;" << endl;
if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0)
{
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
generateDEFForClass(cd,t);
}
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
generateDEFForFile(fd,t);
}
}
}
else
{
t << "dummy_value = true;" << endl;
}
}
/******************************************************************************
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef DEFGEN_H
#define DEFGEN_H
void generateDEF();
#endif
......@@ -625,17 +625,10 @@ static void forceEndItemList()
{
case 'O': outDoc->endEnumList(); break;
case 'U': outDoc->endItemList(); break;
case 'D':
if (inBlock())
{
currentListIndent.push("D"); // hack!
endBlock();
}
else
{
outDoc->endDescription();
}
break;
case 'D': outDoc->endDescription(); break;
case 'P': break; // do not end paragraphs
default:
err("Unexpected list indent token `%c'\n",c);
}
}
insideItemList=FALSE;
......@@ -1030,9 +1023,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->writeString(yytext);
}
<DocHtmlScan,DocLatexScan>.|\n {
char c[2];
c[0]=*yytext;c[1]='\0';
outDoc->writeString(c);
outDoc->writeString(yytext);
}
<DocScan>"\\postheader"/{BN}
<DocScan>"\\functionindex"/{BN} { /* writeMemberList(*outDoc,FALSE);*/ }
......@@ -1077,13 +1068,18 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->codify(c);
}
<DocScan>{CMD}"internal"/{BN} {
if (!Config_getBool("INTERNAL_DOCS"))
{
//if (!Config_getBool("INTERNAL_DOCS"))
//{
// BEGIN( DocInternal );
//}
//else
//{
outDoc->newParagraph();
outDoc->startBold();
scanString(theTranslator->trForInternalUseOnly()+"\n");
//outDoc->writeString("For internal use only.\n");
BEGIN( DocInternal );
}
outDoc->endBold();
outDoc->newParagraph();
//}
}
<DocScan>"\\reimp"/{BN} {
outDoc->newParagraph();
......@@ -1172,7 +1168,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (b) endBlock();
inParBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Par);
outDoc->docify(title);
outDoc->endDescTitle();
......@@ -1190,7 +1186,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inWarningBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Warning);
scanString(theTranslator->trWarning()+": ");
outDoc->endDescTitle();
......@@ -1207,7 +1203,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inRemarkBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Remark);
scanString(theTranslator->trRemarks()+": ");
outDoc->endDescTitle();
......@@ -1224,7 +1220,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inAttentionBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Attention);
scanString(theTranslator->trAttention()+": ");
outDoc->endDescTitle();
......@@ -1241,7 +1237,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inNoteBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Note);
scanString(theTranslator->trNote()+": ");
outDoc->endDescTitle();
......@@ -1258,7 +1254,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inPreBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Pre);
scanString(theTranslator->trPrecondition()+": ");
outDoc->endDescTitle();
......@@ -1275,7 +1271,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inPostBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Post);
scanString(theTranslator->trPostcondition()+": ");
outDoc->endDescTitle();
......@@ -1292,7 +1288,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inInvarBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Invar);
scanString(theTranslator->trInvariant()+": ");
outDoc->endDescTitle();
......@@ -1309,7 +1305,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inVersionBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Version);
scanString(theTranslator->trVersion()+": ");
outDoc->endDescTitle();
......@@ -1326,7 +1322,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inSinceBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Since);
scanString(theTranslator->trSince()+": ");
outDoc->endDescTitle();
......@@ -1343,7 +1339,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inDateBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Date);
scanString(theTranslator->trDate()+": ");
outDoc->endDescTitle();
......@@ -1364,7 +1360,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Todo);
outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");
outDoc->endDescTitle();
......@@ -1384,7 +1380,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Test);
outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");
outDoc->endDescTitle();
......@@ -1404,7 +1400,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Bug);
outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": ");
outDoc->endDescTitle();
......@@ -1420,7 +1416,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inDeprecatedBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Deprecated);
scanString(theTranslator->trDeprecated()+": ");
outDoc->endDescTitle();
......@@ -1439,7 +1435,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
tagText=tagText.left(tagText.length()-1);
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::RCS);
scanString(tagName+": ");
outDoc->endDescTitle();
......@@ -1454,7 +1450,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inAuthorBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Author);
bool singular = ((QString)yytext).find('s')==-1;
scanString(theTranslator->trAuthor(TRUE,singular)+": ");
......@@ -1472,7 +1468,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inReturnBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Return);
scanString(theTranslator->trReturns()+": ");
outDoc->endDescTitle();
......@@ -1485,7 +1481,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inSeeBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::See);
scanString(theTranslator->trSeeAlso()+": ");
outDoc->endDescTitle();
......@@ -1498,7 +1494,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
}
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"param"{BSEP} {
QCString t=yytext;
if (/*t.contains('\n')>1 &&*/ insideItemList)
if (insideItemList)
{
forceEndItemList();
}
......@@ -1507,7 +1503,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inParamBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::Param);
scanString(theTranslator->trParameters()+": ");
outDoc->endDescTitle();
......@@ -1531,7 +1527,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inRetValBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::RetVal);
scanString(theTranslator->trReturnValues()+": ");
outDoc->endDescTitle();
......@@ -1555,7 +1551,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inExceptionBlock=TRUE;
currentListIndent.push("D");
currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::Exception);
scanString(theTranslator->trExceptions()+": ");
outDoc->endDescTitle();
......
......@@ -490,6 +490,70 @@ void DotNode::writeXML(QTextStream &t)
}
void DotNode::writeDEF(QTextStream &t)
{
char* nodePrefix = " node-";
t << " node = {" << endl;
t << nodePrefix << "id = " << m_number << ';' << endl;
t << nodePrefix << "label = '" << m_label << "';" << endl;
if (!m_url.isEmpty())
{
QCString url(m_url);
char *refPtr = url.data();
char *urlPtr = strchr(url.data(),'$');
if (urlPtr)
{
*urlPtr++='\0';
t << nodePrefix << "link = {" << endl << " "
<< nodePrefix << "link-id = '" << urlPtr << "';" << endl;
if (*refPtr!='\0')
{
t << " " << nodePrefix << "link-external = '"
<< refPtr << "';" << endl;
}
t << " };" << endl;
}
}
if (m_children)
{
QListIterator<DotNode> nli(*m_children);
QListIterator<EdgeInfo> eli(*m_edgeInfo);
DotNode *childNode;
EdgeInfo *edgeInfo;
for (;(childNode=nli.current());++nli,++eli)
{
edgeInfo=eli.current();
t << " node-child = {" << endl;
t << " child-id = '" << childNode->m_number << "';" << endl;
t << " relation = ";
switch(edgeInfo->m_color)
{
case EdgeInfo::Blue: t << "public-inheritance"; break;
case EdgeInfo::Green: t << "protected-inheritance"; break;
case EdgeInfo::Red: t << "private-inheritance"; break;
case EdgeInfo::Purple: t << "usage"; break;
case EdgeInfo::Orange: t << "template-instance"; break;
case EdgeInfo::Grey: ASSERT(0); break;
}
t << ';' << endl;
if (!edgeInfo->m_label.isEmpty())
{
t << " edgelabel = <<_EnD_oF_dEf_TeXt_" << endl
<< edgeInfo->m_label << endl
<< "_EnD_oF_dEf_TeXt_;" << endl;
}
t << " }; /* node-child */" << endl;
} /* for (;childNode...) */
}
t << " }; /* node */" << endl;
}
void DotNode::clearWriteFlag()
{
m_written=FALSE;
......@@ -1313,6 +1377,16 @@ void DotClassGraph::writeXML(QTextStream &t)
}
}
void DotClassGraph::writeDEF(QTextStream &t)
{
QDictIterator<DotNode> dni(*m_usedNodes);
DotNode *node;
for (;(node=dni.current());++dni)
{
node->writeDEF(t);
}
}
//--------------------------------------------------------------------
int DotInclDepGraph::m_curNodeNumber;
......
......@@ -77,6 +77,7 @@ class DotNode
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t);
void writeDEF(QTextStream &t);
private:
void colorConnectedNodes(int curColor);
......@@ -126,6 +127,7 @@ class DotClassGraph
bool TBRank=TRUE,bool imageMap=TRUE);
void writeXML(QTextStream &t);
void writeDEF(QTextStream &t);
QCString diskName() const;
private:
......
......@@ -55,6 +55,7 @@
#include "defargs.h"
#include "rtfgen.h"
#include "xmlgen.h"
#include "defgen.h"
#include "reflist.h"
#include "page.h"
#include "packagedef.h"
......@@ -70,16 +71,10 @@ static QDict<Entry> classEntries(1009);
ClassSDict Doxygen::classSDict(1009);
ClassSDict Doxygen::hiddenClasses(257);
//NamespaceList Doxygen::namespaceList; // all namespaces
//NamespaceDict Doxygen::namespaceDict(257);
NamespaceSDict Doxygen::namespaceSDict(20);
//MemberNameList Doxygen::memberNameList; // class member + related functions
//MemberNameDict Doxygen::memberNameDict(10007);
MemberNameSDict Doxygen::memberNameSDict(10000);
//MemberNameList Doxygen::functionNameList; // all global function/namespace members
//MemberNameDict Doxygen::functionNameDict(10007);
MemberNameSDict Doxygen::functionNameSDict(10000);
FileNameList Doxygen::inputNameList; // all input files
......@@ -129,21 +124,15 @@ void clearAll()
Doxygen::namespaceSDict.clear();
Doxygen::pageSDict->clear();
Doxygen::exampleSDict->clear();
//Doxygen::memberNameList.clear();
//Doxygen::functionNameList.clear();
Doxygen::inputNameList.clear();
//Doxygen::groupList.clear();
Doxygen::formulaList.clear();
Doxygen::classSDict.clear();
//Doxygen::memberNameDict.clear();
//Doxygen::functionNameDict.clear();
Doxygen::sectionDict.clear();
Doxygen::inputNameDict->clear();
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
Doxygen::dotFileNameDict->clear();
//Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
Doxygen::tagDestinationDict.clear();
......@@ -163,20 +152,13 @@ void statistics()
Doxygen::imageNameDict->statistics();
fprintf(stderr,"--- dotFileNameDict stats ----\n");
Doxygen::dotFileNameDict->statistics();
//fprintf(stderr,"--- memberNameDict stats ----\n");
//Doxygen::memberNameDict.statistics();
//fprintf(stderr,"--- functionNameDict stats ----\n");
//Doxygen::functionNameDict.statistics();
fprintf(stderr,"--- excludeNameDict stats ----\n");
excludeNameDict.statistics();
fprintf(stderr,"--- aliasDict stats ----\n");
Doxygen::aliasDict.statistics();
fprintf(stderr,"--- typedefDict stats ----\n");
//Doxygen::typedefDict.statistics();
fprintf(stderr,"--- namespaceAliasDict stats ----\n");
Doxygen::namespaceAliasDict.statistics();
//fprintf(stderr,"--- groupDict stats ----\n");
//Doxygen::groupDict.statistics();
fprintf(stderr,"--- formulaDict stats ----\n");
Doxygen::formulaDict.statistics();
fprintf(stderr,"--- formulaNameDict stats ----\n");
......@@ -229,7 +211,7 @@ static void buildGroupList(Entry *root)
if ((gd=Doxygen::groupSDict[root->name]))
{
if ( root->groupdoctype==Entry::GROUPDOC_NORMAL )
if ( root->groupDocType==Entry::GROUPDOC_NORMAL )
{
warn(root->fileName,root->startLine,
"Warning: group %s already documented. "
......@@ -264,8 +246,6 @@ static void buildGroupList(Entry *root)
gd->setBriefDescription(root->brief);
gd->setDocumentation(root->doc);
gd->addSectionsToDefinition(root->anchors);
//Doxygen::groupList.append(gd);
//Doxygen::groupDict.insert(root->name,gd);
Doxygen::groupSDict.append(root->name,gd);
gd->setRefItems(root->todoId,root->testId,root->bugId);
}
......@@ -1619,71 +1599,12 @@ nextMember:
// Searches the Entry tree for Function sections.
// If found they are stored in their class or in the global list.
static void buildFunctionList(Entry *root)
void addNewMemberToClass(Entry *root,ClassDef *cd,
const QCString &rname,const QCString &scope,bool isFriend)
{
if (root->section==Entry::FUNCTION_SEC)
{
Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d\n",
root->type.data(),
root->parent->name.data(),
root->name.data(),
root->args.data(),
root->relates.data(),
root->fileName.data(),
root->startLine,
root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1,
//root->tArgList ? (int)root->tArgList->count() : -1,
//root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId,
root->memSpec
);
int l,i;
static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
bool isFriend=root->type.find("friend ")!=-1;
QCString rname = removeRedundantWhiteSpace(root->name);
if (!rname.isEmpty())
{
ClassDef *cd=0;
// check if this function's parent is a class
QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0));
QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy());
scope=stripTemplateSpecifiersFromScope(scope,FALSE);
bool isMember=FALSE;
int memIndex=rname.find("::");
if (memIndex!=-1)
{
int ts=rname.find('<');
int te=rname.find('>');
if (ts==-1 || te==-1)
{
isMember=TRUE;
}
else
{
isMember=memIndex<ts || memIndex>te;
}
}
int i;
if (root->parent &&
!root->parent->name.isEmpty() &&
(root->parent->section & Entry::COMPOUND_MASK) &&
(cd=getClass(scope)) &&
// do some fuzzy things to exclude function pointers
(root->type.isEmpty() || root->type.find(re,0)==-1 ||
root->type.find(")(")!=-1 || root->type.find("operator")!=-1
)
)
{
int l;
if (!root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable
{
root->args+=root->type.right(root->type.length()-i-l);
......@@ -1706,17 +1627,6 @@ static void buildFunctionList(Entry *root)
name=name.left(i);
}
//if (Config::instance()->get("") && !root->body.isEmpty())
//{
// printf("Function: %s\n-----------------\n%s\n------------------\n",
// rname.data(),root->body.data());
//}
// new member function, signal or slot.
//printf("new member: %s member template args=`%s'\n",
// root->args.data(),
// argListToString(root->mtArgList).data());
MemberDef *md=new MemberDef(
root->fileName,root->startLine,
root->type,name,root->args,root->exception,
......@@ -1828,6 +1738,73 @@ static void buildFunctionList(Entry *root)
addMemberToGroups(root,md);
root->section = Entry::EMPTY_SEC;
md->setRefItems(root->todoId,root->testId,root->bugId);
}
static void buildFunctionList(Entry *root)
{
if (root->section==Entry::FUNCTION_SEC)
{
Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d\n",
root->type.data(),
root->parent->name.data(),
root->name.data(),
root->args.data(),
root->relates.data(),
root->fileName.data(),
root->startLine,
root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1,
//root->tArgList ? (int)root->tArgList->count() : -1,
//root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId,
root->memSpec
);
bool isFriend=root->type.find("friend ")!=-1;
QCString rname = removeRedundantWhiteSpace(root->name);
if (!rname.isEmpty())
{
ClassDef *cd=0;
// check if this function's parent is a class
static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0));
QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy());
scope=stripTemplateSpecifiersFromScope(scope,FALSE);
bool isMember=FALSE;
int memIndex=rname.find("::");
if (memIndex!=-1)
{
int ts=rname.find('<');
int te=rname.find('>');
if (ts==-1 || te==-1)
{
isMember=TRUE;
}
else
{
isMember=memIndex<ts || memIndex>te;
}
}
if (root->parent &&
!root->parent->name.isEmpty() &&
(root->parent->section & Entry::COMPOUND_MASK) &&
(cd=getClass(scope)) &&
// do some fuzzy things to exclude function pointers
(root->type.isEmpty() || root->type.find(re,0)==-1 ||
root->type.find(")(")!=-1 || root->type.find("operator")!=-1
)
)
{
addNewMemberToClass(root,cd,rname,scope,isFriend);
}
else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) &&
......@@ -3077,74 +3054,6 @@ static void computeMemberReferences()
//----------------------------------------------------------------------
#if 0
static void addClassMemberTodoTestBugReferences(Definition *compound)
{
MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli)
{
MemberNameIterator mni(*mn);
MemberDef *md=0;
for (mni.toFirst();(md=mni.current());++mni)
{
Definition *d=md->getClassDef();
QCString scopeName;
if (d) scopeName=d->name();
if (d==0) d=md->getGroupDef();
if (d==0) d=md->getFileDef();
if (d!=0 && ((compound==0 && !md->visited) || compound==d))
{
QCString memLabel;
md->visited=TRUE;
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
memLabel=theTranslator->trField(TRUE,TRUE);
}
else
{
memLabel=theTranslator->trMember(TRUE,TRUE);
}
addRefItem(md->todoId(),md->testId(),md->bugId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),scopeName+"::"+md->name(),md->argsString());
}
}
}
}
static void addFileMemberTodoTestBugReferences(Definition *compound)
{
MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict);
MemberName *mn=0;
for (fnli.toFirst();(mn=fnli.current());++fnli)
{
MemberNameIterator mni(*mn);
MemberDef *md=0;
for (mni.toFirst();(md=mni.current());++mni)
{
Definition *d=md->getNamespaceDef();
QCString scopeName;
if (d) scopeName=d->name();
if (d==0) d=md->getGroupDef();
if (d==0) d=md->getFileDef();
if (d!=0 && ((compound==0 && !md->visited) || compound==d))
{
QCString memLabel;
md->visited=TRUE;
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
memLabel=theTranslator->trGlobal(TRUE,TRUE);
}
else
{
memLabel=theTranslator->trMember(TRUE,TRUE);
}
addRefItem(md->todoId(),md->testId(),md->bugId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),md->name(),md->argsString());
}
}
}
}
#endif
static void addListReferences()
{
MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
......@@ -3292,6 +3201,7 @@ static void addMemberDocs(Entry *root,
//printf("overwrite!\n");
md->setBriefDescription(root->brief);
}
}
if (md->initializer().isEmpty() && !root->initializer.isEmpty())
{
......@@ -3318,7 +3228,6 @@ static void addMemberDocs(Entry *root,
md->setRefItems(root->todoId,root->testId,root->bugId);
}
}
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->mergeMemberSpecifiers(root->memSpec);
......@@ -3587,10 +3496,6 @@ static void substituteTemplatesInArgList(
/*! This function tries to find a member (in a documented class/file/namespace)
* that corresponds to the function/variable declaration given in \a funcDecl.
*
* The \a related field may be used to specify a related class name.
* It is only used if the class name cannot be extracted from the function
* declaration.
*
* The boolean \a overloaded is used to specify whether or not a standard
* overload documentation line should be generated.
*
......@@ -3599,7 +3504,6 @@ static void substituteTemplatesInArgList(
*/
static void findMember(Entry *root,
QCString funcDecl,
QCString related,
bool overloaded,
bool isFunc
)
......@@ -3607,21 +3511,15 @@ static void findMember(Entry *root,
Debug::print(Debug::FindMembers,0,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p (#=%d) "
"scopeSpec=%s memberSpec=%s memSpec=%d\n",
root,funcDecl.data(),related.data(),overloaded,isFunc,root->mGrpId,
"memSpec=%d\n",
root,funcDecl.data(),root->relates.data(),overloaded,isFunc,root->mGrpId,
root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0,
root->scopeSpec.data(),root->memberSpec.data(),root->memSpec
root->memSpec
);
//if (Config::instance()->get("") && !root->body.isEmpty())
//{
// //printf("Function: %s\n-----------------\n%s\n------------------\n",
// //root->name.data(),root->body.data());
//}
QCString scopeName;
QCString className;
QCString namespaceName;
//QCString classTempList;
QCString funcType;
QCString funcName;
QCString funcArgs;
......@@ -3711,16 +3609,16 @@ static void findMember(Entry *root,
// related field.
//printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
// scopeName.data(),className.data(),namespaceName.data());
if (!related.isEmpty() && !isRelated)
if (!root->relates.isEmpty())
{ // related member, prefix user specified scope
isRelated=TRUE;
if (getClass(related)==0 && !scopeName.isEmpty())
scopeName= mergeScopes(scopeName,related);
if (getClass(root->relates)==0 && !scopeName.isEmpty())
scopeName= mergeScopes(scopeName,root->relates);
else
scopeName = related.copy();
scopeName = root->relates.copy();
}
if (related.isEmpty() && root->parent &&
if (root->relates.isEmpty() && root->parent &&
(root->parent->section&Entry::SCOPE_MASK) &&
!root->parent->name.isEmpty())
{
......@@ -3776,7 +3674,7 @@ static void findMember(Entry *root,
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right).
if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool("HIDE_SCOPE_NAMES"))
if (!scopeName.isEmpty() && /*!isRelated &&*/ !isFriend && !Config_getBool("HIDE_SCOPE_NAMES"))
{
if (!funcType.isEmpty())
{
......@@ -3849,7 +3747,7 @@ static void findMember(Entry *root,
" isFunc=%d\n\n",
namespaceName.data(),className.data(),
funcType.data(),funcName.data(),funcArgs.data(),funcTempList.data(),
funcDecl.data(),related.data(),exceptions.data(),isRelated,isFriend,
funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isFriend,
isFunc
);
......@@ -4010,19 +3908,43 @@ static void findMember(Entry *root,
}
if (count==0 && !(isFriend && funcType=="class"))
{
warn(root->fileName,root->startLine,
"Warning: no matching class member found for \n %s",
fullFuncDecl.data()
);
int candidates=0;
if (mn->count()>0)
{
for (mni.toFirst();(md=mni.current());++mni)
{
ClassDef *cd=md->getClassDef();
if (cd!=0 && cd->name()==className) candidates++;
if (cd!=0 && cd->name()==className)
{
if (root->tArgLists && md->templateArguments() &&
root->tArgLists->getLast()->count()<=md->templateArguments()->count())
{ // assume we have found a template specialization
// for which there is only a definition, no declaration in
// the class. TODO: we should actually check whether
// the arguments match!
addNewMemberToClass(root,cd,md->name(),cd->name(),isFriend);
return;
}
candidates++;
}
}
}
warn(root->fileName,root->startLine,
"Warning: no matching class member found for"
);
if (root->tArgLists)
{
QListIterator<ArgumentList> alli(*root->tArgLists);
ArgumentList *al;
for (;(al=alli.current());++alli)
{
warn_cont(" template %s\n",tempArgListToString(al).data());
}
}
warn_cont(" %s\n",fullFuncDecl.data());
if (candidates>0)
{
warn_cont("Possible candidates:\n");
......@@ -4031,7 +3953,13 @@ static void findMember(Entry *root,
ClassDef *cd=md->getClassDef();
if (cd!=0 && cd->name()==className)
{
warn_cont(" %s\n",md->declaration());
if (md->templateArguments())
{
warn_cont(" template %s\n",tempArgListToString(md->templateArguments()).data());
}
warn_cont(" %s %s::%s%s\n",
md->typeString(),cd->name().data(),
md->name().data(),md->argsString());
}
}
}
......@@ -4066,6 +3994,7 @@ static void findMember(Entry *root,
// new overloaded member function
ArgumentList *tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
//printf("new related member %s args=`%s'\n",md->name().data(),funcArgs.data());
MemberDef *md=new MemberDef(
root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions,
......@@ -4107,9 +4036,10 @@ static void findMember(Entry *root,
}
}
}
else if (isRelated && !related.isEmpty())
else if (isRelated && !root->relates.isEmpty())
{
if (className.isEmpty()) className=related.copy();
Debug::print(Debug::FindMembers,0,"2. related function\n");
if (className.isEmpty()) className=root->relates.copy();
ClassDef *cd;
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
if ((cd=getClass(scopeName)))
......@@ -4150,6 +4080,9 @@ static void findMember(Entry *root,
else
mtype=MemberDef::Function;
//printf("New related name `%s' `%d'\n",funcName.data(),
// root->argList ? (int)root->argList->count() : -1);
// new related (member) function
ArgumentList *tArgList =
getTemplateArgumentsFromName(scopeName+"::"+funcName,root->tArgLists);
......@@ -4157,7 +4090,7 @@ static void findMember(Entry *root,
root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,TRUE,
mtype,tArgList,root->argList);
mtype,tArgList,funcArgs.isEmpty() ? 0 : root->argList);
if (root->tagInfo)
{
md->setAnchor(root->tagInfo->anchor);
......@@ -4300,12 +4233,12 @@ static void findMemberDocumentation(Entry *root)
//printf("Documentation for inline member `%s' found args=`%s'\n",
// root->name.data(),root->args.data());
//if (root->relates.length()) printf(" Relates %s\n",root->relates.data());
findMember(root,root->name+root->args+root->exception,root->relates,FALSE,isFunc);
findMember(root,root->name+root->args+root->exception,FALSE,isFunc);
}
else if (root->section==Entry::OVERLOADDOC_SEC)
{
//printf("Overloaded member %s found\n",root->name.data());
findMember(root,root->name,root->relates,TRUE,isFunc);
findMember(root,root->name,TRUE,isFunc);
}
else if
((root->section==Entry::FUNCTION_SEC // function
......@@ -4328,7 +4261,6 @@ static void findMemberDocumentation(Entry *root)
findMember(root,
root->type+" "+
root->name,
root->relates,
FALSE,FALSE);
}
......@@ -4340,7 +4272,6 @@ static void findMemberDocumentation(Entry *root)
root->name+
root->args+
root->exception,
root->relates,
FALSE,isFunc);
}
else
......@@ -4350,19 +4281,23 @@ static void findMemberDocumentation(Entry *root)
root->name+
root->args+
root->exception,
root->relates,
FALSE,isFunc);
}
}
else if (root->section==Entry::DEFINE_SEC && !root->relates.isEmpty())
{
findMember(root,root->name+root->args,FALSE,!root->args.isEmpty());
}
else if (root->section==Entry::VARIABLEDOC_SEC)
{
//printf("Documentation for variable %s found\n",root->name.data());
//if (!root->relates.isEmpty()) printf(" Relates %s\n",root->relates.data());
findMember(root,root->name,root->relates,FALSE,FALSE);
findMember(root,root->name,FALSE,FALSE);
}
else
{
// skip section
//printf("skip section\n");
}
EntryListIterator eli(*root->sublist);
Entry *e;
......@@ -7247,5 +7182,10 @@ void generateOutput()
msg("Generating XML output...\n");
generateXML();
}
if (Config_getBool("GENERATE_AUTOGEN_DEF"))
{
msg("Generating AutoGen DEF output...\n");
generateDEF();
}
}
......@@ -41,7 +41,7 @@ Entry::Entry()
//mtArgList = 0;
mGrpId = -1;
tagInfo = 0;
groupdoctype = GROUPDOC_NORMAL;
groupDocType = GROUPDOC_NORMAL;
reset();
}
......@@ -93,7 +93,7 @@ Entry::Entry(const Entry &e)
//printf("Entry::Entry(copy) tArgList=0\n");
tArgLists = 0;
//mtArgList = 0;
groupdoctype = e.groupdoctype;
groupDocType = e.groupDocType;
// deep copy of the child entry list
QListIterator<Entry> eli(*e.sublist);
......@@ -210,8 +210,8 @@ void Entry::reset()
brief.resize(0);
inside.resize(0);
fileName.resize(0);
scopeSpec.resize(0);
memberSpec.resize(0);
//scopeSpec.resize(0);
//memberSpec.resize(0);
initializer.resize(0);
initLines = -1;
startLine = 1;
......@@ -230,7 +230,7 @@ void Entry::reset()
memSpec = 0;
subGrouping = TRUE;
protection = Public;
groupdoctype = GROUPDOC_NORMAL;
groupDocType = GROUPDOC_NORMAL;
sublist->clear();
extends->clear();
groups->clear();
......
......@@ -254,10 +254,8 @@ class Entry
QCString bitfields; //!< member's bit fields
ArgumentList *argList; //!< member arguments as a list
QList<ArgumentList> *tArgLists; //!< template argument declarations
//ArgumentList *tArgList; //!< template argument lists (for each scope)
//ArgumentList *mtArgList; //!< member template argument list
QCString scopeSpec; //!< template specialization of the scope
QCString memberSpec; //!< template specialization of the member
//QCString scopeSpec; //!< template specialization of the scope
//QCString memberSpec; //!< template specialization of the member
QCString program; //!< the program text
QCString initializer; //!< initial value (for variables)
QCString includeFile; //!< include file (2 arg of \class, must be unique)
......@@ -281,27 +279,31 @@ 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
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
const char *groupDocCmd() const
{
switch( groupDocType )
{
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
Grouping::GroupPri_t groupingPri() const
{
if( section != GROUPDOC_SEC )
{
if( this->section != GROUPDOC_SEC ) {
return Grouping::GROUPING_LOWEST;
}
switch( this->groupdoctype ) {
switch( 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;
......
......@@ -51,8 +51,7 @@ FileDef::FileDef(const char *p,const char *nm,const char *lref)
includedByList = new QList<IncludeInfo>;
includedByList->setAutoDelete(TRUE);
includedByDict = new QDict<IncludeInfo>(61);
namespaceList = new NamespaceList;
namespaceDict = new NamespaceDict(7);
namespaceSDict = new NamespaceSDict;
srcDefDict = 0;
srcMemberDict = 0;
usingDirList = 0;
......@@ -74,8 +73,7 @@ FileDef::~FileDef()
delete classSDict;
delete includeDict;
delete includeList;
delete namespaceList;
delete namespaceDict;
delete namespaceSDict;
delete srcDefDict;
delete srcMemberDict;
delete usingDirList;
......@@ -267,11 +265,12 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startMemberSections();
if (namespaceList->count()>0)
if (namespaceSDict->count()>0)
{
NamespaceDef *nd=namespaceList->first();
NamespaceSDict::Iterator ndi(*namespaceSDict);
NamespaceDef *nd;
bool found=FALSE;
while (nd)
for (ndi.toFirst();(nd=ndi.current());++ndi)
{
if (nd->name().find('@')==-1)
{
......@@ -306,7 +305,6 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.endMemberItem(FALSE);
}
nd=namespaceList->next();
}
if (found) ol.endMemberList();
}
......@@ -533,13 +531,12 @@ void FileDef::insertClass(ClassDef *cd)
/*! Adds namespace definition \a nd to the list of all compounds of this file */
void FileDef::insertNamespace(NamespaceDef *nd)
{
if (!nd->name().isEmpty() && namespaceDict->find(nd->name())==0)
if (!nd->name().isEmpty() && namespaceSDict->find(nd->name())==0)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
namespaceList->inSort(nd);
namespaceSDict->inSort(nd->name(),nd);
else
namespaceList->append(nd);
namespaceDict->insert(nd->name(),nd);
namespaceSDict->append(nd->name(),nd);
}
}
......
......@@ -35,8 +35,7 @@ class ClassList;
class MemberDef;
class OutputList;
class NamespaceDef;
class NamespaceList;
class NamespaceDict;
class NamespaceSDict;
class MemberGroupSDict;
class PackageDef;
......@@ -171,15 +170,15 @@ class FileDef : public Definition
/* user defined member groups */
MemberGroupSDict *memberGroupSDict;
NamespaceSDict *namespaceSDict;
ClassSDict *classSDict;
private:
ClassSDict *classSDict;
QDict<IncludeInfo> *includeDict;
QList<IncludeInfo> *includeList;
QDict<IncludeInfo> *includedByDict;
QList<IncludeInfo> *includedByList;
NamespaceDict *namespaceDict;
NamespaceList *namespaceList;
NamespaceList *usingDirList;
ClassList *usingDeclList;
//DefineList *defineList;
......
......@@ -309,9 +309,9 @@ bool GroupDef::containsGroup(const GroupDef *def)
void GroupDef::addGroup(const GroupDef *def)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
groupList->inSort(def);
else
//if (Config_getBool("SORT_MEMBER_DOCS"))
// groupList->inSort(def);
//else
groupList->append(def);
}
......@@ -382,6 +382,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.startMemberSections();
// write list of files
if (fileList->count()>0)
{
ol.startMemberHeader();
......@@ -411,6 +413,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberList();
}
// write list of namespaces
if (namespaceList->count()>0)
{
ol.startMemberHeader();
......@@ -440,6 +444,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberList();
}
// write list of groups
if (groupList->count()>0)
{
ol.startMemberHeader();
......@@ -469,8 +475,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endMemberList();
}
// write list of classes
classSDict->writeDeclaration(ol);
// write list of members
if (allMemberList->count()>0)
{
/* write user defined member groups */
......
......@@ -101,6 +101,12 @@ class GroupDef : public Definition
/* user defined member groups */
MemberGroupSDict *memberGroupSDict;
FileList * getFiles() const { return fileList; }
ClassSDict * getClasses() const { return classSDict; }
NamespaceList * getNamespaces() const { return namespaceList; }
GroupList * getSubGroups() const { return groupList; }
PageSDict * getPages() const { return pageDict; }
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
......
......@@ -2338,14 +2338,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
// write subgroups
if (hasSubGroups)
{
ol.startItemList();
ol.startIndexList();
QListIterator<GroupDef> gli(*gd->groupList);
GroupDef *subgd = 0;
for (gli.toLast();(subgd=gli.current());--gli)
{
writeGroupTreeNode(ol,subgd,TRUE);
}
ol.endItemList();
ol.endIndexList();
}
......@@ -2544,14 +2544,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
void writeGroupHierarchy(OutputList &ol)
{
ol.startItemList();
ol.startIndexList();
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (gli.toFirst();(gd=gli.current());++gli)
{
writeGroupTreeNode(ol,gd,FALSE);
}
ol.endItemList();
ol.endIndexList();
}
//----------------------------------------------------------------------------
......
......@@ -23,6 +23,7 @@ HEADERS = bufstr.h \
constexp.h \
cppvalue.h \
debug.h \
defgen.h \
doxygen.h \
scanner.h \
doc.h \
......@@ -100,6 +101,7 @@ SOURCES = ce_lex.cpp \
code.cpp \
cppvalue.cpp \
debug.cpp \
defgen.cpp \
declinfo.cpp \
defargs.cpp \
define.cpp \
......
......@@ -73,6 +73,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QCString &scopeName,MemberDef *md)
{
ArgumentList *argList=md->argumentList();
//printf("writeDefArgumentList `%s' %p\n",md->name().data(),argList);
if (argList==0) return; // member has no function like argument list
if (!md->isDefine()) ol.docify(" ");
......@@ -442,28 +443,6 @@ QCString MemberDef::getOutputFileBase() const
return "dummy";
}
//void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal)
//{
// // copy function arguments (if any)
// if (tal)
// {
// scopeTAL = new ArgumentList;
// scopeTAL->setAutoDelete(TRUE);
// copyArgumentList(tal,scopeTAL);
// }
//}
//
//void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
//{
// // copy function arguments (if any)
// if (tal)
// {
// membTAL = new ArgumentList;
// membTAL->setAutoDelete(TRUE);
// copyArgumentList(tal,membTAL);
// }
//}
void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists)
{
if (lists)
......@@ -962,6 +941,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString ldef = definition();
//printf("member `%s' def=`%s'\n",name().data(),ldef.data());
if (isEnumerate())
{
if (name().at(0)=='@')
......@@ -1090,10 +1070,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
if (hasOneLineInitializer()
//!init.isEmpty() && initLines==0 && // one line initializer
// ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
) // add initializer
if (hasOneLineInitializer()) // add initializer
{
if (!isDefine())
{
......@@ -1566,19 +1543,6 @@ QCString MemberDef::getScopeString() const
return result;
}
//Definition *MemberDef::getCompoundDef() const
//{
// NamespaceDef *nd=getNamespaceDef();
// ClassDef *cd=getClassDef();
// FileDef *fd=getFileDef();
// GroupDef *gd=getGroupDef();
// Definition *d = 0;
// if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd;
// ASSERT(d!=0);
// return d;
//}
QCString MemberDef::anchor() const
{
if (m_templateMaster) return m_templateMaster->anchor();
......@@ -1649,7 +1613,7 @@ MemberDef *MemberDef::createTemplateInstanceMember(
);
imd->argList = actualArgList;
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
// TODO: init other member variables.
// TODO: init other member variables (if needed).
return imd;
}
......@@ -1690,7 +1654,16 @@ void MemberDef::addListReference(Definition *d)
{
memLabel=theTranslator->trMember(TRUE,TRUE);
}
QCString memName = name();
if (!Config_getBool("HIDE_SCOPE_NAMES"))
{
Definition *pd=getOuterScope();
if (pd && pd!=Doxygen::globalScope)
{
memName.prepend(pd->name()+"::");
}
}
addRefItem(todoId(),testId(),bugId(),memLabel,
d->getOutputFileBase()+":"+anchor(),name(),argsString());
d->getOutputFileBase()+":"+anchor(),memName,argsString());
}
......@@ -196,10 +196,6 @@ class MemberDef : public Definition
argList = al;
}
ArgumentList *templateArguments() const { return tArgList; }
//void setScopeDefTemplateArguments(ArgumentList *t);
//ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
//void setMemberDefTemplateArguments(ArgumentList *t);
//ArgumentList *memberDefTemplateArguments() const { return membTAL; }
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
QList<ArgumentList> *definitionTemplateParameterLists() const
{ return m_defTmpArgLists; }
......
......@@ -91,13 +91,6 @@ class MemberGroupListIterator : public QListIterator<MemberGroup>
QListIterator<MemberGroup>(l) {}
};
class MemberGroupDict : public QIntDict<MemberGroup>
{
public:
MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
~MemberGroupDict() {}
};
class MemberGroupSDict : public SIntDict<MemberGroup>
{
public:
......@@ -105,12 +98,19 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
~MemberGroupSDict() {}
};
class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
{
public:
MemberGroupDictIterator(const MemberGroupDict &d) :
QIntDictIterator<MemberGroup>(d) {}
~MemberGroupDictIterator() {}
};
//class MemberGroupDict : public QIntDict<MemberGroup>
//{
// public:
// MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
// ~MemberGroupDict() {}
//};
//class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
//{
// public:
// MemberGroupDictIterator(const MemberGroupDict &d) :
// QIntDictIterator<MemberGroup>(d) {}
// ~MemberGroupDictIterator() {}
//};
#endif
......@@ -147,7 +147,7 @@ class NamespaceDict : public QDict<NamespaceDef>
class NamespaceSDict : public SDict<NamespaceDef>
{
public:
NamespaceSDict(int size) : SDict<NamespaceDef>(size) {}
NamespaceSDict(int size=17) : SDict<NamespaceDef>(size) {}
~NamespaceSDict() {}
int compareItems(GCI item1,GCI item2)
{
......
......@@ -272,7 +272,7 @@ class BaseOutputDocInterface
class OutputGenerator : public BaseOutputDocInterface
{
public:
enum OutputType { Html, Latex, Man, RTF, XML };
enum OutputType { Html, Latex, Man, RTF, XML, DEF };
OutputGenerator();
virtual ~OutputGenerator();
......
......@@ -832,6 +832,8 @@ Define *newDefine()
void addDefine()
{
//printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
//ArgumentList *al = new ArgumentList;
//stringToArgumentList(g_defArgsStr,al);
MemberDef *md=new MemberDef(
g_yyFileName,g_yyLineNr,
"#define",g_defName,g_defArgsStr,0,
......
......@@ -76,6 +76,7 @@ static int lastInitializerContext;
static int lastClassTemplSpecContext;
static int lastSkipHtmlCommentContext;
static int lastIfContext;
static int lastInternalDocContext;
static int nextDefContext;
static int overloadContext;
static Protection protection;
......@@ -135,7 +136,7 @@ static QCString *copyArgString;
static QCString fullArgString;
static ArgumentList *currentArgumentList;
static QCString *currentTemplateSpec;
//static QCString *currentTemplateSpec;
static char lastCopyArgChar;
static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
......@@ -525,6 +526,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x ClassDocBrief
%x ClassDocOverload
%x ClassDefineArgs
%x DocInternal
%x DocInternalLine
%x DocBaseClass
%x CppQuote
%x EndCppQuote
......@@ -1034,15 +1037,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
sharpCount=0;
lineCount();
addType( current );
//if (current->mtArgList && current->tArgList==0)
//{
// current->tArgList=current->mtArgList;
// current->mtArgList=0;
//}
current->name=yytext;
current->name=current->name.stripWhiteSpace();
current->scopeSpec.resize(0);
currentTemplateSpec = &current->scopeSpec;
//current->scopeSpec.resize(0);
// currentTemplateSpec = &current->scopeSpec;
if (nameIsOperator(current->name))
BEGIN( Operator );
else
......@@ -1052,8 +1050,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
sharpCount=0;
lineCount();
current->name+=((QCString)yytext).stripWhiteSpace();
current->memberSpec.resize(0);
currentTemplateSpec = &current->memberSpec;
//current->memberSpec.resize(0);
// currentTemplateSpec = &current->memberSpec;
if (nameIsOperator(current->name))
BEGIN( Operator );
else
......@@ -1061,20 +1059,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndTemplate>"<<" {
current->name+=yytext;
*currentTemplateSpec+=yytext;
// *currentTemplateSpec+=yytext;
}
<EndTemplate>"<" {
current->name+='<';
*currentTemplateSpec+='<';
// *currentTemplateSpec+='<';
sharpCount++;
}
<EndTemplate>">>" {
current->name+=yytext;
*currentTemplateSpec+=yytext;
// *currentTemplateSpec+=yytext;
}
<EndTemplate>">" {
current->name+='>';
*currentTemplateSpec+='>';
// *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
//printf("Found %s\n",current->name.data());
......@@ -1084,7 +1082,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<EndTemplate>">"{BN}*"(" {
lineCount();
current->name+='>';
*currentTemplateSpec+='>';
// *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
current->args = "(";
......@@ -1098,7 +1096,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<EndTemplate>">"{BN}*/"::" {
lineCount();
current->name+='>';
*currentTemplateSpec+='>';
// *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
BEGIN(FindMemberName);
......@@ -1106,7 +1104,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndTemplate>. {
current->name+=*yytext;
*currentTemplateSpec+=*yytext;
// *currentTemplateSpec+=*yytext;
}
<FindMembers,FindMemberName>{SCOPENAME} {
lineCount();
......@@ -1203,11 +1201,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCPP>[\r]*\n[\r]* { yyLineNr++ ;
BEGIN( lastCPPContext) ;
}
<Define>{ID}/"(" {
current->bodyLine = yyLineNr;
<Define>{ID}{B}*"(" {
current->name = yytext;
BEGIN( DefineArg );
current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
current->args = "(";
current->bodyLine = yyLineNr;
currentArgumentContext = DefineEnd;
fullArgString=current->args.copy();
copyArgString=&current->args;
BEGIN( ReadFuncArgType ) ;
}
/*
<DefineArg>")" {
//printf("Define with args\n");
current->args += ')';
......@@ -1216,6 +1220,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<DefineArg>. {
current->args += *yytext;
}
*/
<Define>{ID} {
//printf("Define `%s' without args\n",yytext);
current->bodyLine = yyLineNr;
......@@ -2849,21 +2854,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->groupdoctype = Entry::GROUPDOC_NORMAL;
current->groupDocType = Entry::GROUPDOC_NORMAL;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ {
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->groupdoctype = Entry::GROUPDOC_ADD;
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;
current->groupDocType = Entry::GROUPDOC_WEAK;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"namespace"{B}+ {
......@@ -3139,7 +3144,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<GroupDocArg1>{ID}(".html"?) {
current->name = yytext;
lastDefGroup.groupname = yytext;
lastDefGroup.pri = current->groupingpri();
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);
......@@ -3149,7 +3154,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<GroupDocArg1>"\n" {
warn(yyFileName,yyLineNr,
"Warning: missing group name after %s",
current->groupdoccmd()
current->groupDocCmd()
);
yyLineNr++;
BEGIN( Doc );
......@@ -3165,7 +3170,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->type = current->type.stripWhiteSpace();
}
<GroupDocArg2>"\n" {
if( current->groupdoctype == Entry::GROUPDOC_NORMAL &&
if( current->groupDocType == Entry::GROUPDOC_NORMAL &&
current->type.length() == 0 )
warn(yyFileName,yyLineNr,
"Warning: missing title after "
......@@ -3417,7 +3422,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if (current->section==Entry::GROUPDOC_SEC )
{
autoGroupStack.push(new Grouping(current->name,
current->groupingpri()
current->groupingPri()
));
}
else if (current->section == Entry::MEMBERGRP_SEC)
......@@ -3899,12 +3904,42 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(lastAfterDocContext);
}
<AfterDocBrief>"."/{BN} { BEGIN(AfterDoc); }
<LineDoc,AfterDocBrief,AfterDocLine>{CMD}"internal" {
current->brief+="\\internal";
<LineDoc,AfterDocLine>{CMD}"internal" {
if (!Config_getBool("INTERNAL_DOCS"))
{
lastInternalDocContext = YY_START;
BEGIN( DocInternalLine );
}
<Doc,AfterDoc>{CMD}"internal" {
else
{
current->doc+="\\internal";
}
}
<Doc,JavaDoc,ExampleDoc,PageDoc,ClassDoc,AfterDoc>{CMD}"internal" {
if (!Config_getBool("INTERNAL_DOCS"))
{
lastInternalDocContext = YY_START;
BEGIN( DocInternal );
}
else
{
current->doc+="\\internal";
}
}
<DocInternal>.
<DocInternal>\n { yyLineNr++; }
<DocInternal>"/*"|"//"
<DocInternal>"*/" {
unput('/');
unput('*');
BEGIN( lastInternalDocContext );
}
<DocInternalLine>.
<DocInternalLine>\n {
yyLineNr++;
unput('\n');
BEGIN( lastInternalDocContext );
}
<AfterDoc>{CMD}"brief" { BEGIN(AfterDocBrief); }
<AfterDoc>"/*"|"//" { current->doc+=yytext; }
<AfterDoc>^{B}*"*"+/[^/]
......
......@@ -27,7 +27,7 @@
// - changed trPageDocumentation() "Seitenbeschreibung" to
// "Zusätzliche Informationen"
// - removed old trGeneratedFrom()
// - changed "/*!" to "/*" (documentation is inherited from translator.h
// - changed "/*!" to "/*" (documentation is inherited from translator_en.h
// (INHERIT_DOCS = YES), there's no need to make changes twice)
// - Update for "new since 1.2.4" version
//
......@@ -52,20 +52,21 @@
// 2001/07/24 Jens Seidel (jensseidel@users.sourceforge.net)
// - trClassDocumentation() updated as in the English translator.
//
// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and
// Jens Seidel (jensseidel@users.sourceforge.net)
// - trReferences() implemented.
// - trCompoundReference(), trLegendDocs() updated
// - Removed some TODO's
//
// Todo:
// - translation of all Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
// strings (see translator_en.h)
// - translation of "compound"
// - see FIXME
// - was ist richtig: "Liste aller dokumentierter Elemente" oder
// "Liste aller dokumentierten Elemente" (aktuell)
// (nach "aller" suchen)
// "Mithilfe" oder "Mit Hilfe"
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
class TranslatorGerman : public TranslatorAdapter_1_2_11
class TranslatorGerman : public Translator
{
public:
......@@ -180,7 +181,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{ return "Übersicht"; }
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstrukturen";
}
else
{
return "Übersicht";
}
}
/* This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
......@@ -192,7 +202,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{ return "Elementübersicht"; }
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstruktur-Elemente";
}
else
{
return "Datenstruktur-Elemente";
}
}
/* This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
......@@ -232,8 +251,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
return "Hier folgt die Aufzählung aller Datenstrukturen "
"mit einer Kurzbeschreibung:";
else
return "Hier folgt die Aufzählung aller Klassen, Strukturen "
"und Varianten mit einer Kurzbeschreibung:"; // FIXME: "interfaces" = ??
return "Hier folgt die Aufzählung aller Klassen, Strukturen, "
"Varianten und Schnittstellen mit einer Kurzbeschreibung:";
}
/* This is an introduction to the page with all class members. */
......@@ -247,7 +266,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
result+="Klassenelemente mit Verweisen auf ";
if (extractAll) {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result+="die struct/union Dokumentation zu jedem Element:";
result+="die Dokumentation zu jedem Element:";
else
result+="die Klassendokumentation zu jedem Element:";
} else {
......@@ -264,8 +283,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
{
QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen mit Verweisen auf ";
}
else
{
result+="Dateielemente mit Verweisen auf ";
if (extractAll) result+="die Dateidokumentation zu jedem Element:";
}
if (extractAll) result+="die Dokumentation zu jedem Element:";
else result+="die zugehörigen Dateien:";
return result;
}
......@@ -318,7 +344,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
return "Datenstruktur-Verzeichnis";
else
return "Datenstruktur-Verzeichnis"; // FIXME: war compound
return "Datenstruktur-Verzeichnis";
}
/* This is used in LaTeX as the title of the chapter with the
......@@ -454,7 +480,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
* the list of links to documented compounds
*/
virtual QCString trCompounds()
{ return "Übersicht"; }
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstrukturen";
}
else
{
return "Übersicht";
}
}
/* This is used in the standard footer of each page and indicates when
* the page was generated
......@@ -565,16 +600,17 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool /*isTemplate*/) // FIXME
bool isTemplate)
{
QCString result=(QCString)clName+" ";
if (isTemplate) result+="Template ";
switch(compType)
{
case ClassDef::Class: result+=" Klassen"; break;
case ClassDef::Struct: result+=" Strukturen"; break;
case ClassDef::Union: result+=" Varianten"; break;
case ClassDef::Interface: result+=" Interface"; break;
case ClassDef::Exception: result+=" Exception"; break;
case ClassDef::Class: result+="Klassen"; break;
case ClassDef::Struct: result+="Struktur"; break;
case ClassDef::Union: result+="Varianten"; break;
case ClassDef::Interface: result+="Schnittstellen"; break;
case ClassDef::Exception: result+="Ausnahmen"; break;
}
result+="referenz";
return result;
......@@ -742,7 +778,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
case ClassDef::Class: result+=" Klasse"; break;
case ClassDef::Struct: result+=" Struktur"; break;
case ClassDef::Union: result+=" Variante"; break;
case ClassDef::Interface: result+="s Interface"; break;
case ClassDef::Interface: result+=" Schnittstelle"; break;
case ClassDef::Exception: result+=" Ausnahme"; break;
}
result+=" wurde erzeugt aufgrund der Datei";
......@@ -903,9 +939,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
}
virtual QCString trPublicAttribs()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenfelder";
}
else
{
return "Öffentliche Attribute";
}
}
virtual QCString trStaticPublicAttribs()
{
......@@ -1015,6 +1058,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"class Undocumented { };\n\n"
"/*! Mithilfe öffentlicher Vererbung vererbte Klasse */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! Eine Template Klasse */\n"
"template<class T> class Templ { };\n\n"
"/*! Mithilfe geschützter Vererbung vererbte Klasse */\n"
"class ProtectedBase { };\n\n"
"/*! Mithilfe privater Vererbung vererbte Klasse */\n"
......@@ -1026,13 +1071,14 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
" protected ProtectedBase,\n"
" private PrivateBase,\n"
" public Undocumented\n"
" public Templ<int>\n"
"{\n"
" private:\n"
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
"\\endcode\n\n"
"Setzen des Tags \\c MAX_DOT_GRAPH_HEIGHT in der Konfigurationsdatei "
"auf 200 liefert den folgenden Graphen:"
"auf 240 liefert den folgenden Graphen:"
"<p><center><img src=\"graph_legend.gif\"></center>\n"
"<p>\n"
"Die Rechtecke in obigem Graphen bedeuten:\n"
......@@ -1046,7 +1092,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"<li>Ein Rechteck mit rotem Rahmen kennzeichnet eine dokumentierte "
"Struktur oder Klasse, für die nicht alle Vererbungs-/"
"Enthaltenseinsbeziehungen dargestellt werden. Ein Graph wird gekürzt, "
"wenn er nicht in die angegebenen Schranken passt."
"wenn er nicht in die angegebenen Schranken passt.\n"
"</ul>\n"
"Die Pfeile bedeuten:\n"
"<ul>\n"
......@@ -1054,10 +1100,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"zwischen zwei Klassen dar.\n"
"<li>Ein dunkelgrüner Pfeil stellt geschützte Vererbung dar.\n"
"<li>Ein dunkelroter Pfeil stellt private Vererbung dar.\n"
"<li>Ein gestrichelter violetter Pfeil bedeutet, dass eine Klasse in einer "
"anderen enthalten ist oder von einer anderen benutzt wird. Am Pfeil "
"stehen die Variable(n), mit deren Hilfe auf die Struktur oder Klasse "
"an der Pfeilspitze zugegriffen werden kann.\n"
"<li>Ein gestrichelter violetter Pfeil bedeutet, dass eine Klasse in "
"einer anderen enthalten ist oder von einer anderen benutzt wird. Am "
"Pfeil stehen die Variable(n), mit deren Hilfe auf die Struktur oder "
"Klasse an der Pfeilspitze zugegriffen werden kann.\n"
"<li>Ein gestrichelter gelber Pfeil kennzeichnet eine Verknüpfung "
"zwischen einer Template Instanz und der Template Klasse von welcher "
"es abstammt. Neben dem Pfeil sind die Template Parameter aufgeführt.\n"
"</ul>\n";
}
......@@ -1171,13 +1220,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* Used as a marker that is put before a \bug item */
virtual QCString trBug()
{
return "Bug";
return "Fehler";
}
/* Used as the header of the bug list */
virtual QCString trBugList()
{
return "Bug Liste";
return "Liste der bekannten Fehler";
}
//////////////////////////////////////////////////////////////////////////
......@@ -1280,7 +1329,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
*/
virtual QCString trField(bool, bool singular)
{
QCString result("Feld"); // FIXME
QCString result("Feld");
if (!singular) result+="er";
return result;
}
......@@ -1310,6 +1359,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
return result;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.11
//////////////////////////////////////////////////////////////////////////
/* This text is put before the list of members referenced by a member
*/
virtual QCString trReferences()
{
return "Benutzt";
}
};
#endif
......
......@@ -18,6 +18,8 @@
*
* VERSION HISTORY
* ---------------
* 003 23 november 2001
* - Removed some obsolete methods (latexBabelPackage, trAuthor, trAuthors and trFiles)
* 002 19 november 2001
* ! Updated for doxygen v1.2.12
* 001 20 july 2001
......@@ -61,10 +63,6 @@ class TranslatorPortuguese : public Translator
virtual QCString latexLanguageSupportCommand()
{ return "Portuguese"; }
/*! returns the name of the package that is included by LaTeX */
QCString latexBabelPackage()
{ return "portuguese"; }
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{ return "iso-8859-1"; }
......@@ -449,10 +447,6 @@ class TranslatorPortuguese : public Translator
QCString trEnumerationValues()
{ return "Valores da enumeração"; }
/*! This is used in man pages as the author section. */
QCString trAuthor()
{ return "Autor"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
......@@ -510,12 +504,6 @@ class TranslatorPortuguese : public Translator
}
}
/*! This is used in the documentation of a group before the list of
* links to documented files
*/
QCString trFiles()
{ return "Ficheiros"; }
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
......@@ -564,10 +552,6 @@ class TranslatorPortuguese : public Translator
QCString trDate()
{ return "Data"; }
/*! this text is generated when the \\author command is used. */
QCString trAuthors()
{ return "Autor(es)"; }
/*! this text is generated when the \\return command is used. */
QCString trReturns()
{ return "Retorna"; }
......
......@@ -842,7 +842,7 @@ QCString argListToString(ArgumentList *al)
QCString tempArgListToString(ArgumentList *al)
{
QCString result;
if (!al || al->count()==0) return result;
if (al==0) return result;
result="<";
Argument *a=al->first();
while (a)
......
......@@ -30,6 +30,8 @@
#include "doc.h"
#include "dot.h"
#include "code.h"
#include "page.h"
#include "filename.h"
#include <qdir.h>
#include <qfile.h>
......@@ -164,6 +166,7 @@ template<class T> class ValStack
* Its methods are called when some XML text or markup
* needs to be written.
*/
// TODO: htmlonly, latexonly
class XMLGenerator : public OutputDocInterface
{
public:
......@@ -228,7 +231,8 @@ class XMLGenerator : public OutputDocInterface
void writeString(const char *text)
{
startParMode();
m_t << text;
//m_t << text;
docify(text);
}
void startItemList()
{
......@@ -823,6 +827,8 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
// + source references
// + source referenced by
// - body code
// - template arguments
// (templateArguments(), definitionTemplateParameterLists())
if (md->memberType()==MemberDef::EnumValue) return;
......@@ -1115,11 +1121,11 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
// + detailed description
// - template arguments
// - include file
// - member groups
// + member groups
// + inheritance diagram
// + list of direct super classes
// + list of direct sub classes
// - list of inner classes
// + list of inner classes
// + collaboration diagram
// - list of all members
// + user defined member sections
......@@ -1188,6 +1194,17 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
}
}
ClassSDict *cl = cd->getInnerClasses();
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
t << " <innerclass refid=\"" << cd->getOutputFileBase()
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
......@@ -1247,9 +1264,9 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t)
{
// - contained class definitions
// - contained namespace definitions
// - member groups
// + contained class definitions
// + contained namespace definitions
// + member groups
// + normal members
// + brief desc
// + detailed desc
......@@ -1263,6 +1280,28 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t)
writeXMLString(t,nd->name());
t << "</compoundname>" << endl;
ClassSDict *cl = nd->classSDict;
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
t << " <innerclass refid=\"" << cd->getOutputFileBase()
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
NamespaceSDict *nl = nd->namespaceSDict;
if (nl)
{
NamespaceSDict::Iterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
t << " <innernamespace refid=\"" << nd->getOutputFileBase()
<< "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
}
}
MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
......@@ -1295,9 +1334,9 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
// + includedby files
// + include graph
// + included by graph
// - contained class definitions
// - contained namespace definitions
// - member groups
// + contained class definitions
// + contained namespace definitions
// + member groups
// + normal members
// + brief desc
// + detailed desc
......@@ -1356,6 +1395,29 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
t << " </invincdepgraph>" << endl;
}
ClassSDict *cl = fd->classSDict;
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
t << " <innerclass refid=\"" << cd->getOutputFileBase()
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
NamespaceSDict *nl = fd->namespaceSDict;
if (nl)
{
NamespaceSDict::Iterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
t << " <innernamespace refid=\"" << nd->getOutputFileBase()
<< "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
}
}
MemberGroupSDict::Iterator mgli(*fd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
......@@ -1383,6 +1445,113 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
t << " </compounddef>" << endl;
}
static void generateXMLForGroup(GroupDef *gd,QTextStream &t)
{
// + members
// + member groups
// + files
// + classes
// + namespaces
// - packages
// + pages
// + child groups
// - examples
// + brief description
// + detailed description
t << " <compounddef id=\""
<< gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
t << " <name>" << convertToXML(gd->name()) << "</name>" << endl;
t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
FileList *fl = gd->getFiles();
if (fl)
{
QListIterator<FileDef> fli(*fl);
FileDef *fd = fl->first();
for (fli.toFirst();(fd=fli.current());++fli)
{
t << " <innerfile refid=\"" << fd->getOutputFileBase()
<< "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
}
}
ClassSDict *cl = gd->getClasses();
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
t << " <innerclass refid=\"" << cd->getOutputFileBase()
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
NamespaceList *nl = gd->getNamespaces();
if (nl)
{
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
t << " <innernamespace refid=\"" << nd->getOutputFileBase()
<< "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
}
}
PageSDict *pl = gd->getPages();
if (pl)
{
PageSDict::Iterator pli(*pl);
PageInfo *pi;
for (pli.toFirst();(pi=pli.current());++pli)
{
t << " <innerpage refid=\"" << pi->getOutputFileBase()
<< "\"/>" << convertToXML(pi->title) << "</innerpage>" << endl;
}
}
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
generateXMLSection(gd,t,mg->members(),"user-defined",mg->header());
}
generateXMLSection(gd,t,&gd->decDefineMembers,"define");
generateXMLSection(gd,t,&gd->decProtoMembers,"prototype");
generateXMLSection(gd,t,&gd->decTypedefMembers,"typedef");
generateXMLSection(gd,t,&gd->decEnumMembers,"enum");
generateXMLSection(gd,t,&gd->decFuncMembers,"func");
generateXMLSection(gd,t,&gd->decVarMembers,"var");
t << " <briefdescription>" << endl;
writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
t << " </detaileddescription>" << endl;
t << " </compounddef>" << endl;
}
static void generateXMLForPage(PageInfo *pi,QTextStream &t)
{
// + name
// + title
// + documentation
t << " <compounddef id=\"";
if (Config_getBool("CASE_SENSE_NAMES")) t << pi->name; else t << pi->name.lower();
t << "\">" << endl;
t << " <name>" << pi->name << "</name>" << endl;
SectionInfo *si = Doxygen::sectionDict.find(pi->name);
if (si)
{
t << " <title>" << si->title << "</title>" << endl;
}
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,pi->defFileName,pi->defLine,0,0,pi->doc);
t << " </detaileddescription>" << endl;
t << " </compounddef>" << endl;
}
void generateXML()
{
......@@ -1391,8 +1560,9 @@ void generateXML()
// + namespaces
// + files
// - packages
// - groups
// - related pages
// + groups
// + related pages
// - examples
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
......@@ -1475,6 +1645,19 @@ void generateXML()
generateXMLForFile(fd,t);
}
}
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (;(gd=gli.current());++gli)
{
generateXMLForGroup(gd,t);
}
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
generateXMLForPage(pi,t);
}
//t << " </compoundlist>" << endl;
}
t << "</doxygen>" << endl;
......
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