diff options
45 files changed, 803 insertions, 362 deletions
@@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.13-20020121 +DOXYGEN Version 1.2.13-20020203 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (21 January 2002) +Dimitri van Heesch (03 February 2002) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.13_20020121 +DOXYGEN Version 1.2.13_20020203 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (21 January 2002) +Dimitri van Heesch (dimitri@stack.nl) (03 February 2002) @@ -1 +1 @@ -1.2.13-20020121 +1.2.13-20020203 diff --git a/doc/commands.doc b/doc/commands.doc index 2254a68..cd49226 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -1113,7 +1113,7 @@ ALIASES = "english=\if english" \ \sa Section \ref cmdpage "\\page" for an example of the - \ref cmdsubsection "\\cmdsubsection" command. + \ref cmdsubsection "\\subsection" command. <hr> diff --git a/doc/index.doc b/doc/index.doc index 47248d1..450bfe9 100644 --- a/doc/index.doc +++ b/doc/index.doc @@ -166,7 +166,7 @@ Thanks go to: for rendering the logos. <li>Harm van der Heijden for adding HTML help support. <li>Wouter Slegers for registering the www.doxygen.org domain. -<li>Parker Waerchter for adding the RTF output generator. +<li>Parker Waechter for adding the RTF output generator. <li>Joerg Baumann, for adding conditional documentation blocks, PDF links, and the configuration generator. <li>Matthias Andree for providing a .spec script for building rpms from the diff --git a/doc/install.doc b/doc/install.doc index 49b3d9c..0f32e75 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -66,7 +66,7 @@ tools should be installed. \latexonly(see {\tt http://www.research.att.com/sw/tools/graphviz/})\endlatexonly. Needed for the include dependency graphs, the graphical inheritance graphs, and the collaboration graphs. - \note If you compile graphviz yourself, make sure you do include + If you compile graphviz yourself, make sure you do include freetype support (which requires the freetype library and header files), otherwise dot will produce a warning that it cannot find doxfont! <li>The ghostscript interpreter. @@ -210,6 +210,18 @@ instead of the <code>export</code> command above. Now install doxygen as described above. +<b>Bison problems</b> + +Versions 1.31 and 1.32 of bison contain a "bug" that results in a +compiler error like this: + +ce_parse.cpp:348: member `class CPPValue yyalloc::yyvs' with +constructor not allowed in union + +There is no real solution to this problem, but it is discussed on the +bison mailing list. I recomment to use version 1.29 until the problems +with bison are resolved. + <b>Latex problems</b> The file <code>a4wide.sty</code> is not available for all distributions. If diff --git a/doc/language.doc b/doc/language.doc index 2e9f518..0bc1629 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means that the text fragments that doxygen generates can be produced in languages other than English (the default) at configuration time. -Currently (version 1.2.13.1), 25 languages +Currently (version 1.2.13-20020121), 25 languages are supported (sorted alphabetically): Brazilian Portuguese, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, @@ -60,7 +60,7 @@ when the translator was updated. <TD>Chinese</TD> <TD>Wei Liu<br>Wang Weihan</TD> <TD>liuwei@NOSPAM.asiainfo.com<br>wangweihan@NOSPAM.capinfo.com.cn</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Croatian</TD> @@ -72,7 +72,7 @@ when the translator was updated. <TD>Czech</TD> <TD>Petr Přikryl</TD> <TD>prikrylp@NOSPAM.skil.cz</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Danish</TD> @@ -108,7 +108,7 @@ when the translator was updated. <TD>German</TD> <TD>Jens Seidel<br>Jens Breitenstein</TD> <TD>jensseidel@NOSPAM.users.sf.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Greek</TD> @@ -132,13 +132,13 @@ when the translator was updated. <TD>Japanese</TD> <TD>Ryunosuke Sato<br>Kenji Nagamatsu</TD> <TD>puyo@NOSPAM.mint.freemail.ne.jp<br>naga@NOSPAM.joyful.club.ne.jp</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Korean</TD> <TD>Richard Kim</TD> <TD>ryk@NOSPAM.dspwiz.com</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Norwegian</TD> @@ -156,7 +156,7 @@ when the translator was updated. <TD>Portuguese</TD> <TD>Rui Godinho Lopes</TD> <TD>ruiglopes@NOSPAM.yahoo.com</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Romanian</TD> @@ -174,13 +174,13 @@ when the translator was updated. <TD>Slovak</TD> <TD>Stanislav Kudláč</TD> <TD>skudlac@NOSPAM.pobox.sk</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Slovene</TD> <TD>Matjaz Ostroversnik</TD> <TD>matjaz.ostroversnik@NOSPAM.zrs-tk.si</TD> - <TD>up-to-date</TD> + <TD>1.2.13</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Spanish</TD> @@ -213,12 +213,12 @@ when the translator was updated. \hline Brazilian & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\ \hline - Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & up-to-date \\ + Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.13 \\ & Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\ \hline Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\ \hline - Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\ + Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & 1.2.13 \\ \hline Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & 1.2.7 \\ \hline @@ -230,7 +230,7 @@ when the translator was updated. \hline French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\ \hline - German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\ + German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.2.13 \\ & Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\ \hline Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\ @@ -240,24 +240,24 @@ when the translator was updated. Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\ & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\ \hline - Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & up-to-date \\ + Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & 1.2.13 \\ & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & \\ \hline - Korean & Richard Kim & {\tt ryk@dspwiz.com} & up-to-date \\ + Korean & Richard Kim & {\tt ryk@dspwiz.com} & 1.2.13 \\ \hline Norwegian & Lars Erik Jordet & {\tt larsej@stud.ifd.hibu.no} & 1.2.2 \\ \hline Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\ \hline - Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\ + Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.2.13 \\ \hline Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\ \hline Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & up-to-date \\ \hline - Slovak & Stanislav Kudl\'{a}\v{c} & {\tt skudlac@pobox.sk} & up-to-date \\ + Slovak & Stanislav Kudl\'{a}\v{c} & {\tt skudlac@pobox.sk} & 1.2.13 \\ \hline - Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & up-to-date \\ + Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & 1.2.13 \\ \hline Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.2.7 \\ \hline diff --git a/doc/translator.pl b/doc/translator.pl index 5efecc0..170c7c5 100644 --- a/doc/translator.pl +++ b/doc/translator.pl @@ -110,6 +110,14 @@ # The older translator adapters are derived from newer ones. # The mistaken comment said the opposite. # +# 2002/01/23 +# - The nasty bug corrected. GetAdapterClassesInfo() did not +# strip trailing blanks from the method prototype; consequently, +# the required methods implemented by a translator adapter was +# not recognized as the required one (i.e. not listed). +# - Some defined() operators used on hash elements were replaced +# by exists() operators where appropriate. +# ################################################################ use 5.005; @@ -421,10 +429,15 @@ sub GetAdapterClassesInfo ##{{{ # $cont =~ s{\n\s*\n}{\n}sg; + # Trim the spaces. + # + $cont =~ s{^\s+}{}mg; + $cont =~ s{\s+$}{}mg; + # Split the string into the lines again. # @content = split(/\n/, $cont); - + # Now the list contains only two kinds of lines. The first # kind of lines starts with the <class> tag and contains the # identifier of the class. The following lines list the @@ -474,8 +487,8 @@ sub GetAdapterClassesInfo ##{{{ # string of methods. # my $stripped_prototype = StripArgIdentifiers($line); - - if (defined $$reqref{$stripped_prototype}) + + if (exists($$reqref{$stripped_prototype})) { ++$cnt; $methods .= " $line\n"; @@ -498,11 +511,11 @@ sub GetAdapterClassesInfo ##{{{ # Return the result list. # - # push @result, $cont; # ??? return @result; } ##}}} + ################################################################ # GenerateLanguageDoc takes document templates and code sources # generates the content as expected in the $flangdoc file (the @@ -656,7 +669,7 @@ xxxTABLE_FOOTxxx # was not defined in sources, add the question mark to the # language identifier. # - if (defined $language{$lang}) { + if (exists($language{$lang})) { $language{$lang} = $$rcb{"Translator$lang"} . '<msep/>' . join("<sep/>", @info); } @@ -1053,8 +1066,8 @@ print STDERR "\n\n"; # Otherwise, remember it as old method which is # implemented, but not required. # - if (defined $required{$prototype}) { - $required{$prototype} = 0; + if (exists($required{$prototype})) { + $required{$prototype} = 0; # satisfaction } else { push(@old_methods, $implemented); diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 7363fd8..8de6af6 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,6 +1,6 @@ Summary: A documentation system for C/C++. Name: doxygen -Version: 1.2.13_20020121 +Version: 1.2.13_20020203 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index 5ea540f..0182c13 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1580,7 +1580,6 @@ bool ClassDef::isLinkableInProject() const else { return !name().isEmpty() && /* no name */ - //m_isTemplBaseClass==-1 && /* template base class */ !m_artificial && name().find('@')==-1 && /* anonymous compound */ (m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */ @@ -1635,7 +1634,7 @@ bool ClassDef::hasDocumentation() const // returns TRUE iff class definition `bcd' represents an (in)direct base // class of class definition `cd'. -bool ClassDef::isBaseClass(ClassDef *bcd) +bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances) { bool found=FALSE; //printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data()); @@ -1643,12 +1642,12 @@ bool ClassDef::isBaseClass(ClassDef *bcd) for ( ; bcli.current() && !found ; ++bcli) { ClassDef *ccd=bcli.current()->classDef; - if (ccd->templateMaster()) ccd=ccd->templateMaster(); + if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster(); //printf("isBaseClass() baseclass %s\n",ccd->name().data()); if (ccd==bcd) found=TRUE; else - found=ccd->isBaseClass(bcd); + found=ccd->isBaseClass(bcd,followInstances); } return found; } @@ -1719,7 +1718,7 @@ void ClassDef::mergeMembers() { ClassDef *dstCd = dstMd->getClassDef(); //printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data()); - if (srcCd==dstCd || dstCd->isBaseClass(srcCd)) + if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE)) // member is in the same or a base class { found=matchArguments(srcMd->argumentList(), @@ -1731,7 +1730,7 @@ void ClassDef::mergeMembers() hidden = hidden || !found; } else // member is in a non base class => multiple inheritance - // using the same base class. + // using the same base class. { //printf("$$ Existing member %s %s add scope %s\n", // dstMi->ambiguityResolutionScope.data(), @@ -1748,7 +1747,8 @@ void ClassDef::mergeMembers() { // do not add if base class is virtual or // if scope paths are equal - if ((srcMi->virt==Virtual && dstMi->virt==Virtual) || + //printf("same member found srcMi->virt=%d dstMi->virt=%d\n",srcMi->virt,dstMi->virt); + if ((srcMi->virt!=Normal && dstMi->virt!=Normal) || bClass->name()+"::"+srcMi->scopePath == dstMi->scopePath ) { diff --git a/src/classdef.h b/src/classdef.h index 360b98d..e33ec4e 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -151,7 +151,7 @@ class ClassDef : public Definition * class. This function will recusively traverse all branches of the * inheritance tree. */ - bool isBaseClass(ClassDef *bcd); + bool isBaseClass(ClassDef *bcd,bool followInstances); /*! Returns a sorted dictionary with all template instances found for * this template class. Returns 0 if not a template or no instances. @@ -279,8 +279,6 @@ class ClassDef : public Definition void addListReferences(); /*! Creates a new compound definition. - * \param outerScope class, file or namespace in which this class is - * defined. * \param fileName full path and file name in which this compound was * found. * \param startLine line number where the definition of this compound @@ -1092,17 +1092,13 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" g_code->codify(yytext); - // TODO: remove g_inClass=FALSE; - if (--g_curlyCount<=0) - { - //g_classScope.resize(0); - //g_codeParmList.clear(); - } if (--g_bodyCurlyCount<=0) { g_insideBody=FALSE; + g_currentMemberDef=0; + g_currentDefinition=0; } } <ClassName,ClassVar>";" { diff --git a/src/definition.cpp b/src/definition.cpp index 3942edf..5e3c0e5 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -102,8 +102,17 @@ void Definition::writeDocAnchorsToTagFile() } } +void Definition::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE) +{ + if (stripWhiteSpace) + m_doc=((QCString)d).stripWhiteSpace(); + else + m_doc=d; + m_docFile = docFile; + m_docLine = docLine; +} -void Definition::setBriefDescription(const char *b) +void Definition::setBriefDescription(const char *b,const char *briefFile,int briefLine) { m_brief=QCString(b).stripWhiteSpace(); int bl=m_brief.length(); @@ -115,6 +124,8 @@ void Definition::setBriefDescription(const char *b) default: m_brief+='.'; break; } } + m_briefFile = briefFile; + m_briefLine = briefLine; } /*! Reads a fragment of code from file \a fileName starting at diff --git a/src/definition.h b/src/definition.h index 6f384e9..2efbc92 100644 --- a/src/definition.h +++ b/src/definition.h @@ -64,17 +64,15 @@ class Definition /*! Sets a new \a name for the definition */ void setName(const char *name) { m_name=name; } /*! Sets the documentation of this definition to \a d. */ - void setDocumentation(const char *d,bool stripWhiteSpace=TRUE) - { - if (stripWhiteSpace) - m_doc=((QCString)d).stripWhiteSpace(); - else - m_doc=d; - } + void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE); + int docLine() const { return m_docLine; } + QCString docFile() const { return m_docFile; } /*! Sets the brief description of this definition to \a b. * A dot is added to the sentence if not available. */ - void setBriefDescription(const char *b); + void setBriefDescription(const char *b,const char *briefFile,int briefLine); + int briefLine() const { return m_briefLine; } + QCString briefFile() const { return m_briefFile; } /*! Returns TRUE iff the definition is documented */ virtual bool hasDocumentation() const; virtual bool isLinkableInProject() const = 0; @@ -155,6 +153,10 @@ class Definition int m_testId; // id for test list item int m_todoId; // id for todo list item int m_bugId; // id for bug list item + int m_docLine; + QCString m_docFile; + int m_briefLine; + QCString m_briefFile; }; @@ -21,10 +21,11 @@ #include "qtbc.h" class OutputDocInterface; +class MemberDef; extern void parseDoc(OutputDocInterface &ol, const char *fileName,int startLine, - const char *clName, const char *memName, + const char *clName, MemberDef *md, const QCString &docString); extern void parseExample(OutputDocInterface &ol,const QCString &docString, const char *fileName); @@ -22,7 +22,6 @@ */ #include <stdio.h> #include <stdlib.h> -//#include <iostream.h> #include <assert.h> #include <ctype.h> @@ -51,10 +50,13 @@ * * scanner's state variables */ +static MemberDef * memberDef; +static bool hasParamCommand; +static QDict<void> paramsFound; + static OutputDocInterface * outDoc; static bool insideArgumentList; static QCString className; -static QCString memberName; static QCString linkRef; static QCString linkText; static QCString codeBlock; @@ -109,7 +111,6 @@ static void initParser() { insideArgumentList=FALSE; className.resize(0); - memberName.resize(0); linkRef.resize(0); linkText.resize(0); codeBlock.resize(0); @@ -875,6 +876,44 @@ static void writeDotFile(const char *fileName, const char *captionText) } } +/* ----------------------------------------------------------------- */ + +static void checkArgName(const QCString &name) +{ + hasParamCommand=TRUE; + if (memberDef==0) return; // not a member + ArgumentList *al=memberDef->isDocsForDefinition() ? + memberDef->argumentList() : + memberDef->declArgumentList(); + if (al==0) return; // no argument list + if (!Config_getBool("WARN_IF_UNDOCUMENTED")) return; + + static QRegExp re("[a-zA-Z0-9_]+"); + int p=0,i=0,l; + while ((i=re.match(name,p,&l))!=-1) + { + QCString aName=name.mid(i,l); + ArgumentListIterator ali(*al); + Argument *a; + for (ali.toFirst();(a=ali.current());++ali) + { + if (name==a->name) + { + paramsFound.insert(name,(void *)(0x8)); + return; + } + } + QCString scope=memberDef->getScopeString(); + if (!scope.isEmpty()) scope+="::"; else scope=""; + warn(memberDef->docFile(),memberDef->docLine(), + "Warning: argument `%s' of command @param " + "is not found in the argument list of %s%s%s", + name.data(),scope.data(),memberDef->name().data(), + argListToString(al).data() + ); + p=i+l; + } +} /* ----------------------------------------------------------------- */ #undef YY_INPUT @@ -911,7 +950,7 @@ SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ URLCHAR [a-z_A-Z0-9\~\:\?\@\&\%\#\.\-\+\/\=] URLMASK ([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+) NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff] -WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") +WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"") ATTR ({B}+[^>\n]*)? A [aA] BOLD [bB] @@ -1631,8 +1670,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } <DocScan>"\\capt".* <DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM}{BSEP}* { + QCString argName = substitute(yytext,"\"","").stripWhiteSpace(); + if (inParamBlock) checkArgName(argName); outDoc->startDescTableTitle(); - scanDoc(substitute(yytext,"\"","").stripWhiteSpace()); + scanDoc(argName); outDoc->endDescTableTitle(); outDoc->startDescTableData(); BEGIN(DocScan); @@ -2633,18 +2674,58 @@ void parseDocument(OutputDocInterface &od,const QCString &docString) //---------------------------------------------------------------------------- void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, - const char *clName,const char *memName,const QCString &docString) + const char *clName,MemberDef *md,const QCString &docString) { //printf("parseDoc(file=`%s',line=%d)\n",fileName,startLine); initParser(); initParseCodeContext(); exampleDoc=FALSE; // do not cross reference with member docs className=clName; - memberName=memName; + memberDef = md; + hasParamCommand = FALSE; + paramsFound.setAutoDelete(FALSE); + paramsFound.clear(); strcpy(yyFileName,fileName); yyLineNr = startLine; parseDocument(od,docString); + if (md && hasParamCommand && Config_getBool("WARN_IF_UNDOCUMENTED")) + { + ArgumentList *al=memberDef->isDocsForDefinition() ? + memberDef->argumentList() : + memberDef->declArgumentList(); + if (al) + { + ArgumentListIterator ali(*al); + Argument *a; + bool found=FALSE; + for (ali.toFirst();(a=ali.current());++ali) + { + if (!a->name.isEmpty() && paramsFound.find(a->name)==0) + { + found = TRUE; + break; + } + } + if (found) + { + QCString scope=memberDef->getScopeString(); + if (!scope.isEmpty()) scope+="::"; else scope=""; + warn(memberDef->docFile(),memberDef->docLine(), + "Warning: The following parameters of " + "%s%s%s are not documented:", + scope.data(),memberDef->name().data(), + argListToString(al).data()); + for (ali.toFirst();(a=ali.current());++ali) + { + if (!a->name.isEmpty() && paramsFound.find(a->name)==0) + { + warn_cont( " parameter %s\n",a->name.data()); + } + } + } + } + } } //---------------------------------------------------------------------------- diff --git a/src/doxygen.cpp b/src/doxygen.cpp index a4ff869..6883495 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -227,10 +227,11 @@ static void buildGroupList(Entry *root) "group %s: ignoring title \"%s\" that does not match old title \"%s\"\n", root->name.data(), root->type.data(), gd->groupTitle() ); if ( gd->briefDescription().isEmpty() ) - gd->setBriefDescription(root->brief); + gd->setBriefDescription(root->brief,root->briefFile,root->briefLine); if ( !root->doc.stripWhiteSpace().isEmpty() ) gd->setDocumentation( gd->documentation().isEmpty() ? root->doc : - gd->documentation() + "\n\n" + root->doc ); + gd->documentation() + "\n\n" + root->doc, + root->docFile, root->docLine ); gd->addSectionsToDefinition(root->anchors); gd->setRefItems(root->todoId,root->testId,root->bugId); addGroupToGroups(root,gd); @@ -243,8 +244,8 @@ static void buildGroupList(Entry *root) { gd->setReference(root->tagInfo->tagName); } - gd->setBriefDescription(root->brief); - gd->setDocumentation(root->doc); + gd->setBriefDescription(root->brief,root->briefFile,root->briefLine); + gd->setDocumentation(root->doc,root->docFile,root->docLine); gd->addSectionsToDefinition(root->anchors); Doxygen::groupSDict.append(root->name,gd); gd->setRefItems(root->todoId,root->testId,root->bugId); @@ -305,8 +306,8 @@ static void buildFileList(Entry *root) // using FALSE in setDocumentation is small hack to make sure a file // is documented even if a \file command is used without further // documentation - fd->setDocumentation(root->doc,FALSE); - fd->setBriefDescription(root->brief); + fd->setDocumentation(root->doc,root->docFile,root->docLine,FALSE); + fd->setBriefDescription(root->brief,root->briefFile,root->briefLine); fd->addSectionsToDefinition(root->anchors); fd->setRefItems(root->todoId,root->testId,root->bugId); QListIterator<Grouping> gli(*root->groups); @@ -595,7 +596,7 @@ static void buildClassList(Entry *root) } else if (!root->doc.isEmpty()) { - cd->setDocumentation(root->doc); + cd->setDocumentation(root->doc,root->docFile,root->docLine); } if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty()) { @@ -608,7 +609,7 @@ static void buildClassList(Entry *root) } else if (!root->brief.isEmpty()) { - cd->setBriefDescription(root->brief); + cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); } if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1) { @@ -682,8 +683,8 @@ static void buildClassList(Entry *root) } ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec, tagName,refFileName); - cd->setDocumentation(root->doc); // copy docs to definition - cd->setBriefDescription(root->brief); + cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition + cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); @@ -738,7 +739,7 @@ static void buildClassList(Entry *root) } // the empty string test is needed for extract all case - cd->setBriefDescription(root->brief); + cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->insertUsedFile(root->fileName); // add class to the list @@ -794,7 +795,7 @@ static void buildNamespaceList(Entry *root) { if (nd->documentation().isEmpty() && !root->doc.isEmpty()) { - nd->setDocumentation(root->doc); + nd->setDocumentation(root->doc,root->docFile,root->docLine); nd->setName(fullName); // change name to match docs nd->addSectionsToDefinition(root->anchors); } @@ -808,7 +809,7 @@ static void buildNamespaceList(Entry *root) } if (nd->briefDescription().isEmpty() && !root->brief.isEmpty()) { - nd->setBriefDescription(root->brief); + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->setName(fullName); // change name to match docs } else if (!nd->briefDescription().isEmpty() && !root->brief.isEmpty()) @@ -837,8 +838,8 @@ static void buildNamespaceList(Entry *root) tagName=root->tagInfo->tagName; } NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,fullName,tagName); - nd->setDocumentation(root->doc); // copy docs to definition - nd->setBriefDescription(root->brief); + nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); //printf("Adding namespace to group\n"); @@ -852,7 +853,7 @@ static void buildNamespaceList(Entry *root) if (fd) fd->insertNamespace(nd); // the empty string test is needed for extract all case - nd->setBriefDescription(root->brief); + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->insertUsedFile(root->fileName); nd->setBodySegment(root->bodyLine,root->endBodyLine); nd->setBodyDef(fd); @@ -955,8 +956,8 @@ static void findUsingDirectives(Entry *root) { NamespaceDef *nd=new NamespaceDef( root->fileName,root->startLine,root->name); - nd->setDocumentation(root->doc); // copy docs to definition - nd->setBriefDescription(root->brief); + nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); QListIterator<Grouping> gli(*root->groups); @@ -979,7 +980,7 @@ static void findUsingDirectives(Entry *root) } // the empty string test is needed for extract all case - nd->setBriefDescription(root->brief); + nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->insertUsedFile(root->fileName); // add class to the list Doxygen::namespaceSDict.inSort(root->name,nd); @@ -1166,8 +1167,8 @@ static MemberDef *addVariableToClass( md->setMemberClass(cd); //md->setDefFile(root->fileName); //md->setDefLine(root->startLine); - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setDefinition(def); md->setBitfields(root->bitfields); md->addSectionsToDefinition(root->anchors); @@ -1329,8 +1330,8 @@ static MemberDef *addVariableToFile( } //md->setDefFile(root->fileName); //md->setDefLine(root->startLine); - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->addSectionsToDefinition(root->anchors); md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousMember(fromAnnMemb); @@ -1626,6 +1627,7 @@ void addNewMemberToClass(Entry *root,ClassDef *cd, name=name.left(i); } + // adding class member MemberDef *md=new MemberDef( root->fileName,root->startLine, root->type,name,root->args,root->exception, @@ -1637,8 +1639,9 @@ void addNewMemberToClass(Entry *root,ClassDef *cd, md->setReference(root->tagInfo->tagName); } md->setMemberClass(cd); - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setMemberSpecifiers(root->memSpec); md->setMemberGroupId(root->mGrpId); @@ -1746,7 +1749,7 @@ static void buildFunctionList(Entry *root) { Debug::print(Debug::Functions,0, "FUNCTION_SEC:\n" - " `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d\n", + " `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d proto=%d\n", root->type.data(), root->parent->name.data(), root->name.data(), @@ -1759,7 +1762,8 @@ static void buildFunctionList(Entry *root) //root->tArgList ? (int)root->tArgList->count() : -1, //root->mtArgList ? (int)root->mtArgList->count() : -1, root->mGrpId, - root->memSpec + root->memSpec, + root->proto ); bool isFriend=root->type.find("friend ")!=-1; @@ -1856,15 +1860,26 @@ static void buildFunctionList(Entry *root) // found,fd->absFilePath().data(),root->fileName.data()); // merge argument lists - mergeArguments(root->argList,md->argumentList()); + //mergeArguments(root->argList,md->argumentList()); // merge documentation - if (!md->documentation() && !root->doc.isEmpty()) + if (md->documentation().isEmpty() && !root->doc.isEmpty()) { - md->setDocumentation(root->doc); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + ArgumentList *argList = new ArgumentList; + stringToArgumentList(root->args,argList); + if (root->proto) + { + md->setDeclArgumentList(argList); + } + else + { + md->setArgumentList(argList); + } } - if (!md->briefDescription() && !root->brief.isEmpty()) + if (md->briefDescription().isEmpty() && !root->brief.isEmpty()) { - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } // merge body definitions if (md->getStartBodyLine()==-1 && root->bodyLine!=-1) @@ -1908,9 +1923,10 @@ static void buildFunctionList(Entry *root) } //md->setDefFile(root->fileName); //md->setDefLine(root->startLine); - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setPrototype(root->proto); + md->setDocsForDefinition(!root->proto); //md->setBody(root->body); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; @@ -2063,13 +2079,21 @@ static void findFriends() { mergeArguments(mmd->argumentList(),fmd->argumentList()); if (!fmd->documentation().isEmpty()) - mmd->setDocumentation(fmd->documentation()); + { + mmd->setDocumentation(fmd->documentation(),fmd->docFile(),fmd->docLine()); + } else if (!mmd->documentation().isEmpty()) - fmd->setDocumentation(mmd->documentation()); + { + fmd->setDocumentation(mmd->documentation(),mmd->docFile(),mmd->docLine()); + } if (mmd->briefDescription().isEmpty() && !fmd->briefDescription().isEmpty()) - mmd->setBriefDescription(fmd->briefDescription()); + { + mmd->setBriefDescription(fmd->briefDescription(),fmd->briefFile(),fmd->briefLine()); + } else if (!mmd->briefDescription().isEmpty() && !fmd->briefDescription().isEmpty()) - fmd->setBriefDescription(mmd->briefDescription()); + { + fmd->setBriefDescription(mmd->briefDescription(),mmd->briefFile(),mmd->briefLine()); + } if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1) { mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine()); @@ -2128,29 +2152,41 @@ static void transferFunctionDocumentation() // check if not in different but documented files if (Config_getBool("EXTRACT_ALL") || fdef==fdec || - (fdef!=0 && (!fdef->hasDocumentation() || !mdec->hasDocumentation())) + (fdef!=0 && (!fdef->hasDocumentation() || !fdec->hasDocumentation())) ) { - //printf("Found member %s: def in %s and dec in %s\n", - // mn->memberName(),mdef->getFileDef()->name().data(), - // mdec->getFileDef()->name().data()); + //printf("Found member %s: definition in %s (doc=%d) and declation in %s (doc=%d)\n", + // mn->memberName(), + // mdef->getFileDef()->name().data(),!mdef->documentation().isEmpty(), + // mdec->getFileDef()->name().data(),!mdec->documentation().isEmpty() + // ); /* copy documentation between function definition and declaration */ - if (mdec->briefDescription()) + if (!mdec->briefDescription().isEmpty()) { - mdef->setBriefDescription(mdec->briefDescription()); + mdef->setBriefDescription(mdec->briefDescription(),mdec->briefFile(),mdec->briefLine()); } - else if (mdef->briefDescription()) + else if (!mdef->briefDescription().isEmpty()) { - mdec->setBriefDescription(mdef->briefDescription()); + mdec->setBriefDescription(mdef->briefDescription(),mdef->briefFile(),mdef->briefLine()); } - if (mdef->documentation()) + if (!mdef->documentation().isEmpty()) { - mdec->setDocumentation(mdef->documentation()); + //printf("transfering docs mdef->mdec (%s->%s)\n",mdef->argsString(),mdec->argsString()); + mdec->setDocumentation(mdef->documentation(),mdef->docFile(),mdef->docLine()); + mdec->setDocsForDefinition(mdef->isDocsForDefinition()); + ArgumentList *mdefAl = new ArgumentList; + stringToArgumentList(mdef->argsString(),mdefAl); + mdec->setArgumentList(mdefAl); } - else if (mdec->documentation()) + else if (!mdec->documentation().isEmpty()) { - mdef->setDocumentation(mdec->documentation()); + //printf("transfering docs mdec->mdef (%s->%s)\n",mdec->argsString(),mdef->argsString()); + mdef->setDocumentation(mdec->documentation(),mdec->docFile(),mdec->docLine()); + mdef->setDocsForDefinition(mdec->isDocsForDefinition()); + ArgumentList *mdecAl = new ArgumentList; + stringToArgumentList(mdec->argsString(),mdecAl); + mdef->setDeclArgumentList(mdecAl); } if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1) { @@ -2651,9 +2687,9 @@ static bool findClassRelation( found=baseClass!=0 && baseClass!=cd; } + FileDef *fd=cd->getFileDef(); if (!found) { - FileDef *fd=cd->getFileDef(); if (fd) { // look for the using statement in this file in which the @@ -2801,6 +2837,7 @@ static bool findClassRelation( baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec); // the undocumented base was found in this file baseClass->insertUsedFile(root->fileName); + baseClass->setOuterScope(fd); return TRUE; } else @@ -3171,7 +3208,8 @@ static void addMemberDocs(Entry *root, doc+="<p>"; doc+=root->doc; } - md->setDocumentation(doc); + md->setDocumentation(doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); } else { @@ -3188,7 +3226,8 @@ static void addMemberDocs(Entry *root, ) { //printf("overwrite!\n"); - md->setDocumentation(root->doc); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); } //printf("Adding brief md->brief=`%s' root->brief=`%s'!\n", @@ -3203,7 +3242,7 @@ static void addMemberDocs(Entry *root, ) { //printf("overwrite!\n"); - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } } @@ -4014,7 +4053,8 @@ static void findMember(Entry *root, QCString doc=getOverloadDocs(); doc+="<p>"; doc+=root->doc; - md->setDocumentation(doc); + md->setDocumentation(doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); md->addSectionsToDefinition(root->anchors); md->setBodySegment(root->bodyLine,root->endBodyLine); @@ -4148,9 +4188,10 @@ static void findMember(Entry *root, md->setMemberClass(cd); md->setMemberSpecifiers(root->memSpec); md->setDefinition(funcDecl); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); //md->setMemberDefTemplateArguments(root->mtArgList); @@ -4441,8 +4482,9 @@ static void findEnums(Entry *root) cd->insertMember(md); cd->insertUsedFile(root->fileName); } - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); //printf("Adding member=%s\n",md->name().data()); MemberName *mn; @@ -4574,14 +4616,15 @@ static void findEnumDocumentation(Entry *root) // documentation outside a compound overrides the documentation inside it if (!md->documentation() || root->parent->name.isEmpty()) { - md->setDocumentation(root->doc); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); } // brief descriptions inside a compound override the documentation // outside it if (!md->briefDescription() || !root->parent->name.isEmpty()) { - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } if (root->mGrpId!=-1 && md->getMemberGroupId()==-1) @@ -4605,8 +4648,9 @@ static void findEnumDocumentation(Entry *root) MemberName *mn=Doxygen::functionNameSDict[name]; if (mn && (md=mn->getFirst())) { - md->setDocumentation(root->doc); - md->setBriefDescription(root->brief); + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); found=TRUE; @@ -4694,11 +4738,11 @@ static void computeMemberRelations() { ClassDef *bmcd = bmd->getClassDef(); ClassDef *mcd = md->getClassDef(); - //printf("Check relation between `%s'::`%s' and `%s'::`%s'\n", - // mcd->name().data(),md->name().data(), - // bmcd->name().data(),bmd->name().data() + //printf("Check relation between `%s'::`%s' (%p) and `%s'::`%s' (%p)\n", + // mcd->name().data(),md->name().data(),md, + // bmcd->name().data(),bmd->name().data(),bmd // ); - if (md!=bmd && bmcd && mcd && bmcd!=mcd && mcd->isBaseClass(bmcd)) + if (md!=bmd && bmcd && mcd && bmcd!=mcd && mcd->isBaseClass(bmcd,TRUE)) { //printf(" Base argList=`%s'\n Super argList=`%s'\n", // argListToString(bmd->argumentList()).data(), @@ -4921,6 +4965,32 @@ static void addSourceReferences() //---------------------------------------------------------------------------- // generate the documentation of all classes +static void generateClassList(ClassSDict &classSDict) +{ + ClassSDict::Iterator cli(classSDict); + for ( ; cli.current() ; ++cli ) + { + ClassDef *cd=cli.current(); + + if (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file + cd->getOuterScope()==Doxygen::globalScope // only look at global classes + ) + { + // skip external references, anonymous compounds and + // template instances + if ( cd->isLinkableInProject() && cd->templateMaster()==0) + { + msg("Generating docs for compound %s...\n",cd->name().data()); + + cd->writeDocumentation(*outputList); + cd->writeMemberList(*outputList); + } + // even for undocumented classes, the inner classes can be documented. + cd->writeDocumentationForInnerClasses(*outputList); + } + } +} + static void generateClassDocs() { // write the installdox script if necessary @@ -4953,28 +5023,8 @@ static void generateClassDocs() msg("Generating example index...\n"); } - ClassSDict::Iterator cli(Doxygen::classSDict); - for ( ; cli.current() ; ++cli ) - { - ClassDef *cd=cli.current(); - - if (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file - cd->getOuterScope()==Doxygen::globalScope // only look at global classes - ) - { - // skip external references, anonymous compounds and - // template instances - if ( cd->isLinkableInProject() && cd->templateMaster()==0) - { - msg("Generating docs for compound %s...\n",cd->name().data()); - - cd->writeDocumentation(*outputList); - cd->writeMemberList(*outputList); - } - // even for undocumented classes, the inner classes can be documented. - cd->writeDocumentationForInnerClasses(*outputList); - } - } + generateClassList(Doxygen::classSDict); + generateClassList(Doxygen::hiddenClasses); } //---------------------------------------------------------------------------- @@ -4998,12 +5048,14 @@ static void inheritDocumentation() bmd->briefDescription().isEmpty() ) { // search up the inheritance tree for a documentation member + //printf("bmd=%s class=%s\n",bmd->name().data(),bmd->getClassDef()->name().data()); bmd = bmd->reimplements(); } if (bmd) // copy the documentation from the reimplemented member { - md->setDocumentation(bmd->documentation()); - md->setBriefDescription(bmd->briefDescription()); + md->setDocumentation(bmd->documentation(),bmd->docFile(),bmd->docLine()); + md->setDocsForDefinition(bmd->isDocsForDefinition()); + md->setBriefDescription(bmd->briefDescription(),bmd->briefFile(),bmd->briefLine()); } } } @@ -5144,9 +5196,12 @@ static void findDefineDocumentation(Entry *root) if (md->memberType()==MemberDef::Define) { if (md->documentation().isEmpty()) - md->setDocumentation(root->doc); + { + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + } if (md->briefDescription().isEmpty()) - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); @@ -5178,9 +5233,12 @@ static void findDefineDocumentation(Entry *root) // doc and define in the same file assume they belong together. { if (md->documentation().isEmpty()) - md->setDocumentation(root->doc); + { + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + } if (md->briefDescription().isEmpty()) - md->setBriefDescription(root->brief); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); @@ -5299,18 +5357,18 @@ static void buildPackageList(Entry *root) } pd = new PackageDef(root->fileName,root->startLine,root->name,tagName); Doxygen::packageDict.inSort(root->name,pd); - pd->setDocumentation(root->doc); - pd->setBriefDescription(root->brief); + pd->setDocumentation(root->doc,root->docFile,root->docLine); + pd->setBriefDescription(root->brief,root->briefFile,root->briefLine); } else { if (!pd->documentation() && !root->doc.isEmpty()) { - pd->setDocumentation(root->doc); + pd->setDocumentation(root->doc,root->docFile,root->docLine); } if (!pd->briefDescription() && !root->brief.isEmpty()) { - pd->setBriefDescription(root->brief); + pd->setBriefDescription(root->brief,root->briefFile,root->briefLine); } } bool ambig; @@ -6018,13 +6076,15 @@ static int readDir(QFileInfo *fi, StringList *resultList, StringDict *resultDict, bool errorIfNotExist, - bool recursive + bool recursive, + QDict<void> *killDict ) { QDir dir((const char *)fi->absFilePath()); dir.setFilter( QDir::Files | QDir::Dirs ); int totalSize=0; //printf("readDir `%s'\n",fi->absFilePath().data()); + //printf("killDict=%p count=%d\n",killDict,killDict->count()); const QFileInfoList *list = dir.entryInfoList(); QFileInfoListIterator it( *list ); @@ -6034,6 +6094,7 @@ static int readDir(QFileInfo *fi, { if (exclDict==0 || exclDict->find(cfi->absFilePath())==0) { // file should not be excluded + //printf("killDict->find(%s)\n",cfi->absFilePath().data()); if ((!cfi->exists() || !cfi->isReadable()) && errorIfNotExist) { err("Error: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data()); @@ -6041,7 +6102,9 @@ static int readDir(QFileInfo *fi, else if (cfi->isFile() && (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && (patList==0 || patternMatch(cfi,patList)) && - !patternMatch(cfi,exclPatList)) + !patternMatch(cfi,exclPatList) && + (killDict==0 || killDict->find(cfi->absFilePath())==0) + ) { totalSize+=cfi->size()+cfi->absFilePath().length()+4; QCString name=convertToQCString(cfi->fileName()); @@ -6069,6 +6132,7 @@ static int readDir(QFileInfo *fi, } if (resultList) resultList->append(rs); if (resultDict) resultDict->insert(cfi->absFilePath(),rs); + if (killDict) killDict->insert(cfi->absFilePath(),(void *)0x8); } else if (recursive && (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && @@ -6078,7 +6142,7 @@ static int readDir(QFileInfo *fi, cfi->setFile(cfi->absFilePath()); totalSize+=readDir(cfi,fnList,fnDict,exclDict, patList,exclPatList,resultList,resultDict,errorIfNotExist, - recursive); + recursive,killDict); } } ++it; @@ -6135,9 +6199,11 @@ static int readFileOrDirectory(const char *s, StringList *resultList, StringDict *resultDict, bool recursive, - bool errorIfNotExist=TRUE + bool errorIfNotExist=TRUE, + QDict<void> *killDict = 0 ) { + //printf("killDict=%p count=%d\n",killDict,killDict->count()); // strip trailing slashes QCString fs = s; char lc = fs.at(fs.length()-1); @@ -6157,39 +6223,44 @@ static int readFileOrDirectory(const char *s, { if (fi.isFile()) { - totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); - //fiList->inSort(new FileInfo(fi)); - QCString name=convertToQCString(fi.fileName()); - //printf("New file %s\n",name.data()); - if (fnDict) + //printf("killDict->find(%s)\n",fi.absFilePath().data()); + if (killDict==0 || killDict->find(fi.absFilePath())==0) { - FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name); - FileName *fn=0; - if (!name.isEmpty() && (fn=(*fnDict)[name])) + totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); + //fiList->inSort(new FileInfo(fi)); + QCString name=convertToQCString(fi.fileName()); + //printf("New file %s\n",name.data()); + if (fnDict) { - fn->append(fd); + FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name); + FileName *fn=0; + if (!name.isEmpty() && (fn=(*fnDict)[name])) + { + fn->append(fd); + } + else + { + fn = new FileName(fi.absFilePath(),name); + fn->append(fd); + if (fnList) fnList->inSort(fn); + fnDict->insert(name,fn); + } } - else + QCString *rs=0; + if (resultList || resultDict) { - fn = new FileName(fi.absFilePath(),name); - fn->append(fd); - if (fnList) fnList->inSort(fn); - fnDict->insert(name,fn); + rs=new QCString(fi.absFilePath()); } + if (resultList) resultList->append(rs); + if (resultDict) resultDict->insert(fi.absFilePath(),rs); + if (killDict) killDict->insert(fi.absFilePath(),(void *)0x8); } - QCString *rs=0; - if (resultList || resultDict) - { - rs=new QCString(fi.absFilePath()); - } - if (resultList) resultList->append(rs); - if (resultDict) resultDict->insert(fi.absFilePath(),rs); } else if (fi.isDir()) // readable dir { totalSize+=readDir(&fi,fnList,fnDict,exclDict,patList, exclPatList,resultList,resultDict,errorIfNotExist, - recursive); + recursive,killDict); } } } @@ -6305,7 +6376,10 @@ void readConfiguration(int argc, char **argv) case 'g': genConfig=TRUE; configName=getArg(argc,argv,optind); - if (!configName) configName="Doxyfile"; + if (strcmp(argv[optind+1],"-")==0) + { configName="-"; optind++; } + if (!configName) + { configName="Doxyfile"; } break; case 'd': debugLabel=getArg(argc,argv,optind); @@ -6400,7 +6474,7 @@ void readConfiguration(int argc, char **argv) { HtmlGenerator::writeStyleSheetFile(f); } - exit(1); + exit(0); } else if (stricmp(formatName,"latex")==0) { @@ -6435,7 +6509,7 @@ void readConfiguration(int argc, char **argv) { LatexGenerator::writeStyleSheetFile(f); } - exit(1); + exit(0); } else { @@ -6451,7 +6525,7 @@ void readConfiguration(int argc, char **argv) else if (strcmp(&argv[optind][2],"version")==0) { msg("%s\n",versionString); - exit(1); + exit(0); } break; case 'h': @@ -6472,7 +6546,7 @@ void readConfiguration(int argc, char **argv) if (genConfig) { generateConfigFile(configName,shortList); - exit(1); + exit(0); } QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile"); @@ -6515,7 +6589,7 @@ void readConfiguration(int argc, char **argv) if (updateConfig) { generateConfigFile(configName,shortList,TRUE); - exit(1); + exit(0); } Config::instance()->substituteEnvironmentVars(); @@ -6544,8 +6618,8 @@ void parseInput() Doxygen::classSDict.setAutoDelete(TRUE); - Doxygen::inputNameDict = new FileNameDict(1009); - Doxygen::includeNameDict = new FileNameDict(1009); + Doxygen::inputNameDict = new FileNameDict(10007); + Doxygen::includeNameDict = new FileNameDict(10007); Doxygen::exampleNameDict = new FileNameDict(1009); Doxygen::imageNameDict = new FileNameDict(257); Doxygen::dotFileNameDict = new FileNameDict(257); @@ -6652,6 +6726,7 @@ void parseInput() } msg("Reading input files...\n"); + QDict<void> *killDict = new QDict<void>(10007); int inputSize=0; QStrList &inputList=Config_getList("INPUT"); s=inputList.first(); @@ -6667,9 +6742,12 @@ void parseInput() &Config_getList("FILE_PATTERNS"), &Config_getList("EXCLUDE_PATTERNS"), &inputFiles,0, - alwaysRecursive); + alwaysRecursive, + TRUE, + killDict); s=inputList.next(); } + delete killDict; // add predefined macro name to a dictionary QStrList &expandAsDefinedList =Config_getList("EXPAND_AS_DEFINED"); diff --git a/src/entry.cpp b/src/entry.cpp index 848ece9..13378e9 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -65,8 +65,12 @@ Entry::Entry(const Entry &e) includeFile = e.includeFile.copy(); includeName = e.includeFile.copy(); doc = e.doc.copy(); + docLine = e.docLine; + docFile = e.docFile.copy(); relates = e.relates.copy(); brief = e.brief.copy(); + briefLine = e.briefLine; + briefFile = e.briefFile.copy(); inside = e.inside.copy(); fileName = e.fileName.copy(); startLine = e.startLine; @@ -90,9 +94,7 @@ Entry::Entry(const Entry &e) anchors->setAutoDelete(TRUE); argList = new ArgumentList; argList->setAutoDelete(TRUE); - //printf("Entry::Entry(copy) tArgList=0\n"); tArgLists = 0; - //mtArgList = 0; groupDocType = e.groupDocType; // deep copy of the child entry list @@ -206,8 +208,12 @@ void Entry::reset() includeFile.resize(0); includeName.resize(0); doc.resize(0); + docFile.resize(0); + docLine=-1; relates.resize(0); brief.resize(0); + briefFile.resize(0); + briefLine=-1; inside.resize(0); fileName.resize(0); //scopeSpec.resize(0); @@ -251,12 +257,13 @@ int Entry::getSize() size+=bitfields.length()+1; size+=exception.length()+1; size+=program.length()+1; - //size+=body.length()+1; size+=includeFile.length()+1; size+=includeName.length()+1; size+=doc.length()+1; + size+=docFile.length()+1; size+=relates.length()+1; size+=brief.length()+1; + size+=briefFile.length()+1; size+=inside.length()+1; size+=fileName.length()+1; size+=initializer.length()+1; diff --git a/src/entry.h b/src/entry.h index 3e52b82..4020a96 100644 --- a/src/entry.h +++ b/src/entry.h @@ -254,15 +254,17 @@ class Entry QCString bitfields; //!< member's bit fields ArgumentList *argList; //!< member arguments as a list QList<ArgumentList> *tArgLists; //!< template argument declarations - //QCString scopeSpec; //!< template specialization of the scope - //QCString memberSpec; //!< template specialization of the member QCString program; //!< the program text QCString initializer; //!< initial value (for variables) QCString includeFile; //!< include file (2 arg of \class, must be unique) QCString includeName; //!< include name (3 arg of \class) QCString doc; //!< documentation block (partly parsed) - QCString relates; //!< related class (doc block) + int docLine; //!< line number at which the documentation was found + QCString docFile; //!< file in which the documentation was found QCString brief; //!< brief description (doc block) + int briefLine; //!< line number at which the brief desc. was found + QCString briefFile; //!< file in which the brief desc. was found + QCString relates; //!< related class (doc block) QCString inside; //!< name of the class in which documents are found QCString exception; //!< throw specification int bodyLine; //!< line number of the definition in the source diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index a49ff2f..65c16d9 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -443,8 +443,10 @@ int FTVHelp::decContentsDepth() /*! Add a list item to the contents file. * \param isDir TRUE if the item is a directory, FALSE if it is a text - * \param name the name of the item. * \param ref the URL of to the item. + * \param file the file containing the definition of the item + * \param anchor the anchor within the file. + * \param name the name of the item. */ void FTVHelp::addContentsItem(bool isDir, const char *ref, diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 6d7982a..fbd0c37 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -134,14 +134,16 @@ void HtmlGenerator::writeStyleSheetFile(QFile &file) t << defaultStyleSheet; } -static void writeDefaultHeaderFile(QTextStream &t,const char *title, +static void writeDefaultHeaderFile(QTextStream &t, const char *title, bool external) { t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" "<html><head>" /*"<meta name=\"robots\" content=\"noindex\">\n"*/ "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=" << theTranslator->idLanguageCharset() << "\">\n" - "<title>" << title << "</title>\n"; + "<title>"; + t << convertToHtml(title); + t << "</title>\n"; t << "<link "; if (external) t << "doxygen=\"_doc:" << Config_getString("DOC_URL") @@ -212,7 +214,7 @@ void HtmlGenerator::startFile(const char *name,const char *, } else { - t << substituteKeywords(g_header,lastTitle); + t << substituteKeywords(g_header,convertToHtml(lastTitle)); } t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " << versionString << " -->" << endl; @@ -255,7 +257,7 @@ void HtmlGenerator::writeFooter(int part,bool external) if (g_footer.isEmpty()) t << "<hr><address><small>"; else - t << substituteKeywords(g_footer,lastTitle); + t << substituteKeywords(g_footer,convertToHtml(lastTitle)); break; case 1: if (g_footer.isEmpty()) diff --git a/src/htmlgen.h b/src/htmlgen.h index 9f9d216..5e08a92 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -82,7 +82,7 @@ class HtmlGenerator : public OutputGenerator void codify(const char *text); void writeObjectLink(const char *ref,const char *file, const char *anchor,const char *name); - void writeCodeLink(const char *ref,const char *f, + void writeCodeLink(const char *ref,const char *file, const char *anchor,const char *name); void startTextLink(const char *file,const char *anchor); void endTextLink(); diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index fce5ec8..f179449 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -396,8 +396,10 @@ int HtmlHelp::decContentsDepth() } /*! Add an list item to the contents file. + * \param isDir boolean indicating if this is a dir or file entry * \param name the name of the item. * \param ref the URL of to the item. + * \param anchor the anchor of the item. */ void HtmlHelp::addContentsItem(bool isDir, const char *name,const char *ref, @@ -433,8 +435,10 @@ void HtmlHelp::addContentsItem(bool isDir, } /*! Add an list item to the index file. - * \param name the name of the item. + * \param level1 the main index of the item. + * \param level2 the sub index of the item. * \param ref the URL of to the item. + * \param anchor the anchor of the item. * \sa HtmlHelpIndex */ void HtmlHelp::addIndexItem(const char *level1, const char *level2, diff --git a/src/index.cpp b/src/index.cpp index aab89db..dfd7db9 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -586,7 +586,8 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) bool hasChildren = !cd->visited && cd->subClasses()->count()>0; if (cd->isLinkable()) { - //printf("Writing class %s\n",cd->displayName().data()); + //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n", + // cd->displayName().data(),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); if (cd->isReference()) { diff --git a/src/latexgen.h b/src/latexgen.h index 679f81e..2f4313f 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -78,14 +78,14 @@ class LatexGenerator : public OutputGenerator void docify(const char *text); void codify(const char *text); void writeObjectLink(const char *ref,const char *file, - const char *anchor,const char *text); + const char *anchor,const char *name); void writeCodeLink(const char *ref, const char *file, - const char *anchor,const char *text); + const char *anchor,const char *name); void startTextLink(const char *,const char *); void endTextLink(); - void startHtmlLink(const char *); + void startHtmlLink(const char *url); void endHtmlLink(); - void writeMailLink(const char *); + void writeMailLink(const char *url); void startTypewriter() { t << "{\\tt "; } void endTypewriter() { t << "}"; } void startGroupHeader(); diff --git a/src/mangen.h b/src/mangen.h index 3abc90c..a1b30a4 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -77,7 +77,7 @@ class ManGenerator : public OutputGenerator void codify(const char *text); void writeObjectLink(const char *ref,const char *file, const char *anchor,const char *name); - void writeCodeLink(const char *ref,const char *f, + void writeCodeLink(const char *ref,const char *file, const char *anchor,const char *name); void startTextLink(const char *,const char *) {} void endTextLink() {} diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 2d84e97..303d8f3 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -72,9 +72,10 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr static void writeDefArgumentList(OutputList &ol,ClassDef *cd, const QCString &scopeName,MemberDef *md) { - ArgumentList *argList=md->argumentList(); - //printf("writeDefArgumentList `%s' %p\n",md->name().data(),argList); - if (argList==0) return; // member has no function like argument list + ArgumentList *defArgList=md->isDocsForDefinition() ? + md->argumentList() : md->declArgumentList(); + //printf("writeDefArgumentList `%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition()); + if (defArgList==0) return; // member has no function like argument list if (!md->isDefine()) ol.docify(" "); ol.pushGeneratorState(); @@ -88,7 +89,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.popGeneratorState(); //printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine()); - Argument *a=argList->first(); + Argument *a=defArgList->first(); QCString cName; //if (md->scopeDefTemplateArguments()) //{ @@ -143,7 +144,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, if (!md->isDefine()) { ol.endParameterType(); - ol.startParameterName(argList->count()<2); + ol.startParameterName(defArgList->count()<2); } if (!a->name.isEmpty()) // argument has a name { @@ -173,7 +174,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.docify(" = "); linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n); } - a=argList->next(); + a=defArgList->next(); if (a) { ol.docify(", "); // there are more arguments @@ -193,8 +194,8 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.disableAllBut(OutputGenerator::Html); if (!md->isDefine()) { - if (first) ol.startParameterName(argList->count()<2); - ol.endParameterName(TRUE,argList->count()<2); + if (first) ol.startParameterName(defArgList->count()<2); + ol.endParameterName(TRUE,defArgList->count()<2); } else { @@ -203,11 +204,11 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.endParameterName(TRUE,TRUE); } ol.popGeneratorState(); - if (argList->constSpecifier) + if (defArgList->constSpecifier) { ol.docify(" const"); } - if (argList->volatileSpecifier) + if (defArgList->volatileSpecifier) { ol.docify(" volatile"); } @@ -290,6 +291,7 @@ MemberDef::MemberDef(const char *df,int dl, args=a; args=removeRedundantWhiteSpace(args); if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args; + //declLine=0; memberGroup=0; virt=v; @@ -329,27 +331,38 @@ MemberDef::MemberDef(const char *df,int dl, { tArgList=0; } - // copy function arguments (if any) + // copy function definition arguments (if any) if (al) { - argList = new ArgumentList; - argList->setAutoDelete(TRUE); + defArgList = new ArgumentList; + defArgList->setAutoDelete(TRUE); ArgumentListIterator ali(*al); Argument *a; for (;(a=ali.current());++ali) { - argList->append(new Argument(*a)); + defArgList->append(new Argument(*a)); } - argList->constSpecifier = al->constSpecifier; - argList->volatileSpecifier = al->volatileSpecifier; - argList->pureSpecifier = al->pureSpecifier; + defArgList->constSpecifier = al->constSpecifier; + defArgList->volatileSpecifier = al->volatileSpecifier; + defArgList->pureSpecifier = al->pureSpecifier; + } + else + { + defArgList=0; + } + // convert function declaration arguments (if any) + if (!args.isEmpty()) + { + declArgList = new ArgumentList; + stringToArgumentList(args,declArgList); } else { - argList=0; + declArgList = 0; } m_templateMaster=0; classSectionSDict=0; + docsForDefinition=TRUE; } /*! Destroys the member definition. */ @@ -358,18 +371,19 @@ MemberDef::~MemberDef() delete redefinedBy; delete exampleSDict; delete enumFields; - delete argList; + delete defArgList; delete tArgList; delete m_defTmpArgLists; delete classSectionSDict; + delete declArgList; } void MemberDef::setReimplements(MemberDef *md) { - if (m_templateMaster) - { - m_templateMaster->setReimplements(md); - } + //if (m_templateMaster) + //{ + // m_templateMaster->setReimplements(md); + //} redefines=md; } @@ -380,7 +394,17 @@ void MemberDef::insertReimplementedBy(MemberDef *md) m_templateMaster->insertReimplementedBy(md); } if (redefinedBy==0) redefinedBy = new MemberList; - redefinedBy->inSort(md); + if (redefinedBy->find(md)==-1) redefinedBy->inSort(md); +} + +MemberDef *MemberDef::reimplements() const +{ + return redefines; +} + +MemberList *MemberDef::reimplementedBy() const +{ + return redefinedBy; } void MemberDef::insertEnumField(MemberDef *md) @@ -831,7 +855,7 @@ void MemberDef::writeDeclaration(OutputList &ol, !annMemb) { ol.startMemberDescription(); - parseDoc(ol,m_defFileName,m_defLine,cname,name(),briefDescription()); + parseDoc(ol,m_defFileName,m_defLine,cname,this,briefDescription()); if (detailsVisible) { ol.pushGeneratorState(); @@ -878,7 +902,7 @@ bool MemberDef::isDetailedSectionLinkable() const //(initLines>0 && initLines<maxInitLines) || hasMultiLineInitializer() || // has one or more documented arguments - (argList!=0 && argList->hasDocumentation()); + (defArgList!=0 && defArgList->hasDocumentation()); // this is not a global static or global statics should be extracted bool staticFilter = getClassDef()!=0 || !isStatic() || Config_getBool("EXTRACT_STATIC"); @@ -1136,7 +1160,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.docify("]"); ol.endTypewriter(); } - if (!isDefine() && argList) ol.endParameterList(); + if (!isDefine() && defArgList) ol.endParameterList(); ol.endMemberDoc(); ol.endDoxyAnchor(cfname,anchor()); ol.startIndent(); @@ -1171,7 +1195,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, QCString detailed = m_templateMaster ? m_templateMaster->documentation() : documentation(); ArgumentList *docArgList = m_templateMaster ? - m_templateMaster->argList : argList; + m_templateMaster->defArgList : defArgList; /* write brief description */ if (!brief.isEmpty() && @@ -1180,23 +1204,23 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ) /* || !annMemb */ ) { - parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),brief); + parseDoc(ol,m_defFileName,m_defLine,scopeName,this,brief); ol.newParagraph(); } /* write detailed description */ if (!detailed.isEmpty()) { - parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),detailed+"\n"); + parseDoc(ol,m_defFileName,m_defLine,scopeName,this,detailed+"\n"); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::RTF); ol.newParagraph(); ol.popGeneratorState(); } - //printf("***** argList=%p name=%s docs=%s hasDocs=%d\n", - // argList, - // argList?argList->hasDocumentation():-1); + //printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n", + // defArgList, + // defArgList?defArgList->hasDocumentation():-1); if (docArgList && docArgList->hasDocumentation()) { //printf("***** argumentList is documented\n"); @@ -1215,7 +1239,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.docify(a->name); ol.endDescTableTitle(); ol.startDescTableData(); - parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),a->docs+"\n"); + parseDoc(ol,m_defFileName,m_defLine,scopeName,this,a->docs+"\n"); ol.endDescTableData(); } } @@ -1270,7 +1294,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (!fmd->briefDescription().isEmpty()) { - parseDoc(ol,m_defFileName,m_defLine,scopeName,fmd->name(),fmd->briefDescription()); + parseDoc(ol,m_defFileName,m_defLine,scopeName,fmd,fmd->briefDescription()); //ol.newParagraph(); } if (!fmd->briefDescription().isEmpty() && @@ -1280,7 +1304,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } if (!fmd->documentation().isEmpty()) { - parseDoc(ol,m_defFileName,m_defLine,scopeName,fmd->name(),fmd->documentation()+"\n"); + parseDoc(ol,m_defFileName,m_defLine,scopeName,fmd,fmd->documentation()+"\n"); } ol.endDescTableData(); } @@ -1531,7 +1555,7 @@ bool MemberDef::hasDocumentation() const { return Definition::hasDocumentation() || (mtype==Enumeration && docEnumValues) || // has enum values - (argList!=0 && argList->hasDocumentation()); // has doc arguments + (defArgList!=0 && defArgList->hasDocumentation()); // has doc arguments } void MemberDef::setMemberGroup(MemberGroup *grp) @@ -1605,10 +1629,10 @@ MemberDef *MemberDef::createTemplateInstanceMember( { //printf(" Member %s %s %s\n",typeString(),name().data(),argsString()); ArgumentList *actualArgList = 0; - if (argList) + if (defArgList) { actualArgList = new ArgumentList; - ArgumentListIterator ali(*argList); + ArgumentListIterator ali(*defArgList); Argument *arg; for (;(arg=ali.current());++ali) { @@ -1616,9 +1640,9 @@ MemberDef *MemberDef::createTemplateInstanceMember( actArg->type = substituteTemplateArgumentsInString(actArg->type,formalArgs,actualArgs); actualArgList->append(actArg); } - actualArgList->constSpecifier = argList->constSpecifier; - actualArgList->volatileSpecifier = argList->volatileSpecifier; - actualArgList->pureSpecifier = argList->pureSpecifier; + actualArgList->constSpecifier = defArgList->constSpecifier; + actualArgList->volatileSpecifier = defArgList->volatileSpecifier; + actualArgList->pureSpecifier = defArgList->pureSpecifier; } MemberDef *imd = new MemberDef( @@ -1629,7 +1653,7 @@ MemberDef *MemberDef::createTemplateInstanceMember( exception, prot, virt, stat, related, mtype, 0, 0 ); - imd->argList = actualArgList; + imd->defArgList = actualArgList; imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs); imd->setBodyDef(getBodyDef()); imd->setBodySegment(getStartBodyLine(),getEndBodyLine()); diff --git a/src/memberdef.h b/src/memberdef.h index 008de3f..acbcb8c 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -164,8 +164,8 @@ class MemberDef : public Definition // relation to other members void setReimplements(MemberDef *md); void insertReimplementedBy(MemberDef *md); - MemberDef *reimplements() const { return redefines; } - MemberList *reimplementedBy() const { return redefinedBy; } + MemberDef *reimplements() const; + MemberList *reimplementedBy() const; // enumeration specific members void insertEnumField(MemberDef *md); @@ -180,6 +180,7 @@ class MemberDef : public Definition bool hasDocumentedEnumValues() const { return docEnumValues; } void setAnonymousEnumType(MemberDef *md) { annEnumType = md; } MemberDef *getAnonymousEnumType() const { return annEnumType; } + bool isDocsForDefinition() const { return docsForDefinition; } // example related members bool addExample(const char *anchor,const char *name,const char *file); @@ -191,10 +192,17 @@ class MemberDef : public Definition bool isPrototype() const { return proto; } // argument related members - ArgumentList *argumentList() const { return argList; } + ArgumentList *argumentList() const { return defArgList; } + ArgumentList *declArgumentList() const { return declArgList; } void setArgumentList(ArgumentList *al) - { if (argList) delete argList; - argList = al; + { + if (defArgList) delete defArgList; + defArgList = al; + } + void setDeclArgumentList(ArgumentList *al) + { + if (declArgList) delete declArgList; + declArgList = al; } ArgumentList *templateArguments() const { return tArgList; } void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists); @@ -234,6 +242,7 @@ class MemberDef : public Definition return bodyMemb ? bodyMemb->anchor() : anchor(); } void setBodyMember(MemberDef *md) { bodyMemb = md; } + void setDocsForDefinition(bool b) { docsForDefinition = b; } bool visited; @@ -281,10 +290,9 @@ class MemberDef : public Definition int userInitLines; // result of explicit \hideinitializer or \showinitializer MemberList *section; // declation list containing this member MemberDef *annMemb; - ArgumentList *argList; // argument list of this member + ArgumentList *defArgList; // argument list of this member definition + ArgumentList *declArgList; // argument list of this member declaration ArgumentList *tArgList; // template argument list of function template - //ArgumentList *scopeTAL; // template argument list of class template - //ArgumentList *membTAL; // template argument list of class template QList<ArgumentList> *m_defTmpArgLists; int grpId; // group id MemberGroup *memberGroup; // group's member definition @@ -302,6 +310,9 @@ class MemberDef : public Definition bool groupHasDocs; // true if the entry that caused the grouping was documented MemberDef *m_templateMaster; SIntDict<MemberList> *classSectionSDict; + bool docsForDefinition; // TRUE => documentation block is put before + // definition. + // FALSE => block is put before declaration. // disable copying of member defs diff --git a/src/membergroup.cpp b/src/membergroup.cpp index e053b2a..3794af1 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -142,8 +142,8 @@ void MemberGroup::distributeMemberGroupDocumentation() if (omd->documentation().isEmpty() && omd->briefDescription().isEmpty()) { //printf("Copying documentation to member %s\n",omd->name().data()); - omd->setBriefDescription(md->briefDescription()); - omd->setDocumentation(md->documentation()); + omd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); + omd->setDocumentation(md->documentation(),md->docFile(),md->docLine()); } omd=memberList->next(); } diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 0e3ab0f..228232e 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -343,7 +343,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.startMemberDescription(); parseDoc(ol, md->getDefFileName(),md->getDefLine(), - cd?cd->name().data():0,md->name().data(), + cd?cd->name().data():0,md, md->briefDescription() ); if (md->isDetailedSectionLinkable()) diff --git a/src/outputgen.h b/src/outputgen.h index cd5c237..2b963a4 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -95,10 +95,10 @@ class BaseOutputDocInterface * \param file The file in which the object is located. * \param anchor The anchor uniquely identifying the object within * the file. - * \param text The text to display as a placeholder for the link. + * \param name The text to display as a placeholder for the link. */ virtual void writeObjectLink(const char *ref,const char *file, - const char *anchor, const char *text) = 0; + const char *anchor, const char *name) = 0; /*! Writes a link to an object in a code fragment. * \param ref If this is non-zero, the object is to be found in @@ -106,10 +106,10 @@ class BaseOutputDocInterface * \param file The file in which the object is located. * \param anchor The anchor uniquely identifying the object within * the file. - * \param text The text to display as a placeholder for the link. + * \param name The text to display as a placeholder for the link. */ virtual void writeCodeLink(const char *ref,const char *file, - const char *anchor,const char *text) = 0; + const char *anchor,const char *name) = 0; /*! Starts a (link to an) URL found in the documentation. * \param url The URL to link to. diff --git a/src/outputlist.h b/src/outputlist.h index 22f0e46..79e511b 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -134,11 +134,11 @@ class OutputList : public OutputDocInterface void codify(const char *s) { forall(&OutputGenerator::codify,s); } void writeObjectLink(const char *ref,const char *file, - const char *anchor, const char *text) - { forall(&OutputGenerator::writeObjectLink,ref,file,anchor,text); } + const char *anchor, const char *name) + { forall(&OutputGenerator::writeObjectLink,ref,file,anchor,name); } void writeCodeLink(const char *ref,const char *file, - const char *anchor,const char *text) - { forall(&OutputGenerator::writeCodeLink,ref,file,anchor,text); } + const char *anchor,const char *name) + { forall(&OutputGenerator::writeCodeLink,ref,file,anchor,name); } void startTextLink(const char *file,const char *anchor) { forall(&OutputGenerator::startTextLink,file,anchor); } void endTextLink() @@ -1122,10 +1122,15 @@ BN [ \t\r\n] } <CopyLine>{ID}/{BN}*"(" { Define *def=0; - //printf("Search for define %s\n",yytext); + //def=g_fileDefineDict->find(yytext); + //printf("Search for define %s found=%d g_includeStack.isEmpty()=%d " + // "g_curlyCount=%d g_macroExpansion=%d g_expandOnlyPredef=%d " + // "isPreDefined=%d\n",yytext,def ? 1 : 0, + // g_includeStack.isEmpty(),g_curlyCount,g_macroExpansion,g_expandOnlyPredef, + // def ? def->isPredefined : -1 + // ); if ((g_includeStack.isEmpty() || g_curlyCount>0) && g_macroExpansion && - /* (expandDefine=fileDefineCache->findDefine(g_yyFileName,yytext)) */ (def=g_fileDefineDict->find(yytext)) && (!g_expandOnlyPredef || def->isPredefined) ) diff --git a/src/reflist.cpp b/src/reflist.cpp index b927969..2469d65 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -41,7 +41,6 @@ RefList::~RefList() } /*! Adds a new item to the list. - * \param text The item text. * \returns A unique id for this item. */ int RefList::addRefItem() diff --git a/src/rtfgen.h b/src/rtfgen.h index 396653c..ceb22cc 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -79,12 +79,12 @@ class RTFGenerator : public OutputGenerator void docify(const char *text); void codify(const char *text); void writeObjectLink(const char *ref,const char *file, - const char *anchor,const char *text); + const char *anchor,const char *name); void writeCodeLink(const char *ref, const char *file, - const char *anchor,const char *text); + const char *anchor,const char *name); void startTextLink(const char *f,const char *anchor); void endTextLink(); - void startHtmlLink(const char *); + void startHtmlLink(const char *url); void endHtmlLink(); void writeMailLink(const char *url); void startTypewriter() { t << "{\\f2 "; } diff --git a/src/scanner.l b/src/scanner.l index 1e6acd2..46ed1f1 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -477,6 +477,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x Function %x FuncRound %x ExcpRound +%x ExcpList %x FuncQual %x Operator %x Array @@ -1246,16 +1247,24 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if (yytext[yyleng-3]=='/') { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyFileName; BEGIN(AfterDocLine); } else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyLineNr; + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDocBrief); } else { current->doc.resize(0); + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDoc); } } @@ -1266,16 +1275,24 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if (yytext[yyleng-3]=='/') { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyLineNr; BEGIN(AfterDocLine); } else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyLineNr; + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDocBrief); } else { current->doc.resize(0); + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDoc); } } @@ -1292,16 +1309,22 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if (yytext[yyleng-3]=='/') { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyFileName; BEGIN(AfterDocLine); } else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyFileName; BEGIN(AfterDocBrief); } else { current->doc.resize(0); + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDoc); } } @@ -1319,12 +1342,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if (yytext[1]=='/') // C++ style comment { current->brief.resize(0); + current->briefLine = yyLineNr; + current->briefFile = yyFileName; lastDocContext = YY_START; BEGIN( LineDoc ); } else // C style comment { current->doc.resize(0); + current->docLine = yyLineNr; + current->docFile = yyFileName; lastDocContext = YY_START; removeSlashes=FALSE; BEGIN( Doc ); @@ -2195,7 +2222,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <FuncQual>{BN}*"try"{BN}+ { /* try-function-block */ insideTryBlock=TRUE; } -<FuncQual>{BN}*"throw"{BN}*"(" { +<FuncQual>{BN}*"throw"{BN}*"(" { // C++ style throw clause current->exception = " throw (" ; roundCount=0; lineCount() ; @@ -2207,6 +2234,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) roundCount=0; BEGIN( ExcpRound ) ; } +<FuncQual>{BN}*"throws"{BN}+ { // Java style throw clause + current->exception = " throws " ; + lineCount() ; + BEGIN( ExcpList ); + } <ExcpRound>"(" { current->exception += *yytext ; ++roundCount ; } @@ -2217,7 +2249,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN( FuncQual ) ; } <ExcpRound>. { - current->exception += yytext; + current->exception += *yytext; + } +<ExcpList>"{" { + unput('{'); BEGIN( FuncQual ); + } +<ExcpList>"\n" { + current->exception += ' '; + } +<ExcpList>. { + current->exception += *yytext; } <Function>"(" { current->type += current->name ; current->name = current->args ; @@ -2235,29 +2276,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->name=current->name.simplifyWhiteSpace(); current->type=current->type.simplifyWhiteSpace(); current->args=current->args.simplifyWhiteSpace(); - //QCString &cn=current->name; - //QCString &rn=current_root->name; - //int i; - //if ((i=cn.findRev("::"))!=-1) // name contains scope - //{ - // if (cn.left(i)==rn.right(i)) // scope name is redundant - // { - // cn=cn.right(cn.length()-i-2); // strip scope - // //printf("new name=`%s'\n",cn.data()); - // } - //} current->fileName = yyFileName; current->startLine = yyLineNr; if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) ) { int tempArg=current->name.find('<'); QCString tempName; - if (tempArg==-1) - tempName=current->name; - else - tempName=current->name.left(tempArg); - if (current->type.isEmpty() && tempName.find("operator")==-1 && - (tempName.find('*')!=-1 || tempName.find('&')!=-1)) + static QRegExp re("operator[^a-z_A-Z0-9]"); + if (tempArg==-1) tempName=current->name; else tempName=current->name.left(tempArg); + if ((current->type.isEmpty() && tempName.find(re)==-1) || + current->type.left(8)=="typedef " + ) { //printf("Scanner.l: found in class variable: `%s' `%s' `%s'\n", // current->type.data(),current->name.data(),current->args.data()); @@ -2268,12 +2297,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) //printf("Scanner.l: found in class function: `%s' `%s' `%s'\n", // current->type.data(),current->name.data(),current->args.data()); current->section = Entry::FUNCTION_SEC ; + current->proto = *yytext==';'; } } else // a global function prototype or function variable { + static QRegExp re("([^)]*)"); //printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data()); - QRegExp re("([^)]*)"); if (!current->type.isEmpty() && (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef ")) { @@ -2305,11 +2335,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) curlyCount=0; BEGIN( SkipCurly ) ; } - //else if( *yytext == ':' ) - //{ - // //addToBody(yytext); - // BEGIN( SkipInits ) ; - //} else { if (previous->section!=Entry::VARIABLE_SEC) @@ -2359,11 +2384,25 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) lastAfterDocContext = SkipCurlyEndDoc; afterDocTerminator = '}'; if (yytext[yyleng-3]=='/') + { + current->briefLine = yyLineNr; + current->briefFile = yyFileName; BEGIN(AfterDocLine); + } else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) + { + current->briefLine = yyLineNr; + current->briefFile = yyFileName; + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDocBrief); + } else + { + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN(AfterDoc); + } } } <SkipCurlyEndDoc>"}" { @@ -2667,9 +2706,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) removeSlashes=(yytext[1]=='/'); tmpDocType=-1; if (YY_START==ReadBody) + { current->doc+="\n\n"; + } else + { current->doc.resize(0); + } + current->docLine = yyLineNr; + current->docFile = yyFileName; lastDocContext = YY_START; if (current_root->section & Entry::SCOPE_MASK) { @@ -2696,9 +2741,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) { tmpDocType=-1; if (YY_START==ReadBody) + { current->doc+="\n\n"; + } else + { current->doc.resize(0); + } + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN( Doc ); } else // Use the javadoc style @@ -2708,6 +2759,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) tmpDocType=-1; current->doc+="\n\n"; lastDocContext = ReadBody; + current->docLine = yyLineNr; + current->docFile = yyFileName; BEGIN( Doc ); } else @@ -2715,6 +2768,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) tmpDocType=Doc; current->doc.resize(0); current->brief.resize(0); + current->docLine = yyLineNr; + current->docFile = yyFileName; + current->briefLine = yyLineNr; + current->briefFile = yyFileName; BEGIN( JavaDoc ); } } diff --git a/src/translator_br.h b/src/translator_br.h index d8e668f..42d5d93 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -13,15 +13,12 @@ * Brazilian Portuguese version by * Fabio "FJTC" Jun Takada Chino <chino@icmc.sc.usp.br> * http://www.icmc.sc.usp.br/~chino - * Version: 1.2.11 (2001/11/23) - * - * News: - * - Everything was revised. + * Version: 1.2.13 (2002/01/24) */ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian: public TranslatorAdapter_1_2_13 +class TranslatorBrazilian: public Translator { public: @@ -1313,5 +1310,26 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_13 { return "Referências"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementa "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementado em "+trWriteList(numEntries)+"."; + } + }; #endif diff --git a/src/translator_cz.h b/src/translator_cz.h index 987a8ed..76b6919 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -131,6 +131,9 @@ // 2001/11/06 // - trReferences() implemented. // +// 2002/01/23 +// - trImplementedFromList() and trImplementedInList() implemented +// (new since 1.2.13) // // Todo // ---- @@ -1479,6 +1482,26 @@ class TranslatorCzech : public TranslatorAdapter_1_2_13 return decode("Odkazuje se na"); } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementuje "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementováno v "+trWriteList(numEntries)+"."; + } + }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_en.h b/src/translator_en.h index 9ad7221..7b986db 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -1385,7 +1385,7 @@ class TranslatorEnglish : public Translator } /*! used in member documentation blocks to produce a list of - * all members that implementation this member. + * all members that implement this abstract member. */ virtual QCString trImplementedInList(int numEntries) { diff --git a/src/translator_fr.h b/src/translator_fr.h index 375afbc..a85defd 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2002 by Dimitri van Heesch. + * Copyright (C) 1997-2001 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -33,11 +33,13 @@ * | QCString trIncludeFile() * | QCString trVerbatimText(const char *f) * -------------+------------------------------------------------------------ + * 2002-01-23 | Update for new since 1.2.13 + * -------------+------------------------------------------------------------ */ #ifndef TRANSLATOR_FR_H #define TRANSLATOR_FR_H -class TranslatorFrench : public TranslatorAdapter_1_2_13 +class TranslatorFrench : public Translator { public: QCString idLanguage() @@ -1232,5 +1234,25 @@ class TranslatorFrench : public TranslatorAdapter_1_2_13 { return "Références"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implémente "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implémenté dans "+trWriteList(numEntries)+"."; + } + }; #endif diff --git a/src/translator_hr.h b/src/translator_hr.h index 603d766..0783a5d 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -44,11 +44,13 @@ // - Added strings for 1.2.11 // - better output for C documentation (trCompoundMembersDescription(), trClassDocumentation()) // +// 2001/11/13 +// - Added strings for 1.2.13 #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public TranslatorAdapter_1_2_13 +class TranslatorCroatian : public Translator { private: /*! to avoid macro redefinition from translator_cz.h */ @@ -1019,6 +1021,25 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_13 { return "Reference"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementira "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementirano u "+trWriteList(numEntries)+"."; + } }; #endif diff --git a/src/translator_it.h b/src/translator_it.h index 9472dab..383b198 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -19,28 +19,29 @@ * * Revision history * - * Initial Italian Translation by Ahmed Aldo Faisal - * Revised and completed by Alessandro Falappa (since June 1999) - * Updates: - * 2001/11: corrected the translation fixing the issues reported by the translator.pl script - * translated new items used since version 1.2.11 - * 2001/08: corrected the translation fixing the issues reported by the translator.pl script - * translated new items used since version 1.2.7 - * 2001/05: adopted new translation mechanism (trough adapters), - * translated new items used since version 1.2.5 and 1.2.6, - * revised those function returning strings in OPTIMIZE_OTPUT_FOR_C case, - * corrections regarding the plurals of some english terms mantained in the translation, - * changed some terms to better suit the sense - * 2001/02: translated new items used since version 1.2.4 - * 2000/11: modified slightly the translation in trLegendDocs() function, - * translated new items used since version 1.2.1 and 1.2.2 - * 2000/08: translated new items used since version 1.1.3, 1.1.4, 1.1.5 and 1.2.0 - * 2000/03: translated new items used since version 1.0 and 1.1.0 - * 1999/19: entirely rewritten the translation to correct small variations due - * to feature additions and to conform to the layout of the latest - * commented translator.h for the english language - * 1999/09: corrected some small typos in the "new since 0.49-990425" section - * added the "new since 0.49-990728" section + * 2002/01: translated new items used since version 1.2.13 + * updated e-mail address + * 2001/11: corrected the translation fixing the issues reported by the translator.pl script + * translated new items used since version 1.2.11 + * 2001/08: corrected the translation fixing the issues reported by the translator.pl script + * translated new items used since version 1.2.7 + * 2001/05: adopted new translation mechanism (trough adapters), + * translated new items used since version 1.2.5 and 1.2.6, + * revised those function returning strings in OPTIMIZE_OTPUT_FOR_C case, + * corrections regarding the plurals of some english terms mantained in the translation, + * changed some terms to better suit the sense + * 2001/02: translated new items used since version 1.2.4 + * 2000/11: modified slightly the translation in trLegendDocs() function, + * translated new items used since version 1.2.1 and 1.2.2 + * 2000/08: translated new items used since version 1.1.3, 1.1.4, 1.1.5 and 1.2.0 + * 2000/03: translated new items used since version 1.0 and 1.1.0 + * 1999/19: entirely rewritten the translation to correct small variations due + * to feature additions and to conform to the layout of the latest + * commented translator.h for the english language + * 1999/09: corrected some small typos in the "new since 0.49-990425" section + * added the "new since 0.49-990728" section + * 1999/06: revised and completed by Alessandro Falappa (actual mantainer) + * 1999/??: initial italian translation by Ahmed Aldo Faisal */ /****************************************************************************** @@ -55,13 +56,13 @@ * tecnica (ad es "lista dei file" e non "lista dei files") * * Se avete suggerimenti sulla traduzione di alcuni termini o volete segnalare - * eventuali sviste potete scrivermi all'indirizzo: afalappa@interfree.it + * eventuali sviste potete scrivermi all'indirizzo: alessandro@falappa.net */ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public TranslatorAdapter_1_2_13 +class TranslatorItalian : public Translator { public: @@ -1321,6 +1322,26 @@ class TranslatorItalian : public TranslatorAdapter_1_2_13 { return "Riferimenti"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implementa "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implementato in "+trWriteList(numEntries)+"."; + } }; #endif diff --git a/src/translator_ru.h b/src/translator_ru.h index 49c24dc..2e3e026 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -50,7 +50,7 @@ #ifndef TRANSLATOR_RU_H #define TRANSLATOR_RU_H -class TranslatorRussian : public TranslatorAdapter_1_2_13 +class TranslatorRussian : public Translator { private: /*! The Decode() inline assumes the source written in the @@ -746,7 +746,12 @@ class TranslatorRussian : public TranslatorAdapter_1_2_13 */ virtual QCString trReimplementedFromList(int numEntries) { - return decode("ðÅÒÅÏÐÒÅÄÅÌÑÅÔ ÍÅÔÏÄ ÐÒÅÄËÁ ")+trWriteList(numEntries)+"."; + QCString result="ðÅÒÅÏÐÒÅÄÅÌÑÅÔ ÍÅÔÏÄ"; + if(numEntries>1) + result+="Ù ÐÒÅÄËÏ×"; + else + result+=" ÐÒÅÄËÁ"; + return decode(result+" ")+trWriteList(numEntries)+"."; } /*! used in member documentation blocks to produce a list of @@ -1369,6 +1374,26 @@ class TranslatorRussian : public TranslatorAdapter_1_2_13 return "ðÅÒÅËÒÅÓÔÎÙÅ ÓÓÙÌËÉ"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "úÁÍÅÝÁÅÔ "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "úÁÍÅÝÁÅÔÓÑ × "+trWriteList(numEntries)+"."; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index 5e20126..35b26be 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -570,7 +570,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) result+="< "; // insert extra space for layouting (nested) templates } else if (i>0 && c=='>' && // current char is a > - (isId(s.at(i-1)) || isspace(s.at(i-1))) && // prev char is an id char or space + (isId(s.at(i-1)) || isspace(s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space (i<8 || !findOperator(s,i)) // string in front is not "operator" ) { @@ -1546,6 +1546,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, return TRUE; } +#if 0 static void mergeArgument(Argument *srcA,Argument *dstA, const QCString &className, const QCString &namespaceName, @@ -1779,6 +1780,7 @@ done: // dstA->type.data(),dstA->name.data()); return; } +#endif /*! @@ -1885,8 +1887,8 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ++srcAli,++dstAli ) { - mergeArgument(srcA,dstA,className,namespaceName, - usingNamespaces,usingClasses); + //mergeArgument(srcA,dstA,className,namespaceName, + // usingNamespaces,usingClasses); } MATCH return TRUE; // all arguments match @@ -2213,7 +2215,12 @@ bool getDefs(const QCString &scName,const QCString &memberName, } } } - if (found) return TRUE; + if (found) + { + gd=md->getGroupDef(); + if (gd && gd->isLinkable()) nd=0; else gd=0; + return TRUE; + } } else // no scope => global function { diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 86fb548..ac9b230 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -930,7 +930,7 @@ static void writeXMLDocBlock(QTextStream &t, const QCString &fileName, int lineNr, const QCString &scope, - const QCString &name, + MemberDef *md, const QCString &text) { QCString stext = text.stripWhiteSpace(); @@ -938,10 +938,10 @@ static void writeXMLDocBlock(QTextStream &t, XMLGenerator *xmlGen = new XMLGenerator; //xmlGen->startParMode(); parseDoc(*xmlGen, - fileName, // input definition file - lineNr, // input definition line - scope, // scope (which should not be linked to) - name, // member (which should not be linked to) + fileName, // input definition file + lineNr, // input definition line + scope, // scope (which should not be linked to) + md, // member (which should not be linked to) stext+"\n" // actual text ); xmlGen->endParMode(); @@ -1112,10 +1112,9 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De if (isFunc) //function { - ArgumentList *declAl = new ArgumentList; + ArgumentList *declAl = md->declArgumentList(); ArgumentList *defAl = md->argumentList(); - stringToArgumentList(md->argsString(),declAl); - if (declAl->count()>0) + if (declAl && declAl->count()>0) { ArgumentListIterator declAli(*declAl); ArgumentListIterator defAli(*defAl); @@ -1164,7 +1163,6 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De if (defArg) ++defAli; } } - delete declAl; } else if (md->memberType()==MemberDef::Define && md->argsString()!=0) // define @@ -1213,10 +1211,10 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De } } t << " <briefdescription>" << endl; - writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md->name(),md->briefDescription()); + writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription()); t << " </briefdescription>" << endl; t << " <detaileddescription>" << endl; - writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md->name(),md->documentation()); + writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation()); t << " </detaileddescription>" << endl; if (md->getDefLine()!=-1) { |