diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-07 17:28:47 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-07 17:28:47 (GMT) |
commit | eab6039875f05c8776119469fff0df8761b9b3a2 (patch) | |
tree | e0730802a8bb7eac348a5e39cffb88118aa42020 /src | |
parent | e4cebf12a245705a0ecb714cd3794750af9d0844 (diff) | |
download | Doxygen-eab6039875f05c8776119469fff0df8761b9b3a2.zip Doxygen-eab6039875f05c8776119469fff0df8761b9b3a2.tar.gz Doxygen-eab6039875f05c8776119469fff0df8761b9b3a2.tar.bz2 |
Release-1.2.4-20010107
Diffstat (limited to 'src')
127 files changed, 1084 insertions, 356 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 31ab7f1..aadd7ad 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2,7 +2,7 @@ # # # -# Copyright (C) 1997-2000 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 diff --git a/src/bufstr.h b/src/bufstr.h new file mode 100644 index 0000000..576dac7 --- /dev/null +++ b/src/bufstr.h @@ -0,0 +1,61 @@ +/****************************************************************************** + * + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ +#ifndef _BUFSTR_H +#define _BUFSTR_H + +#include "qtbc.h" + +/*! String that can deal more efficiently with large large numbers + * of resizing. + */ +class BufStr : public QCString +{ + public: + BufStr(int size) : QCString(size), offset(0), spareRoom(10240) {} + void addChar(char c) + { + if (offset>=size()) + { + resize(size()+spareRoom); + } + data()[offset++]=c; + } + void addArray(const char *a,int len) + { + if (offset+len>=size()) + { + resize(size()+len+spareRoom); + } + memcpy(data()+offset,a,len); + offset+=len; + } + uint curPos() { return offset; } + void skip(uint s) + { + if (offset+s>=size()) + { + resize(size()+s+spareRoom); + } + offset+=s; + } + private: + uint offset; + const int spareRoom; // 10Kb extra room to avoid frequent resizing +}; + +#endif diff --git a/src/classdef.cpp b/src/classdef.cpp index e339c41..93a7921 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -51,15 +51,8 @@ ClassDef::ClassDef( { //name=n; - QCString compoundName; - switch(ct) - { - case Class: compoundName="class"; break; - case Struct: compoundName="struct"; break; - case Union: compoundName="union"; break; - case Interface: compoundName="interface"; break; - case Exception: compoundName="exception"; break; - } + compType=ct; + QCString compoundName=compoundTypeString(); if (fName) fileName=stripExtension(fName); else @@ -86,7 +79,6 @@ ClassDef::ClassDef( allMemberNameInfoDict = new MemberNameInfoDict(1009); visited=FALSE; setReference(lref); - compType=ct; incInfo=0; tempArgs=0; prot=Public; @@ -654,13 +646,10 @@ void ClassDef::writeDocumentation(OutputList &ol) QCString pageTitle=name().copy(); QCString pageType; ArgumentList *outerTempArgList = outerTemplateArguments(); - switch(compType) - { - case Class: pageType+=" Class"; break; - case Struct: pageType+=" Struct"; break; - case Union: pageType+=" Union"; break; - default: pageType+=" Interface"; break; - } + QCString cType=compoundTypeString(); + toupper(cType.at(0)); + pageType+=" "; + pageType+=cType; pageTitle+=pageType+" Reference"; if (outerTempArgList) pageTitle.prepend(" Template"); startFile(ol,fileName,pageTitle); @@ -732,15 +721,7 @@ void ClassDef::writeDocumentation(OutputList &ol) if (!Config::genTagFile.isEmpty()) { - tagFile << " <compound kind=\""; - switch(compType) - { - case Class: tagFile << "class"; break; - case Struct: tagFile << "struct"; break; - case Union: tagFile << "union"; break; - case Interface: tagFile << "interface"; break; - case Exception: tagFile << "exception"; break; - } + tagFile << " <compound kind=\"" << compoundTypeString(); tagFile << "\">" << endl; tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl; @@ -1891,15 +1872,8 @@ void ClassDef::generateXML(QTextStream &t) { if (name().find('@')!=-1) return; // skip anonymous compounds t << " <compounddef id=\"" - << getOutputFileBase() << "\" type=\""; - switch(compType) - { - case Class: t << "class"; break; - case Struct: t << "struct"; break; - case Union: t << "union"; break; - default: t << "interface"; break; - } - t << "\">" << endl; + << getOutputFileBase() << "\" type=\"" + << compoundTypeString() << "\">" << endl; t << " <compoundname>"; writeXMLString(t,name()); t << "</compoundname>" << endl; @@ -1996,3 +1970,22 @@ void ClassDef::generateXML(QTextStream &t) } t << " </compounddef>" << endl; } + +PackageDef *ClassDef::packageDef() const +{ + return fileDef ? fileDef->packageDef() : 0; +} + +QCString ClassDef::compoundTypeString() const +{ + switch (compType) + { + case Class: return "class"; + case Struct: return "struct"; + case Union: return "union"; + case Interface: return "interface"; + case Exception: return "exception"; + } + return "unknown"; +} + diff --git a/src/classdef.h b/src/classdef.h index f9c26dd..329e47b 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -43,6 +43,7 @@ class UsesClassDict; class MemberGroupList; class MemberGroupDict; class QTextStream; +class PackageDef; struct IncludeInfo; class ClassDef : public Definition @@ -62,6 +63,7 @@ class ClassDef : public Definition QCString getOutputFileBase() const { return fileName; } QCString displayName() const; CompoundType compoundType() const { return compType; } + QCString compoundTypeString() const; void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0); BaseClassList *baseClasses() { return inherits; } void insertSuperClass(ClassDef *,Protection p,Specifier s,const char *t=0); @@ -126,6 +128,8 @@ class ClassDef : public Definition void generateXML(QTextStream &t); void generateXMLSection(QTextStream &t,MemberList *ml,const char *type); + + PackageDef *packageDef() const; protected: void addUsedInterfaceClasses(MemberDef *md,const char *typeStr); diff --git a/src/classlist.cpp b/src/classlist.cpp index f62ff36..6061d47 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -48,7 +48,7 @@ ClassListIterator::ClassListIterator(const ClassList &cllist) : { } -void ClassList::writeDeclaration(OutputList &ol) +void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,const char *header) { if (count()>0) { @@ -56,7 +56,9 @@ void ClassList::writeDeclaration(OutputList &ol) bool found=FALSE; while (cd) { - if (cd->name().find('@')==-1) + if (cd->name().find('@')==-1 && + (filter==0 || *filter==cd->compoundType()) + ) { bool isLink = cd->isLinkable(); if (isLink || !Config::hideClassFlag) @@ -64,24 +66,25 @@ void ClassList::writeDeclaration(OutputList &ol) if (!found) { ol.startMemberHeader(); - parseText(ol,theTranslator->trCompounds()); + if (header) + { + parseText(ol,header); + } + else + { + parseText(ol,theTranslator->trCompounds()); + } ol.endMemberHeader(); ol.startMemberList(); found=TRUE; } if (!Config::genTagFile.isEmpty()) { - tagFile << " <class>" << convertToXML(cd->name()) << "</class>" << endl; + tagFile << " <class kind=\"" << cd->compoundTypeString() + << "\">" << convertToXML(cd->name()) << "</class>" << endl; } ol.startMemberItem(FALSE); - switch (cd->compoundType()) - { - case ClassDef::Class: ol.writeString("class"); break; - case ClassDef::Struct: ol.writeString("struct"); break; - case ClassDef::Union: ol.writeString("union"); break; - case ClassDef::Interface: ol.writeString("interface"); break; - case ClassDef::Exception: ol.writeString("exception"); break; - } + ol.writeString(cd->compoundTypeString()); ol.writeString(" "); ol.insertMemberAlign(); if (isLink) diff --git a/src/classlist.h b/src/classlist.h index 7162459..02521d0 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -30,7 +30,8 @@ class ClassList : public QList<ClassDef> ~ClassList(); int compareItems(GCI item1,GCI item2); - void writeDeclaration(OutputList &ol); + void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter=0, + const char *header=0); }; class ClassListIterator : public QListIterator<ClassDef> @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -1009,7 +1009,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" addType(); g_name+=yytext; } -<Body>{SCOPENAME}{B}*"<"[^\n\"\>]*">"/{B}* { // A<T> *pt; +<Body>{SCOPENAME}{B}*"<"[^\n\/\{\"\>]*">"/{B}* { // A<T> *pt; generateClassLink(*g_code,yytext); addType(); g_name+=yytext; @@ -1129,6 +1129,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" g_name.resize(0); } if (*yytext!=',') g_type.resize(0); + if (*yytext==';') g_name.resize(0); g_args.resize(0); } <Body>"]" { diff --git a/src/config.h b/src/config.h index 9e5c906..0ceec45 100644 --- a/src/config.h +++ b/src/config.h @@ -8,7 +8,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/config.l b/src/config.l index 2aa605c..df0d591 100644 --- a/src/config.l +++ b/src/config.l @@ -8,7 +8,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/constexp.h b/src/constexp.h index f31e19d..2b09ed9 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/constexp.l b/src/constexp.l index f73e293..b6604ff 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp index 25b94b4..62d73dd 100644 --- a/src/cppvalue.cpp +++ b/src/cppvalue.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/cppvalue.h b/src/cppvalue.h index 32e0566..159e217 100644 --- a/src/cppvalue.h +++ b/src/cppvalue.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/debug.cpp b/src/debug.cpp index 5398991..6ec6d7c 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/debug.h b/src/debug.h index ce280df..9fbced0 100644 --- a/src/debug.h +++ b/src/debug.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/declinfo.h b/src/declinfo.h index 6cf6096..b337aae 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/declinfo.l b/src/declinfo.l index 7a1b020..bfa599e 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -114,7 +114,7 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) name += yytext; BEGIN(Operator); } -<Start>(~{B}*)?{ID} { +<Start>(~{B}*)?{ID}({B}*"["{B}*"]")* { // the []'s are for Java addTypeName(); name += yytext; } @@ -228,6 +228,13 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t, //printf("type=`%s' class=`%s' name=`%s' args=`%s'\n", // type.data(),scope.data(),name.data(),args.data()); + int nb = name.findRev('['); + if (nb!=-1) // correct for [] in name ambigity (due to Java return type allowing []) + { + args.prepend(name.right(name.length()-nb)); + name=name.left(nb); + } + cl=scope.copy(); //printf("scope=`%s'\n",scope.data()); int il=0,ir=0; diff --git a/src/defargs.h b/src/defargs.h index 1678797..7bfae61 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/defargs.l b/src/defargs.l index 05a26b6..58af23d 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/define.cpp b/src/define.cpp index ea8d8e3..424e0be 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/define.h b/src/define.h index 060270e..2715450 100644 --- a/src/define.h +++ b/src/define.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/definition.cpp b/src/definition.cpp index 13707d8..4805638 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/definition.h b/src/definition.h index 378faf3..e92292e 100644 --- a/src/definition.h +++ b/src/definition.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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,7 +33,10 @@ class Definition { public: /*! Types of derived classes */ - enum DefType { TypeClass, TypeMember, TypeFile, TypeGroup, TypeNamespace }; + enum DefType + { + TypeClass, TypeMember, TypeFile, TypeGroup, TypeNamespace, TypePackage + }; /*! Use this for dynamic inspection of the derived class */ virtual DefType definitionType() = 0; diff --git a/src/diagram.cpp b/src/diagram.cpp index eed5cd2..b74abc8 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/diagram.h b/src/diagram.h index 4338772..7b8182e 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -804,6 +804,7 @@ TR [tT][rR] TT [tT][tT] UL [uU][lL] VAR [vV][aA][rR] +BLOCKQUOTE [bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE] DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") %option noyywrap @@ -821,6 +822,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") %x DocCodeBlock %x DocInternal %x DocLink +%x DocJavaLink %x DocLinkText %x DocSkipWord %x DocInclude @@ -959,12 +961,25 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") scanString(theTranslator->trReimplementedForInternalReasons()+"\n"); } <DocScan>{CMD}"link"/{BN} { BEGIN( DocLink ); } +<DocScan>"{"{CMD}"link"{BN}+ { BEGIN( DocJavaLink ); } <DocSkipWord>[a-z_A-Z0-9.:()]+ { BEGIN( DocScan ); } -<DocLink>[a-z_A-Z0-9:#.,~&*/<>()\-\+]+ { // TODO: support operators as well! +<DocLink>[a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+ { // TODO: support operators as well! linkRef = stripKnownExtensions(yytext); linkText = ""; BEGIN( DocLinkText ); } +<DocJavaLink>([a-z_A-Z0-9]+".")+ { /* Skip scope prefix (TODO: fix) */ } +<DocJavaLink>([a-z_A-Z0-9]+"#")?[a-z_A-Z0-9]+("("[a-z_A-Z0-9.,~&*()\[\]]*")")? { // TODO: support operators as well! + linkRef = yytext; + } +<DocJavaLink>"}" { + //printf("Trying to link `%s'\n",linkRef.data()); + if (!generateLink(*outDoc,className,linkRef,inSeeBlock,0)) + { + warn(yyFileName,yyLineNr,"Warning: link to unknown entity `%s' in the documentation of this entity!",linkRef.data()); + } + BEGIN( DocScan ); + } <DocLinkText>. { linkText += *yytext; } <DocLinkText>"\n" { linkText += " "; } <DocLink,DocLinkText>{CMD}"endlink" { // <- needed for things like \endlink. @@ -972,7 +987,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") // className.data(),linkRef.data(),linkText.data()); if (!generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace())) { - warn(yyFileName,yyLineNr,"Warning: link to unknown section %s in the documentation of this entity!",linkRef.data()); + warn(yyFileName,yyLineNr,"Warning: link to unknown entity `%s' in the documentation of this entity!",linkRef.data()); } BEGIN( DocScan ); } @@ -1718,13 +1733,13 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") generateRef(*outDoc,className,yytext,inSeeBlock); BEGIN(DocScan); } -<DocScan,DocRefName>({SCOPEMASK}"::")?"operator()("[a-z_A-Z0-9,\<\> \t\*\&]*")" { +<DocScan,DocRefName>({SCOPEMASK}"::")?"operator()"("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { QCString oName=yytext; generateRef(*outDoc,className, removeRedundantWhiteSpace(oName),inSeeBlock); BEGIN(DocScan); } -<DocScan,DocRefName>({SCOPEMASK}"::")?"operator"[^(\r\n.,]+"("[a-z_A-Z0-9,\<\> \t\*\&]*")" { +<DocScan,DocRefName>({SCOPEMASK}"::")?"operator"[^(\r\n.,]+("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { QCString oName=yytext; generateRef(*outDoc,className, removeRedundantWhiteSpace(oName),inSeeBlock); @@ -1827,6 +1842,8 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") <DocScan>"</"{HEAD}{ATTR}">" <DocScan>"<"{BODY}{ATTR}">" <DocScan>"</"{BODY}{ATTR}">" +<DocScan>"<"{BLOCKQUOTE}{ATTR}">" +<DocScan>"</"{BLOCKQUOTE}{ATTR}">" <DocScan>"<"{CODE}{ATTR}">" { outDoc->startTypewriter(); } <DocScan>"</"{CODE}{ATTR}">" { outDoc->endTypewriter(); } <DocScan>"<"{DFN}{ATTR}">" { outDoc->startTypewriter(); } diff --git a/src/dot.cpp b/src/dot.cpp index e4a3932..6e9f823 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 8a12922..1b31b6f 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -57,6 +57,8 @@ #include "xml.h" #include "reflist.h" #include "page.h" +#include "packagedef.h" +#include "bufstr.h" #if defined(_MSC_VER) || defined(__BORLANDC__) #define popen _popen @@ -102,6 +104,8 @@ OutputList *outputList = 0; // list of output generating objects PageInfo *mainPage = 0; QIntDict<QCString> memberHeaderDict(1009); // dictionary of the member groups heading QIntDict<QCString> memberDocDict(1009); // dictionary of the member groups heading + +PackageSDict packageDict(257); // java packages void clearAll() @@ -192,6 +196,7 @@ int documentedNamespaces; int documentedNamespaceMembers; int documentedIncludeFiles; int documentedPages; +int documentedPackages; QTextStream tagFile; @@ -2101,7 +2106,8 @@ static void transferFunctionDocumentation() // check if not in different but documented files if (Config::extractAllFlag || fdef==fdec || - !fdef->hasDocumentation() || !mdec->hasDocumentation()) + (fdef!=0 && (!fdef->hasDocumentation() || !mdec->hasDocumentation())) + ) { //printf("Found member %s: def in %s and dec in %s\n", // mn->memberName(),mdef->getFileDef()->name().data(), @@ -3021,10 +3027,11 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl { Debug::print(Debug::FindMembers,0, "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d," - "isFunc=%d mGrpId=%d tArgList=%p=\"%s\" scopeSpec=%s " - "memberSpec=%s memSpec=%d\n", + "isFunc=%d mGrpId=%d tArgList=%p=\"%s\" mtArgList=%p=\"%s\" " + "scopeSpec=%s memberSpec=%s memSpec=%d\n", root,funcDecl.data(),related.data(),overloaded,isFunc,root->mGrpId, root->tArgList,tempArgListToString(root->tArgList).data(), + root->mtArgList,tempArgListToString(root->mtArgList).data(), root->scopeSpec.data(),root->memberSpec.data(),root->memSpec ); //if (Config::includeSourceFlag && !root->body.isEmpty()) @@ -3248,7 +3255,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl // no template specifiers found during parsing (because \fn was used), // but there are template names in the scope, so we build the template // specifiers from that. - printf("Building template list from `%s'\n",classTempList.data()); + //printf("Building template list from `%s'\n",classTempList.data()); root->tArgList = new ArgumentList; QRegExp re(idMask); int i,p=0,l; @@ -3619,6 +3626,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl if (!newMember && rmd) // member already exists as rmd -> add docs { //printf("addMemberDocs for related member %s\n",root->name.data()); + rmd->setMemberDefTemplateArguments(root->mtArgList); addMemberDocs(root,rmd,funcDecl,0,overloaded); } } @@ -3694,13 +3702,12 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl md->setMemberClass(cd); md->setMemberSpecifiers(root->memSpec); md->setDefinition(funcDecl); - //md->setDefFile(root->fileName); - //md->setDefLine(root->startLine); md->setPrototype(root->proto); md->setDocumentation(root->doc); md->setBriefDescription(root->brief); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); + md->setMemberDefTemplateArguments(root->mtArgList); mn->append(md); cd->insertMember(md); cd->insertUsedFile(root->fileName); @@ -4764,6 +4771,52 @@ static void findMainPage(Entry *root) //---------------------------------------------------------------------------- +/*! Search for all Java package statements + */ +static void buildPackageList(Entry *root) +{ + if (root->section == Entry::PACKAGE_SEC) + { + PackageDef *pd=0; + if (!root->name.isEmpty() && (pd=packageDict.find(root->name))==0) + { + pd = new PackageDef(root->fileName,root->startLine,root->name); + packageDict.inSort(root->name,pd); + } + if (pd) + { + bool ambig; + FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); + if (fd) + { + fd->setPackageDef(pd); + } + } + } + EntryListIterator eli(*root->sublist); + Entry *e; + for (;(e=eli.current());++eli) + { + buildPackageList(e); + } +} + +//---------------------------------------------------------------------------- + +/*! Add Java classes to their respective packages */ +static void addClassesToPackages() +{ + ClassDef *cd; + ClassListIterator cli(classList); + for (;(cd=cli.current());++cli) + { + PackageDef *pd = cd->packageDef(); + if (pd) pd->addClass(cd); + } +} + +//---------------------------------------------------------------------------- + static void resolveUserReferences() { QDictIterator<SectionInfo> sdi(sectionDict); @@ -4931,17 +4984,6 @@ static void generateGroupDocs() GroupDef *gd; for (;(gd=gli.current());++gli) { - //printf("group %s #members=%d\n",gd->name().data(),gd->countMembers()); - //if (gd->countMembers()>0) - //{ - // gd->writeDocumentation(*outputList); - //} - //else - //{ - // warn(gd->getDefFileName(),gd->getDefLine(), - // "Warning: group %s does not have any (documented) members.", - // gd->name().data()); - //} if (!gd->isReference()) { gd->writeDocumentation(*outputList); @@ -4950,6 +4992,23 @@ static void generateGroupDocs() } //---------------------------------------------------------------------------- + +static void generatePackageDocs() +{ + writePackageIndex(*outputList); + + if (packageDict.count()>0) + { + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd; + for (pdi.toFirst();(pd=pdi.current());++pdi) + { + pd->writeDocumentation(*outputList); + } + } +} + +//---------------------------------------------------------------------------- // generate module pages static void generateNamespaceDocs() @@ -5581,7 +5640,7 @@ static void readFormulaRepository() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2000\n\n",versionString); + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2001\n\n",versionString); msg("You can use doxygen in four ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -6126,6 +6185,9 @@ int main(int argc,char **argv) msg("Building page list...\n"); buildPageList(root); + msg("Buidling package list...\n"); + buildPackageList(root); + msg("Search for main page...\n"); findMainPage(root); @@ -6145,6 +6207,9 @@ int main(int argc,char **argv) msg("Computing member relations...\n"); computeMemberRelations(); + msg("Adding classes to their packages...\n"); + addClassesToPackages(); + if (Config::haveDotFlag && Config::collGraphFlag) { msg("Computing class implementation usage relations...\n"); @@ -6208,7 +6273,7 @@ int main(int argc,char **argv) documentedNamespaces = countNamespaces(); documentedNamespaceMembers = countNamespaceMembers(); documentedPages = countRelatedPages(); - //documentedIncludeFiles = countIncludeFiles(); + documentedPackages = countPackages(); // compute the shortest possible names of all files // without loosing the uniqueness of the file names. @@ -6248,6 +6313,9 @@ int main(int argc,char **argv) msg("Generating group index...\n"); writeGroupIndex(*outputList); + msg("Generating package index...\n"); + generatePackageDocs(); + msg("Generating example index...\n"); writeExampleIndex(*outputList); diff --git a/src/doxygen.h b/src/doxygen.h index edfe602..00b339c 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -32,32 +32,7 @@ #include "formula.h" #include "section.h" #include "membergroup.h" - -class BufStr : public QCString -{ - public: - BufStr(int size) : QCString(size), offset(0), spareRoom(10240) {} - void addChar(char c) - { - if (offset>=size()) resize(size()+spareRoom); - data()[offset++]=c; - } - void addArray(const char *a,int len) - { - if (offset+len>=size()) resize(size()+len+spareRoom); - memcpy(data()+offset,a,len); - offset+=len; - } - uint curPos() { return offset; } - void skip(uint s) - { - if (offset+s>=size()) resize(size()+s+spareRoom); - offset+=s; - } - private: - uint offset; - const int spareRoom; // 10Kb extra room to avoid frequent resizing -}; +#include "packagedef.h" class PageSList; class PageSDict; @@ -83,7 +58,6 @@ extern MemberNameList memberNameList; extern MemberNameList functionNameList; extern MemberNameDict memberNameDict; extern MemberNameDict functionNameDict; -//extern StringDict substituteDict; extern FileList fileList; extern FileDict fileDict; extern ClassDef unrelatedClass; @@ -104,6 +78,7 @@ extern StringDict aliasDict; extern QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading extern QIntDict<QCString> memberDocDict; // dictionary of the member groups heading extern QDict<void> expandAsDefinedDict; +extern PackageSDict packageDict; extern int annotatedClasses; extern int hierarchyClasses; @@ -117,6 +92,7 @@ extern int documentedNamespaces; extern int documentedNamespaceMembers; extern int documentedIncludeFiles; extern int documentedPages; +extern int documentedPackages; extern QCString spaces; extern const char * getOverloadDocs(); diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 92c60f8..b08a714 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2000 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 @@ -28,7 +28,7 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \ reflist.h page.h sortdict.h translator_hu.h translator_kr.h \ translator_ro.h translator_si.h translator_cn.h ftvhelp.h \ - treeview.h tagreader.h + treeview.h tagreader.h packagedef.h SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \ entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \ @@ -39,7 +39,7 @@ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \ version.cpp language.cpp definition.cpp formula.cpp debug.cpp \ membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \ - reflist.cpp ftvhelp.cpp tagreader.cpp + reflist.cpp ftvhelp.cpp tagreader.cpp packagedef.cpp unix:LIBS += -L../qtools -lqtools win32:INCLUDEPATH += . win32-mingw:LIBS += -L../qtools -lqtools diff --git a/src/doxygen.t b/src/doxygen.t index d1f6a64..0608894 100644 --- a/src/doxygen.t +++ b/src/doxygen.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2000 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 diff --git a/src/doxysearch.cpp b/src/doxysearch.cpp index d14cf37..ddbdedd 100644 --- a/src/doxysearch.cpp +++ b/src/doxysearch.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/doxytag.l b/src/doxytag.l index 2d9e7b4..e2f3a55 100644 --- a/src/doxytag.l +++ b/src/doxytag.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -500,7 +500,7 @@ void parseFileOrDir(const char *fileName) void usage(const char *name) { - fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2000\n\n", + fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2001\n\n", versionString); fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n"); fprintf(stderr,"Usage: %s [-t tag_file] [-s index_file] [ html_file [html_file...] ]\n",name); diff --git a/src/entry.cpp b/src/entry.cpp index 829bc3b..297831f 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/entry.h b/src/entry.h index 2968b1e..05d85c1 100644 --- a/src/entry.h +++ b/src/entry.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -107,6 +107,7 @@ class Entry { public: + /*! Kind of entries that are supported */ enum Sections { CLASS_SEC = 0x00000001, STRUCT_SEC = 0x00000002, @@ -150,7 +151,8 @@ class Entry USINGDIR_SEC = 0x01100000, MAINPAGEDOC_SEC = 0x01200000, MEMBERGRP_SEC = 0x01300000, - USINGDECL_SEC = 0x01400000 + USINGDECL_SEC = 0x01400000, + PACKAGE_SEC = 0x01500000 }; enum MemberSpecifier { @@ -167,48 +169,48 @@ class Entry void addSubEntry (Entry* e) ; void reset(); - int section; // entry type (see Sections); - Protection protection; // class protection - MethodTypes mtype; // signal, slot, (dcop) method, or property? - bool stat; // static ? - bool explicitExternal; // explicitly defined as external? - bool proto; // prototype ? - int memSpec; // member specifiers - int initLines; // define/variable initializer lines to show - bool subGrouping; // automatically group class members? - Specifier virt; // virtualness of the entry - Entry *parent; // parent node in the tree - QCString type; // member type - QCString name; // member name - QCString args; // member argument string - QCString bitfields; // member's bit fields - ArgumentList *argList; // member arguments as a list - ArgumentList *tArgList; // template argument list - ArgumentList *mtArgList; // member template argument list - 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) - QCString brief; // brief description (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 - int endBodyLine; // line number where the definition ends - int mGrpId; // member group id - QList<Entry> *sublist; // entries that are children of this one - QList<BaseInfo> *extends; // list of base classes - QList<QCString> *groups; // list of groups this entry belongs to - QList<QCString> *anchors; // list of anchors defined in this entry - QCString fileName; // file this entry was extracted from - int startLine; // start line of entry in the source - int todoId; // id of the todo item of this entry - int testId; // id of the test item of this entry - TagInfo *tagInfo; // tag file info - static int num; // counts the total number of entries + int section; //!< entry type (see Sections); + Protection protection; //!< class protection + MethodTypes mtype; //!< signal, slot, (dcop) method, or property? + bool stat; //!< static ? + bool explicitExternal; //!< explicitly defined as external? + bool proto; //!< prototype ? + int memSpec; //!< member specifiers + int initLines; //!< define/variable initializer lines to show + bool subGrouping; //!< automatically group class members? + Specifier virt; //!< virtualness of the entry + Entry *parent; //!< parent node in the tree + QCString type; //!< member type + QCString name; //!< member name + QCString args; //!< member argument string + QCString bitfields; //!< member's bit fields + ArgumentList *argList; //!< member arguments as a list + ArgumentList *tArgList; //!< template argument list + ArgumentList *mtArgList; //!< member template argument list + 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) + QCString brief; //!< brief description (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 + int endBodyLine; //!< line number where the definition ends + int mGrpId; //!< member group id + QList<Entry> *sublist; //!< entries that are children of this one + QList<BaseInfo> *extends; //!< list of base classes + QList<QCString> *groups; //!< list of groups this entry belongs to + QList<QCString> *anchors; //!< list of anchors defined in this entry + QCString fileName; //!< file this entry was extracted from + int startLine; //!< start line of entry in the source + int todoId; //!< id of the todo item of this entry + int testId; //!< id of the test item of this entry + TagInfo *tagInfo; //!< tag file info + static int num; //!< counts the total number of entries private: Entry &operator=(const Entry &); } ; diff --git a/src/example.h b/src/example.h index d531978..425b488 100644 --- a/src/example.h +++ b/src/example.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/filedef.cpp b/src/filedef.cpp index b27f8ac..6402df3 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -57,6 +57,7 @@ FileDef::FileDef(const char *p,const char *nm,const char *lref) srcMemberDict = 0; usingDirList = 0; usingDeclList = 0; + package = 0; isSource = FALSE; docname = nm; if (Config::fullPathNameFlag) diff --git a/src/filedef.h b/src/filedef.h index 510b49a..6d0f71c 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -37,6 +37,7 @@ class NamespaceList; class NamespaceDict; class MemberGroupList; class MemberGroupDict; +class PackageDef; struct IncludeInfo { @@ -116,6 +117,9 @@ class FileDef : public Definition void insertNamespace(NamespaceDef *nd); void computeAnchors(); + void setPackageDef(PackageDef *pd) { package=pd; } + PackageDef *packageDef() const { return package; } + void addUsingDirective(NamespaceDef *nd); NamespaceList *getUsedNamespaces() const { return usingDirList; } void addUsingDeclaration(ClassDef *cd); @@ -169,6 +173,8 @@ class FileDef : public Definition /* user defined member groups */ MemberGroupList *memberGroupList; MemberGroupDict *memberGroupDict; + + PackageDef *package; }; #if 0 // obsolete diff --git a/src/filename.cpp b/src/filename.cpp index e5f224a..7214ee8 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/filename.h b/src/filename.h index 48c73ec..59928d7 100644 --- a/src/filename.h +++ b/src/filename.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/formula.cpp b/src/formula.cpp index abe529a..065f036 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/formula.h b/src/formula.h index a17f279..2c2fd51 100644 --- a/src/formula.h +++ b/src/formula.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/gifenc.cpp b/src/gifenc.cpp index 458d050..cdc1481 100644 --- a/src/gifenc.cpp +++ b/src/gifenc.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/gifenc.h b/src/gifenc.h index 0aff24e..2ec1d7b 100644 --- a/src/gifenc.h +++ b/src/gifenc.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 501ceb0..faccc93 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/groupdef.h b/src/groupdef.h index b8aaa40..649f70d 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 86c90e9..fdd71e4 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -144,7 +144,7 @@ void HtmlGenerator::writeFooterFile(QFile &file) << "align=\"middle\" border=0 width=110 height=53>\n" << "</a> $doxygenversion written by" << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>,\n" - << " © 1997-2000</small></address>\n" + << " © 1997-2001</small></address>\n" << "</body>\n" << "</html>\n"; } @@ -235,7 +235,7 @@ void HtmlGenerator::writeFooter(int part,bool external) default: if (footer.isEmpty()) t << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>,\n © " - "1997-2000</small></address>\n</body>\n</html>\n"; + "1997-2001</small></address>\n</body>\n</html>\n"; break; } @@ -430,7 +430,9 @@ void HtmlGenerator::endTextLink() void HtmlGenerator::writeHtmlLink(const char *url,const char *text) { - t << "<a href=\""; + t << "<a "; + if (Config::ftvHelpFlag) t << "target=\"top\" "; + t << "href=\""; if (url) t << url; t << "\">"; docify(text); diff --git a/src/htmlgen.h b/src/htmlgen.h index 0a0ebf1..4d7fa4f 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 1802a48..5ec135d 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/htmlhelp.h b/src/htmlhelp.h index cb899c6..affadb2 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/image.cpp b/src/image.cpp index 17d89b4..ccfa65f 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/image.h b/src/image.h index 3d4b1a4..178996b 100644 --- a/src/image.h +++ b/src/image.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/index.cpp b/src/index.cpp index 08a77cd..15cc2d4 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -36,6 +36,7 @@ #include "ftvhelp.h" #include "dot.h" #include "page.h" +#include "packagedef.h" //---------------------------------------------------------------------------- @@ -43,6 +44,8 @@ static bool g_memberIndexLetterUsed[256]; static bool g_fileIndexLetterUsed[256]; static bool g_namespaceIndexLetterUsed[256]; +const int maxItemsBeforeQuickIndex = 50; + //---------------------------------------------------------------------------- // strips w from s iff s starts with w @@ -829,14 +832,7 @@ void writeAnnotatedClassList(OutputList &ol) { if (cd->isLinkableInProject()) { - QCString type; - switch (cd->compoundType()) - { - case ClassDef::Class: type="class"; break; - case ClassDef::Struct: type="struct"; break; - case ClassDef::Union: type="union"; break; - default: type="interface"; break; - } + QCString type=cd->compoundTypeString(); ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName()); if (!cd->briefDescription().isEmpty()) { @@ -859,7 +855,42 @@ void writeAnnotatedClassList(OutputList &ol) FTVHelp::getInstance()->addContentsItem(FALSE,cd->getReference(),cd->getOutputFileBase(),0,cd->name()); } } - cd=classList.next(); + } + ol.endIndexList(); +} + +//---------------------------------------------------------------------------- + +void writePackageList(OutputList &ol) +{ + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; + bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; + ol.startIndexList(); + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd; + for (;(pd=pdi.current());++pdi) + { + ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name()); + if (!pd->briefDescription().isEmpty()) + { + ol.docify(" ("); + OutputList briefOutput(&ol); + parseDoc(briefOutput, + pd->getDefFileName(),pd->getDefLine(), + pd->name(),0, + abbreviate(pd->briefDescription(),pd->name())); + ol+=briefOutput; + ol.docify(")"); + } + ol.writeEndAnnoItem(pd->getOutputFileBase()); + if (hasHtmlHelp) + { + HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase()); + } + if (hasFtvHelp) + { + FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name()); + } } ol.endIndexList(); } @@ -1042,7 +1073,6 @@ void writeAnnotatedIndex(OutputList &ol) if (annotatedClasses==0) return; - //if (classList.count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); startFile(ol,"annotated","Annotated Index"); @@ -1069,7 +1099,6 @@ void writeAnnotatedIndex(OutputList &ol) ftvHelp->incContentsDepth(); } parseText(ol,theTranslator->trCompoundListDescription()); - //ol.newParagraph(); ol.endTextBlock(); writeAnnotatedClassList(ol); if (hasHtmlHelp) @@ -1082,7 +1111,56 @@ void writeAnnotatedIndex(OutputList &ol) } endFile(ol); - //ol.enable(OutputGenerator::Man); + ol.popGeneratorState(); +} + +//---------------------------------------------------------------------------- + +void writePackageIndex(OutputList &ol) +{ + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; + bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; + + if (documentedPackages==0) return; + + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + startFile(ol,"packages","Package Index"); + startTitle(ol,0); + QCString title = theTranslator->trPackageList(); + QCString htmlHelpTitle = title; + QCString ftvHelpTitle = title; + if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); + parseText(ol,title); + endTitle(ol,0,0); + ol.startTextBlock(); + HtmlHelp *htmlHelp = 0; + FTVHelp *ftvHelp = 0; + if (hasHtmlHelp) + { + htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"packages"); + htmlHelp->incContentsDepth(); + } + if (hasFtvHelp) + { + ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(TRUE,0,"packages",0,ftvHelpTitle); + ftvHelp->incContentsDepth(); + } + parseText(ol,theTranslator->trPackageListDescription()); + ol.endTextBlock(); + writePackageList(ol); + if (hasHtmlHelp) + { + htmlHelp->decContentsDepth(); + } + if (hasFtvHelp) + { + ftvHelp->decContentsDepth(); + } + + endFile(ol); ol.popGeneratorState(); } @@ -1240,14 +1318,30 @@ void writeMemberIndex(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); startFile(ol,"functions","Compound Member Index"); + QCString title = theTranslator->trCompoundMembers(); + QCString htmlHelpTitle = title; + QCString ftvHelpTitle = title; + if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); startTitle(ol,0); - parseText(ol,Config::projectName+" "+theTranslator->trCompoundMembers()); + parseText(ol,title); endTitle(ol,0,0); - bool quickIndex = documentedMembers>50; + bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; if (quickIndex) { writeQuickMemberIndex(ol,g_memberIndexLetterUsed); } + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; + bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag; + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"functions"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle); + } parseText(ol,theTranslator->trCompoundMembersDescription(Config::extractAllFlag)); writeMemberList(ol,quickIndex); endFile(ol); @@ -1342,7 +1436,6 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) { char lastChar=0; bool first=TRUE; - //ol.startItemList(); MemberName *mn=functionNameList.first(); while (mn) { @@ -1375,6 +1468,11 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) first=FALSE; } } + else if (first) + { + ol.startItemList(); + first=FALSE; + } ol.writeListItem(); ol.docify(md->name()); if (md->isFunction()) ol.docify("()"); @@ -1404,7 +1502,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) } mn=functionNameList.next(); } - ol.endItemList(); + if (!first) ol.endItemList(); } //---------------------------------------------------------------------------- @@ -1476,14 +1574,30 @@ void writeFileMemberIndex(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); startFile(ol,"globals","File Member Index"); + QCString title = theTranslator->trFileMembers(); + QCString htmlHelpTitle = title; + QCString ftvHelpTitle = title; + if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); startTitle(ol,0); - parseText(ol,Config::projectName+" "+theTranslator->trFileMembers()); + parseText(ol,title); endTitle(ol,0,0); - bool quickIndex = documentedMembers>50; + bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; if (quickIndex) { writeQuickMemberIndex(ol,g_fileIndexLetterUsed); } + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; + bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag; + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"globals"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle); + } parseText(ol,theTranslator->trFileMembersDescription(Config::extractAllFlag)); writeFileMemberList(ol,quickIndex); endFile(ol); @@ -1498,14 +1612,30 @@ void writeNamespaceMemberIndex(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); startFile(ol,"namespacemembers","Namespace Member Index"); + QCString title = theTranslator->trNamespaceMembers(); + QCString htmlHelpTitle = title; + QCString ftvHelpTitle = title; + if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); startTitle(ol,0); - parseText(ol,Config::projectName+" "+theTranslator->trNamespaceMembers()); + parseText(ol,title); endTitle(ol,0,0); - bool quickIndex = documentedMembers>50; + bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; if (quickIndex) { writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed); } + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; + bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag; + if (hasHtmlHelp) + { + HtmlHelp *htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"namespacemembers"); + } + if (hasFtvHelp) + { + FTVHelp *ftvHelp = FTVHelp::getInstance(); + ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle); + } parseText(ol,theTranslator->trNamespaceMemberDescription(Config::extractAllFlag)); writeNamespaceMemberList(ol,quickIndex); endFile(ol); @@ -1598,6 +1728,20 @@ int countRelatedPages() //---------------------------------------------------------------------------- +int countPackages() +{ + int count=0; + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd=0; + for (pdi.toFirst();(pd=pdi.current());++pdi) + { + count++; + } + return count; +} + +//---------------------------------------------------------------------------- + void writePageIndex(OutputList &ol) { if (documentedPages==0) return; @@ -2121,6 +2265,13 @@ void writeIndex(OutputList &ol) } ol.enable(OutputGenerator::Latex); + + if (documentedPackages>0) + { + ol.startIndexSection(isPackageIndex); + parseText(ol,projPrefix+theTranslator->trPackageList()); + ol.endIndexSection(isPackageIndex); + } if (documentedGroups>0) { ol.startIndexSection(isModuleIndex); @@ -2158,6 +2309,12 @@ void writeIndex(OutputList &ol) ol.endIndexSection(isPageIndex); } ol.lastIndexPage(); + if (documentedPackages>0) + { + ol.startIndexSection(isPackageDocumentation); + parseText(ol,projPrefix+theTranslator->trPackageDocumentation()); + ol.endIndexSection(isPackageDocumentation); + } if (documentedGroups>0) { ol.startIndexSection(isModuleDocumentation); diff --git a/src/index.h b/src/index.h index d928a5b..0cb4b9d 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -26,12 +26,14 @@ enum IndexSections isTitlePageStart, isTitlePageAuthor, isMainPage, + isPackageIndex, isModuleIndex, isNamespaceIndex, isClassHierarchyIndex, isCompoundIndex, isFileIndex, isPageIndex, + isPackageDocumentation, isModuleDocumentation, isNamespaceDocumentation, isClassDocumentation, @@ -63,6 +65,7 @@ void writeNamespaceIndex(OutputList &ol); void writeNamespaceMemberIndex(OutputList &ol); void writeGraphicalClassHierarchy(OutputList &ol); void writeGraphInfo(OutputList &ol); +void writePackageIndex(OutputList &ol); int countClassHierarchy(); int countClassMembers(); @@ -74,5 +77,6 @@ int countAnnotatedClasses(); int countNamespaceMembers(); int countIncludeFiles(); int countRelatedPages(); +int countPackages(); #endif diff --git a/src/instdox.cpp b/src/instdox.cpp index 97df7c6..b7d3ec4 100644 --- a/src/instdox.cpp +++ b/src/instdox.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/instdox.h b/src/instdox.h index f71c8fd..179b1db 100644 --- a/src/instdox.h +++ b/src/instdox.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/language.cpp b/src/language.cpp index 0711aa3..c6f5d78 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/language.h b/src/language.h index d38f494..11840cb 100644 --- a/src/language.h +++ b/src/language.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 416b5e3..1d15252 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -407,11 +407,11 @@ void LatexGenerator::writeStyleSheetFile(QFile &f) writeDefaultStyleSheetPart1(t); t << "Generated at " << dateToString(TRUE); if (Config::projectName.isEmpty()) t << " for " << Config::projectName << " "; - t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2000"; + t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2001"; writeDefaultStyleSheetPart2(t); t << "Generated at " << dateToString(TRUE); if (Config::projectName.isEmpty()) t << " for " << Config::projectName << " "; - t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2000"; + t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2001"; writeDefaultStyleSheetPart3(t); } @@ -464,6 +464,10 @@ void LatexGenerator::startIndexSection(IndexSections is) if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; t << "{"; //Introduction}\n" break; + case isPackageIndex: + if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; + t << "{"; //Package Index}\n" + break; case isModuleIndex: if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; t << "{"; //Module Index}\n" @@ -488,6 +492,21 @@ void LatexGenerator::startIndexSection(IndexSections is) if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; t << "{"; //Annotated Page Index}\n" break; + case isPackageDocumentation: + { + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd=pdi.toFirst(); + bool found=FALSE; + while (pd && !found) + { + if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; + t << "{"; + found=TRUE; + ++pdi; + pd=pdi.current(); + } + } + break; case isModuleDocumentation: { GroupDef *gd=groupList.first(); @@ -595,6 +614,9 @@ void LatexGenerator::endIndexSection(IndexSections is) if (Config::pdfHyperFlag) t << "\\hypertarget{index}{}"; t << "\\input{index}\n"; break; + case isPackageIndex: + t << "}\n\\input{packages}\n"; + break; case isModuleIndex: t << "}\n\\input{modules}\n"; break; @@ -613,6 +635,27 @@ void LatexGenerator::endIndexSection(IndexSections is) case isPageIndex: t << "}\n\\input{pages}\n"; break; + case isPackageDocumentation: + { + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd=pdi.toFirst(); + bool found=FALSE; + while (pd && !found) + { + t << "}\n\\input{" << pd->getOutputFileBase() << "}\n"; + found=TRUE; + ++pdi; + pd=pdi.current(); + } + while (pd) + { + if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; + t << "{" << pd->getOutputFileBase() << "}\n"; + ++pdi; + pd=pdi.current(); + } + } + break; case isModuleDocumentation: { GroupDef *gd=groupList.first(); @@ -774,14 +817,14 @@ void LatexGenerator::writeStyleInfo(int part) break; case 2: { - t << " Dimitri van Heesch \\copyright~1997-2000"; + t << " Dimitri van Heesch \\copyright~1997-2001"; t << "}]{}\n"; writeDefaultStyleSheetPart2(t); } break; case 4: { - t << " Dimitri van Heesch \\copyright~1997-2000"; + t << " Dimitri van Heesch \\copyright~1997-2001"; writeDefaultStyleSheetPart3(t); endPlainFile(); } diff --git a/src/latexgen.h b/src/latexgen.h index 4095eb5..f298953 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -113,7 +113,7 @@ class LatexGenerator : public OutputGenerator void startPreFragment() { t << "\\small\\begin{alltt}"; } void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; } void startCodeLine() { col=0; } - void endCodeLine() { t << endl; } + void endCodeLine() { codify("\n"); } void writeBoldString(const char *text) { t << "{\\bf "; docify(text); t << "}"; } void startEmphasis() { t << "{\\em "; } diff --git a/src/logos.cpp b/src/logos.cpp index 92bc08e..43d7b46 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/logos.h b/src/logos.h index d8f84a5..71019f8 100644 --- a/src/logos.h +++ b/src/logos.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/mangen.cpp b/src/mangen.cpp index 852a0f4..1a61011 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/mangen.h b/src/mangen.h index 39d9f2d..f342069 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -109,7 +109,7 @@ class ManGenerator : public OutputGenerator void startPreFragment() { startCodeFragment(); } void endPreFragment() { endCodeFragment(); } void startCodeLine() {} - void endCodeLine() { t << endl; col=0; } + void endCodeLine() { codify("\n"); col=0; } void writeBoldString(const char *text) { t << "\\fB"; docify(text); t << "\\fR"; firstCol=FALSE; } void startEmphasis() { t << "\\fI"; firstCol=FALSE; } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index c6c5354..0d87093 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -658,6 +658,10 @@ void MemberDef::writeDeclaration(OutputList &ol, { writeTemplatePrefix(ol,tArgList,FALSE); } + else if (membTAL) + { + writeTemplatePrefix(ol,membTAL,FALSE); + } if (i!=-1) // member has an anonymous type { @@ -818,7 +822,14 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.disableAllBut(OutputGenerator::Html); ol.endEmphasis(); ol.docify(" "); - ol.startTextLink(0,anchor()); + if (group!=0 && gd==0) // forward link to the group + { + ol.startTextLink(group->getOutputFileBase(),anchor()); + } + else + { + ol.startTextLink(0,anchor()); + } parseText(ol,theTranslator->trMore()); ol.endTextLink(); ol.startEmphasis(); @@ -1396,7 +1407,7 @@ bool MemberDef::isLinkable() bool MemberDef::detailsAreVisible() const { return !documentation().isEmpty() || // has detailed docs - (Config::sourceBrowseFlag && startBodyLine!=-1 && bodyDef) || // has reference to sources + //(Config::sourceBrowseFlag && startBodyLine!=-1 && bodyDef) || // has reference to sources (mtype==Enumeration && docEnumValues) || // has enum values (mtype==EnumValue && !briefDescription().isEmpty()) || // is doc enum value (!briefDescription().isEmpty() && diff --git a/src/memberdef.h b/src/memberdef.h index 7f211f1..36b3c45 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/membergroup.cpp b/src/membergroup.cpp index f1bf6bb..f96dc06 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/membergroup.h b/src/membergroup.h index 01312b2..8ddcb66 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 964607f..142e2f2 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/memberlist.h b/src/memberlist.h index 66efdb3..417abfd 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/membername.cpp b/src/membername.cpp index 3c3a3d0..87b4c79 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/membername.h b/src/membername.h index fb81a55..21282df 100644 --- a/src/membername.h +++ b/src/membername.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/message.cpp b/src/message.cpp index 112d5af..57aba79 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/message.h b/src/message.h index df2bc94..ed47fa2 100644 --- a/src/message.h +++ b/src/message.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index b92d2e5..9fe1a01 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/namespacedef.h b/src/namespacedef.h index 884107e..d3c163d 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 95ef0b0..490a80e 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/outputgen.h b/src/outputgen.h index f890a30..49bd734 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 01f0fc6..b41a97e 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/outputlist.h b/src/outputlist.h index b964483..2d57034 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/packagedef.cpp b/src/packagedef.cpp new file mode 100644 index 0000000..308f1f1 --- /dev/null +++ b/src/packagedef.cpp @@ -0,0 +1,122 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include <ctype.h> +#include "packagedef.h" +#include "qtbc.h" +#include "classdef.h" +#include "classlist.h" +#include "outputlist.h" +#include "util.h" +#include "config.h" +#include "doc.h" +#include "language.h" +#include "doxygen.h" + +PackageDef::PackageDef(const char *df,int dl,const char *na) : + Definition(df,dl,na) +{ + classList = new ClassList; + packageFileName = "package_"+convertFileName(na); +} + +PackageDef::~PackageDef() +{ + delete classList; +} + +void PackageDef::addClass(const ClassDef *def) +{ + if (Config::sortMembersFlag) + classList->inSort(def); + else + classList->append(def); +} + +void PackageDef::writeDocumentation(OutputList &ol) +{ + QCString title = theTranslator->trPackage(name()); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); + startFile(ol,getOutputFileBase(),title); + startTitle(ol,getOutputFileBase()); + ol.docify(title); + endTitle(ol,getOutputFileBase(),title); + + OutputList briefOutput(&ol); + if (!briefDescription().isEmpty()) + { + parseDoc(briefOutput,defFileName,defLine,name(),0,briefDescription()); + ol+=briefOutput; + ol.writeString(" \n"); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.startTextLink(0,"_details"); + parseText(ol,theTranslator->trMore()); + ol.endTextLink(); + ol.popGeneratorState(); + } + + if (!Config::genTagFile.isEmpty()) + { + tagFile << " <compound kind=\"package\">" << endl; + } + + ol.startMemberSections(); + ClassDef::CompoundType ct; + ct=ClassDef::Interface; + classList->writeDeclaration(ol,&ct,theTranslator->trInterfaces()); + ct=ClassDef::Class; + classList->writeDeclaration(ol,&ct,theTranslator->trClasses()); + ol.endMemberSections(); + + if (!Config::genTagFile.isEmpty()) + { + tagFile << " </compound>" << endl; + } + + if (!briefDescription().isEmpty() || !documentation().isEmpty()) + { + ol.writeRuler(); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.writeAnchor(0,"_details"); + ol.popGeneratorState(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trDetailedDescription()); + ol.endGroupHeader(); + + // repeat brief description + if (!briefDescription().isEmpty() && Config::repeatBriefFlag) + { + ol+=briefOutput; + ol.newParagraph(); + } + + // write documentation + if (!documentation().isEmpty()) + { + parseDoc(ol,defFileName,defLine,name(),0,documentation()+"\n"); + } + } + + endFile(ol); + ol.popGeneratorState(); +} + diff --git a/src/packagedef.h b/src/packagedef.h new file mode 100644 index 0000000..7d5224a --- /dev/null +++ b/src/packagedef.h @@ -0,0 +1,62 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef PACKAGEDEF_H +#define PACKAGEDEF_H + +#include "qtbc.h" +#include <qlist.h> +#include <qdict.h> +#include "definition.h" +#include "sortdict.h" + +class ClassList; +class ClassDef; +class PackageList; +class OutputList; + +class PackageDef : public Definition +{ + public: + PackageDef(const char *fName,int line, const char *name); + ~PackageDef(); + DefType definitionType() { return TypePackage; } + QCString getOutputFileBase() const { return packageFileName; } + void addClass(const ClassDef *def); + void writeDocumentation(OutputList &ol); + bool isLinkableInProject() + { + return hasDocumentation() && !isReference(); + } + bool isLinkable() + { + return isLinkableInProject() || isReference(); + } + + private: + QCString packageFileName; // base name of the generated file + ClassList *classList; // list of classes in the package +}; + +class PackageSDict : public SDict<PackageDef> +{ + public: + PackageSDict(int size) : SDict<PackageDef>(size) {} +}; + +#endif + @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -43,6 +43,7 @@ #include "util.h" #include "defargs.h" #include "debug.h" +#include "bufstr.h" #if defined(_MSC_VER) || defined(__BORLANDC__) #define popen _popen @@ -51,7 +52,6 @@ #define YY_NEVER_INTERACTIVE 1 -#define SHOW_INCLUDES 0 // set this to one to list all parsed include files struct FileState { @@ -317,7 +317,6 @@ static void processConcatOperators(QCString &expr) static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result) { //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),g_level); - //bool replaced=FALSE; uint j=pos; len=0; result.resize(0); @@ -334,9 +333,6 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int } getNextChar(expr,rest,j); // eat the `(' character - //while (j<expr.length() && expr.at(j)!='(') j++; - //j++; // skip opening paren - QDict<QCString> argTable; // list of arguments argTable.setAutoDelete(TRUE); QCString arg; @@ -417,26 +413,34 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int else if (c=='\"') // append literal strings { arg+=c; - char pc=c; bool found=FALSE; while (!found && (cc=getNextChar(expr,rest,j))!=EOF) { - found = pc!='\\' && cc=='"'; + found = cc=='"'; + if (cc=='\\') + { + c=(char)cc; + arg+=c; + if ((cc=getNextChar(expr,rest,j))==EOF) break; + } c=(char)cc; - pc=c; arg+=c; } } else if (c=='\'') // append literal characters { arg+=c; - char pc=c; bool found=FALSE; while (!found && (cc=getNextChar(expr,rest,j))!=EOF) { - found = pc!='\\' && cc=='\''; + found = cc=='\''; + if (cc=='\\') + { + c=(char)cc; + arg+=c; + if ((cc=getNextChar(expr,rest,j))==EOF) break; + } c=(char)cc; - pc=c; arg+=c; } } @@ -876,10 +880,11 @@ static void readIncludeFile(const QCString &inc) //printf("Searching for `%s'\n",incFileName.data()); if ((f=findFile(incFileName))) // see if the include file can be found { -#if SHOW_INCLUDES - for (i=0;i<g_includeStack.count();i++) msg(" "); - msg("#include %s: parsing...\n",incFileName.data()); -#endif + if (Debug::isFlagSet(Debug::Preprocessor)) + { + for (i=0;i<g_includeStack.count();i++) msg(" "); + msg("#include %s: parsing...\n",incFileName.data()); + } if (oldFileDef) { // add include dependency to the file in which the #include was found @@ -916,10 +921,11 @@ static void readIncludeFile(const QCString &inc) fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude); } } -#if SHOW_INCLUDES - msg("#include %s: not found! skipping...\n",incFileName.data()); - //printf("Error: include file %s not found\n",yytext); -#endif + if (Debug::isFlagSet(Debug::Preprocessor)) + { + msg("#include %s: not found! skipping...\n",incFileName.data()); + //printf("Error: include file %s not found\n",yytext); + } } } } @@ -957,7 +963,7 @@ BN [ \t\r\n] %x DefinedExpr2 %x SkipDoubleQuote %x SkipSingleQuote -%x Ung_defName +%x UndefName %x IgnoreLine %x FindDefineArgs %x ReadString @@ -1094,8 +1100,8 @@ BN [ \t\r\n] g_roundCount--; if (g_roundCount==0) { - //printf("g_defArgsStr=`%s'\n",g_defArgsStr.data()); QCString result=expandMacro(g_defArgsStr); + //printf("g_defArgsStr=`%s'->`%s'\n",g_defArgsStr.data(),result.data()); if (g_findDefArgContext==CopyLine) { outputArray(result,result.length()); @@ -1114,7 +1120,7 @@ BN [ \t\r\n] g_defArgsStr+=yytext; } */ -<FindDefineArgs>"\"" { +<FindDefineArgs>\" { g_defArgsStr+=*yytext; BEGIN(ReadString); } @@ -1128,9 +1134,6 @@ BN [ \t\r\n] <FindDefineArgs>. { g_defArgsStr+=*yytext; } -<ReadString>"\\\"" { - g_defArgsStr+=yytext; - } <ReadString>"\"" { g_defArgsStr+=*yytext; BEGIN(FindDefineArgs); @@ -1138,6 +1141,9 @@ BN [ \t\r\n] <ReadString>"//"|"/*" { g_defArgsStr+=yytext; } +<ReadString>\\. { + g_defArgsStr+=yytext; + } <ReadString>. { g_defArgsStr+=*yytext; } @@ -1207,7 +1213,7 @@ BN [ \t\r\n] } } <Command>"undef"{B}+ { - BEGIN(Ung_defName); + BEGIN(UndefName); } <Command>("elif"|"else"{B}*"if")/[ \t(] { if (!otherCaseDone()) @@ -1228,9 +1234,13 @@ BN [ \t\r\n] <Command>{ID} { // unknown directive BEGIN(IgnoreLine); } +<IgnoreLine>\\[\r]?\n { + outputChar('\n'); + g_yyLineNr++; + } <IgnoreLine>. <Command>. -<Ung_defName>{ID} { +<UndefName>{ID} { Define *def; if ((def=isDefined(yytext))) { @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/reflist.cpp b/src/reflist.cpp index 8bef347..b67628e 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/reflist.h b/src/reflist.h index f0d9958..1aa189e 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 8a1dae2..b8d48ad 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2001 by Parker Waechter & Dimitri van Heesch. * * Style sheet additions by Alexander Bartolich * @@ -778,6 +778,10 @@ void RTFGenerator::startIndexSection(IndexSections is) //Introduction beginRTFChapter(); break; + case isPackageIndex: + //Package Index + beginRTFChapter(); + break; case isModuleIndex: //Module Index beginRTFChapter(); @@ -803,6 +807,21 @@ void RTFGenerator::startIndexSection(IndexSections is) //Related Page Index beginRTFChapter(); break; + case isPackageDocumentation: + { + //Package Documentation + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd=pdi.toFirst(); + bool found=FALSE; + while (pd && !found) + { + beginRTFChapter(); + found=TRUE; + ++pdi; + pd=pdi.current(); + } + } + break; case isModuleDocumentation: { //Module Documentation @@ -932,6 +951,11 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "{\\tc \\v " << theTranslator->trMainPage() << "}"<< endl; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"index.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; break; + case isPackageIndex: + t << "\\par " << Rtf_Style_Reset << endl; + t << "{\\tc \\v " << theTranslator->trPackageList() << "}"<< endl; + t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; + break; case isModuleIndex: t << "\\par " << Rtf_Style_Reset << endl; t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}"<< endl; @@ -962,6 +986,22 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "{\\tc \\v " << theTranslator->trPageIndex() << "}"<< endl; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; break; + case isPackageDocumentation: + { + PackageSDict::Iterator pdi(packageDict); + PackageDef *pd=pdi.toFirst(); + t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl; + while (pd) + { + t << "\\par " << Rtf_Style_Reset << endl; + t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; + t << pd->getOutputFileBase(); + t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; + ++pdi; + pd=pdi.current(); + } + } + break; case isModuleDocumentation: { GroupDef *gd=groupList.first(); diff --git a/src/rtfgen.h b/src/rtfgen.h index 2631dc0..491b483 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2001 by Parker Waechter & 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 diff --git a/src/scanner.h b/src/scanner.h index 0763e33..007dc5b 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/scanner.l b/src/scanner.l index 6bf33ed..c831a9c 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -124,6 +124,7 @@ static QCString baseName; static QCString* specName; static QCString formulaText; static bool insideIDL = FALSE; +static bool insideJava = FALSE; static bool insideCppQuote = FALSE; static int argRoundCount; @@ -374,6 +375,10 @@ A [aA] BR [bB][rR] PRE [pP][rR][eE] TABLE [tT][aA][bB][lL][eE] +P [pP] +UL [uU][lL] +OL [oO][lL] +DL [dD][lL] TITLE [tT][iI][tT][lL][eE] %option noyywrap @@ -493,6 +498,7 @@ TITLE [tT][iI][tT][lL][eE] %x IDLUnionCase %x NSAliasName %x NSAliasArg +%x PackageName %% @@ -507,7 +513,8 @@ TITLE [tT][iI][tT][lL][eE] for( i = 0 ; yytext[i+1] != 6 ; i++ ) yyFileName[i] = yytext[i+1] ; yyFileName[i] = 0 ; - insideIDL = i>4 && strcmp(&yyFileName[i-4],".idl")==0; + insideIDL = i>4 && strcmp(&yyFileName[i-4],".idl")==0; + insideJava = i>5 && strcmp(&yyFileName[i-5],".java")==0; msg("Parsing file %s...\n",yyFileName); current_root = global_root ; initParser(); @@ -653,6 +660,22 @@ TITLE [tT][iI][tT][lL][eE] <FindMembers>{BN}+ { lineCount(); } +<FindMembers>{B}*"package"{BN}+ { // Java package + lineCount(); + BEGIN(PackageName); + } +<PackageName>{ID}("."{ID})* { + current->name = yytext; + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->section=Entry::PACKAGE_SEC; + current_root->addSubEntry(current); + current = new Entry ; + initEntry(); + } +<PackageName>";" { + BEGIN(FindMembers); + } <FindMembers>{B}*"static"{BN}+ { //current->type += " static "; current->stat = TRUE; lineCount(); @@ -666,6 +689,10 @@ TITLE [tT][iI][tT][lL][eE] current->virt = Virtual; lineCount(); } +<FindMembers>{B}*"abstract"{BN}+ { current->type += " abstract "; + current->virt = Pure; + lineCount(); + } <FindMembers>{B}*"inline"{BN}+ { current->memSpec|=Entry::Inline; lineCount(); } @@ -903,7 +930,7 @@ TITLE [tT][iI][tT][lL][eE] addType( current ); current->name=n.left(n.length()-2); } -<FindMembers>{SCOPENAME}{BN}*/"<" { +<FindMembers>{SCOPENAME}{BN}*/"<" { // Note: this could be a return type! sharpCount=0; lineCount(); addType( current ); @@ -982,6 +1009,13 @@ TITLE [tT][iI][tT][lL][eE] *currentTemplateSpec+=*yytext; } <FindMembers,FindMemberName>{SCOPENAME} { + // correct for misinterpreting return type as scope name: example: A<T> func() + if (YY_START==FindMembers && current->tArgList && current->mtArgList==0) + { + current->mtArgList=current->tArgList; + current->tArgList=0; + current->scopeSpec.resize(0); + } lineCount(); if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0) { @@ -991,16 +1025,30 @@ TITLE [tT][iI][tT][lL][eE] { BEGIN(IDLUnionCase); } - else + else { if (YY_START==FindMembers) { addType( current ) ; - current->name = yytext; + } + if (insideJava && strcmp(yytext,"public")==0) + { + current->protection = Public; + } + else if (insideJava && strcmp(yytext,"protected")==0) + { + current->protection = Protected; + } + else if (insideJava && strcmp(yytext,"private")==0) + { + current->protection = Private; } else { - current->name += yytext; + if (YY_START==FindMembers) + current->name = yytext; + else + current->name += yytext; } QCString tmp=yytext; if (nameIsOperator(tmp)) @@ -1337,6 +1385,8 @@ TITLE [tT][iI][tT][lL][eE] { current = new Entry(*current); current->name.resize(0); + current->args.resize(0); + current->initializer.resize(0); int i=oldType.length(); while (i>0 && (oldType[i-1]=='*' || oldType[i-1]=='&' || oldType[i-1]==' ')) i--; current->type = oldType.left(i); @@ -1486,9 +1536,10 @@ TITLE [tT][iI][tT][lL][eE] current_root->addSubEntry( current ) ; current = new Entry(*current); if (current->section==Entry::NAMESPACE_SEC || - current->section==Entry::INTERFACE_SEC + current->section==Entry::INTERFACE_SEC || + insideJava ) - { // namespaces and interfaces ends with a closing bracket without semicolon + { // namespaces and interfaces and java classes ends with a closing bracket without semicolon current->reset(); initEntry(); BEGIN( FindMembers ) ; @@ -2219,6 +2270,14 @@ TITLE [tT][iI][tT][lL][eE] roundCount=0; BEGIN(SkipUnionSwitch); } + else if (insideJava && (strcmp(yytext,"implements")==0 || strcmp(yytext,"extends")==0)) + { + current->type.resize(0); + baseProt=Public; + baseVirt=Normal; + baseName.resize(0); + BEGIN( BasesProt ) ; + } else { if (isTypedef) @@ -2274,20 +2333,30 @@ TITLE [tT][iI][tT][lL][eE] <BasesProt>{BN} { lineCount(); } <BasesProt>. { unput(*yytext); BEGIN(Bases); } <Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} { - //current->extends->append( - // new BaseInfo(yytext,baseProt,baseVirt) - //) ; - bool globalScope = *yytext==':' && baseName.isEmpty(); + QCString bName = yytext; + bName = bName.stripWhiteSpace(); + bool globalScope = bName.at(0)==':' && baseName.isEmpty(); if (!globalScope) - baseName += yytext; + baseName += bName; else - baseName += (yytext+2); + baseName += (bName.data()+2); current->args += ' '; if (!globalScope) - current->args += yytext; + current->args += bName; else - current->args += (yytext+2); + current->args += (bName.data()+2); } +<Bases>{BN}*{ID}("."{ID})* { // Java style class + QCString name = yytext; + int i=name.findRev('.'); + if (i!=-1) // strip part before dots + { + name=name.right(name.length()-i-1); + } + baseName += name; + current->args += ' '; + current->args += name; + } <ClassVar>"<" { current->name += *yytext; sharpCount=1; lastSkipSharpContext = YY_START; @@ -2322,13 +2391,14 @@ TITLE [tT][iI][tT][lL][eE] <SkipRound>")" { if (--roundCount<=0) BEGIN ( lastSkipRoundContext ); } -<Bases>"," { current->args += ',' ; +<Bases>","|({BN}+"implements"{BN}*) { lineCount(); + current->args += ',' ; current->name = removeRedundantWhiteSpace(current->name); if (!baseName.isEmpty()) current->extends->append( new BaseInfo(baseName,baseProt,baseVirt) ); - if (current->section == Entry::INTERFACE_SEC) + if (current->section == Entry::INTERFACE_SEC || insideJava) baseProt=Public; else baseProt=Private; @@ -2484,7 +2554,7 @@ TITLE [tT][iI][tT][lL][eE] current->doc+=yytext; BEGIN( tmpDocType ); } -<JavaDoc>"<"{TABLE}{ATTR}">" { +<JavaDoc>"<"({TABLE}|{UL}|{OL}|{DL}){ATTR}|{P}">" { // end brief upon encountering any of these //current->doc+=yytext; int i; for (i=yyleng-1;i>=0;i--) @@ -2986,7 +3056,7 @@ TITLE [tT][iI][tT][lL][eE] if (!removeSlashes) *pSkipDoc+=yytext; } -<SkipCode>^{B}*"*"+ +<SkipCode>^{B}*"*"+/{B}+ <SkipCode>"//" { *pSkipDoc+=yytext; } diff --git a/src/searchindex.cpp b/src/searchindex.cpp index a482928..5567f4e 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/searchindex.h b/src/searchindex.h index 4fb2ba2..214de6e 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/section.h b/src/section.h index 30bf268..206237c 100644 --- a/src/section.h +++ b/src/section.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/sortdict.h b/src/sortdict.h index 9c46e9b..199c34d 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/suffixtree.cpp b/src/suffixtree.cpp index 5439fc6..242fa9c 100644 --- a/src/suffixtree.cpp +++ b/src/suffixtree.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/suffixtree.h b/src/suffixtree.h index a0b7434..7aa8dc9 100644 --- a/src/suffixtree.h +++ b/src/suffixtree.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 3e74d77..cfe7bb0 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -124,7 +124,8 @@ class TagFileParser : public QXmlDefaultHandler InNamespace, InGroup, InPage, - InMember + InMember, + InPackage }; class StartElementHandler { @@ -204,6 +205,10 @@ class TagFileParser : public QXmlDefaultHandler m_curPage = new TagPageInfo; m_state = InPage; } + else if (kind=="package") + { + m_state = InPackage; + } else { err("Error: Unknown compound attribute `%s' found!\n",kind.data()); @@ -746,7 +751,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) } else if (tmi->kind=="typedef") { - me->section = Entry::TYPEDEF_SEC; + me->section = Entry::VARIABLE_SEC; //Entry::TYPEDEF_SEC; me->mtype = Method; } else if (tmi->kind=="enumeration") diff --git a/src/tagreader.h b/src/tagreader.h index 1508009..a9c7afd 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator.h b/src/translator.h index 4849c95..0c203fa 100644 --- a/src/translator.h +++ b/src/translator.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -1102,6 +1102,46 @@ class Translator { return "Property Documentation"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java interfaces in the summary section of Java packages */ + virtual QCString trInterfaces() + { + return "Interfaces"; + } + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + return "Classes"; + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Package "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Package List"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Here are the packages with brief descriptions (if available):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Packages"; + } + /*! Used as a chapter title for Latex & RTF output */ + virtual QCString trPackageDocumentation() + { + return "Package Documentation"; + } }; #endif diff --git a/src/translator_cn.h b/src/translator_cn.h index dfe5a78..e68234c 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_cz.h b/src/translator_cz.h index bad2bf2..6f41444 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_de.h b/src/translator_de.h index dd32ec8..5a5ee53 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_es.h b/src/translator_es.h index 1af7658..29822e5 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_fi.h b/src/translator_fi.h index 504008f..5f44a24 100644 --- a/src/translator_fi.h +++ b/src/translator_fi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_fr.h b/src/translator_fr.h index 2bf7aa4..e7809b5 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_hr.h b/src/translator_hr.h index b857fb2..20ed696 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_hu.h b/src/translator_hu.h index 7140242..b23047a 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_it.h b/src/translator_it.h index 11ac002..c0429cf 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2000 by Dimitri van Heesch. + * Copyright (C) 1997-2001 by Dimitri van Heesch. * * Initial Italian Translation by Ahmed Aldo Faisal * Revised and completed by Alessandro Falappa (June 1999) diff --git a/src/translator_jp.h b/src/translator_jp.h index 4946379..80b1e97 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_kr.h b/src/translator_kr.h index 6703fe0..c1c5fea 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_nl.h b/src/translator_nl.h index 80a5030..3ac1887 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_no.h b/src/translator_no.h index f215c8c..063495c 100644 --- a/src/translator_no.h +++ b/src/translator_no.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_pl.h b/src/translator_pl.h index ce9b532..71ff0b3 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_pt.h b/src/translator_pt.h index 8b6e3af..2f80e6e 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_ro.h b/src/translator_ro.h index ec76d39..f5d6c3b 100644 --- a/src/translator_ro.h +++ b/src/translator_ro.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -32,7 +32,6 @@ #ifndef TRANSLATOR_RO_H #define TRANSLATOR_RO_H -#include "qtbc.h" #include "classdef.h" #include "util.h" diff --git a/src/translator_se.h b/src/translator_se.h index 92f2461..f8d6aed 100644 --- a/src/translator_se.h +++ b/src/translator_se.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/translator_si.h b/src/translator_si.h index 64ea923..a2ee2bb 100644 --- a/src/translator_si.h +++ b/src/translator_si.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/util.cpp b/src/util.cpp index 43e9b2c..56820e7 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -484,11 +484,19 @@ QCString removeRedundantWhiteSpace(const QCString &s) { result+=" >"; // insert extra space for layouting (nested) templates } + else if (i>0 && isId(s.at(i)) && s.at(i-1)==')') + { + result+=' '; + result+=s.at(i); + } else if (c!=' ' || - (i!=0 && i!=l-1 && isId(s.at(i-1)) && isId(s.at(i+1))) - ) + ( i!=0 && i!=l-1 && + (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',') && + isId(s.at(i+1)) + ) + ) { - if ((c=='*' || c=='&' || c=='@')) + if (c=='*' || c=='&' || c=='@') { uint rl=result.length(); if (rl>0 && (isId(result.at(rl-1)) || result.at(rl-1)=='>')) result+=' '; @@ -797,6 +805,13 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) parseText(ol,theTranslator->trMainPage()); ol.endQuickIndexItem(); + if (documentedPackages>0) + { + if (!compact) ol.writeListItem(); + ol.startQuickIndexItem(extLink,"packages.html"); + parseText(ol,theTranslator->trPackages()); + ol.endQuickIndexItem(); + } if (documentedGroups>0) { if (!compact) ol.writeListItem(); @@ -1974,7 +1989,12 @@ bool getDefs(const QCString &scName,const QCString &memberName, } } //printf(" >Succes=%d\n",mdist<maxInheritanceDepth); - if (mdist<maxInheritanceDepth) return TRUE; /* found match */ + if (mdist<maxInheritanceDepth) + { + gd=md->getGroupDef(); + if (gd) cd=0; + return TRUE; /* found match */ + } } /* goto the parent scope */ @@ -1996,7 +2016,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, // scopeName.data(),mScope.data(),mName.data()); if ((mn=functionNameDict[mName])) // name is known { - //printf(" >member name found\n"); + //printf(" >function name found\n"); NamespaceDef *fnd=0; int scopeOffset=scopeName.length(); do @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/version.h b/src/version.h index 1e8a2f0..fef5707 100644 --- a/src/version.h +++ b/src/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 diff --git a/src/xml.cpp b/src/xml.cpp index 1171a2e..4fba201 100644 --- a/src/xml.cpp +++ b/src/xml.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2000 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 @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2000 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 |