From 47d9b2d70a4136d4df2a5c87ba33843b1520261b Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 22 Apr 2001 19:01:52 +0000 Subject: Release-1.2.6-20010422 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/doxywizard/Makefile.in | 2 +- addon/doxywizard/doxywizard.cpp | 2 +- addon/doxywizard/doxywizard.h | 2 +- addon/doxywizard/doxywizard.pro.in | 2 +- addon/doxywizard/doxywizard_templ.cpp | 2 +- addon/doxywizard/doxywizard_templ.h | 2 +- addon/doxywizard/inputbool.cpp | 2 +- addon/doxywizard/inputbool.h | 2 +- addon/doxywizard/inputint.cpp | 2 +- addon/doxywizard/inputint.h | 2 +- addon/doxywizard/inputstring.cpp | 2 +- addon/doxywizard/inputstring.h | 2 +- addon/doxywizard/inputstrlist.cpp | 2 +- addon/doxywizard/inputstrlist.h | 2 +- addon/doxywizard/pagewidget.cpp | 2 +- addon/doxywizard/pagewidget.h | 2 +- addon/doxywizard/pixmaps.cpp | 2 +- addon/doxywizard/pixmaps.h | 2 +- addon/doxywizard/qtbc.h | 2 +- addon/xmlgen/xml.cpp | 18 +- addon/xmlread/qtbc.h | 2 +- doc/config.doc | 8 + doc/docblocks.doc | 46 +- doc/install.doc | 33 +- doc/language.doc | 8 +- packages/rpm/doxygen.spec | 55 +- qtools/Makefile.in | 2 +- qtools/qarray.h | 2 +- qtools/qasciidict.h | 2 +- qtools/qbuffer.cpp | 2 +- qtools/qbuffer.h | 2 +- qtools/qcollection.cpp | 2 +- qtools/qcollection.h | 2 +- qtools/qcstring.cpp | 2 +- qtools/qcstring.h | 2 +- qtools/qdatastream.cpp | 2 +- qtools/qdatastream.h | 2 +- qtools/qdatetime.cpp | 2 +- qtools/qdatetime.h | 2 +- qtools/qdict.h | 2 +- qtools/qdir.cpp | 2 +- qtools/qdir.h | 2 +- qtools/qdir_unix.cpp | 2 +- qtools/qdir_win32.cpp | 2 +- qtools/qfeatures.h | 2 +- qtools/qfile.cpp | 2 +- qtools/qfile.h | 2 +- qtools/qfile_unix.cpp | 2 +- qtools/qfile_win32.cpp | 2 +- qtools/qfiledefs_p.h | 2 +- qtools/qfileinfo.cpp | 2 +- qtools/qfileinfo.h | 2 +- qtools/qfileinfo_unix.cpp | 2 +- qtools/qfileinfo_win32.cpp | 2 +- qtools/qgarray.cpp | 2 +- qtools/qgarray.h | 2 +- qtools/qgdict.cpp | 2 +- qtools/qgdict.h | 2 +- qtools/qgeneric.h | 2 +- qtools/qglist.cpp | 2 +- qtools/qglist.h | 2 +- qtools/qglobal.cpp | 2 +- qtools/qglobal.h | 2 +- qtools/qgvector.cpp | 2 +- qtools/qgvector.h | 2 +- qtools/qintdict.h | 2 +- qtools/qiodevice.cpp | 2 +- qtools/qiodevice.h | 2 +- qtools/qlist.h | 2 +- qtools/qmap.cpp | 2 +- qtools/qmap.h | 2 +- qtools/qptrdict.h | 2 +- qtools/qqueue.h | 2 +- qtools/qregexp.cpp | 2 +- qtools/qregexp.h | 2 +- qtools/qshared.h | 2 +- qtools/qsortedlist.h | 2 +- qtools/qstack.h | 2 +- qtools/qstring.cpp | 2 +- qtools/qstring.h | 2 +- qtools/qstringlist.cpp | 2 +- qtools/qstringlist.h | 2 +- qtools/qstrlist.h | 2 +- qtools/qstrvec.h | 2 +- qtools/qtextcodec.cpp | 2 +- qtools/qtextcodec.h | 2 +- qtools/qtextstream.cpp | 2 +- qtools/qtextstream.h | 2 +- qtools/qtl.h | 2 +- qtools/qvaluelist.h | 2 +- qtools/qvaluestack.h | 2 +- qtools/qvector.h | 2 +- qtools/qxml.cpp | 2 +- qtools/qxml.h | 2 +- src/classdef.cpp | 261 ++---- src/classdef.h | 3 +- src/definition.cpp | 2 +- src/definition.h | 2 +- src/doc.l | 137 ++- src/doxygen.cpp | 24 +- src/filedef.cpp | 127 ++- src/filedef.h | 25 +- src/groupdef.cpp | 151 +-- src/groupdef.h | 25 +- src/index.cpp | 14 +- src/language.cpp | 6 +- src/latexgen.cpp | 10 - src/memberdef.cpp | 765 ++++++++------- src/memberdef.h | 27 +- src/membergroup.cpp | 82 +- src/membergroup.h | 21 +- src/memberlist.cpp | 600 +++++------- src/memberlist.h | 43 +- src/message.cpp | 4 + src/namespacedef.cpp | 141 ++- src/namespacedef.h | 28 +- src/rtfgen.cpp | 16 +- src/scanner.l | 26 +- src/translator.h | 18 + src/translator_br.h | 786 +++++++++++----- src/translator_cz.h | 189 +++- src/translator_de.h | 155 ++-- src/translator_ru.h | 1653 ++++++++++++++++++++------------- src/util.cpp | 91 +- src/util.h | 7 +- 128 files changed, 3304 insertions(+), 2489 deletions(-) diff --git a/INSTALL b/INSTALL index 5bf3046..f11b8bd 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.6-20010409 +DOXYGEN Version 1.2.6-20010422 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (09 April 2001) +Dimitri van Heesch (22 April 2001) diff --git a/README b/README index afd334e..dbc2ab2 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.6_20010409 +DOXYGEN Version 1.2.6_20010422 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (09 April 2001) +Dimitri van Heesch (22 April 2001) diff --git a/VERSION b/VERSION index ebc8ce8..3339dbc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.6-20010409 +1.2.6-20010422 diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 65995b5..1b56e9a 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -1,5 +1,5 @@ # -# $Id$ +# # # Copyright (C) 1997-2001 by Dimitri van Heesch. # diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 8ceecbb..13d80f5 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h index f78733e..be99539 100644 --- a/addon/doxywizard/doxywizard.h +++ b/addon/doxywizard/doxywizard.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index 649c395..53847c2 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -1,5 +1,5 @@ # -# $Id$ +# # # Copyright (C) 1997-2001 by Dimitri van Heesch. # diff --git a/addon/doxywizard/doxywizard_templ.cpp b/addon/doxywizard/doxywizard_templ.cpp index 97fe34c..cafec21 100644 --- a/addon/doxywizard/doxywizard_templ.cpp +++ b/addon/doxywizard/doxywizard_templ.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/doxywizard_templ.h b/addon/doxywizard/doxywizard_templ.h index 4daf3fd..92e35e1 100644 --- a/addon/doxywizard/doxywizard_templ.h +++ b/addon/doxywizard/doxywizard_templ.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index 4ac2f8a..c77578e 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h index 9c2511f..2b4d869 100644 --- a/addon/doxywizard/inputbool.h +++ b/addon/doxywizard/inputbool.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp index d6173c4..702988c 100644 --- a/addon/doxywizard/inputint.cpp +++ b/addon/doxywizard/inputint.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h index 28da9cf..47fbf13 100644 --- a/addon/doxywizard/inputint.h +++ b/addon/doxywizard/inputint.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index e43fc93..a20ba68 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h index 794f93e..1c4554d 100644 --- a/addon/doxywizard/inputstring.h +++ b/addon/doxywizard/inputstring.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index c6c34f4..9ab9a5b 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h index e60b036..115bad2 100644 --- a/addon/doxywizard/inputstrlist.h +++ b/addon/doxywizard/inputstrlist.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/pagewidget.cpp b/addon/doxywizard/pagewidget.cpp index 67d4d57..7e6920b 100644 --- a/addon/doxywizard/pagewidget.cpp +++ b/addon/doxywizard/pagewidget.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/pagewidget.h b/addon/doxywizard/pagewidget.h index 266fcc4..6d238df 100644 --- a/addon/doxywizard/pagewidget.h +++ b/addon/doxywizard/pagewidget.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/pixmaps.cpp b/addon/doxywizard/pixmaps.cpp index 6c7199b..5f2497b 100644 --- a/addon/doxywizard/pixmaps.cpp +++ b/addon/doxywizard/pixmaps.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/pixmaps.h b/addon/doxywizard/pixmaps.h index 144fee3..7ec854e 100644 --- a/addon/doxywizard/pixmaps.h +++ b/addon/doxywizard/pixmaps.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/doxywizard/qtbc.h b/addon/doxywizard/qtbc.h index 13b6fea..51f62dd 100644 --- a/addon/doxywizard/qtbc.h +++ b/addon/doxywizard/qtbc.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/addon/xmlgen/xml.cpp b/addon/xmlgen/xml.cpp index dbfb0e9..ea40d05 100644 --- a/addon/xmlgen/xml.cpp +++ b/addon/xmlgen/xml.cpp @@ -420,18 +420,18 @@ void generateXMLForFile(FileDef *fd,QTextStream &t) t << " "; writeXMLString(t,fd->name()); t << "" << endl; - int numMembers = fd->defineMembers.count()+fd->protoMembers.count()+ - fd->typedefMembers.count()+fd->enumMembers.count()+ - fd->funcMembers.count()+fd->varMembers.count(); + int numMembers = fd->decDefineMembers.count()+fd->decProtoMembers.count()+ + fd->decTypedefMembers.count()+fd->decEnumMembers.count()+ + fd->decFuncMembers.count()+fd->decVarMembers.count(); if (numMembers>0) { t << " " << endl; - generateXMLFileSection(fd,t,&fd->defineMembers,"define"); - generateXMLFileSection(fd,t,&fd->protoMembers,"prototype"); - generateXMLFileSection(fd,t,&fd->typedefMembers,"typedef"); - generateXMLFileSection(fd,t,&fd->enumMembers,"enum"); - generateXMLFileSection(fd,t,&fd->funcMembers,"func"); - generateXMLFileSection(fd,t,&fd->varMembers,"var"); + generateXMLFileSection(fd,t,&fd->decDefineMembers,"define"); + generateXMLFileSection(fd,t,&fd->decProtoMembers,"prototype"); + generateXMLFileSection(fd,t,&fd->decTypedefMembers,"typedef"); + generateXMLFileSection(fd,t,&fd->decEnumMembers,"enum"); + generateXMLFileSection(fd,t,&fd->decFuncMembers,"func"); + generateXMLFileSection(fd,t,&fd->decVarMembers,"var"); t << " " << endl; } t << " " << endl; diff --git a/addon/xmlread/qtbc.h b/addon/xmlread/qtbc.h index 13b6fea..51f62dd 100644 --- a/addon/xmlread/qtbc.h +++ b/addon/xmlread/qtbc.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/doc/config.doc b/doc/config.doc index afe2b8e..b819f53 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -164,6 +164,7 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_rtf_stylesheet_file RTF_STYLESHEET_FILE
  • \refitem cfg_search_includes SEARCH_INCLUDES
  • \refitem cfg_searchengine SEARCHENGINE +
  • \refitem cfg_short_names SHORT_NAMES
  • \refitem cfg_show_include_files SHOW_INCLUDE_FILES
  • \refitem cfg_show_used_files SHOW_USED_FILES
  • \refitem cfg_sort_member_docs SORT_MEMBER_DOCS @@ -351,6 +352,13 @@ followed by the descriptions of the tags grouped by category. classes or files whose names only differ in case and if your file system supports case sensitive file names. +\anchor cfg_short_names +
    \c SHORT_NAMES
    + \addindex SHORT_NAMES + If the \c SHORT_NAMES tag is set to \c YES, doxygen will generate much shorter + (but less readable) file names. This can be useful is your file systems + doesn't support long names like on DOS, Mac, or CD-ROM. + \anchor cfg_hide_scope_names
    \c HIDE_SCOPE_NAMES
    \addindex HIDE_SCOPE_NAMES diff --git a/doc/docblocks.doc b/doc/docblocks.doc index 95d13b5..d2df482 100644 --- a/doc/docblocks.doc +++ b/doc/docblocks.doc @@ -43,7 +43,7 @@ The following types of special documentation blocks are supported by doxygen: Doxygen only allows one brief and one detailed description. If there is one brief description before a declaration and one before a definition, only the one before the \e declaration will be used. If -the same situation occurs for a detail description, +the same situation occurs for a detailed description, the one before the \e definition is preferred and the one before the declaration will be ignored. @@ -56,14 +56,15 @@ Here is an example of a documented piece of C++ code using the Qt style: The one-line comments should contain a brief description, whereas the multi-line comment blocks contain a more detailed description. -The brief descriptions are included in the member overview of a class, -namespace or file and are printed using a small italic font -(this description can be hidden by - setting \ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in -the config file). By default the brief descriptions are also the first -sentence of the detailed description -(this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF" tag -to \c NO). Both the brief and the detailed descriptions are optional +Note that consecutive one-line comments are merged together in one brief +description. The brief descriptions are included in the member overview of a +class, namespace or file and are printed using a small italic font +(this description can be hidden by setting +\ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in +the config file). By default the brief descriptions become the first +sentence of the detailed descriptions +(but this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF" +tag to \c NO). Both the brief and the detailed descriptions are optional for the Qt style. By default a JavaDoc style documentation block behaves the same way as a @@ -71,7 +72,7 @@ Qt style documentation block. This is not according the JavaDoc specification however, where the first sentence of the documentation block is automatically treated as a brief description. To enable this behaviour you should set \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" to YES in the configuration -file. If you enble this option and want to put a dot in the middle of a +file. If you enable this option and want to put a dot in the middle of a sentence without ending it, you should put a backslash and a space after it. Here is an example: \verbatim @@ -112,7 +113,8 @@ of a function or inside a normal C style comment block), as long as you put a structural command inside the documentation block. Structural commands (like all other commands) start with a backslash -(\\) followed by a command name and one or more parameters. +(\\), or an at-sign (\@) in JavaDoc style, +followed by a command name and one or more parameters. For instance, if you want to document the class \c Test in the example above, you could have also put the following documentation block somewhere in the input that is read by doxygen: @@ -124,7 +126,7 @@ in the input that is read by doxygen: */ \endverbatim -Here the special command \c \class is used to indicated that the +Here the special command \c \class is used to indicate that the comment block contains documentation for the class \c Test. Other structural commands are:
      @@ -142,11 +144,17 @@ commands. Note that the documentation block belonging to a file should always contain a structural command. To document a member of a C++ class, you must also document the class -itself. The same holds for namespaces. To document a C function, typedef, +itself. The same holds for namespaces. To document a global C function, typedef, enum or preprocessor definition you must first document the file that contains it (usually this will be a header file, because that file contains the information that is exported to other source files). +Let's repeat that, because it is often overlooked: +to document global objects (functions, typedefs, enum, macros, etc), you +must document the file in which they are defined. In other words, +there must at least be a \verbatim /*! \file */ \endverbatim +or a \verbatim /** @file */ \endverbatim line in this file. + Here is an example of a C header named \c structcmd.h that is documented using structural commands: \verbinclude structcmd.h @@ -164,7 +172,7 @@ using structural commands: \subsection memberdoc Documenting compound members. -If you want to document the members of a file, struct, union, class, or enum +If you want to document the members of a file, struct, union, class, or enum, and you want to put the documentation for these members inside the compound, it is sometimes desired to place the documentation block after the member instead of before. For this purpose doxygen has the following @@ -172,7 +180,7 @@ additional comment blocks: \verbatim /*!< ... */ \endverbatim -This block can be used to put a qt style documentation blocks after a member. +This block can be used to put a Qt style documentation blocks after a member. The one line version look as follows: \verbatim //!< ... @@ -189,7 +197,7 @@ Note that these blocks have the same structure and meaning as the special comment blocks above only the \< indicates that the member is located in front of the block instead of after the block. -Here is an example of a the use of these comment blocks: +Here is an example of the use of these comment blocks: \verbinclude afterdoc.h \htmlonly Click here @@ -198,9 +206,9 @@ Here is an example of a the use of these comment blocks: \warning These blocks can only be used to document \e members. They cannot be used to document files, classes, unions, structs, - groups, namespaces and enums. Furthermore, the structural commands - mentioned in the previous section (like \\class) are ignored - inside these comment blocks. + groups, namespaces and enums themselves. Furthermore, the structural + commands mentioned in the previous section + (like \\class) are ignored inside these comment blocks. \htmlonly Go to the next section or return to the diff --git a/doc/install.doc b/doc/install.doc index fe05177..30acc5c 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -358,11 +358,18 @@ Here is what is required:
    • The GNU tools flex, bison, and sed. To get these working on Windows you should install the cygwin tools - \latexonly(see {\tt http://sources.redhat.com/cygwin/})\endlatexonly. + \latexonly(see {\tt http://sources.redhat.com/cygwin/})\endlatexonly + + Alternatively, you can also choose to + download only a small subset + \latexonly(see {\tt http://www.doxygen.org/dl/cygwin_tools.zip})\endlatexonly + of the cygwin tools that I put together just to compile doxygen. Make sure the BISONLIB environment variable points to the location where the files bison.simple and - bison.hairy are located. + bison.hairy are located. For instance if these files are in + c:\\tools\\cygwin\\share then BISONLIB should + be set to //c/tools/cygwin/share/ Also make sure the tools are available from a dos box, by adding the directory they are in to the search path. @@ -377,16 +384,18 @@ Here is what is required: using WinZip -- as mentioned at the beginning of this list of steps. -
    • Since Doxygen-1.2.2-20001015, the distribution includes the part - of Qt-2.x.x that is needed for compilation of doxygen, doxytag, - and doxysearch. The missing files for Windows were also created. - This allows compilation of doxygen on systems without X11 or the - full Qt. For doxywizard Qt-2.2 is still required however. - - You may be interested in the professional license of - Qt for Windows - \latexonly\par (see - {\tt http://www.trolltech.com/products/qt.html})\endlatexonly. +
    • From Doxygen-1.2.2-20001015 onwards, the distribution includes the part + of Qt-2.x.x that is needed for to compile doxygen, doxytag, + and doxysearch. The Windows specific part were also created. + As a result doxygen can be compiled on systems without X11 or the + commerical version of Qt. + + For doxywizard, a complete Qt library this is + still a requirement however. You may be interested in the professional + license of Qt for + Windows \latexonly\par (see + {\tt http://www.trolltech.com/products/qt.html})\endlatexonly. If you + donate me a professional license I'll port doxywizard for you :-)
    • To generate LaTeX documentation or formulas in HTML you need the tools: latex, dvips and gswin32. diff --git a/doc/language.doc b/doc/language.doc index 595fa4e..d7b3a53 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -148,11 +148,11 @@ Here is a list of the languages and their current maintainers: Russian - Andrey V. Stolyarov + Alexandr Chelpanov - - crocodil@NOSPAM.croco.net + + cav@NOSPAM.cryptopro.ru @@ -246,7 +246,7 @@ Here is a list of the languages and their current maintainers: \hline Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} \\ \hline - Russian & Andrey V. Stolyarov & {\tt crocodil@croco.net} \\ + Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} \\ \hline Korean & Richard Kim & {\tt ryk@dspwiz.com} \\ \hline diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index b5921f2..803b24c 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,8 +1,8 @@ Name: doxygen -Version: 1.2.6_20010409 +Version: 1.2.6_20010422 Summary: documentation system for C, C++ and IDL -Release: 1 -Source0: doxygen_%{version}.src.tar.gz +Release: 2 +Source: doxygen_%{version}.src.tar.gz Copyright: GPL Group: unsorted @@ -13,43 +13,54 @@ BuildRoot: /var/tmp/doxygen_%{version}.root # requires Perl for tmake (Troll's make) BuildPrereq: perl tetex -%define prefix /usr - %description +Doxygen is a documentation system for C and C++. It can generate an +on-line class browser (in HTML) and/or an off-line reference manual +(in LaTeX) from a set of documented source files. The documentation is +extracted directly from the sources. Doxygen is developed on a Linux +platform, but it runs on most other UNIX flavors as well. An +executable for Windows 95/NT is also available. +Author: +-------- + Dimitri van Heesch -%prep -%setup -n doxygen-%{version} +%description -l de +Doxygen ist ein Dokumentationssystem fЭr C und C++. Es kann eine +KlassenЭbersicht (in HTML) und/oder eine Referenz (in LaTeX) aus +dokumentierten Quelldateien erzeugen. Die Dokumentation wird direkt aus +den Quellen extrahiert. Doxygen wird auf einer Linux-Plattform +entwickelt, funktioniert aber genauso auf den meisten andern Unix +Dialekten. Das Programm ist auch fЭr Windows 95/NT erhДltlich. +Author: +-------- + Dimitri van Heesch +%prep +%setup -n doxygen-%{version} %build -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix %{prefix} --with-doxywizard +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix /do_we_need_this_usr --with-doxywizard make %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{prefix}/usr - -# install -make INSTALL=$RPM_BUILD_ROOT%{prefix} install -( cd $RPM_BUILD_ROOT - mkdir -p ./usr/doc/packages - mv .%{prefix}/doc/doxygen ./usr/doc/packages/doxygen - mv .%{prefix}/doc/doxysearch ./usr/doc/packages/doxysearch - mv .%{prefix}/doc/doxytag ./usr/doc/packages/doxytag - mv .%{prefix}/doc/doxywizard ./usr/doc/packages/doxywizard -) +make install INSTALL=$RPM_BUILD_ROOT/usr DOCDIR=$RPM_BUILD_ROOT%{_docdir}/doxygen +install -m 644 LICENSE LANGUAGE.HOWTO PLATFORMS README VERSION $RPM_BUILD_ROOT%{_docdir}/doxygen %files %defattr(-,root,root) -%{prefix}/bin -# %doc LANGUAGE.HOWTO LICENSE PLATFORMS VERSION README -%doc %{prefix}/doc/packages/doxygen +%attr(755,root,root) /usr/bin/* +%doc %{_docdir}/doxygen %clean rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 16 2001 Jens Seidel + - new decription (english, german) + - use of %{_docdir} + - added README, LICENSE, ... to install section * Mon Mar 13 2000 Matthias Andree - inital version build with rpmify diff --git a/qtools/Makefile.in b/qtools/Makefile.in index 26a8e9c..78710fd 100644 --- a/qtools/Makefile.in +++ b/qtools/Makefile.in @@ -1,5 +1,5 @@ # -# $Id$ +# # # Copyright (C) 1997-2000 by Dimitri van Heesch. # diff --git a/qtools/qarray.h b/qtools/qarray.h index 5fb6bf7..90dcbb7 100644 --- a/qtools/qarray.h +++ b/qtools/qarray.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QArray template/macro class ** diff --git a/qtools/qasciidict.h b/qtools/qasciidict.h index 23b85e5..3f2deaf 100644 --- a/qtools/qasciidict.h +++ b/qtools/qasciidict.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QAsciiDict template class ** diff --git a/qtools/qbuffer.cpp b/qtools/qbuffer.cpp index 59d20a2..beed0ba 100644 --- a/qtools/qbuffer.cpp +++ b/qtools/qbuffer.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QBuffer class ** diff --git a/qtools/qbuffer.h b/qtools/qbuffer.h index d3fdae1..9dcd286 100644 --- a/qtools/qbuffer.h +++ b/qtools/qbuffer.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QBuffer class ** diff --git a/qtools/qcollection.cpp b/qtools/qcollection.cpp index 21bf412..e70b64b 100644 --- a/qtools/qcollection.cpp +++ b/qtools/qcollection.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of base class for all collection classes ** diff --git a/qtools/qcollection.h b/qtools/qcollection.h index e672609..a169b7c 100644 --- a/qtools/qcollection.h +++ b/qtools/qcollection.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of base class for all collection classes ** diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index f128ae1..2d2e0c5 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of extended char array operations, and QByteArray and ** QCString classes diff --git a/qtools/qcstring.h b/qtools/qcstring.h index b9cad44..073a969 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of the extended char array operations, ** and QByteArray and QCString classes diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp index c586570..7f63cbf 100644 --- a/qtools/qdatastream.cpp +++ b/qtools/qdatastream.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QDataStream class ** diff --git a/qtools/qdatastream.h b/qtools/qdatastream.h index dafab36..3d18062 100644 --- a/qtools/qdatastream.h +++ b/qtools/qdatastream.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QDataStream class ** diff --git a/qtools/qdatetime.cpp b/qtools/qdatetime.cpp index 026387a..cecb855 100644 --- a/qtools/qdatetime.cpp +++ b/qtools/qdatetime.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of date and time classes ** diff --git a/qtools/qdatetime.h b/qtools/qdatetime.h index 820fde3..2479dbf 100644 --- a/qtools/qdatetime.h +++ b/qtools/qdatetime.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of date and time classes ** diff --git a/qtools/qdict.h b/qtools/qdict.h index fdd9366..3b70336 100644 --- a/qtools/qdict.h +++ b/qtools/qdict.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QDict template class ** diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp index b0d1c0d..ed7ed99 100644 --- a/qtools/qdir.cpp +++ b/qtools/qdir.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QDir class ** diff --git a/qtools/qdir.h b/qtools/qdir.h index 8fcadf5..dd74271 100644 --- a/qtools/qdir.h +++ b/qtools/qdir.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QDir class ** diff --git a/qtools/qdir_unix.cpp b/qtools/qdir_unix.cpp index 9ace60a..46a3b69 100644 --- a/qtools/qdir_unix.cpp +++ b/qtools/qdir_unix.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QDirclass ** diff --git a/qtools/qdir_win32.cpp b/qtools/qdir_win32.cpp index 832c86b..b1eee66 100644 --- a/qtools/qdir_win32.cpp +++ b/qtools/qdir_win32.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/qtools/qfeatures.h b/qtools/qfeatures.h index 9dc5107..84fa715 100644 --- a/qtools/qfeatures.h +++ b/qtools/qfeatures.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Global feature selection ** diff --git a/qtools/qfile.cpp b/qtools/qfile.cpp index 06300de..2222b5b 100644 --- a/qtools/qfile.cpp +++ b/qtools/qfile.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QFile class ** diff --git a/qtools/qfile.h b/qtools/qfile.h index e95cdf4..4ef0685 100644 --- a/qtools/qfile.h +++ b/qtools/qfile.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QFile class ** diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp index a1beb31..e074eed 100644 --- a/qtools/qfile_unix.cpp +++ b/qtools/qfile_unix.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QFileInfo class ** diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp index 12a0643..fd28d43 100644 --- a/qtools/qfile_win32.cpp +++ b/qtools/qfile_win32.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/qtools/qfiledefs_p.h b/qtools/qfiledefs_p.h index eeac5c5..4a1a154 100644 --- a/qtools/qfiledefs_p.h +++ b/qtools/qfiledefs_p.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Common macros and system include files for QFile, QFileInfo and QDir. ** diff --git a/qtools/qfileinfo.cpp b/qtools/qfileinfo.cpp index 7e30a9e..5053b76 100644 --- a/qtools/qfileinfo.cpp +++ b/qtools/qfileinfo.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QFileInfo class ** diff --git a/qtools/qfileinfo.h b/qtools/qfileinfo.h index 8543e1c..76ef8c2 100644 --- a/qtools/qfileinfo.h +++ b/qtools/qfileinfo.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QFileInfo class ** diff --git a/qtools/qfileinfo_unix.cpp b/qtools/qfileinfo_unix.cpp index fbeb363..5a8fe04 100644 --- a/qtools/qfileinfo_unix.cpp +++ b/qtools/qfileinfo_unix.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QFileInfo class ** diff --git a/qtools/qfileinfo_win32.cpp b/qtools/qfileinfo_win32.cpp index abb9b9d..bfcc6ac 100644 --- a/qtools/qfileinfo_win32.cpp +++ b/qtools/qfileinfo_win32.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2001 by Dimitri van Heesch. * diff --git a/qtools/qgarray.cpp b/qtools/qgarray.cpp index b20caee..efc9de0 100644 --- a/qtools/qgarray.cpp +++ b/qtools/qgarray.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QGArray class ** diff --git a/qtools/qgarray.h b/qtools/qgarray.h index 971d6bf..12c463b 100644 --- a/qtools/qgarray.h +++ b/qtools/qgarray.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QGArray class ** diff --git a/qtools/qgdict.cpp b/qtools/qgdict.cpp index 545628e..c3b2f74 100644 --- a/qtools/qgdict.cpp +++ b/qtools/qgdict.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QGDict and QGDictIterator classes ** diff --git a/qtools/qgdict.h b/qtools/qgdict.h index cc9e262..6243364 100644 --- a/qtools/qgdict.h +++ b/qtools/qgdict.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QGDict and QGDictIterator classes ** diff --git a/qtools/qgeneric.h b/qtools/qgeneric.h index 312cb30..c2892a0 100644 --- a/qtools/qgeneric.h +++ b/qtools/qgeneric.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Macros for pasting tokens; utilized by our generic classes ** diff --git a/qtools/qglist.cpp b/qtools/qglist.cpp index 0ffddf0..f464a73 100644 --- a/qtools/qglist.cpp +++ b/qtools/qglist.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QGList and QGListIterator classes ** diff --git a/qtools/qglist.h b/qtools/qglist.h index 6949aa3..f400b64 100644 --- a/qtools/qglist.h +++ b/qtools/qglist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QGList and QGListIterator classes ** diff --git a/qtools/qglobal.cpp b/qtools/qglobal.cpp index 95075a9..50f5202 100644 --- a/qtools/qglobal.cpp +++ b/qtools/qglobal.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Global functions ** diff --git a/qtools/qglobal.h b/qtools/qglobal.h index 7acd0de..9c2b53e 100644 --- a/qtools/qglobal.h +++ b/qtools/qglobal.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Global type declarations and definitions ** diff --git a/qtools/qgvector.cpp b/qtools/qgvector.cpp index a769a55..88409ce 100644 --- a/qtools/qgvector.cpp +++ b/qtools/qgvector.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QGVector class ** diff --git a/qtools/qgvector.h b/qtools/qgvector.h index b5fbde0..6a7999d 100644 --- a/qtools/qgvector.h +++ b/qtools/qgvector.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QGVector class ** diff --git a/qtools/qintdict.h b/qtools/qintdict.h index 52722ed..ddc5fdf 100644 --- a/qtools/qintdict.h +++ b/qtools/qintdict.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QIntDict template class ** diff --git a/qtools/qiodevice.cpp b/qtools/qiodevice.cpp index babe387..43b2787 100644 --- a/qtools/qiodevice.cpp +++ b/qtools/qiodevice.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QIODevice class ** diff --git a/qtools/qiodevice.h b/qtools/qiodevice.h index 6688bda..1c54217 100644 --- a/qtools/qiodevice.h +++ b/qtools/qiodevice.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QIODevice class ** diff --git a/qtools/qlist.h b/qtools/qlist.h index a7ad156..a4608fb 100644 --- a/qtools/qlist.h +++ b/qtools/qlist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QList template/macro class ** diff --git a/qtools/qmap.cpp b/qtools/qmap.cpp index 3f73f81..1d2510a 100644 --- a/qtools/qmap.cpp +++ b/qtools/qmap.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QMap ** diff --git a/qtools/qmap.h b/qtools/qmap.h index ecd355f..f384a3d 100644 --- a/qtools/qmap.h +++ b/qtools/qmap.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QMap class ** diff --git a/qtools/qptrdict.h b/qtools/qptrdict.h index 2ed1ef2..c075e30 100644 --- a/qtools/qptrdict.h +++ b/qtools/qptrdict.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QPtrDict template class ** diff --git a/qtools/qqueue.h b/qtools/qqueue.h index 36af518..94bc130 100644 --- a/qtools/qqueue.h +++ b/qtools/qqueue.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QQueue template/macro class ** diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp index 99189a6..671867e 100644 --- a/qtools/qregexp.cpp +++ b/qtools/qregexp.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QRegExp class ** diff --git a/qtools/qregexp.h b/qtools/qregexp.h index a66453c..25868ce 100644 --- a/qtools/qregexp.h +++ b/qtools/qregexp.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QRegExp class ** diff --git a/qtools/qshared.h b/qtools/qshared.h index 338029e..79fab7b 100644 --- a/qtools/qshared.h +++ b/qtools/qshared.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QShared struct ** diff --git a/qtools/qsortedlist.h b/qtools/qsortedlist.h index 7b90da6..aeadd90 100644 --- a/qtools/qsortedlist.h +++ b/qtools/qsortedlist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QList template/macro class ** diff --git a/qtools/qstack.h b/qtools/qstack.h index 47311a5..c23215c 100644 --- a/qtools/qstack.h +++ b/qtools/qstack.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QStack template/macro class ** diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp index b9530a6..e13ffc8 100644 --- a/qtools/qstring.cpp +++ b/qtools/qstring.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of the QString class and related Unicode functions ** diff --git a/qtools/qstring.h b/qtools/qstring.h index b574b05..f131446 100644 --- a/qtools/qstring.h +++ b/qtools/qstring.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of the QString class, and related Unicode ** functions. diff --git a/qtools/qstringlist.cpp b/qtools/qstringlist.cpp index d923f23..ff4f33e 100644 --- a/qtools/qstringlist.cpp +++ b/qtools/qstringlist.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QStringList ** diff --git a/qtools/qstringlist.h b/qtools/qstringlist.h index 04d11c6..03342c5 100644 --- a/qtools/qstringlist.h +++ b/qtools/qstringlist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QStringList class ** diff --git a/qtools/qstrlist.h b/qtools/qstrlist.h index abec631..c6a1864 100644 --- a/qtools/qstrlist.h +++ b/qtools/qstrlist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QStrList, QStrIList and QStrListIterator classes ** diff --git a/qtools/qstrvec.h b/qtools/qstrvec.h index 31d7d89..15d3abb 100644 --- a/qtools/qstrvec.h +++ b/qtools/qstrvec.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QStrVec and QStrIVec classes ** diff --git a/qtools/qtextcodec.cpp b/qtools/qtextcodec.cpp index b55345e..cdecfce 100644 --- a/qtools/qtextcodec.cpp +++ b/qtools/qtextcodec.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QTextCodec class ** diff --git a/qtools/qtextcodec.h b/qtools/qtextcodec.h index 9d5783f..18ece20 100644 --- a/qtools/qtextcodec.h +++ b/qtools/qtextcodec.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QTextCodec class ** diff --git a/qtools/qtextstream.cpp b/qtools/qtextstream.cpp index ae794df..6686f81 100644 --- a/qtools/qtextstream.cpp +++ b/qtools/qtextstream.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QTextStream class ** diff --git a/qtools/qtextstream.h b/qtools/qtextstream.h index 357447d..c5f5ba1 100644 --- a/qtools/qtextstream.h +++ b/qtools/qtextstream.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QTextStream class ** diff --git a/qtools/qtl.h b/qtools/qtl.h index ed1fe40..bd72e7d 100644 --- a/qtools/qtl.h +++ b/qtools/qtl.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of Qt template library classes ** diff --git a/qtools/qvaluelist.h b/qtools/qvaluelist.h index 246df84..a1014ed 100644 --- a/qtools/qvaluelist.h +++ b/qtools/qvaluelist.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QValueList class ** diff --git a/qtools/qvaluestack.h b/qtools/qvaluestack.h index e38edb2..9728d6c 100644 --- a/qtools/qvaluestack.h +++ b/qtools/qvaluestack.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QValueStack class ** diff --git a/qtools/qvector.h b/qtools/qvector.h index 9dd970c..36f0be7 100644 --- a/qtools/qvector.h +++ b/qtools/qvector.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QVector template/macro class ** diff --git a/qtools/qxml.cpp b/qtools/qxml.cpp index f437783..11a9b01 100644 --- a/qtools/qxml.cpp +++ b/qtools/qxml.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Implementation of QXmlSimpleReader and related classes. ** diff --git a/qtools/qxml.h b/qtools/qxml.h index 98d6641..ce40e5f 100644 --- a/qtools/qxml.h +++ b/qtools/qxml.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id$ +** ** ** Definition of QXmlSimpleReader and related classes. ** diff --git a/src/classdef.cpp b/src/classdef.cpp index f477cb1..743ff4f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -150,58 +150,31 @@ void ClassDef::insertSubClass(ClassDef *cd,Protection p, inheritedBy->inSort(new BaseClassDef(cd,0,p,s,t)); } -void ClassDef::addMemberListToGroup(MemberList *ml) -{ - MemberListIterator mli(*ml); - MemberDef *md; - for (;(md=mli.current());++mli) - { - int groupId=md->getMemberGroupId(); - if (groupId!=-1) - { - QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId]; - QCString *pDocs = Doxygen::memberDocDict[groupId]; - if (pGrpHeader) - { - MemberGroup *mg = memberGroupDict->find(groupId); - if (mg==0) - { - mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); - memberGroupDict->insert(groupId,mg); - memberGroupList->append(mg); - } - mg->insertMember(md); - md->setMemberGroup(mg); - } - } - } -} - void ClassDef::addMembersToMemberGroup() { - addMemberListToGroup(&pubTypes); - addMemberListToGroup(&pubMembers); - addMemberListToGroup(&pubAttribs); - addMemberListToGroup(&pubSlots); - addMemberListToGroup(&signals); - addMemberListToGroup(&dcopMethods); - addMemberListToGroup(&pubStaticMembers); - addMemberListToGroup(&pubStaticAttribs); - addMemberListToGroup(&proTypes); - addMemberListToGroup(&proMembers); - addMemberListToGroup(&proAttribs); - addMemberListToGroup(&proSlots); - addMemberListToGroup(&proStaticMembers); - addMemberListToGroup(&proStaticAttribs); - addMemberListToGroup(&priTypes); - addMemberListToGroup(&priMembers); - addMemberListToGroup(&priAttribs); - addMemberListToGroup(&priSlots); - addMemberListToGroup(&priStaticMembers); - addMemberListToGroup(&priStaticAttribs); - addMemberListToGroup(&friends); - addMemberListToGroup(&related); - addMemberListToGroup(&properties); + ::addMembersToMemberGroup(&pubTypes,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&pubMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&pubAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&pubSlots,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&signals,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&dcopMethods,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&pubStaticMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&pubStaticAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proTypes,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proSlots,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proStaticMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&proStaticAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priTypes,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priSlots,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priStaticMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&priStaticAttribs,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&friends,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&related,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&properties,memberGroupDict,memberGroupList); } // adds new member definition to the class @@ -1037,85 +1010,26 @@ void ClassDef::writeDocumentation(OutputList &ol) writeTemplateSpec(ol,outerTempArgList,pageType,name()); } - typedefMembers.countDocMembers(); - if (typedefMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trMemberTypedefDocumentation()); - ol.endGroupHeader(); - typedefMembers.writeDocumentation(ol,name(),this); - } + typedefMembers.writeDocumentation(ol,name(),this, + theTranslator->trMemberTypedefDocumentation()); - enumMembers.countDocMembers(); - if (enumMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trMemberEnumerationDocumentation()); - ol.endGroupHeader(); - enumMembers.writeDocumentation(ol,name(),this); - } + enumMembers.writeDocumentation(ol,name(),this, + theTranslator->trMemberEnumerationDocumentation()); - //enumValMembers.countDocMembers(); - //if (enumValMembers.totalCount()>0) - //{ - // ol.writeRuler(); - // ol.startGroupHeader(); - // parseText(ol,theTranslator->trEnumerationValueDocumentation()); - // ol.endGroupHeader(); - // enumValMembers.writeDocumentation(ol,name()); - //} - - constructors.countDocMembers(); - if (constructors.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trConstructorDocumentation()); - ol.endGroupHeader(); - constructors.writeDocumentation(ol,name(),this); - } + constructors.writeDocumentation(ol,name(),this, + theTranslator->trConstructorDocumentation()); - functionMembers.countDocMembers(); - if (functionMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trMemberFunctionDocumentation()); - ol.endGroupHeader(); - functionMembers.writeDocumentation(ol,name(),this); - } + functionMembers.writeDocumentation(ol,name(),this, + theTranslator->trMemberFunctionDocumentation()); - relatedMembers.countDocMembers(); - if (relatedMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trRelatedFunctionDocumentation()); - ol.endGroupHeader(); - relatedMembers.writeDocumentation(ol,name(),this); - } + relatedMembers.writeDocumentation(ol,name(),this, + theTranslator->trRelatedFunctionDocumentation()); - variableMembers.countDocMembers(); - if (variableMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trMemberDataDocumentation()); - ol.endGroupHeader(); - variableMembers.writeDocumentation(ol,name(),this); - } + variableMembers.writeDocumentation(ol,name(),this, + theTranslator->trMemberDataDocumentation()); - propertyMembers.countDocMembers(); - if (propertyMembers.totalCount()>0) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trPropertyDocumentation()); - ol.endGroupHeader(); - propertyMembers.writeDocumentation(ol,name(),this); - } + propertyMembers.writeDocumentation(ol,name(),this, + theTranslator->trPropertyDocumentation()); ol.startTextBlock(); @@ -1398,13 +1312,16 @@ bool ClassDef::hasNonReferenceSuperClass() return found; } +/*! called from MemberDef::writeDeclaration() to (recusively) write the + * definition of an annonymous struct, union or class. + */ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) { //ol.insertMemberAlign(); //printf("ClassName=`%s' inGroup=%d\n",name().data(),inGroup); - if (inGroup && md && md->getClassDef()==this) return; - + //if (inGroup && md && md->getClassDef()==this) return; + ol.docify(compoundTypeString()); int ri=name().findRev("::"); if (ri==-1) ri=name().length(); @@ -1417,45 +1334,64 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ol.docify(" {"); ol.endMemberItem(FALSE); - // insert members of this class - if (inGroup) + // write user defined member groups + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) { - MemberGroupListIterator mgli(*memberGroupList); - MemberGroup *mg; - for (;(mg=mgli.current());++mgli) - { - mg->writePlainDeclarations(ol,this,0,0,0); - } + mg->setInGroup(inGroup); + mg->writePlainDeclarations(ol,this,0,0,0); } - else + + pubTypes.setInGroup(inGroup); + pubTypes.writePlainDeclarations(ol,this,0,0,0); + pubMembers.setInGroup(inGroup); + pubMembers.writePlainDeclarations(ol,this,0,0,0); + pubAttribs.setInGroup(inGroup); + pubAttribs.writePlainDeclarations(ol,this,0,0,0); + pubSlots.setInGroup(inGroup); + pubSlots.writePlainDeclarations(ol,this,0,0,0); + signals.setInGroup(inGroup); + signals.writePlainDeclarations(ol,this,0,0,0); + dcopMethods.setInGroup(inGroup); + dcopMethods.writePlainDeclarations(ol,this,0,0,0); + properties.setInGroup(inGroup); + properties.writePlainDeclarations(ol,this,0,0,0); + pubStaticMembers.setInGroup(inGroup); + pubStaticMembers.writePlainDeclarations(ol,this,0,0,0); + pubStaticAttribs.setInGroup(inGroup); + pubStaticAttribs.writePlainDeclarations(ol,this,0,0,0); + proTypes.setInGroup(inGroup); + proTypes.writePlainDeclarations(ol,this,0,0,0); + proMembers.setInGroup(inGroup); + proMembers.writePlainDeclarations(ol,this,0,0,0); + proAttribs.setInGroup(inGroup); + proAttribs.writePlainDeclarations(ol,this,0,0,0); + proSlots.setInGroup(inGroup); + proSlots.writePlainDeclarations(ol,this,0,0,0); + proStaticMembers.setInGroup(inGroup); + proStaticMembers.writePlainDeclarations(ol,this,0,0,0); + proStaticAttribs.setInGroup(inGroup); + proStaticAttribs.writePlainDeclarations(ol,this,0,0,0); + if (Config_getBool("EXTRACT_PRIVATE")) { - pubTypes.writePlainDeclarations(ol,this,0,0,0); - pubMembers.writePlainDeclarations(ol,this,0,0,0); - pubAttribs.writePlainDeclarations(ol,this,0,0,0); - pubSlots.writePlainDeclarations(ol,this,0,0,0); - signals.writePlainDeclarations(ol,this,0,0,0); - dcopMethods.writePlainDeclarations(ol,this,0,0,0); - properties.writePlainDeclarations(ol,this,0,0,0); - pubStaticMembers.writePlainDeclarations(ol,this,0,0,0); - pubStaticAttribs.writePlainDeclarations(ol,this,0,0,0); - proTypes.writePlainDeclarations(ol,this,0,0,0); - proMembers.writePlainDeclarations(ol,this,0,0,0); - proAttribs.writePlainDeclarations(ol,this,0,0,0); - proSlots.writePlainDeclarations(ol,this,0,0,0); - proStaticMembers.writePlainDeclarations(ol,this,0,0,0); - proStaticAttribs.writePlainDeclarations(ol,this,0,0,0); - if (Config_getBool("EXTRACT_PRIVATE")) - { - priTypes.writePlainDeclarations(ol,this,0,0,0); - priMembers.writePlainDeclarations(ol,this,0,0,0); - priAttribs.writePlainDeclarations(ol,this,0,0,0); - priSlots.writePlainDeclarations(ol,this,0,0,0); - priStaticMembers.writePlainDeclarations(ol,this,0,0,0); - priStaticAttribs.writePlainDeclarations(ol,this,0,0,0); - } - friends.writePlainDeclarations(ol,this,0,0,0); - related.writePlainDeclarations(ol,this,0,0,0); + priTypes.setInGroup(inGroup); + priTypes.writePlainDeclarations(ol,this,0,0,0); + priMembers.setInGroup(inGroup); + priMembers.writePlainDeclarations(ol,this,0,0,0); + priAttribs.setInGroup(inGroup); + priAttribs.writePlainDeclarations(ol,this,0,0,0); + priSlots.setInGroup(inGroup); + priSlots.writePlainDeclarations(ol,this,0,0,0); + priStaticMembers.setInGroup(inGroup); + priStaticMembers.writePlainDeclarations(ol,this,0,0,0); + priStaticAttribs.setInGroup(inGroup); + priStaticAttribs.writePlainDeclarations(ol,this,0,0,0); } + friends.setInGroup(inGroup); + friends.writePlainDeclarations(ol,this,0,0,0); + related.setInGroup(inGroup); + related.writePlainDeclarations(ol,this,0,0,0); } /*! a link to this class is possible within this project */ @@ -1478,6 +1414,11 @@ bool ClassDef::isVisibleInHierarchy() (hasDocumentation() || !Config_getBool("HIDE_UNDOC_CLASSES") || isReference()); } +bool ClassDef::hasDocumentation() const +{ + return Definition::hasDocumentation(); +} + //---------------------------------------------------------------------- // recursive function: // returns TRUE iff class definition `bcd' represents an (in)direct base diff --git a/src/classdef.h b/src/classdef.h index 2270d31..63dabd9 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -70,6 +70,8 @@ class ClassDef : public Definition QCString getFileBase() const; QCString getSourceFileBase() const; + bool hasDocumentation() const; + /*! Returns the name as it is appears in the documentation */ QCString displayName() const; @@ -247,7 +249,6 @@ class ClassDef : public Definition protected: void addUsedInterfaceClasses(MemberDef *md,const char *typeStr); - void addMemberListToGroup(MemberList *); bool hasExamples(); bool hasNonReferenceSuperClass(); diff --git a/src/definition.cpp b/src/definition.cpp index 78c2ded..1beeba9 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -400,7 +400,7 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) ol.popGeneratorState(); } -bool Definition::hasDocumentation() +bool Definition::hasDocumentation() const { return !doc.isEmpty() || // has detailed docs !brief.isEmpty() || // has brief description diff --git a/src/definition.h b/src/definition.h index 7353e38..2018525 100644 --- a/src/definition.h +++ b/src/definition.h @@ -73,7 +73,7 @@ class Definition */ void setBriefDescription(const char *b); /*! Returns TRUE iff the definition is documented */ - virtual bool hasDocumentation(); + virtual bool hasDocumentation() const; virtual bool isLinkableInProject() = 0; virtual bool isLinkable() = 0; diff --git a/src/doc.l b/src/doc.l index 8bbf7a4..2f6dc97 100644 --- a/src/doc.l +++ b/src/doc.l @@ -1841,21 +1841,49 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } {ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? { - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } BEGIN(DocScan); } {SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" { - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } BEGIN(DocScan); } {SCOPEMASK}("()")? { - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } BEGIN(DocScan); } ({SCOPEMASK}"::")?"operator"{OPMASK} { QCString oName=yytext; - generateRef(*outDoc,className, - removeRedundantWhiteSpace(oName),inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className, + removeRedundantWhiteSpace(oName),inSeeBlock); + } + else + { + outDoc->docify(yytext); + } BEGIN(DocScan); } ("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->startHtmlLink(yytext); @@ -1864,10 +1892,24 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } [a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } {FILESCHAR}*{FILEECHAR}+/".\\n" { // special exception that is otherwise matches by FILEMASK - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } } {FILEMASK} { - generateFileRef(*outDoc,yytext); + if (!insideHtmlLink) + { + generateFileRef(*outDoc,yytext); + } + else + { + outDoc->docify(yytext); + } } {BN}*{CMD}"endcode"/[^a-z_A-Z0-9] { // needed to match things like \endcode. (note the dot) parseCode(*outDoc,className,codeBlock,exampleDoc,exampleName); @@ -2156,55 +2198,118 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } {FILEMASK} { outDoc->startEmphasis(); - generateFileRef(*outDoc,yytext); + if (!insideHtmlLink) + { + generateFileRef(*outDoc,yytext); + } + else + { + outDoc->docify(yytext); + } outDoc->endEmphasis(); BEGIN( DocScan ); } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startEmphasis(); - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } outDoc->endEmphasis(); BEGIN( DocScan ); } {WORD} { outDoc->startEmphasis(); - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + if (!insideHtmlLink) + { + linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + } + else + { + outDoc->docify(yytext); + } outDoc->endEmphasis(); BEGIN( DocScan ); } {FILEMASK} { outDoc->startBold(); - generateFileRef(*outDoc,yytext); + if (!insideHtmlLink) + { + generateFileRef(*outDoc,yytext); + } + else + { + outDoc->docify(yytext); + } outDoc->endBold(); BEGIN( DocScan ); } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startBold(); - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } outDoc->endBold(); BEGIN( DocScan ); } {WORD} { outDoc->startBold(); - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + if (!insideHtmlLink) + { + linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + } + else + { + outDoc->docify(yytext); + } outDoc->endBold(); BEGIN( DocScan ); } {FILEMASK} { outDoc->startTypewriter(); - generateFileRef(*outDoc,yytext); + if (!insideHtmlLink) + { + generateFileRef(*outDoc,yytext); + } + else + { + outDoc->docify(yytext); + } outDoc->endTypewriter(); BEGIN( DocScan ); } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()!\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startTypewriter(); - generateRef(*outDoc,className,yytext,inSeeBlock); + if (!insideHtmlLink) + { + generateRef(*outDoc,className,yytext,inSeeBlock); + } + else + { + outDoc->docify(yytext); + } outDoc->endTypewriter(); BEGIN( DocScan ); } {WORD} { outDoc->startTypewriter(); - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + if (!insideHtmlLink) + { + linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,FALSE); + } + else + { + outDoc->docify(yytext); + } outDoc->endTypewriter(); BEGIN( DocScan ); } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 18610ac..73c765c 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -599,7 +599,7 @@ static bool addNamespace(Entry *root,ClassDef *cd) { NamespaceDef *nd=0; //printf("addNameSpace() trying: %s\n",e->name.data()); - QCString nsName = stripAnnonymousNamespaceScope(e->name); + QCString nsName = stripAnonymousNamespaceScope(e->name); if (!nsName.isEmpty() && nsName.at(0)!='@' && (nd=getResolvedNamespace(nsName)) ) @@ -637,7 +637,7 @@ static void buildClassList(Entry *root) } else { - fullName=stripAnnonymousNamespaceScope(fullName); + fullName=stripAnonymousNamespaceScope(fullName); Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data()); bool ambig; @@ -825,7 +825,7 @@ static void buildNamespaceList(Entry *root) !root->name.isEmpty() ) { - QCString fullName=stripAnnonymousNamespaceScope(root->name.copy()); + QCString fullName=stripAnonymousNamespaceScope(root->name.copy()); if (!fullName.isEmpty()) { //printf("Found namespace %s in %s at line %d\n",root->name.data(), @@ -1199,13 +1199,14 @@ static MemberDef *addVariableToClass( md->setDefinition(def); md->setBitfields(root->bitfields); md->addSectionsToDefinition(root->anchors); - md->setFromAnnonymousScope(fromAnnScope); - md->setFromAnnonymousMember(fromAnnMemb); + md->setFromAnonymousScope(fromAnnScope); + md->setFromAnonymousMember(fromAnnMemb); md->setIndentDepth(indentDepth); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setInitializer(root->initializer); md->setMaxInitLines(root->initLines); md->setMemberGroupId(root->mGrpId); + addMemberToGroups(root,md); //if (root->mGrpId!=-1) //{ // printf("memberdef %s in memberGroup %d\n",name.data(),root->mGrpId); @@ -1356,8 +1357,8 @@ static MemberDef *addVariableToFile( md->setDocumentation(root->doc); md->setBriefDescription(root->brief); md->addSectionsToDefinition(root->anchors); - md->setFromAnnonymousScope(fromAnnScope); - md->setFromAnnonymousMember(fromAnnMemb); + md->setFromAnonymousScope(fromAnnScope); + md->setFromAnonymousMember(fromAnnMemb); md->setIndentDepth(indentDepth); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setInitializer(root->initializer); @@ -1366,6 +1367,7 @@ static MemberDef *addVariableToFile( md->setBodyDef(fd); md->setDefinition(def); md->setExplicitExternal(root->explicitExternal); + addMemberToGroups(root,md); //if (root->mGrpId!=-1) //{ // md->setMemberGroup(memberGroupDict[root->mGrpId]); @@ -1535,7 +1537,7 @@ void buildVarList(Entry *root) else mtype=MemberDef::Variable; - QCString classScope=stripAnnonymousNamespaceScope(scope); + QCString classScope=stripAnonymousNamespaceScope(scope); QCString annScopePrefix=scope.left(scope.length()-classScope.length()); scope=classScope; if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope))) @@ -1639,7 +1641,7 @@ static void buildMemberList(Entry *root) //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=stripAnnonymousNamespaceScope(root->parent->name.copy()); + QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy()); bool isMember=FALSE; int memIndex=rname.find("::"); @@ -2475,7 +2477,7 @@ static void computeClassRelations(Entry *root) { ClassDef *cd; // strip any annonymous scopes first - QCString bName=stripAnnonymousNamespaceScope(root->name); + QCString bName=stripAnonymousNamespaceScope(root->name); Debug::print(Debug::Classes,0," Class %s : \n",bName.data()); if ((cd=getClass(bName))) { @@ -3201,7 +3203,7 @@ static void findMember(Entry *root, Entry *p=root->parent; while (p) // get full scope as class name { - QCString sc = stripAnnonymousNamespaceScope(p->name); + QCString sc = stripAnonymousNamespaceScope(p->name); if ((p->section & Entry::SCOPE_MASK) && !sc.isEmpty() && sc[0]!='@' ) diff --git a/src/filedef.cpp b/src/filedef.cpp index 741c76d..e2fcb76 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -114,7 +114,7 @@ void FileDef::writeDocumentation(OutputList &ol) // fn.prepend(stripFromPath(getPath().copy())); //} - //printf("WriteDocumentation %p diskname=%s\n",this,diskname.data()); + //printf("WriteDocumentation diskname=%s\n",diskname.data()); QCString pageTitle=name()+" File Reference"; startFile(ol,getOutputFileBase(),pageTitle); @@ -311,7 +311,13 @@ void FileDef::writeDocumentation(OutputList &ol) } } - allMemberList.writeDeclarations(ol,0,0,this,0,0,0); + //allMemberList.writeDeclarations(ol,0,0,this,0,0,0); + decDefineMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trDefines(),0); + decProtoMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trFuncProtos(),0); + decTypedefMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trTypedefs(),0); + decEnumMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trEnumerations(),0); + decFuncMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trFunctions(),0); + decVarMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trVariables(),0); ol.endMemberSections(); //doc=doc.stripWhiteSpace(); @@ -366,65 +372,23 @@ void FileDef::writeDocumentation(OutputList &ol) } } - defineMembers.countDocMembers(); - if (defineMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trDefineDocumentation()); - ol.endGroupHeader(); - defineMembers.writeDocumentation(ol,name(),this); - } + docDefineMembers.writeDocumentation(ol,name(),this, + theTranslator->trDefineDocumentation()); - protoMembers.countDocMembers(); - if (protoMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); - ol.endGroupHeader(); - protoMembers.writeDocumentation(ol,name(),this); - } + docProtoMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionPrototypeDocumentation()); - typedefMembers.countDocMembers(); - if (typedefMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trTypedefDocumentation()); - ol.endGroupHeader(); - typedefMembers.writeDocumentation(ol,name(),this); - } + docTypedefMembers.writeDocumentation(ol,name(),this, + theTranslator->trTypedefDocumentation()); - enumMembers.countDocMembers(); - if (enumMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trEnumerationTypeDocumentation()); - ol.endGroupHeader(); - enumMembers.writeDocumentation(ol,name(),this); - } + docEnumMembers.writeDocumentation(ol,name(),this, + theTranslator->trEnumerationTypeDocumentation()); - funcMembers.countDocMembers(); - if (funcMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionDocumentation()); - ol.endGroupHeader(); - funcMembers.writeDocumentation(ol,name(),this); - } + docFuncMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionDocumentation()); - varMembers.countDocMembers(); - if (varMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trVariableDocumentation()); - ol.endGroupHeader(); - varMembers.writeDocumentation(ol,name(),this); - } + docVarMembers.writeDocumentation(ol,name(),this, + theTranslator->trVariableDocumentation()); // write Author section (Man only) ol.disableAllBut(OutputGenerator::Man); @@ -470,6 +434,7 @@ void FileDef::writeSource(OutputList &ol) ol.enableAll(); } +#if 0 /*! Adds a member \a md to the member group with id \a groupId. */ void FileDef::addMemberListToGroup(MemberList *ml, @@ -501,15 +466,16 @@ void FileDef::addMemberListToGroup(MemberList *ml, } } } +#endif void FileDef::addMembersToMemberGroup() { - addMemberListToGroup(&allMemberList,&MemberDef::isDefine); - addMemberListToGroup(&allMemberList,&MemberDef::isTypedef); - addMemberListToGroup(&allMemberList,&MemberDef::isEnumerate); - addMemberListToGroup(&allMemberList,&MemberDef::isEnumValue); - addMemberListToGroup(&allMemberList,&MemberDef::isFunction); - addMemberListToGroup(&allMemberList,&MemberDef::isVariable); + ::addMembersToMemberGroup(&decDefineMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decProtoMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decTypedefMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decEnumMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decFuncMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decVarMembers,memberGroupDict,memberGroupList); } /*! Adds member definition \a md to the list of all members of this file */ @@ -521,45 +487,56 @@ void FileDef::insertMember(MemberDef *md) switch(md->memberType()) { case MemberDef::Variable: + case MemberDef::Property: + decVarMembers.append(md); if (sortMemberDocs) - varMembers.inSort(md); + docVarMembers.inSort(md); else - varMembers.append(md); + docVarMembers.append(md); break; case MemberDef::Function: + decFuncMembers.append(md); if (sortMemberDocs) - funcMembers.inSort(md); + docFuncMembers.inSort(md); else - funcMembers.append(md); + docFuncMembers.append(md); break; case MemberDef::Typedef: + decTypedefMembers.append(md); if (sortMemberDocs) - typedefMembers.inSort(md); + docTypedefMembers.inSort(md); else - typedefMembers.append(md); + docTypedefMembers.append(md); break; case MemberDef::Enumeration: + decEnumMembers.append(md); if (sortMemberDocs) - enumMembers.inSort(md); + docEnumMembers.inSort(md); else - enumMembers.append(md); + docEnumMembers.append(md); break; case MemberDef::EnumValue: // enum values are shown inside their enums break; case MemberDef::Prototype: + decProtoMembers.append(md); if (sortMemberDocs) - protoMembers.inSort(md); + docProtoMembers.inSort(md); else - protoMembers.append(md); + docProtoMembers.append(md); break; case MemberDef::Define: + decDefineMembers.append(md); if (sortMemberDocs) - defineMembers.inSort(md); + docDefineMembers.inSort(md); else - defineMembers.append(md); + docDefineMembers.append(md); break; default: - err("FileDef::insertMembers(): unexpected member insert in file!\n"); + err("FileDef::insertMembers(): " + "member `%s' with class scope `%s' inserted in file scope `%s'!\n", + md->name().data(), + md->getClassDef() ? md->getClassDef()->name().data() : "", + name().data()); } //addMemberToGroup(md,groupId); } diff --git a/src/filedef.h b/src/filedef.h index d042601..26a297d 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -149,15 +149,22 @@ class FileDef : public Definition //void generateXMLSection(QTextStream &t,MemberList *ml,const char *type); MemberList allMemberList; - MemberList defineMembers; - MemberList protoMembers; - MemberList typedefMembers; - MemberList enumMembers; - MemberList funcMembers; - MemberList varMembers; - - protected: - void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); + + // members in the declaration part of the documentation + MemberList decDefineMembers; + MemberList decProtoMembers; + MemberList decTypedefMembers; + MemberList decEnumMembers; + MemberList decFuncMembers; + MemberList decVarMembers; + + // members in the documentation part of the documentation + MemberList docDefineMembers; + MemberList docProtoMembers; + MemberList docTypedefMembers; + MemberList docEnumMembers; + MemberList docFuncMembers; + MemberList docVarMembers; private: diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 765c95f..ccb81de 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -56,6 +56,22 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : memberGroupList->setAutoDelete(TRUE); memberGroupDict = new MemberGroupDict(1009); + decDefineMembers.setInGroup(TRUE); + decProtoMembers.setInGroup(TRUE); + decTypedefMembers.setInGroup(TRUE); + decEnumMembers.setInGroup(TRUE); + decEnumValMembers.setInGroup(TRUE); + decFuncMembers.setInGroup(TRUE); + decVarMembers.setInGroup(TRUE); + + docDefineMembers.setInGroup(TRUE); + docProtoMembers.setInGroup(TRUE); + docTypedefMembers.setInGroup(TRUE); + docEnumMembers.setInGroup(TRUE); + docEnumValMembers.setInGroup(TRUE); + docFuncMembers.setInGroup(TRUE); + docVarMembers.setInGroup(TRUE); + visited = 0; } @@ -119,6 +135,7 @@ void GroupDef::addExample(const PageInfo *def) exampleDict->append(def->name,def); } +#if 0 void GroupDef::addMemberListToGroup(MemberList *ml, bool (MemberDef::*func)() const) { @@ -147,9 +164,12 @@ void GroupDef::addMemberListToGroup(MemberList *ml, } } } +#endif + void GroupDef::addMembersToMemberGroup() { +#if 0 addMemberListToGroup(allMemberList,&MemberDef::isDefine); addMemberListToGroup(allMemberList,&MemberDef::isTypedef); addMemberListToGroup(allMemberList,&MemberDef::isEnumerate); @@ -158,6 +178,23 @@ void GroupDef::addMembersToMemberGroup() addMemberListToGroup(allMemberList,&MemberDef::isSlot); addMemberListToGroup(allMemberList,&MemberDef::isSignal); addMemberListToGroup(allMemberList,&MemberDef::isVariable); +#endif + + ::addMembersToMemberGroup(&decDefineMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decProtoMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decTypedefMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decEnumMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decEnumValMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decFuncMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decVarMembers,memberGroupDict,memberGroupList); + + //printf("GroupDef::addMembersToMemberGroup() memberGroupList=%d\n",memberGroupList->count()); + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->setInGroup(TRUE); + } } @@ -189,49 +226,55 @@ void GroupDef::insertMember(MemberDef *md) switch(md->memberType()) { case MemberDef::Variable: + decVarMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - varMembers.inSort(md); + docVarMembers.inSort(md); else - varMembers.append(md); + docVarMembers.append(md); break; case MemberDef::Function: + decFuncMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - funcMembers.inSort(md); + docFuncMembers.inSort(md); else - funcMembers.append(md); + docFuncMembers.append(md); break; case MemberDef::Typedef: + decTypedefMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - typedefMembers.inSort(md); + docTypedefMembers.inSort(md); else - typedefMembers.append(md); + docTypedefMembers.append(md); break; case MemberDef::Enumeration: + decEnumMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - enumMembers.inSort(md); + docEnumMembers.inSort(md); else - enumMembers.append(md); + docEnumMembers.append(md); break; case MemberDef::EnumValue: - if (Config_getBool("SORT_MEMBER_DOCS")) - enumValMembers.inSort(md); - else - enumValMembers.append(md); break; case MemberDef::Prototype: + decProtoMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - protoMembers.inSort(md); + docProtoMembers.inSort(md); else - protoMembers.append(md); + docProtoMembers.append(md); break; case MemberDef::Define: + decDefineMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - defineMembers.inSort(md); + docDefineMembers.inSort(md); else - defineMembers.append(md); + docDefineMembers.append(md); break; default: - err("FileDef::insertMembers(): unexpected member insert in file!\n"); + err("GroupDef::insertMembers(): " + "member `%s' with class scope `%s' inserted in group scope `%s'!\n", + md->name().data(), + md->getClassDef() ? md->getClassDef()->name().data() : "", + name().data()); } //addMemberToGroup(md,groupId); } @@ -410,7 +453,13 @@ void GroupDef::writeDocumentation(OutputList &ol) mg->writeDeclarations(ol,0,0,0,this); } - allMemberList->writeDeclarations(ol,0,0,0,this,0,0); + //allMemberList->writeDeclarations(ol,0,0,0,this,0,0); + decDefineMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trDefines(),0); + decProtoMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trFuncProtos(),0); + decTypedefMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trTypedefs(),0); + decEnumMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trEnumerations(),0); + decFuncMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trFunctions(),0); + decVarMembers.writeDeclarations(ol,0,0,0,this,theTranslator->trVariables(),0); } ol.endMemberSections(); @@ -471,65 +520,23 @@ void GroupDef::writeDocumentation(OutputList &ol) } } - defineMembers.countDocMembers(TRUE); - if (defineMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trDefineDocumentation()); - ol.endGroupHeader(); - defineMembers.writeDocumentation(ol,name(),this); - } + docDefineMembers.writeDocumentation(ol,name(),this, + theTranslator->trDefineDocumentation()); - protoMembers.countDocMembers(TRUE); - if (protoMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); - ol.endGroupHeader(); - protoMembers.writeDocumentation(ol,name(),this); - } + docProtoMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionPrototypeDocumentation()); - typedefMembers.countDocMembers(TRUE); - if (typedefMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trTypedefDocumentation()); - ol.endGroupHeader(); - typedefMembers.writeDocumentation(ol,name(),this); - } + docTypedefMembers.writeDocumentation(ol,name(),this, + theTranslator->trTypedefDocumentation()); - enumMembers.countDocMembers(TRUE); - if (enumMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trEnumerationTypeDocumentation()); - ol.endGroupHeader(); - enumMembers.writeDocumentation(ol,name(),this); - } + docEnumMembers.writeDocumentation(ol,name(),this, + theTranslator->trEnumerationTypeDocumentation()); - funcMembers.countDocMembers(TRUE); - if (funcMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionDocumentation()); - ol.endGroupHeader(); - funcMembers.writeDocumentation(ol,name(),this); - } + docFuncMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionDocumentation()); - varMembers.countDocMembers(TRUE); - if (varMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trVariableDocumentation()); - ol.endGroupHeader(); - varMembers.writeDocumentation(ol,name(),this); - } + docVarMembers.writeDocumentation(ol,name(),this, + theTranslator->trVariableDocumentation()); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { diff --git a/src/groupdef.h b/src/groupdef.h index 8c586ba..e55c727 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -94,14 +94,23 @@ class GroupDef : public Definition MemberList *allMemberList; MemberNameInfoDict *allMemberNameInfoDict; - // members sorted by type - MemberList defineMembers; - MemberList protoMembers; - MemberList typedefMembers; - MemberList enumMembers; - MemberList enumValMembers; - MemberList funcMembers; - MemberList varMembers; + // members in the declaration part of the documentation + MemberList decDefineMembers; + MemberList decProtoMembers; + MemberList decTypedefMembers; + MemberList decEnumMembers; + MemberList decEnumValMembers; + MemberList decFuncMembers; + MemberList decVarMembers; + + // members in the documentation part of the documentation + MemberList docDefineMembers; + MemberList docProtoMembers; + MemberList docTypedefMembers; + MemberList docEnumMembers; + MemberList docEnumValMembers; + MemberList docFuncMembers; + MemberList docVarMembers; /* user defined member groups */ MemberGroupList *memberGroupList; // list of member groups in this group diff --git a/src/index.cpp b/src/index.cpp index d37bef6..f7aa869 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2239,13 +2239,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) }; MemInfo memberLists[] = { - MemInfo(&gd->defineMembers, theTranslator->trDefines()), - MemInfo(&gd->typedefMembers, theTranslator->trTypedefs()), - MemInfo(&gd->enumMembers, theTranslator->trEnumerations()), - MemInfo(&gd->enumValMembers, theTranslator->trEnumerationValues()), - MemInfo(&gd->funcMembers, theTranslator->trFunctions()), - MemInfo(&gd->varMembers, theTranslator->trVariables()), - MemInfo(&gd->protoMembers, theTranslator->trFuncProtos()), + MemInfo(&gd->docDefineMembers, theTranslator->trDefines()), + MemInfo(&gd->docTypedefMembers, theTranslator->trTypedefs()), + MemInfo(&gd->docEnumMembers, theTranslator->trEnumerations()), + MemInfo(&gd->docEnumValMembers, theTranslator->trEnumerationValues()), + MemInfo(&gd->docFuncMembers, theTranslator->trFunctions()), + MemInfo(&gd->docVarMembers, theTranslator->trVariables()), + MemInfo(&gd->docProtoMembers, theTranslator->trFuncProtos()), MemInfo(0,0) }; diff --git a/src/language.cpp b/src/language.cpp index 870a271..d8b2b86 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -61,10 +61,6 @@ bool setTranslator(const char *langName) } else if (L_EQUAL("czech")) { -#ifndef _WIN32 - err("Warning: The Czech translation uses the windows code page 1250 encoding.\n" - "Please convert translator_cz.h to ISO Latin-2 to use it under UNIX.\n"); -#endif theTranslator=new TranslatorCzech; } else if (L_EQUAL("french")) @@ -133,7 +129,7 @@ bool setTranslator(const char *langName) } else if (L_EQUAL("brazilian")) { - theTranslator=new TranslatorBrazilianPortuguese; + theTranslator=new TranslatorBrazilian; } #endif else // use the default language (i.e. english) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 9347c79..761845f 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -261,16 +261,6 @@ static void writeDefaultHeaderPart1(QTextStream &t) // The result of the LatexLanguageSupportCommand() // is empty, which means that the language prefers // the babel package, or no package is needed at all. - if (theTranslator->latexBabelPackage()=="russian") - { - // The russian babel package also needs an encoding. - // Assume the encoding matched the platform. -#if defined(_WIN32) - t << "\\usepackage[cp1251]{inputenc}\n"; -#else - t << "\\usepackage[koi8-r]{inputenc}\n"; -#endif - } t << "\\usepackage[" << theTranslator->latexBabelPackage() << "]{babel}\n"; } } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 9962576..75b5c21 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -182,7 +182,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, } } -static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE) +static void writeTemplatePrefix(OutputList &ol,ArgumentList *al) { ol.docify("template<"); Argument *a=al->first(); @@ -200,35 +200,29 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE) if (a) ol.docify(", "); } ol.docify("> "); - if (br) - { - // ol.pushGeneratorState(); - // ol.disable(OutputGenerator::Man); - // ol.disable(OutputGenerator::Latex); - // ol.lineBreak(); - // ol.popGeneratorState(); - } } //----------------------------------------------------------------------------- /*! Creates a new member definition. - * Members can be function/variables/enums/etc. inside a class or inside a - * file. * * \param df File containing the definition of this member. * \param dl Line at which the member definition was found. * \param t A string representing the type of the member. - * \param n A string representing the name of the member. + * \param na A string representing the name of the member. * \param a A string representing the arguments of the member. - * \param p The type of protection of the member, possible values are: + * \param e A string representing the throw clause of the members. + * \param p The protection context of the member, possible values are: * \c Public, \c Protected, \c Private. - * \param v The `virtualness' of the member, possible values are: + * \param v The degree of `virtualness' of the member, possible values are: * \c Normal, \c Virtual, \c Pure. - * \param s A boolean that is true if the member is static. - * \param r A boolean that is true if the member is only related. + * \param s A boolean that is true iff the member is static. + * \param r A boolean that is true iff the member is only related. * \param mt The kind of member. See #MemberDef::MemberType for a list of * all types. + * \param tal The template arguments of this member. + * \param al The arguments of this member. This is a structured form of + * the string past as argument \a a. */ MemberDef::MemberDef(const char *df,int dl, @@ -240,7 +234,6 @@ MemberDef::MemberDef(const char *df,int dl, //printf("++++++ MemberDef(%s file=%s,line=%d) ++++++ \n",na,df,dl); classDef=0; fileDef=0; - //fileDec=0; redefines=0; redefinedBy=0; nspace=0; @@ -268,7 +261,6 @@ MemberDef::MemberDef(const char *df,int dl, stat=s; mtype=mt; exception=e; - eUsed=FALSE; proto=FALSE; annScope=FALSE; memSpec=FALSE; @@ -319,6 +311,7 @@ MemberDef::MemberDef(const char *df,int dl, } } +/*! Destroys the member definition. */ MemberDef::~MemberDef() { delete redefinedBy; @@ -399,10 +392,6 @@ QCString MemberDef::getOutputFileBase() const { return fileDef->getOutputFileBase(); } - //else if (fileDec) - //{ - // return fileDec->getOutputFileBase(); - //} else if (nspace) { return nspace->getOutputFileBase(); @@ -454,7 +443,7 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, { Definition *d=0; if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; - if (d==0) { err("Member %s without group! Please report this bug!\n",name().data()); return; } + if (d==0) { err("Member %s without definition! Please report this bug!\n",name().data()); return; } if (group!=0 && gd==0) // forward link to the group { ol.writeObjectLink(group->getReference(),group->getOutputFileBase(),anchor(),name()); @@ -465,422 +454,435 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, } } - -void MemberDef::writeDeclaration(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup - ) +/*! If this member has an anonymous class/struct/union as its type, then + * this method will return the ClassDef that describes this return type. + */ +ClassDef *MemberDef::getClassDefOfAnonymousType(const char *scopeName) const { - int i,l; - bool hasDocs=hasDocumentation(); - //printf("%s MemberDef::writeDeclaration(): hasDocs %d\n",name().data(),hasDocs); - //if (cd) - //{ - // printf("MemberDef: %s in class %s annScope=%d annMemb=%p\n", - // name().data(),cd->name().data(),annScope,annMemb); - //} - - // hide members in anonymous scopes - // (they are displayed by there parent placeholder) - if (annScope) return; - // hide undocumented members unless overwritten by the configuration - if (!hasDocs && Config_getBool("HIDE_UNDOC_MEMBERS")) return; - // hide members with no detailed desciption and brief descriptions explicitly - // disabled. - if (Config_getBool("HIDE_UNDOC_MEMBERS") && documentation().isEmpty() && - !Config_getBool("BRIEF_MEMBER_DESC") && !Config_getBool("REPEAT_BRIEF") - ) return; - // hide static file & namespace members unless extract static is on - if (cd==0 && isStatic() && !Config_getBool("EXTRACT_STATIC")) return; - - // hide private member that are put into a member group. Non-grouped - // members are not rendered anyway. - //printf("md->name()=`%s' Protection=%d\n",name().data(),protection()); - if (inGroup && protection()==Private && !Config_getBool("EXTRACT_PRIVATE")) return; - - QCString ltype=type.copy(); + QCString cname=scopeName; + QCString ltype(type); // strip `static' keyword from ltype if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7); // strip `friend' keyword from ltype if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7); static QRegExp r("@[0-9]+"); - i=-1; - if ((ltype.isEmpty() || (i=r.match(ltype,0,&l))==-1) || !enumUsed()) + int l,i=r.match(ltype,0,&l); + // search for the last anonymous scope in the member type + ClassDef *annoClassDef=0; + if (i!=-1) // found anonymous scope in type { - - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + int il=i-1,ir=i+l; + // extract anonymous scope + while (il>=0 && (isId(ltype.at(il)) || ltype.at(il)==':' || ltype.at(il)=='@')) il--; + if (il>0) il++; + while (ir<(int)ltype.length() && (isId(ltype.at(ir)) || ltype.at(ir)==':' || ltype.at(ir)=='@')) ir++; + + //QCString annName = ltype.mid(i,l); + QCString annName = ltype.mid(il,ir-il); + + // if inside a class or namespace try to prepend the scope name + if (!cname.isEmpty() && annName.left(cname.length()+2)!=cname+"::") { - Doxygen::tagFile << " " << endl; - Doxygen::tagFile << " " << convertToXML(name()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(anchor()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(argsString()) << "" << endl; - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " " << endl; + QCString ts=stripAnonymousNamespaceScope(cname+"::"+annName); + //printf("Member::writeDeclaration: Trying %s\n",ts.data()); + annoClassDef=getClass(ts); } - - Definition *d=0; - ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something - if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; - QCString cname = d->name(); - QCString cfname = d->getOutputFileBase(); - - //int gId = inGroup ? -1 : groupId(); - //MemberGroup *mg = (gId!=prevGroupId && gId!=-1) ? memberGroupDict[gId] : 0; - //const char *gHeader = 0; - //const char *gFile = 0; - //if (mg) - //{ - // gHeader=mg->header(); - // gFile=mg->getOutputFileBase(); - //} - // - //if (!inGroup) - //{ - // if (prevGroupId==-1 && gId!=-1) - // { - // ol.memberGroupSpacing(FALSE); - // ol.memberGroupSeparator(); - // } - // else if (prevGroupId!=-1 && gId==-1) - // { - // ol.memberGroupSpacing(TRUE); - // ol.memberGroupSeparator(); - // } - // else if (prevGroupId!=-1 && gId!=-1 && prevGroupId!=gId) - // { - // ol.memberGroupSpacing(TRUE); - // ol.memberGroupSeparator(); - // } - //} - - HtmlHelp *htmlHelp=0; - bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); - if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); - - // search for the last anonymous scope in the member type - ClassDef *annoClassDef=0; - //while (i!=-1 && cname.find(ltype.mid(i,l))!=-1) - //{ - // i=r.match(ltype,i+l,&l); - //} - int il=i-1,ir=i+l; - if (i!=-1) // found anonymous scope in type + // if not found yet, try without scope name + if (annoClassDef==0) { - // extract anonymous scope - while (il>=0 && (isId(ltype.at(il)) || ltype.at(il)==':' || ltype.at(il)=='@')) il--; - if (il>0) il++; - while (ir<(int)ltype.length() && (isId(ltype.at(ir)) || ltype.at(ir)==':' || ltype.at(ir)=='@')) ir++; - - //QCString annName = ltype.mid(i,l); - QCString annName = ltype.mid(il,ir-il); - - // if inside a class or namespace try to prepend the scope name - if ((cd || nd) && annName.left(cname.length())!=cname) - { - QCString ts=stripAnnonymousNamespaceScope(cname+"::"+annName); - //printf("Member::writeDeclaration: Trying %s\n",ts.data()); - annoClassDef=getClass(ts); - } - // if not found yet, try without scope name - if (annoClassDef==0) - { - QCString ts=stripAnnonymousNamespaceScope(annName); - //printf("Member::writeDeclaration: Trying %s\n",ts.data()); - annoClassDef=getClass(ts); - } + QCString ts=stripAnonymousNamespaceScope(annName); + //printf("Member::writeDeclaration: Trying %s\n",ts.data()); + annoClassDef=getClass(ts); } + } + return annoClassDef; +} + +/*! This methods returns TRUE iff the brief section (also known as + * declaration section) is visible in the documentation. + */ +bool MemberDef::isBriefSectionVisible() const +{ + // only include static members with file/namespace scope if + // explicitly enabled in the config file + bool visibleIfStatic = !(getClassDef()==0 && + isStatic() && + !Config_getBool("EXTRACT_STATIC") + ); - // start a new member declaration - ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0); + // only include members is the are documented or + // HIDE_UNDOC_MEMBERS is NO in the config file + bool visibleIfDocumented = (!Config_getBool("HIDE_UNDOC_MEMBERS") || + hasDocumentation() + ); + + // hide members with no detailed desciption and brief descriptions + // explicitly disabled. + bool visibleIfEnabled = !(Config_getBool("HIDE_UNDOC_MEMBERS") && + documentation().isEmpty() && + !Config_getBool("BRIEF_MEMBER_DESC") && + !Config_getBool("REPEAT_BRIEF") + ); + + // only include members that are non-private unless EXTRACT_PRIVATE is + // set to YES or the member is part of a group + bool visibleIfPrivate = (protection()!=Private || + Config_getBool("EXTRACT_PRIVATE") + ); - // If there is no detailed description we need to write the anchor here. - bool detailsVisible = detailsAreVisible(); - if (!detailsVisible && !Config_getBool("EXTRACT_ALL") && !annMemb) - { - QCString doxyName=name().copy(); - if (!cname.isEmpty()) doxyName.prepend(cname+"::"); - ol.startDoxyAnchor(cfname,anchor(),doxyName); + return visibleIfStatic && visibleIfDocumented && + visibleIfEnabled && visibleIfPrivate && !annScope; +} - ol.addIndexItem(name(),cname); - ol.addIndexItem(cname,name()); +void MemberDef::writeDeclaration(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + bool inGroup + ) +{ + //printf("%s MemberDef::writeDeclaration()\n",name().data()); - if (hasHtmlHelp) - { - htmlHelp->addIndexItem(cname,name(),cfname,anchor()); - } - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Man); - ol.docify("\n"); - ol.popGeneratorState(); - } + // hide members whose brief section should not be visible + if (!isBriefSectionVisible()) return; - //printf("member name=%s indDepth=%d\n",name().data(),indDepth); - if (annoClassDef || annMemb) - { - int j; - for (j=0;jwriteDeclaration(ol,annMemb,inGroup); - ol.startMemberItem(2); - int j; - for (j=0;jenumDecl(); - linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.right(ltype.length()-i-l),TRUE); - } - else - { - ltype = ltype.left(i) + " { ... } " + ltype.right(ltype.length()-i-l); - linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE); - } - } + Doxygen::tagFile << "\" virtualness=\""; + if (virt==Virtual) Doxygen::tagFile << "virtual"; + else /* Pure */ Doxygen::tagFile << "pure"; } - else - { - linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE); - } - bool htmlOn = ol.isEnabled(OutputGenerator::Html); - if (htmlOn && Config_getBool("HTML_ALIGN_MEMBERS") && !ltype.isEmpty()) + if (isStatic()) { - ol.disable(OutputGenerator::Html); + Doxygen::tagFile << "\" static=\"yes"; } - if (!ltype.isEmpty()) ol.docify(" "); - if (htmlOn) + Doxygen::tagFile << "\">" << endl; + Doxygen::tagFile << " " << convertToXML(name()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(anchor()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(argsString()) << "" << endl; + writeDocAnchorsToTagFile(); + Doxygen::tagFile << " " << endl; + } + + Definition *d=0; + ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something + if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; + QCString cname = d->name(); + QCString cfname = d->getOutputFileBase(); + + HtmlHelp *htmlHelp=0; + bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); + if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); + + // search for the last anonymous scope in the member type + ClassDef *annoClassDef=getClassDefOfAnonymousType((cd||nd)?cname.data():0); + + // start a new member declaration + ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0); + + // If there is no detailed description we need to write the anchor here. + bool detailsVisible = isDetailedSectionVisible(); + if (!detailsVisible && !annMemb) + { + QCString doxyName=name().copy(); + if (!cname.isEmpty()) doxyName.prepend(cname+"::"); + ol.startDoxyAnchor(cfname,anchor(),doxyName); + + ol.addIndexItem(name(),cname); + ol.addIndexItem(cname,name()); + + if (hasHtmlHelp) { - ol.enable(OutputGenerator::Html); + htmlHelp->addIndexItem(cname,name(),cfname,anchor()); } + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + ol.docify("\n"); + ol.popGeneratorState(); + } - if (annMemb) + //printf("member name=%s indDepth=%d\n",name().data(),indDepth); + if (annoClassDef || annMemb) + { + int j; + for (j=0;jwriteDeclaration(ol,annMemb,inGroup); + ol.startMemberItem(2); + int j; + for (j=0;j>>>>> indDepth=%d ltype=`%s' varName=`%s'\n",indDepth,ltype.data(),varName.data()); + ol.docify("}"); + if (varName.isEmpty() && (name().isEmpty() || name().at(0)=='@')) + { + ol.docify(";"); + } + //else + //{ + // ol.docify(varName); + //} } - - // write name - if (!name().isEmpty() && name().at(0)!='@') + else { - if (isLinkable()) + if (getAnonymousEnumType()) // type is an anonymous enum { - if (annMemb) - { - //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor()); - annMemb->writeLink(ol, - annMemb->getClassDef(), - annMemb->getNamespaceDef(), - annMemb->getFileDef(), - annMemb->getGroupDef() - ); - annMemb->annUsed=annUsed=TRUE; - } - else - //printf("writeLink %s->%d\n",name.data(),hasDocumentation()); - writeLink(ol,cd,nd,fd,gd); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.left(i),TRUE); + ol+=*getAnonymousEnumType()->enumDecl(); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.right(ltype.length()-i-l),TRUE); } - else // there is a brief member description and brief member - // descriptions are enabled or there is no detailed description. + else { - if (annMemb) annMemb->annUsed=annUsed=TRUE; - ol.startBold(); - ol.docify(name()); - ol.endBold(); + ltype = ltype.left(i) + " { ... } " + ltype.right(ltype.length()-i-l); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE); } } + } + else + { + linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE); + } + bool htmlOn = ol.isEnabled(OutputGenerator::Html); + if (htmlOn && Config_getBool("HTML_ALIGN_MEMBERS") && !ltype.isEmpty()) + { + ol.disable(OutputGenerator::Html); + } + if (!ltype.isEmpty()) ol.docify(" "); + if (htmlOn) + { + ol.enable(OutputGenerator::Html); + } - // if member template specifiers are not part of the name, but they are - // present, we add them - //if (tArgList && !(name().find('<')!=-1 && name().find('>')!=-1) - // && cd && cd->templateArguments()) - //{ - // ol.docify(tempArgListToString(tArgList)); - //} + if (annMemb) + { + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.writeNonBreakableSpace(3); + ol.popGeneratorState(); + } + else + { + ol.insertMemberAlign(); + } - if (argsString()) + // write name + if (!name().isEmpty() && name().at(0)!='@') + { + if (isLinkable()) { - if (!isDefine()) ol.writeString(" "); - //ol.docify(argsString()); - linkifyText(TextGeneratorOLImpl(ol),cname,name(),argsString()); + if (annMemb) + { + //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor()); + annMemb->writeLink(ol, + annMemb->getClassDef(), + annMemb->getNamespaceDef(), + annMemb->getFileDef(), + annMemb->getGroupDef() + ); + annMemb->annUsed=annUsed=TRUE; + } + else + //printf("writeLink %s->%d\n",name.data(),hasDocumentation()); + writeLink(ol,cd,nd,fd,gd); } - - if (excpString()) + else // there is a brief member description and brief member + // descriptions are enabled or there is no detailed description. { - ol.writeString(" "); - ol.docify(excpString()); + if (annMemb) annMemb->annUsed=annUsed=TRUE; + ol.startBold(); + ol.docify(name()); + ol.endBold(); } + } + + if (argsString()) + { + if (!isDefine()) ol.writeString(" "); + //ol.docify(argsString()); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),argsString()); + } + + if (excpString()) + { + ol.writeString(" "); + ol.docify(excpString()); + } - if (!bitfields.isEmpty()) // add bitfields + if (!bitfields.isEmpty()) // add bitfields + { + linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace()); + } + else if (!init.isEmpty() && initLines==0 && // one line initializer + ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly + ) // add initializer + { + if (!isDefine()) { - linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace()); + ol.writeString(" = "); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),init.simplifyWhiteSpace()); } - else if (!init.isEmpty() && initLines==0 && // one line initializer - ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly - ) // add initializer + else { - if (!isDefine()) - { - ol.writeString(" = "); - linkifyText(TextGeneratorOLImpl(ol),cname,name(),init.simplifyWhiteSpace()); - } - else - { - ol.writeNonBreakableSpace(3); - linkifyText(TextGeneratorOLImpl(ol),cname,name(),init); - } + ol.writeNonBreakableSpace(3); + linkifyText(TextGeneratorOLImpl(ol),cname,name(),init); } + } - if (!detailsVisible && !Config_getBool("EXTRACT_ALL") && !annMemb) - { - ol.endDoxyAnchor(cfname,anchor()); - } + if (!detailsVisible && !annMemb) + { + ol.endDoxyAnchor(cfname,anchor()); + } - ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType); - - //ol.endMemberItem(gId!=-1,gFile,gHeader,annoClassDef || annMemb); - // write brief description - if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC") && !annMemb) + ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType); + + //ol.endMemberItem(gId!=-1,gFile,gHeader,annoClassDef || annMemb); + // write brief description + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC") && !annMemb) + { + ol.startMemberDescription(); + parseDoc(ol,defFileName,defLine,cname,name(),briefDescription()); + if (detailsVisible) { - ol.startMemberDescription(); - parseDoc(ol,defFileName,defLine,cname,name(),briefDescription()); - if (/*!documentation().isEmpty()*/ detailsAreVisible()) + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.endEmphasis(); + ol.docify(" "); + if (group!=0 && gd==0) // forward link to the group { - ol.pushGeneratorState(); - ol.disableAllBut(OutputGenerator::Html); - ol.endEmphasis(); - ol.docify(" "); - if (group!=0 && gd==0) // forward link to the group - { - ol.startTextLink(group->getOutputFileBase(),anchor()); - } - else - { - ol.startTextLink(0,anchor()); - } - parseText(ol,theTranslator->trMore()); - ol.endTextLink(); - ol.startEmphasis(); - ol.popGeneratorState(); + ol.startTextLink(group->getOutputFileBase(),anchor()); + } + else + { + ol.startTextLink(0,anchor()); } - //ol.newParagraph(); - ol.endMemberDescription(); + parseText(ol,theTranslator->trMore()); + ol.endTextLink(); + ol.startEmphasis(); + ol.popGeneratorState(); } + //ol.newParagraph(); + ol.endMemberDescription(); } warnIfUndocumented(); } +bool MemberDef::isDetailedSectionVisible(bool inGroup) const +{ + // the member has details documentation for any of the following reasons + bool docFilter = + // treat everything as documented + Config_getBool("EXTRACT_ALL") || + // has detailed docs + !documentation().isEmpty() || + // is an enum with values that are documented + (mtype==Enumeration && docEnumValues) || + // is documented enum value + (mtype==EnumValue && !briefDescription().isEmpty()) || + // has brief description that is part of the detailed description + (!briefDescription().isEmpty() && + (!Config_getBool("BRIEF_MEMBER_DESC") || + Config_getBool("ALWAYS_DETAILED_SEC")) && + Config_getBool("REPEAT_BRIEF" + ) + ) || + // has a multi-line initialization block + (initLines>0 && initLineshasDocumentation()); + + // this is not a global static or global statics should be extracted + bool staticFilter = getClassDef()!=0 || !isStatic() || Config_getBool("EXTRACT_STATIC"); + + // details are not part of a group or this is for a group documentation page + bool groupFilter = getGroupDef()==0 || inGroup; + + // member is part of an anonymous scope that is the type of + // another member in the list. + // + bool inAnonymousScope = !briefDescription().isEmpty() && annUsed; + + return ((docFilter && staticFilter) || inAnonymousScope) && groupFilter; +} + /*! Writes the "detailed documentation" section of this member to * all active output formats. */ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, const char *scName, - Definition *container + Definition *container, + bool inGroup ) { - // hide global static functions unless extractStaticFlag is enabled - if (getClassDef()==0 && isStatic() && !Config_getBool("EXTRACT_STATIC")) return; - // hide member that are documented in their own group - if (group!=0 && container->definitionType()!=TypeGroup) return; - // if this member is in a group find the real scope name. - QCString scopeName = scName; - if (container->definitionType()==TypeGroup) + bool hasDocs = isDetailedSectionVisible(inGroup); + //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n", + // name().data(),hasDocs,container->definitionType(),inGroup); + if ( hasDocs ) { - if (getClassDef()) scopeName=getClassDef()->name(); - else if (getNamespaceDef()) scopeName=getNamespaceDef()->name(); - else if (getFileDef()) scopeName=getFileDef()->name(); - } + QCString scopeName = scName; + if (container->definitionType()==TypeGroup) + { + if (getClassDef()) scopeName=getClassDef()->name(); + else if (getNamespaceDef()) scopeName=getNamespaceDef()->name(); + else if (getFileDef()) scopeName=getFileDef()->name(); + } - bool hasDocs = detailsAreVisible(); - //printf("MemberDef::writeDocumentation(): type=`%s' def=`%s'\n",type.data(),definition()); - if ( - Config_getBool("EXTRACT_ALL") || hasDocs - || /* member is part of an anonymous scope that is the type of - * another member in the list. - */ - (!hasDocs && !briefDescription().isEmpty() && annUsed) - ) - { // get definition. QCString cname = container->name(); QCString cfname = container->getOutputFileBase(); @@ -939,7 +941,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } if (!found) // anonymous compound { - //printf("Annonymous compound `%s'\n",cname.data()); + //printf("Anonymous compound `%s'\n",cname.data()); ol.startDoxyAnchor(cfname,anchor(),doxyName); ol.startMemberDoc(cname,name(),anchor(),name()); if (hasHtmlHelp) @@ -1429,30 +1431,17 @@ bool MemberDef::isLinkable() return isLinkableInProject() || isReference(); } -bool MemberDef::detailsAreVisible() const -{ - return !documentation().isEmpty() || // has detailed docs - //((Config_getBool("SOURCE_BROWSER") || Config_getBool("INLINE_SOURCES")) && startBodyLine!=-1 && bodyDef) || // has reference to sources - (mtype==Enumeration && docEnumValues) || // has enum values - (mtype==EnumValue && !briefDescription().isEmpty()) || // is doc enum value - (!briefDescription().isEmpty() && - (!Config_getBool("BRIEF_MEMBER_DESC") || Config_getBool("ALWAYS_DETAILED_SEC")) && - Config_getBool("REPEAT_BRIEF") // has brief description inside detailed area - ) || - (initLines>0 && initLineshasDocumentation()) - ; -} - void MemberDef::setEnumDecl(OutputList &ed) { enumDeclList=new OutputList(&ed); *enumDeclList+=ed; } -bool MemberDef::hasDocumentation() +bool MemberDef::hasDocumentation() const { - return Definition::hasDocumentation() || (argList!=0 && argList->hasDocumentation()); + return Definition::hasDocumentation() || + (mtype==Enumeration && docEnumValues) || // has enum values + (argList!=0 && argList->hasDocumentation()); } void MemberDef::setMemberGroup(MemberGroup *grp) diff --git a/src/memberdef.h b/src/memberdef.h index ee60338..4eda16b 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -95,6 +95,7 @@ class MemberDef : public Definition Specifier virtualness() const { return virt; } MemberType memberType() const { return mtype; } + // convenience methods bool isSignal() const { return mtype==Signal; } bool isSlot() const { return mtype==Slot; } @@ -117,8 +118,9 @@ class MemberDef : public Definition // output info bool isLinkableInProject(); bool isLinkable(); - bool detailsAreVisible() const; - bool hasDocumentation(); // overrides hasDocumentation in definition.h + bool hasDocumentation() const; // overrides hasDocumentation in definition.h + bool isBriefSectionVisible() const; + bool isDetailedSectionVisible(bool inGroup=FALSE) const; // set functions void setMemberType(MemberType t) { mtype=t; } @@ -148,7 +150,8 @@ class MemberDef : public Definition ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, bool inGroup); void writeDocumentation(MemberList *ml,OutputList &ol, - const char *scopeName,Definition *container); + const char *scopeName,Definition *container, + bool inGroup); void warnIfUndocumented(); // relation to other members @@ -162,8 +165,8 @@ class MemberDef : public Definition void setEnumScope(MemberDef *md) { enumScope=md; } MemberDef *getEnumScope() const { return enumScope; } void setEnumDecl(OutputList &ed); - void setEnumUsed() { eUsed=TRUE; } - bool enumUsed() const { return eUsed; } + //void setEnumUsed() { eUsed=TRUE; } + //bool enumUsed() const { return eUsed; } OutputList *enumDecl() const { return enumDeclList; } MemberList *enumFieldList() const { return enumFields; } void setDocumentedEnumValues(bool value) { docEnumValues=value; } @@ -202,11 +205,11 @@ class MemberDef : public Definition void setMemberGroupId(int id) { grpId=id; } int getMemberGroupId() const { return grpId; } - // annonymous scope members - void setFromAnnonymousScope(bool b) { annScope=b; } - void setFromAnnonymousMember(MemberDef *m) { annMemb=m; } - bool fromAnnonymousScope() const { return annScope; } - bool annonymousDeclShown() const { return annUsed; } + // anonymous scope members + void setFromAnonymousScope(bool b) { annScope=b; } + void setFromAnonymousMember(MemberDef *m) { annMemb=m; } + bool fromAnonymousScope() const { return annScope; } + bool anonymousDeclShown() const { return annUsed; } void setIndentDepth( int i) { indDepth=i; } int indentDepth() { return indDepth; } @@ -214,7 +217,7 @@ class MemberDef : public Definition QCString getScopeString() const; - //void generateXML(QTextStream &t,Definition *def); + ClassDef *getClassDefOfAnonymousType(const char *scopeName) const; private: ClassDef *classDef; // member of or related to @@ -247,7 +250,7 @@ class MemberDef : public Definition bool stat; // is it a static function? int memSpec; // The specifiers present for this member MemberType mtype; // returns the kind of member - bool eUsed; // is the enumerate already placed in a list + //bool eUsed; // is the enumerate already placed in a list bool proto; // is it a prototype; bool docEnumValues; // is an enum with documented enum values. bool annScope; // member is part of an annoymous scope diff --git a/src/membergroup.cpp b/src/membergroup.cpp index f96dc06..83e4dd3 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -43,7 +43,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(i scope = 0; inSameSection = TRUE; inDeclSection = 0; - numDeclMembers = -1; + m_numDecMembers = -1; //printf("Member group docs=`%s'\n",doc.data()); } @@ -89,15 +89,22 @@ void MemberGroup::setAnchors() void MemberGroup::writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd) { - memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,doc,TRUE,TRUE); + //printf("MemberGroup::writeDeclarations() memberList->count()=%d\n",memberList->count()); + memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,doc/*,TRUE,TRUE*/); } void MemberGroup::writePlainDeclarations(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup) + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd + ) { //printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count()); - memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inGroup); + memberList->writePlainDeclarations(ol,cd,nd,fd,gd); +} + +void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName, + Definition *container) +{ + memberList->writeDocumentation(ol,scopeName,container,0); } /*! Add this group as a subsection of the declaration section, instead @@ -111,14 +118,14 @@ void MemberGroup::addToDeclarationSection() } } -int MemberGroup::countDecMembers(bool sectionPerType) +int MemberGroup::countDecMembers(/*bool sectionPerType*/) { - if (numDeclMembers==-1) /* number of member not cached */ + if (m_numDecMembers==-1) /* number of member not cached */ { - memberList->countDecMembers(TRUE,TRUE,sectionPerType); - numDeclMembers = memberList->totalCount(); + memberList->countDecMembers(/*TRUE,TRUE,sectionPerType*/); + m_numDecMembers = memberList->numDecMembers(); } - return numDeclMembers; + return m_numDecMembers; } void MemberGroup::distributeMemberGroupDocumentation() @@ -141,3 +148,58 @@ void MemberGroup::distributeMemberGroupDocumentation() } } } + +int MemberGroup::varCount() const +{ + return memberList->varCount(); +} + +int MemberGroup::funcCount() const +{ + return memberList->funcCount(); +} + +int MemberGroup::enumCount() const +{ + return memberList->enumCount(); +} + +int MemberGroup::enumValueCount() const +{ + return memberList->enumValueCount(); +} + +int MemberGroup::typedefCount() const +{ + return memberList->typedefCount(); +} + +int MemberGroup::protoCount() const +{ + return memberList->protoCount(); +} + +int MemberGroup::defineCount() const +{ + return memberList->defineCount(); +} + +int MemberGroup::friendCount() const +{ + return memberList->friendCount(); +} + +int MemberGroup::numDecMembers() const +{ + return memberList->numDecMembers(); +} + +int MemberGroup::numDocMembers() const +{ + return memberList->numDocMembers(); +} + +void MemberGroup::setInGroup(bool b) +{ + memberList->setInGroup(b); +} diff --git a/src/membergroup.h b/src/membergroup.h index 8ddcb66..833350e 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -43,15 +43,28 @@ class MemberGroup /* : public Definition */ void insertMember(MemberDef *); void setAnchors(); void writePlainDeclarations(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup=TRUE); + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); + + void writeDocumentation(OutputList &ol,const char *scopeName, + Definition *container); QCString documentation() { return doc; } bool allMembersInSameSection() { return inSameSection; } void addToDeclarationSection(); - int countDecMembers(bool sectionPerType); + int countDecMembers(/*bool sectionPerType*/); void distributeMemberGroupDocumentation(); + int varCount() const; + int funcCount() const; + int enumCount() const; + int enumValueCount() const; + int typedefCount() const; + int protoCount() const; + int defineCount() const; + int friendCount() const; + int numDecMembers() const; + int numDocMembers() const; + void setInGroup(bool b); private: MemberList *memberList; // list of all members in the group @@ -62,7 +75,7 @@ class MemberGroup /* : public Definition */ QCString doc; MemberList *inDeclSection; bool inSameSection; - int numDeclMembers; + int m_numDecMembers; }; class MemberGroupList : public QList diff --git a/src/memberlist.cpp b/src/memberlist.cpp index d6d05e2..404c5a0 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -30,6 +30,9 @@ MemberList::MemberList() : QList() { memberGroupList=0; + m_numDecMembers=-1; // special value indicating that computation is needed + m_numDocMembers=-1; // special value indicating that computation is needed + m_inGroup=FALSE; } MemberList::~MemberList() @@ -44,96 +47,98 @@ int MemberList::compareItems(GCI item1, GCI item2) return strcmp(c1->name(),c2->name()); } -void MemberList::countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType) +/*! Count the number of members in this list that are visible in + * the declaration part of a compound's documentation page. + */ +void MemberList::countDecMembers(/*bool inGroup,bool countSubGroups,bool sectionPerType*/) { - //printf("----- countDecMembers ----\n"); - varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt=0; - m_count=0; - MemberDef *md=first(); - while (md) + if (m_numDecMembers!=-1) return; + + //printf("----- countDecMembers count=%d ----\n",count()); + m_varCnt=m_funcCnt=m_enumCnt=m_enumValCnt=0; + m_typeCnt=m_protoCnt=m_defCnt=m_friendCnt=0; + m_numDecMembers=0; + QListIterator mli(*this); + MemberDef *md; + for (mli.toFirst();(md=mli.current());++mli) { - //printf("md=%p md->name()=`%s' inGroup=%d getMemberGroup()=%p\n", - // md,md->name().data(),inGroup,md->getMemberGroup()); - if (!(md->getClassDef()==0 && md->isStatic() && !Config_getBool("EXTRACT_STATIC")) && - (!Config_getBool("HIDE_UNDOC_MEMBERS") || md->hasDocumentation()) && - ( - (!Config_getBool("HIDE_UNDOC_MEMBERS") || !md->documentation().isEmpty() || - Config_getBool("BRIEF_MEMBER_DESC") || Config_getBool("REPEAT_BRIEF") - ) || Config_getBool("EXTRACT_ALL") || - (md->isEnumerate() && - md->hasDocumentedEnumValues() - ) - ) && - inGroup==md->visibleMemberGroup(sectionPerType) && - !(inGroup && md->protection()==Private && !Config_getBool("EXTRACT_PRIVATE")) - ) + if (md->isBriefSectionVisible()) { switch(md->memberType()) { case MemberDef::Variable: // fall through - case MemberDef::Property: varCnt++,m_count++; + case MemberDef::Property: m_varCnt++,m_numDecMembers++; break; case MemberDef::Function: // fall through case MemberDef::Signal: // fall through case MemberDef::DCOP: // fall through case MemberDef::Slot: if (!md->isRelated() || md->getClassDef()) - funcCnt++,m_count++; + m_funcCnt++,m_numDecMembers++; break; - case MemberDef::Enumeration: enumCnt++,m_count++; break; - case MemberDef::EnumValue: enumValCnt++,m_count++; break; - case MemberDef::Typedef: typeCnt++,m_count++; break; - case MemberDef::Prototype: protoCnt++,m_count++; break; + case MemberDef::Enumeration: m_enumCnt++,m_numDecMembers++; break; + case MemberDef::EnumValue: m_enumValCnt++,m_numDecMembers++; break; + case MemberDef::Typedef: m_typeCnt++,m_numDecMembers++; break; + case MemberDef::Prototype: m_protoCnt++,m_numDecMembers++; break; case MemberDef::Define: if (Config_getBool("EXTRACT_ALL") || md->argsString() || !md->initializer().isEmpty() || md->hasDocumentation() - ) defCnt++,m_count++; + ) m_defCnt++,m_numDecMembers++; break; - case MemberDef::Friend: friendCnt++,m_count++; break; + case MemberDef::Friend: m_friendCnt++,m_numDecMembers++; break; default: - err("Error: Unknown member type found!"); + err("Error: Unknown member type found for member `%s'\n!",md->name().data()); } } - md=next(); } - if (memberGroupList && countSubGroups) + if (memberGroupList /*&& countSubGroups*/) { MemberGroupListIterator mgli(*memberGroupList); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - int mgCount = mg->countDecMembers(sectionPerType); - //printf("memberGroupList adding %d inGroup=%d\n",mgCount,inGroup); - m_count+=mgCount; + mg->countDecMembers(); + m_varCnt+=mg->varCount(); + m_funcCnt+=mg->funcCount(); + m_enumCnt+=mg->enumCount(); + m_enumValCnt+=mg->enumValueCount(); + m_typeCnt+=mg->typedefCount(); + m_protoCnt+=mg->protoCount(); + m_defCnt+=mg->defineCount(); + m_friendCnt+=mg->friendCount(); + m_numDecMembers+=mg->numDecMembers(); } } //printf("----- end countDecMembers ----\n"); - //printf("MemberList::countDecMembers(%d)=%d\n",inGroup,m_count); + //printf("MemberList::countDecMembers()=%d\n",m_numDecMembers); } -void MemberList::countDocMembers(bool listOfGroup) +void MemberList::countDocMembers() { - /*varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt=0;*/ - m_count=0; - MemberDef *md=first(); - while (md) + if (m_numDocMembers!=-1) return; // used cached value + m_numDocMembers=0; + QListIterator mli(*this); + MemberDef *md; + for (mli.toFirst();(md=mli.current());++mli) { - //printf("%s MemberList::countDocMembers() details=%d\n", - // md->name().data(),md->detailsAreVisible()); - bool visibleIfStatic = - !(md->getClassDef()==0 && md->isStatic() && !Config_getBool("EXTRACT_STATIC")); - - bool inOwnGroup = (md->getGroupDef()!=0 && !listOfGroup); - - if (visibleIfStatic && !inOwnGroup && - (Config_getBool("EXTRACT_ALL") || md->detailsAreVisible()) - ) + if (md->isDetailedSectionVisible(m_inGroup)) + { + // do not count enum values, since they do not produce entries of their own + if (md->memberType()!=MemberDef::EnumValue) m_numDocMembers++; + } + } + if (memberGroupList) + { + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) { - if (md->memberType()!=MemberDef::EnumValue) m_count++; + mg->countDecMembers(); + m_numDocMembers+=mg->numDocMembers(); } - md=next(); } + //printf("MemberList::countDocMembers()=%d memberGroupList=%p\n",m_numDocMembers,memberGroupList); } bool MemberList::insert(uint index,const MemberDef *md) @@ -157,183 +162,88 @@ MemberListIterator::MemberListIterator(const QList &l) : } void MemberList::writePlainDeclarations(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup,bool countSubGroups + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd ) { - bool sectionPerType = !inGroup && (fd || nd || gd); //printf("----- writePlainDeclaration() ----\n"); - countDecMembers(inGroup,countSubGroups,sectionPerType); - if (totalCount()==0) return; // no members in this list + countDecMembers(/*inGroup,countSubGroups,sectionPerType*/); + if (numDecMembers()==0) return; // no members in this list //printf("----> writePlainDeclaration() inGroup=%d totalCount()=%d\n",inGroup,totalCount()); ol.pushGeneratorState(); - //int prevGroupId = -1; - if (!sectionPerType) ol.startMemberList(); + ol.startMemberList(); MemberDef *md; - - if (defineCount()>0) - { - if (sectionPerType) - { - ol.startMemberHeader(); - parseText(ol,theTranslator->trDefines()); - ol.endMemberHeader(); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()); ++mli ) - { - //printf("md->isDefined()=%d inGroup=%d md->getMemberGroup()=%p\n", - // md->isDefine(),inGroup,md->getMemberGroup()); - if (md->isDefine() && - (md->argsString() || md->hasDocumentation() || - !md->initializer().isEmpty() || - Config_getBool("EXTRACT_ALL")) && - inGroup==md->visibleMemberGroup(sectionPerType) - ) - { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); - } - } - if (sectionPerType) - { - ol.endMemberList(); - } - } - - if (protoCount()>0) - { - //printf("There are %d prototypes\n",protoCount()); - if (sectionPerType) - { - ol.startMemberHeader(); - parseText(ol,theTranslator->trFuncProtos()); - ol.endMemberHeader(); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()); ++mli ) - { - if (md->isPrototype() && inGroup==md->visibleMemberGroup(sectionPerType)) - { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); - } - } - if (sectionPerType) - { - ol.endMemberList(); - } - } - - if (typedefCount()>0) - { - //printf("There are %d typedefs\n",typedefCount()); - if (sectionPerType) - { - ol.startMemberHeader(); - parseText(ol,theTranslator->trTypedefs()); - ol.endMemberHeader(); - //ol.writeMemberHeader("Typedefs"); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()) ; ++mli ) - { - if (md->isTypedef() && inGroup==md->visibleMemberGroup(sectionPerType)) - { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); - } - } - if (sectionPerType) ol.endMemberList(); - } - - // write enums - if (enumCount()>0) + MemberListIterator mli(*this); + for ( ; (md=mli.current()); ++mli ) { - //printf("There are %d enums\n",enumCount()); - if (sectionPerType) + //printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType()); + switch(md->memberType()) { - ol.startMemberHeader(); - parseText(ol,theTranslator->trEnumerations()); - ol.endMemberHeader(); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()) ; ++mli ) // iterate through the members - { - // see if member is hidden by protection - if (md->protection()==Private && !Config_getBool("EXTRACT_PRIVATE")) continue; - - QCString type=md->typeString(); - type=type.stripWhiteSpace(); // TODO: is this really needed? - - // filter out enums that are in a group iff inGroup holds - if (md->isEnumerate() && inGroup==md->visibleMemberGroup(sectionPerType) /*&& (hasDocs || !Config_getBool("HIDE_UNDOC_MEMBERS"))*/) + case MemberDef::Define: // fall through + case MemberDef::Prototype: // fall through + case MemberDef::Typedef: // fall through + case MemberDef::Variable: // fall through + case MemberDef::Function: // fall through + case MemberDef::Signal: // fall through + case MemberDef::Slot: // fall through + case MemberDef::DCOP: // fall through + case MemberDef::Property: + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); + break; + case MemberDef::Enumeration: { - // filter out invisible enums - if ( !Config_getBool("HIDE_UNDOC_MEMBERS") || // do not hide undocumented members or - !md->documentation().isEmpty() || // member has detailed descr. or - md->hasDocumentedEnumValues() || // member has documented enum vales. - ( - !md->briefDescription().isEmpty() && - Config_getBool("BRIEF_MEMBER_DESC") // brief descr. is shown or - ) - ) + OutputList typeDecl(&ol); + QCString name(md->name()); + int i=name.findRev("::"); + if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?) + if (name[0]!='@') // not an anonymous enum { - OutputList typeDecl(&ol); - QCString name=md->name().copy(); - int i=name.findRev("::"); - if (i!=-1) name=name.right(name.length()-i-2); // strip scope - if (name[0]!='@') // not an anonymous enum + if (md->isLinkableInProject() || md->hasDocumentedEnumValues()) { - if (md->isLinkableInProject() || md->hasDocumentedEnumValues()) - { - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " " << endl; - Doxygen::tagFile << " " << convertToXML(md->name()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(md->anchor()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(md->argsString()) << "" << endl; - Doxygen::tagFile << " " << endl; - } - md->writeLink(typeDecl,cd,nd,fd,gd); - } - else + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { - typeDecl.startBold(); - typeDecl.docify(name); - typeDecl.endBold(); + Doxygen::tagFile << " " << endl; + Doxygen::tagFile << " " << convertToXML(md->name()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(md->anchor()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(md->argsString()) << "" << endl; + Doxygen::tagFile << " " << endl; } - typeDecl.writeChar(' '); + md->writeLink(typeDecl,cd,nd,fd,gd); + } + else + { + typeDecl.startBold(); + typeDecl.docify(name); + typeDecl.endBold(); } + typeDecl.writeChar(' '); + } + + int enumMemCount=0; - int enumMemCount=0; - - uint enumValuesPerLine = - (uint)Config_getInt("ENUM_VALUES_PER_LINE"); - typeDecl.docify("{ "); - QList *fmdl=md->enumFieldList(); - if (fmdl) + uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE"); + typeDecl.docify("{ "); + QList *fmdl=md->enumFieldList(); + if (fmdl) + { + MemberDef *fmd=fmdl->first(); + while (fmd) { - MemberDef *fmd=fmdl->first(); - while (fmd) + /* in html we start a new line after a number of items */ + if (fmdl->count()>enumValuesPerLine + && (enumMemCount%enumValuesPerLine)==0 + ) { - /* in html we start a new line after a number of items */ - if (fmdl->count()>enumValuesPerLine - && (enumMemCount%enumValuesPerLine)==0 - ) - { - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.writeString("  "); - typeDecl.popGeneratorState(); - } + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.writeString("  "); + typeDecl.popGeneratorState(); + } - if (fmd->hasDocumentation()) // enum value has docs - { + if (fmd->hasDocumentation()) // enum value has docs + { if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " " << endl; @@ -342,130 +252,95 @@ void MemberList::writePlainDeclarations(OutputList &ol, Doxygen::tagFile << " " << convertToXML(fmd->argsString()) << "" << endl; Doxygen::tagFile << " " << endl; } - fmd->writeLink(typeDecl,cd,nd,fd,gd); - } - else // no docs for this enum value - { - typeDecl.startBold(); - typeDecl.docify(fmd->name()); - typeDecl.endBold(); - } - if (!fmd->initializer().isEmpty()) // enum value has initializer - { - typeDecl.writeString(" = "); - parseText(typeDecl,fmd->initializer()); - } - - fmd=fmdl->next(); - if (fmd) typeDecl.writeString(", "); - typeDecl.disable(OutputGenerator::Man); - typeDecl.writeString("\n"); // to prevent too long lines in LaTeX - typeDecl.enable(OutputGenerator::Man); - enumMemCount++; + fmd->writeLink(typeDecl,cd,nd,fd,gd); } - if (fmdl->count()>enumValuesPerLine) + else // no docs for this enum value { - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.popGeneratorState(); + typeDecl.startBold(); + typeDecl.docify(fmd->name()); + typeDecl.endBold(); } + if (!fmd->initializer().isEmpty()) // enum value has initializer + { + typeDecl.writeString(" = "); + parseText(typeDecl,fmd->initializer()); + } + + fmd=fmdl->next(); + if (fmd) typeDecl.writeString(", "); + typeDecl.disable(OutputGenerator::Man); + typeDecl.writeString("\n"); // to prevent too long lines in LaTeX + typeDecl.enable(OutputGenerator::Man); + enumMemCount++; + } + if (fmdl->count()>enumValuesPerLine) + { + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.popGeneratorState(); } - typeDecl.docify(" }"); - md->setEnumDecl(typeDecl); - int enumVars=0; - MemberListIterator vmli(*this); - MemberDef *vmd; - if (name[0]=='@') // anonymous enum => append variables + } + typeDecl.docify(" }"); + md->setEnumDecl(typeDecl); + int enumVars=0; + MemberListIterator vmli(*this); + MemberDef *vmd; + if (name[0]=='@') // anonymous enum => append variables + { + for ( ; (vmd=vmli.current()) ; ++vmli) { - for ( ; (vmd=vmli.current()) ; ++vmli) + QCString vtype=vmd->typeString(); + if ((vtype.find(name))!=-1) { - QCString vtype=vmd->typeString(); - if ((vtype.find(name))!=-1) - { - enumVars++; - vmd->setAnonymousEnumType(md); - } + enumVars++; + vmd->setAnonymousEnumType(md); } } - // if this is an annoymous enum and there are variable of this - // enum type (i.e. enumVars>0), then we do not show the enum here. - if (enumVars==0) // show enum here + } + // if this is an anoymous enum and there are variable of this + // enum type (i.e. enumVars>0), then we do not show the enum here. + if (enumVars==0) // show enum here + { + ol.startMemberItem(0); + ol.writeString("enum "); + ol.insertMemberAlign(); + ol+=typeDecl; // append the enum values. + ol.endMemberItem(FALSE); + if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startMemberItem(0); - ol.writeString("enum "); - ol.insertMemberAlign(); - ol+=typeDecl; // append the enum values. - ol.endMemberItem(FALSE); - if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) + ol.startMemberDescription(); + parseDoc(ol, + md->getDefFileName(),md->getDefLine(), + cd?cd->name().data():0,md->name().data(), + md->briefDescription() + ); + if (!md->documentation().isEmpty() || md->hasDocumentedEnumValues()) { - ol.startMemberDescription(); - parseDoc(ol, - md->getDefFileName(),md->getDefLine(), - cd?cd->name().data():0,md->name().data(), - md->briefDescription() - ); - if (!md->documentation().isEmpty() || md->hasDocumentedEnumValues()) - { - ol.disableAllBut(OutputGenerator::Html); - ol.endEmphasis(); - ol.docify(" "); - ol.startTextLink(0,md->anchor()); - parseText(ol,theTranslator->trMore()); - ol.endTextLink(); - ol.startEmphasis(); - ol.enableAll(); - } - ol.endMemberDescription(); + ol.disableAllBut(OutputGenerator::Html); + ol.endEmphasis(); + ol.docify(" "); + ol.startTextLink(0,md->anchor()); + parseText(ol,theTranslator->trMore()); + ol.endTextLink(); + ol.startEmphasis(); + ol.enableAll(); } + ol.endMemberDescription(); } - md->warnIfUndocumented(); } - } // md->isEnumerate() - } // enum loop - if (sectionPerType) ol.endMemberList(); - } // write enums - - // write functions - if (funcCount()>0) - { - //printf("There are %d functions\n",funcCount()); - if (sectionPerType) - { - ol.startMemberHeader(); - parseText(ol,theTranslator->trFunctions()); - ol.endMemberHeader(); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()) ; ++mli ) - { - if ( - ( md->isFunction() || md->isSignal() || md->isSlot() || md->isDCOP()) && - ( !md->isRelated() || md->getClassDef() ) && - inGroup==md->visibleMemberGroup(sectionPerType) - ) - { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); + md->warnIfUndocumented(); + break; } - } - if (sectionPerType) ol.endMemberList(); - } - - if (friendCount()>0) - { - //printf("There are %d friends\n",friendCount()); - MemberListIterator mli(*this); - for ( ; (md=mli.current()) ; ++mli ) - { - if (md->isFriend() && inGroup==md->visibleMemberGroup(sectionPerType)) + case MemberDef::Friend: { + //printf("Writing friend `%s'\n",md->name().data()); QCString type=md->typeString(); //printf("Friend: type=%s name=%s\n",type.data(),md->name().data()); bool isFriendClass = type=="friend class"; if (!isFriendClass) { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); } else // isFriendClass // friend is undocumented as a member but it is a class, @@ -499,52 +374,31 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.endMemberItem(FALSE); } } + break; } + case MemberDef::EnumValue: + break; } } - // write variables - if (varCount()>0) - { - //printf("There are %d variables\n",varCount()); - if (sectionPerType) - { - ol.startMemberHeader(); - parseText(ol,theTranslator->trVariables()); - ol.endMemberHeader(); - ol.startMemberList(); - } - MemberListIterator mli(*this); - for ( ; (md=mli.current()) ; ++mli ) - { - if ((md->isVariable() || md->isProperty()) && - inGroup==md->visibleMemberGroup(sectionPerType)) - { - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); - } - } - if (sectionPerType) ol.endMemberList(); - } - - // handle members that are inside annonymous compounds and for which - // no variables of the annonymous compound type exist. + // handle members that are inside anonymous compounds and for which + // no variables of the anonymous compound type exist. if (cd) { MemberListIterator mli(*this); for ( ; (md=mli.current()) ; ++mli ) { - if (md->fromAnnonymousScope() && !md->annonymousDeclShown() - && inGroup==md->visibleMemberGroup(sectionPerType)) + if (md->fromAnonymousScope() && !md->anonymousDeclShown()) { - //printf("annonymous compound members\n"); - md->setFromAnnonymousScope(FALSE); - md->writeDeclaration(ol,cd,nd,fd,gd,inGroup); - md->setFromAnnonymousScope(TRUE); + //printf("anonymous compound members\n"); + md->setFromAnonymousScope(FALSE); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); + md->setFromAnonymousScope(TRUE); } } } - if (!sectionPerType) { ol.endMemberList(); /*ol.writeChar('\n');*/ } + ol.endMemberList(); ol.popGeneratorState(); //printf("----- end writePlainDeclaration() ----\n"); @@ -552,24 +406,13 @@ void MemberList::writePlainDeclarations(OutputList &ol, void MemberList::writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const char *title,const char *subtitle, - bool inGroup,bool countSubGroups) + const char *title,const char *subtitle + /*, bool inGroup,bool countSubGroups*/) { //printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')\n",title,subtitle); //printf("----- writeDeclaration() ----\n"); - bool sectionPerType = !inGroup && (fd || nd || gd); - countDecMembers(FALSE,countSubGroups,sectionPerType); // count member not in group - int normalMembers = totalCount(); - int ingroupMembers = 0; - //printf("Normal members %d\n",normalMembers); - if (inGroup) - { - countDecMembers(TRUE,countSubGroups,sectionPerType); // count member inside group - ingroupMembers = totalCount(); - } - int totalMembers = normalMembers + ingroupMembers; - //printf("Total members %d\n",totalMembers); - if (totalMembers==0) return; + countDecMembers(); // count member not in group + if (numDecMembers()==0) return; if (title) { ol.startMemberHeader(); @@ -580,15 +423,16 @@ void MemberList::writeDeclarations(OutputList &ol, { //printf("subtitle=`%s'\n",subtitle); ol.startMemberSubtitle(); - if (inGroup) + if (m_inGroup) parseDoc(ol,"",1,0,0,subtitle); else parseText(ol,subtitle); ol.endMemberSubtitle(); } - writePlainDeclarations(ol,cd,nd,fd,gd,inGroup,FALSE); + writePlainDeclarations(ol,cd,nd,fd,gd); + //printf("memberGroupList=%p\n",memberGroupList); if (memberGroupList) { MemberGroupListIterator mgli(*memberGroupList); @@ -611,8 +455,8 @@ void MemberList::writeDeclarations(OutputList &ol, } ol.startMemberGroup(); mg->writePlainDeclarations(ol,cd,nd,fd,gd); - ++mgli; ol.endMemberGroup(hasHeader); + ++mgli; } } //printf("----- end writeDeclaration() ----\n"); @@ -620,13 +464,37 @@ void MemberList::writeDeclarations(OutputList &ol, } void MemberList::writeDocumentation(OutputList &ol, - const char *scopeName, Definition *container) + const char *scopeName, Definition *container, + const char *title) { + //printf("MemberList::writeDocumentation()\n"); + + countDocMembers(); + if (numDocMembers()==0) return; + + if (title) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,title); + ol.endGroupHeader(); + } + MemberListIterator mli(*this); MemberDef *md; for ( ; (md=mli.current()) ; ++mli) { - md->writeDocumentation(this,ol,scopeName,container); + md->writeDocumentation(this,ol,scopeName,container,m_inGroup); + } + if (memberGroupList) + { + //printf("MemberList::writeDocumentation() -- member groups\n"); + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeDocumentation(ol,scopeName,container); + } } } diff --git a/src/memberlist.h b/src/memberlist.h index 417abfd..9b8410f 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -33,36 +33,35 @@ class MemberList : public QList void inSort(const MemberDef *md); void append(const MemberDef *md); int compareItems(GCI item1,GCI item2); - int varCount() const { return varCnt; } - int funcCount() const { return funcCnt; } - int enumCount() const { return enumCnt; } - int enumValueCount() const { return enumValCnt; } - int typedefCount() const { return typeCnt; } - int protoCount() const { return protoCnt; } - int defineCount() const { return defCnt; } - int friendCount() const { return friendCnt; } - void countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType); - void countDocMembers(bool listOfGroup=FALSE); - int totalCount() const - { return //varCnt+funcCnt+enumCnt+enumValCnt+typeCnt+ - //protoCnt+defCnt+friendCnt; - m_count; - } + int varCount() const { ASSERT(m_numDecMembers!=-1); return m_varCnt; } + int funcCount() const { ASSERT(m_numDecMembers!=-1); return m_funcCnt; } + int enumCount() const { ASSERT(m_numDecMembers!=-1); return m_enumCnt; } + int enumValueCount() const { ASSERT(m_numDecMembers!=-1); return m_enumValCnt; } + int typedefCount() const { ASSERT(m_numDecMembers!=-1); return m_typeCnt; } + int protoCount() const { ASSERT(m_numDecMembers!=-1); return m_protoCnt; } + int defineCount() const { ASSERT(m_numDecMembers!=-1); return m_defCnt; } + int friendCount() const { ASSERT(m_numDecMembers!=-1); return m_friendCnt; } + int numDecMembers() const { ASSERT(m_numDecMembers!=-1); return m_numDecMembers; } + int numDocMembers() const { ASSERT(m_numDocMembers!=-1); return m_numDocMembers; } + void countDecMembers(/*bool inGroup,bool countSubGroups,bool sectionPerType*/); + void countDocMembers(); void writePlainDeclarations(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup=FALSE,bool countSubGroups=TRUE); + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const char *title,const char *subtitle, - bool inGroup=FALSE,bool countSubGroups=TRUE); + const char *title,const char *subtitle); void writeDocumentation(OutputList &ol,const char *scopeName, - Definition *container); + Definition *container,const char *title); void addMemberGroup(MemberGroup *mg); + void setInGroup(bool group) { m_inGroup=group; } private: - int varCnt,funcCnt,enumCnt,enumValCnt,typeCnt,protoCnt,defCnt,friendCnt; - int m_count; + int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt; + int m_protoCnt,m_defCnt,m_friendCnt; + int m_numDecMembers; // number of members in the brief part of the memberlist + int m_numDocMembers; // number of members in the detailed part of the memberlist MemberGroupList *memberGroupList; + bool m_inGroup; // is this list part of a group }; class MemberListIterator : public QListIterator diff --git a/src/message.cpp b/src/message.cpp index 5c9e783..285f1c3 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -85,6 +85,10 @@ void initWarningFormat() { warnFile = fopen(Config_getString("WARN_LOGFILE"),"w"); } + if (!warnFile) // point it to something valid, because warn() relies on it + { + warnFile = stderr; + } } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index b214de6..efcd10f 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -87,6 +87,7 @@ void NamespaceDef::insertClass(ClassDef *cd) } } +#if 0 void NamespaceDef::addMemberListToGroup(MemberList *ml, bool (MemberDef::*func)() const) { @@ -114,14 +115,16 @@ void NamespaceDef::addMemberListToGroup(MemberList *ml, } } } +#endif void NamespaceDef::addMembersToMemberGroup() { - addMemberListToGroup(&allMemberList,&MemberDef::isTypedef); - addMemberListToGroup(&allMemberList,&MemberDef::isEnumerate); - addMemberListToGroup(&allMemberList,&MemberDef::isEnumValue); - addMemberListToGroup(&allMemberList,&MemberDef::isFunction); - addMemberListToGroup(&allMemberList,&MemberDef::isVariable); + ::addMembersToMemberGroup(&decDefineMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decProtoMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decTypedefMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decEnumMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decFuncMembers,memberGroupDict,memberGroupList); + ::addMembersToMemberGroup(&decVarMembers,memberGroupDict,memberGroupList); } void NamespaceDef::insertMember(MemberDef *md) @@ -131,49 +134,55 @@ void NamespaceDef::insertMember(MemberDef *md) switch(md->memberType()) { case MemberDef::Variable: + decVarMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - varMembers.inSort(md); + docVarMembers.inSort(md); else - varMembers.append(md); + docVarMembers.append(md); break; case MemberDef::Function: + decFuncMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - funcMembers.inSort(md); + docFuncMembers.inSort(md); else - funcMembers.append(md); + docFuncMembers.append(md); break; case MemberDef::Typedef: + decTypedefMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - typedefMembers.inSort(md); + docTypedefMembers.inSort(md); else - typedefMembers.append(md); + docTypedefMembers.append(md); break; case MemberDef::Enumeration: + decEnumMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - enumMembers.inSort(md); + docEnumMembers.inSort(md); else - enumMembers.append(md); + docEnumMembers.append(md); break; case MemberDef::EnumValue: - if (Config_getBool("SORT_MEMBER_DOCS")) - enumValMembers.inSort(md); - else - enumValMembers.append(md); break; case MemberDef::Prototype: + decProtoMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - protoMembers.inSort(md); + docProtoMembers.inSort(md); else - protoMembers.append(md); + docProtoMembers.append(md); break; case MemberDef::Define: + decDefineMembers.append(md); if (Config_getBool("SORT_MEMBER_DOCS")) - defineMembers.inSort(md); + docDefineMembers.inSort(md); else - defineMembers.append(md); + docDefineMembers.append(md); break; default: - err("NamespaceDef::insertMembers(): unexpected member inserted in namespace!\n"); + err("NamespaceDef::insertMembers(): " + "member `%s' with class scope `%s' inserted in namespace scope `%s'!\n", + md->name().data(), + md->getClassDef() ? md->getClassDef()->name().data() : "", + name().data()); } //addMemberToGroup(md,groupId); } @@ -238,7 +247,14 @@ void NamespaceDef::writeDocumentation(OutputList &ol) mg->writeDeclarations(ol,0,this,0,0); } - allMemberList.writeDeclarations(ol,0,this,0,0,0,0); + + //allMemberList.writeDeclarations(ol,0,this,0,0,0,0); + decDefineMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trDefines(),0); + decProtoMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFuncProtos(),0); + decTypedefMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trTypedefs(),0); + decEnumMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trEnumerations(),0); + decFuncMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trFunctions(),0); + decVarMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trVariables(),0); ol.endMemberSections(); if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || @@ -273,76 +289,23 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ol.endTextBlock(); } - //memList->countDocMembers(); - defineMembers.countDocMembers(); - if ( defineMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trDefineDocumentation()); - ol.endGroupHeader(); - defineMembers.writeDocumentation(ol,name(),this); - } + docDefineMembers.writeDocumentation(ol,name(),this, + theTranslator->trDefineDocumentation()); - protoMembers.countDocMembers(); - if ( protoMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); - ol.endGroupHeader(); - protoMembers.writeDocumentation(ol,name(),this); - } + docProtoMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionPrototypeDocumentation()); - typedefMembers.countDocMembers(); - if ( typedefMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trTypedefDocumentation()); - ol.endGroupHeader(); - typedefMembers.writeDocumentation(ol,name(),this); - } + docTypedefMembers.writeDocumentation(ol,name(),this, + theTranslator->trTypedefDocumentation()); - enumMembers.countDocMembers(); - if ( enumMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trEnumerationTypeDocumentation()); - ol.endGroupHeader(); - enumMembers.writeDocumentation(ol,name(),this); - } + docEnumMembers.writeDocumentation(ol,name(),this, + theTranslator->trEnumerationTypeDocumentation()); - //enumValMembers.countDocMembers(); - //if ( enumValMembers.totalCount()>0 ) - //{ - // ol.writeRuler(); - // ol.startGroupHeader(); - // parseText(ol,theTranslator->trEnumerationValueDocumentation()); - // ol.endGroupHeader(); - // enumValMembers.writeDocumentation(ol,name()); - //} - - funcMembers.countDocMembers(); - if ( funcMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trFunctionDocumentation()); - ol.endGroupHeader(); - funcMembers.writeDocumentation(ol,name(),this); - } + docFuncMembers.writeDocumentation(ol,name(),this, + theTranslator->trFunctionDocumentation()); - varMembers.countDocMembers(); - if ( varMembers.totalCount()>0 ) - { - ol.writeRuler(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trVariableDocumentation()); - ol.endGroupHeader(); - varMembers.writeDocumentation(ol,name(),this); - } + docVarMembers.writeDocumentation(ol,name(),this, + theTranslator->trVariableDocumentation()); // write Author section (Man only) ol.pushGeneratorState(); @@ -365,7 +328,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) int NamespaceDef::countMembers() { allMemberList.countDocMembers(); - return allMemberList.totalCount()+classList->count(); + return allMemberList.numDocMembers()+classList->count(); } void NamespaceDef::addUsingDirective(NamespaceDef *nd) diff --git a/src/namespacedef.h b/src/namespacedef.h index 0e1d089..08a8701 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -66,8 +66,8 @@ class NamespaceDef : public Definition void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); - protected: - void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); + //protected: + // void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); private: //QCString reference; @@ -79,13 +79,23 @@ class NamespaceDef : public Definition ClassList *usingDeclList; MemberList allMemberList; - MemberList defineMembers; - MemberList protoMembers; - MemberList typedefMembers; - MemberList enumMembers; - MemberList enumValMembers; - MemberList funcMembers; - MemberList varMembers; + + // members in the declaration part of the documentation + MemberList decDefineMembers; + MemberList decProtoMembers; + MemberList decTypedefMembers; + MemberList decEnumMembers; + MemberList decFuncMembers; + MemberList decVarMembers; + + // members in the documentation part of the documentation + MemberList docAllMemberList; + MemberList docDefineMembers; + MemberList docProtoMembers; + MemberList docTypedefMembers; + MemberList docEnumMembers; + MemberList docFuncMembers; + MemberList docVarMembers; /* user defined member groups */ MemberGroupList *memberGroupList; diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 82f3396..be3b676 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -742,13 +742,17 @@ void RTFGenerator::beginRTFDocument() /* all the included RTF files should begin with the * same header */ - t <<"{\\rtf1\\ansi\\ansicpg1252\\uc1 \\deff0\\deflang1033\\deflangfe1033\n"; + t <<"{\\rtf1\\ansi\\ansicpg" << theTranslator->trRTFansicp(); + t <<"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n"; DBG_RTF(t <<"{\\comment Begining font list}\n") t <<"{\\fonttbl "; - t <<"{\\f0\\froman\\fcharset0\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n"; - t <<"{\\f1\\fswiss\\fcharset0\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n"; - t <<"{\\f2\\fmodern\\fcharset0\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n"; + t <<"{\\f0\\froman\\fcharset" << theTranslator->trRTFCharSet(); + t <<"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n"; + t <<"{\\f1\\fswiss\\fcharset" << theTranslator->trRTFCharSet(); + t <<"\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n"; + t <<"{\\f2\\fmodern\\fcharset" << theTranslator->trRTFCharSet(); + t <<"\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n"; t <<"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n"; t <<"}\n"; DBG_RTF(t <<"{\\comment begin colors}\n") @@ -1332,9 +1336,9 @@ void RTFGenerator::endIndexSection(IndexSections is) case isEndIndex: beginRTFChapter(); t << Rtf_Style["Heading1"]->reference; - t << "Index\\par "<< endl; + t << theTranslator->trRTFGeneralIndex() << "\\par "<< endl; t << Rtf_Style_Reset << endl; - t << "{\\tc \\v Index}" << endl; + t << "{\\tc \\v " << theTranslator->trRTFGeneralIndex() << "}" << endl; t << "{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n"; break; diff --git a/src/scanner.l b/src/scanner.l index cf35630..2a38b43 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1248,7 +1248,7 @@ TITLE [tT][iI][tT][lL][eE] BEGIN(AfterDoc); } } -"//"([!*]?){B}*{CMD}"{"|"/*"([!*]?){B}*{CMD}"{" { +"//"([!/]?){B}*{CMD}"{"|"/*"([!*]?){B}*{CMD}"{" { startGroup(); tmpDocType=-1; if (current_root->section & Entry::SCOPE_MASK) @@ -1267,7 +1267,7 @@ TITLE [tT][iI][tT][lL][eE] BEGIN( Doc ); } } -"//"([!*]?){B}*{CMD}"}"|"/*"([!*]?){B}*{CMD}"}"{B}*"*/" { +"//"([!/]?){B}*{CMD}"}"|"/*"([!*]?){B}*{CMD}"}"{B}*"*/" { endGroup(); } "=" { @@ -1687,6 +1687,15 @@ TITLE [tT][iI][tT][lL][eE] varEntry->doc = current->doc.copy(); varEntry->brief = current->brief.copy(); varEntry->mGrpId = current->mGrpId; + + // deep copy group list + QListIterator sli(*current->groups); + QCString *s; + for (;(s=sli.current());++sli) + { + varEntry->groups->append(new QCString(*s)); + } + //printf("Add: type=`%s',name=`%s',args=`%s'\n", // varEntry->type.data(),varEntry->name.data(),varEntry->args.data()); current_root->addSubEntry(varEntry); @@ -2313,7 +2322,6 @@ TITLE [tT][iI][tT][lL][eE] BEGIN( ClassVar ); } {SCOPENAME}{BN}*/"(" { - err("Inside IDL = %d\n",insideIDL); if (insideIDL && strncmp(yytext,"switch",6)==0 && !isId(yytext[6])) { // Corba IDL style union @@ -3810,7 +3818,19 @@ static void parseCompounds(Entry *rt) mtype = Method; gstat = FALSE; virt = Normal; + + memberGroupId = NOGROUP; + + // rebuild compound's group context + QCString *s = ce->groups->first(); + if (s) + { + lastDefGroup=*s; + startGroup(); + } + current->mGrpId = memberGroupId = ce->mGrpId; + scanYYlex() ; delete current; current=0; ce->program.resize(0); diff --git a/src/translator.h b/src/translator.h index 9b6e413..d40e379 100644 --- a/src/translator.h +++ b/src/translator.h @@ -1276,6 +1276,24 @@ class Translator return "Bug List"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.? +////////////////////////////////////////////////////////////////////////// + /*! Used as ansicpg for RTF file */ + virtual QCString trRTFansicp() + { + return "1252"; + } + /*! Used as ansicpg for RTF fcharset */ + virtual QCString trRTFCharSet() + { + return "0"; + } + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Index"; + } }; #endif diff --git a/src/translator_br.h b/src/translator_br.h index 4919737..ae8ed73 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,7 +1,4 @@ /****************************************************************************** - * - * - * * Copyright (C) 1997-2001 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its @@ -13,10 +10,9 @@ * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * - * The translation into Brasilian Portuguese was provided by + * Brazilian Portuguese version by * Fabio "FJTC" Jun Takada Chino - * Based on the original translation to Portuguese provided by - * Rui Godinho Lopes + * Version: 1.2.6.1 (2001/04/13) */ #ifndef TRANSLATOR_BR_H @@ -24,450 +20,557 @@ #include "translator.h" -/* -* I used the name brazilian in language.cpp. -*/ -class TranslatorBrazilianPortuguese : public Translator +class TranslatorBrazilian: public Translator { public: - QCString idLanguage() - { return "brazilian"; } + + // --- Language contol methods ------------------- + + /*! Used for identification of the language. May resemble + * the string returned by latexBabelPackage(), but it is not used + * for the same purpose. The identification should not be translated. + * It should be replaced by the name of the language in English + * (e.g. Czech, Japanese, Russian, etc.). It should be equal to + * the identification in language.h. + */ + virtual QCString idLanguage() + { + return "portuges"; + /* I'm not sure if it is correct. I did not found the documentation of BabelPackage*/ + } + + /*! Used to get the command(s) for the language support. This method + * was designed for languages which do not prefer babel package. + * If this methods returns empty string, then the latexBabelPackage() + * method is used to generate the command for using the babel package. + */ + virtual QCString latexLanguageSupportCommand() + { + return "Brazilian"; + } + /*! returns the name of the package that is included by LaTeX */ - QCString latexBabelPackage() - { return "portuguese_br"; } + virtual QCString latexBabelPackage() + { return ""; } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "iso-8859-1"; + } + + // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ - QCString trRelatedFunctions() - { return "FunГУes relacionadas"; } + virtual QCString trRelatedFunctions() + { return "FunГУes Relacionadas"; } /*! subscript for the related functions. */ - QCString trRelatedSubscript() - { return "(Note que nЦo sЦo funГУes membro)"; } + virtual QCString trRelatedSubscript() + { return "(Note que estes nЦo sЦo funГУes membros.)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ - QCString trDetailedDescription() - { return "DescriГЦo"; } + virtual QCString trDetailedDescription() + { return "DescriГЦo Detalhada"; } /*! header that is put before the list of typedefs. */ - QCString trMemberTypedefDocumentation() - { return "Tipos definidos"; } + virtual QCString trMemberTypedefDocumentation() + { return "DefiniГУes de Tipos"; } /*! header that is put before the list of enumerations. */ - QCString trMemberEnumerationDocumentation() + virtual QCString trMemberEnumerationDocumentation() { return "EnumeraГУes"; } /*! header that is put before the list of member functions. */ - QCString trMemberFunctionDocumentation() + virtual QCString trMemberFunctionDocumentation() { return "MИtodos"; } /*! header that is put before the list of member attributes. */ - QCString trMemberDataDocumentation() - { return "Atributos"; } + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Campos e Atributos"; + } + else + { + return "Constantes"; + } + } /*! this is the text of a link put after brief descriptions. */ - QCString trMore() + virtual QCString trMore() { return "Mais..."; } /*! put in the class documentation */ - QCString trListOfAllMembers() - { return "Mostrar lista completa dos membros"; } + virtual QCString trListOfAllMembers() + { return "Lista de todos os Membros."; } /*! used as the title of the "list of all members" page of a class */ - QCString trMemberList() - { return "Lista dos membros"; } + virtual QCString trMemberList() + { return "Lista de Membros"; } /*! this is the first part of a sentence that is followed by a class name */ - QCString trThisIsTheListOfAllMembers() - { return "Esta И a lista de todos os membros de "; } + virtual QCString trThisIsTheListOfAllMembers() + { return "Esta И a lista completa dos membros da "; } /*! this is the remainder of the sentence after the class name */ - QCString trIncludingInheritedMembers() - { return ", incluindo os membros herdados."; } + virtual QCString trIncludingInheritedMembers() + { return ", incluindo todos os membros herdados."; } /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. */ - QCString trGeneratedAutomatically(const char *s) + virtual QCString trGeneratedAutomatically(const char *s) { QCString result="Gerado automaticamente por Doxygen"; if (s) result+=(QCString)" para "+s; - result+=" a partir do cСdigo fonte."; + result+=" a partir do cСdigo-fonte."; return result; } /*! put after an enum name in the list of all members */ - QCString trEnumName() - { return "enumeraГЦo"; } + virtual QCString trEnumName() + { return "Nome da enumeraГЦo"; } /*! put after an enum value in the list of all members */ - QCString trEnumValue() - { return "valor enumerado"; } + virtual QCString trEnumValue() + { return "Valor enumerado"; } /*! put after an undocumented member in the list of all members */ - QCString trDefinedIn() - { return "definido em"; } + virtual QCString trDefinedIn() + { return "definida em"; } /*! put as in introduction in the verbatim header file of a class. * parameter f is the name of the include file. */ - QCString trIncludeFile() - { return "Arquivo incluМdo"; } - QCString trVerbatimText(const char *f) - { return (QCString)"Este texto foi originado pelo arquivo incluМdo "+f+"."; } + virtual QCString trVerbatimText(const char *f) + { return (QCString)"Este И o texto original do arquivo "+f+"."; } // quick reference sections /*! This is put above each page as a link to the list of all groups of - * compounds or files (see the \group command). + * compounds or files (see the \\group command). */ - QCString trModules() - { return "MСdulos"; } + virtual QCString trModules() + { return "Modulos"; } /*! This is put above each page as a link to the class hierarchy */ - QCString trClassHierarchy() - { return "Hierarquia de classes"; } + virtual QCString trClassHierarchy() + { return "Hierarquia de Classes"; } /*! This is put above each page as a link to the list of annotated classes */ - QCString trCompoundList() - { return "Lista de componentes"; + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Estrutura de Dados"; + } + else + { + return "Lista de Componentes"; + } + } - /*! This is put above each page as a link to the list of documented files */} - QCString trFileList() - { return "Lista de arquivos"; } + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Lista de Arquivos"; } /*! This is put above each page as a link to the list of all verbatim headers */ - QCString trHeaderFiles() - { return "Arquivos IncluМdos"; } + virtual QCString trHeaderFiles() + { return "Arquivos de CabeГalho (Headers)"; } /*! This is put above each page as a link to all members of compounds. */ - QCString trCompoundMembers() - { return "Componentes"; } + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Campos de Dados"; + } + else + { + return "Componentes Membros"; + } + } /*! This is put above each page as a link to all members of files. */ - QCString trFileMembers() - { return "DeclaraГУes"; } + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globais"; + } + else + { + return "Arquivos Membros"; + } + } /*! This is put above each page as a link to all related pages. */ - QCString trRelatedPages() - { return "Paginas relacionadas"; } + virtual QCString trRelatedPages() + { return "PАginas relacionadas"; } /*! This is put above each page as a link to all examples. */ - QCString trExamples() + virtual QCString trExamples() { return "Exemplos"; } /*! This is put above each page as a link to the search engine. */ - QCString trSearch() - { return "Localizar"; } + virtual QCString trSearch() + { return "Busca"; } /*! This is an introduction to the class hierarchy. */ - QCString trClassHierarchyDescription() - { return "Esta lista de heranГas estА organizada, dentro do possМvel, por ordem alfabИtica:"; } + virtual QCString trClassHierarchyDescription() + { return "Esta lista de hierarquia И parcialmente ordenada em ordem alfabИtica:"; } /*! This is an introduction to the list with all files. */ - QCString trFileListDescription(bool extractAll) + virtual QCString trFileListDescription(bool extractAll) { - QCString result="Lista de todos os arquivos "; + QCString result="Aqui estА a lista de todos os arquivos "; if (!extractAll) result+="documentados "; - result+="com uma breve descriГЦo:"; + result+="com suas respectivas descriГУes:"; return result; } /*! This is an introduction to the annotated compound list. */ - QCString trCompoundListDescription() - { return "Lista de classes, estruturas, uniУes e interfaces com breves descriГУes:"; + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Aqui estЦo as estruturas de dados e suas respectivas descriГУes:"; + } + else + { + return "Aqui estЦo as classes, estruturas, uniУes e interfaces e suas respectivas descriГУes:"; + } } /*! This is an introduction to the page with all class members. */ - QCString trCompoundMembersDescription(bool extractAll) + virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result="Lista de todos os membros "; + QCString result="Aqui estА a lista de todos os membros de classes "; if (!extractAll) result+="documentados "; result+="com links para "; - if (extractAll) result+="a documentaГЦo das respectivas classes:"; - else result+="o arquivo a que pertencem:"; + if (extractAll) + result+="a documentaГЦo de suas respectivas classes:"; + else + result+="suas respectivas classes:"; return result; } /*! This is an introduction to the page with all file members. */ - QCString trFileMembersDescription(bool extractAll) + virtual QCString trFileMembersDescription(bool extractAll) { - QCString result="Lista de todos os membros "; - if (!extractAll) result+="documentados "; + QCString result="Aqui esta a lista de "; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="tadas as funГУes, variАveis, definiГУes, enumeraГУes e definiГУes de tipos "; + if (!extractAll) result+="documentadas "; + } + else + { + result+="todos os membros dos arquivos "; + if (!extractAll) result+="documentados "; + } + + result+="com links para "; - if (extractAll) result+="a documentaГЦo correspondente:"; - else result+="os arquivos onde foram definidos:"; + if (extractAll) + result+="seus respectivos arquivos:"; + else + result+="suas respectivas documentaГУes:"; return result; } /*! This is an introduction to the page with the list of all header files. */ - QCString trHeaderFilesDescription() - { return "Lista de todos os arquivos cabeГalho que constituem a API:"; } + virtual QCString trHeaderFilesDescription() + { return "Aqui estЦo os arquivos de cabeГalho que compУe a API:"; } /*! This is an introduction to the page with the list of all examples */ - QCString trExamplesDescription() - { return "Lista de todos os exemplos:"; } + virtual QCString trExamplesDescription() + { return "Aqui estА a lista de todos os exemplos:"; } /*! This is an introduction to the page with the list of related pages */ - QCString trRelatedPagesDescription() - { return "Lista de documentaГЦo relacionada:"; } + virtual QCString trRelatedPagesDescription() + { return "Aqui estА a lista de toda a documentaГЦo relacionadas:"; } /*! This is an introduction to the page with the list of class/file groups */ - QCString trModulesDescription() - { return "Lista de todos os mСdulos:"; } + virtual QCString trModulesDescription() + { return "Aqui estА a lista de todos os mИdulos:"; } /*! This sentences is used in the annotated class/file lists if no brief * description is given. */ - QCString trNoDescriptionAvailable() - { return "Nenhuma descriГЦo disponМvel"; } + virtual QCString trNoDescriptionAvailable() + { return "Sem descriГЦodisponМvel"; } // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ - QCString trDocumentation() + virtual QCString trDocumentation() { return "DocumentaГЦo"; } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ - QCString trModuleIndex() - { return "мndice dos mСdulos"; } + virtual QCString trModuleIndex() + { return "мndice de MСdulos"; } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ - QCString trHierarchicalIndex() - { return "мndice da hierarquia"; } + virtual QCString trHierarchicalIndex() + { return "мndice HierАrquico"; } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. */ - QCString trCompoundIndex() - { return "мndice dos componentes"; } + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "мndice das Estruturas de Dados"; + } + else + { + return "мndice dos Componentes"; + } + } /*! This is used in LaTeX as the title of the chapter with the * list of all files. */ - QCString trFileIndex() - { return "мndice dos arquivos"; } + virtual QCString trFileIndex() + { return "мndice dos Arquivos"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ - QCString trModuleDocumentation() - { return "DocumentaГЦo do mСdulo"; } + virtual QCString trModuleDocumentation() + { return "MСdulos"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. */ - QCString trClassDocumentation() - { return "DocumentaГЦo da classe"; } + virtual QCString trClassDocumentation() + { return "Classes"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. */ - QCString trFileDocumentation() - { return "DocumentaГЦo do arquivo"; } + virtual QCString trFileDocumentation() + { return "Arquivos"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ - QCString trExampleDocumentation() - { return "DocumentaГЦo do exemplo"; } + virtual QCString trExampleDocumentation() + { return "Exemplos"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ - QCString trPageDocumentation() - { return "DocumentaГЦo da pАgina"; } + virtual QCString trPageDocumentation() + { return "DocumentaГЦo Relacionada"; } /*! This is used in LaTeX as the title of the document */ - QCString trReferenceManual() - { return "Manual de referЙncia"; } + virtual QCString trReferenceManual() + { return "Manual de ReferЙncia"; } /*! This is used in the documentation of a file as a header before the * list of defines */ - QCString trDefines() - { return "DefiniГЦo de macros"; } + virtual QCString trDefines() + { return "DefiniГУes e Macros"; } /*! This is used in the documentation of a file as a header before the * list of function prototypes */ - QCString trFuncProtos() - { return "ProtСtipos de funГУes"; } + virtual QCString trFuncProtos() + { return "ProtСtipos de FunГУes"; } /*! This is used in the documentation of a file as a header before the * list of typedefs */ - QCString trTypedefs() - { return "DefiniГУes de tipos"; } + virtual QCString trTypedefs() + { return "DefiniГУes de Tipos"; } /*! This is used in the documentation of a file as a header before the * list of enumerations */ - QCString trEnumerations() + virtual QCString trEnumerations() { return "EnumeraГУes"; } /*! This is used in the documentation of a file as a header before the * list of (global) functions */ - QCString trFunctions() + virtual QCString trFunctions() { return "FunГУes"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trVariables() + virtual QCString trVariables() { return "VariАveis"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trEnumerationValues() - { return "Valores da enumeraГЦo"; } + virtual QCString trEnumerationValues() + { return "Valores Enumerados"; } /*! This is used in man pages as the author section. */ - QCString trAuthor() + virtual QCString trAuthor() { return "Autor"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ - QCString trDefineDocumentation() - { return "Macros"; } + virtual QCString trDefineDocumentation() + { return "DeiniГУes e macros"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ - QCString trFunctionPrototypeDocumentation() - { return "ProtСtipos das funГУes"; } + virtual QCString trFunctionPrototypeDocumentation() + { return "ProtСtipos de funГУes"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ - QCString trTypedefDocumentation() - { return "Tipos"; } + virtual QCString trTypedefDocumentation() + { return "DefiniГУes de tipos"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ - QCString trEnumerationTypeDocumentation() + virtual QCString trEnumerationTypeDocumentation() { return "EnumeraГУes"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration values */ - QCString trEnumerationValueDocumentation() - { return "Elementos da enumeraГЦo"; } + virtual QCString trEnumerationValueDocumentation() + { return "Valores enumerados"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ - QCString trFunctionDocumentation() + virtual QCString trFunctionDocumentation() { return "FunГУes"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ - QCString trVariableDocumentation() + virtual QCString trVariableDocumentation() { return "VariАveis"; } /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds */ - QCString trCompounds() - { return "Componentes"; } + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Estruturas de Dados"; + } + else + { + return "Componentes"; + } + } /*! This is used in the documentation of a group before the list of * links to documented files */ - QCString trFiles() + virtual QCString trFiles() { return "Arquivos"; } /*! This is used in the standard footer of each page and indicates when * the page was generated */ - QCString trGeneratedAt(const char *date,const char *projName) + virtual QCString trGeneratedAt(const char *date,const char *projName) { - QCString result=(QCString)"Criado em "+date; + QCString result=(QCString)"Gerado em "+date; if (projName) result+=(QCString)" para "+projName; result+=(QCString)" por"; return result; } /*! This is part of the sentence used in the standard footer of each page. */ - QCString trWrittenBy() + virtual QCString trWrittenBy() { return "escrito por"; } /*! this text is put before a class diagram */ - QCString trClassDiagram(const char *clName) + virtual QCString trClassDiagram(const char *clName) { - return (QCString)"Diagrama de heranГas da classe "+clName; + return (QCString)"Diagrama de Hierarquia para "+clName+":"; } - /*! this text is generated when the \internal command is used. */ - QCString trForInternalUseOnly() + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() { return "Apenas para uso interno."; } - /*! this text is generated when the \reimp command is used. */ - QCString trReimplementedForInternalReasons() - { return "Redefinido por razУes internas. A interface nЦo foi afetada."; - } + /*! this text is generated when the \\reimp command is used. */ + virtual QCString trReimplementedForInternalReasons() + { return "Reimplementado por razУes internas. A API nЦo foi modificada."; } - /*! this text is generated when the \warning command is used. */ - QCString trWarning() + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() { return "Aviso"; } - /*! this text is generated when the \bug command is used. */ - QCString trBugsAndLimitations() + /*! this text is generated when the \\bug command is used. */ + virtual QCString trBugsAndLimitations() { return "Bugs e limitaГУes"; } - /*! this text is generated when the \version command is used. */ - QCString trVersion() + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() { return "VersЦo"; } - /*! this text is generated when the \date command is used. */ - QCString trDate() + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() { return "Data"; } - /*! this text is generated when the \author command is used. */ - QCString trAuthors() + /*! this text is generated when the \\author command is used. */ + virtual QCString trAuthors() { return "Autor(es)"; } - /*! this text is generated when the \return command is used. */ - QCString trReturns() + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() { return "Retorna"; } - /*! this text is generated when the \sa command is used. */ - QCString trSeeAlso() + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() { return "Veja tambИm"; } - /*! this text is generated when the \param command is used. */ - QCString trParameters() + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() { return "ParБmetros"; } - /*! this text is generated when the \exception command is used. */ - QCString trExceptions() + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() { return "ExceГУes"; } /*! this text is used in the title page of a LaTeX document. */ - QCString trGeneratedBy() - { return "Criado por"; } + virtual QCString trGeneratedBy() + { return "Gerado por"; } - // new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() - { return "Lista de namespaces"; } + { return "Lista de Namespaces"; } /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { - QCString result="Lista "; - if (!extractAll) result+="de toda a documentaГЦo "; - result+="dos namespaces com uma breve descriГЦo:"; + QCString result="Aqui esta a lista de todos os Namespaces "; + if (!extractAll) result+="documentados "; + result+="com suas respectivas descriГУes:"; return result; } @@ -485,7 +588,7 @@ class TranslatorBrazilianPortuguese : public Translator * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return "FunГУes relacionadas e classes amigas"; } + { return "Amigos e FunГУes Relacionadas"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -496,19 +599,17 @@ class TranslatorBrazilianPortuguese : public Translator ClassDef::CompoundType compType, bool isTemplate) { - QCString result="Referencia "; + QCString result="ReferЙncia da"; + + if (isTemplate) result+=" Template de"; switch(compType) { - case ClassDef::Class: result+="Ю classe "; break; - case ClassDef::Struct: result+="Ю estrutura "; break; - case ClassDef::Union: result+="Ю uniЦo "; break; - case ClassDef::Interface: result+="Ю interface "; break; - case ClassDef::Exception: result+="Ю excepГЦo "; break; + case ClassDef::Class: result+=" Classe "; break; + case ClassDef::Struct: result+=" Estrutura "; break; + case ClassDef::Union: result+=" UniЦo "; break; + case ClassDef::Interface: result+=" Interface "; break; + case ClassDef::Exception: result+=" ExceГЦo "; break; } - - if (isTemplate) - result+="