diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 27 | ||||
-rw-r--r-- | src/config.l | 15 | ||||
-rw-r--r-- | src/definition.cpp | 13 | ||||
-rw-r--r-- | src/definition.h | 8 | ||||
-rw-r--r-- | src/diagram.cpp | 2 | ||||
-rw-r--r-- | src/doc.l | 148 | ||||
-rw-r--r-- | src/dot.cpp | 26 | ||||
-rw-r--r-- | src/doxygen.cpp | 43 | ||||
-rw-r--r-- | src/doxygen.h | 2 | ||||
-rw-r--r-- | src/doxygen.pro.in | 1 | ||||
-rw-r--r-- | src/filedef.cpp | 7 | ||||
-rw-r--r-- | src/ftvhelp.cpp | 12 | ||||
-rw-r--r-- | src/groupdef.cpp | 25 | ||||
-rw-r--r-- | src/groupdef.h | 9 | ||||
-rw-r--r-- | src/htmlgen.cpp | 20 | ||||
-rw-r--r-- | src/index.cpp | 44 | ||||
-rw-r--r-- | src/latexgen.cpp | 8 | ||||
-rw-r--r-- | src/namespacedef.cpp | 3 | ||||
-rw-r--r-- | src/page.h | 9 | ||||
-rw-r--r-- | src/pre.l | 2 | ||||
-rw-r--r-- | src/rtfgen.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 2 | ||||
-rw-r--r-- | src/translator_jp.h | 25 | ||||
-rw-r--r-- | src/util.cpp | 33 | ||||
-rw-r--r-- | src/util.h | 1 | ||||
-rw-r--r-- | src/xmlgen.cpp | 45 |
26 files changed, 384 insertions, 148 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 0182c13..396d979 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -39,7 +39,7 @@ static QCString stripExtension(const char *fName) { QCString result=fName; - if (result.right(5)==".html") result=result.left(result.length()-5); + if (result.right(htmlFileExtensionLength)==htmlFileExtension) result=result.left(result.length()-htmlFileExtensionLength); return result; } @@ -701,6 +701,7 @@ void ClassDef::writeDocumentation(OutputList &ol) startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); parseText(ol,theTranslator->trCompoundReference(name(),m_compType,outerTempArgList!=0)); + addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),name()); ol.startTextBlock(); @@ -789,7 +790,7 @@ void ClassDef::writeDocumentation(OutputList &ol) Doxygen::tagFile << " <compound kind=\"" << compoundTypeString(); Doxygen::tagFile << "\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << ".html</filename>" << endl; + Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << htmlFileExtension << "</filename>" << endl; if (m_tempArgs) { ArgumentListIterator ali(*m_tempArgs); @@ -929,7 +930,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeString("<center><font size=\"2\">["); - ol.startHtmlLink("graph_legend.html"); + ol.startHtmlLink("graph_legend"+htmlFileExtension); ol.docify(theTranslator->trLegend()); ol.endHtmlLink(); ol.writeString("]</font></center>"); @@ -964,7 +965,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeString("<center><font size=\"2\">["); - ol.startHtmlLink("graph_legend.html"); + ol.startHtmlLink("graph_legend"+htmlFileExtension); ol.docify(theTranslator->trLegend()); ol.endHtmlLink(); ol.writeString("]</font></center>"); @@ -1727,7 +1728,7 @@ void ClassDef::mergeMembers() // argListToString(srcMd->argumentList()).data(), // argListToString(dstMd->argumentList()).data(), // found); - hidden = hidden || !found; + hidden = hidden || !found; } else // member is in a non base class => multiple inheritance // using the same base class. @@ -1746,10 +1747,12 @@ void ClassDef::mergeMembers() else // same members { // do not add if base class is virtual or - // if scope paths are equal + // if scope paths are equal or + // if base class is an interface (and thus implicitly virtual). //printf("same member found srcMi->virt=%d dstMi->virt=%d\n",srcMi->virt,dstMi->virt); if ((srcMi->virt!=Normal && dstMi->virt!=Normal) || - bClass->name()+"::"+srcMi->scopePath == dstMi->scopePath + bClass->name()+"::"+srcMi->scopePath == dstMi->scopePath || + dstMd->getClassDef()->compoundType()==ClassDef::Interface ) { found=TRUE; @@ -1783,17 +1786,23 @@ void ClassDef::mergeMembers() // this case is shown anyway. if (!found && srcMd->protection()!=Private) { + Protection prot=srcMd->protection(); + if (bcd->prot==Protected && prot==Public) prot=bcd->prot; + else if (bcd->prot==Private) prot=bcd->prot; + if (inlineInheritedMembers) { if (!isStandardFunc(srcMd)) { //printf(" insertMember `%s'\n",srcMd->name().data()); - internalInsertMember(srcMd,bcd->prot,FALSE); + internalInsertMember(srcMd,prot,FALSE); } } + Specifier virt=srcMi->virt; if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt; - MemberInfo *newMi = new MemberInfo(srcMd,bcd->prot,virt,TRUE); + + MemberInfo *newMi = new MemberInfo(srcMd,prot,virt,TRUE); newMi->scopePath=bClass->name()+"::"+srcMi->scopePath; if (ambigue) { diff --git a/src/config.l b/src/config.l index cce57b9..702f652 100644 --- a/src/config.l +++ b/src/config.l @@ -862,6 +862,13 @@ void Config::check() { outputLanguage = "English"; } + + QCString &htmlFileExtension=Config_getString("HTML_FILE_EXTENSION"); + htmlFileExtension=htmlFileExtension.stripWhiteSpace(); + if (htmlFileExtension.isEmpty()) + { + htmlFileExtension = ".html"; + } // expand the relative stripFromPath values QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH"); @@ -1750,6 +1757,14 @@ void Config::create() cs->setWidgetType(ConfigString::Dir); cs->addDependency("GENERATE_HTML"); cs = addString( + "HTML_FILE_EXTENSION", + "The HTML_FILE_EXTENSION tag can be used to specify the file extension for \n" + "each generated HTML page (for example: .htm,.php,.asp). If it is left blank \n" + "doxygen will generate files with .html extension.\n" + ); + cs->setDefaultValue(".html"); + cs->addDependency("GENERATE_HTML"); + cs = addString( "HTML_HEADER", "The HTML_HEADER tag can be used to specify a personal HTML header for \n" "each generated HTML page. If it is left blank doxygen will generate a \n" diff --git a/src/definition.cpp b/src/definition.cpp index 7f6a534..8800f81 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2002 by Dimitri van Heesch. * @@ -27,6 +27,7 @@ #include "doc.h" #include "code.h" #include "util.h" +#include "groupdef.h" Definition::Definition(const char *df,int dl, const char *name,const char *b,const char *d) @@ -50,6 +51,7 @@ Definition::Definition(const char *df,int dl, m_testId=0; m_bugId=0; m_outerScope=Doxygen::globalScope; + m_partOfGroups=0; } Definition::~Definition() @@ -57,9 +59,9 @@ Definition::~Definition() delete m_sectionDict; delete m_sourceRefByDict; delete m_sourceRefsDict; + delete m_partOfGroups; } - void Definition::addSectionsToDefinition(QList<QCString> *anchorList) { if (!anchorList) return; @@ -544,3 +546,10 @@ void Definition::setBodySegment(int bls,int ble) m_endBodyLine=ble; } +void Definition::makePartOfGroup(GroupDef *gd) +{ + if (m_partOfGroups==0) m_partOfGroups = new GroupList; + m_partOfGroups->append(gd); +} + + diff --git a/src/definition.h b/src/definition.h index 2efbc92..3ea3f56 100644 --- a/src/definition.h +++ b/src/definition.h @@ -28,6 +28,8 @@ class SectionDict; //class MemberDict; class MemberSDict; class MemberDef; +class GroupDef; +class GroupList; /*! The common base class of all entity definitions found in the sources. */ class Definition @@ -124,6 +126,9 @@ class Definition MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; } MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; } + void makePartOfGroup(GroupDef *gd); + GroupList *partOfGroups() const { return m_partOfGroups; } + protected: int m_startBodyLine; // line number of the start of the definition int m_endBodyLine; // line number of the end of the definition @@ -139,6 +144,9 @@ class Definition QCString m_name; // name of the definition QCString m_localName; // local (unqualified) name of the definition // in the future m_name should become m_localName + /*! List of groups this definition is part of */ + GroupList *m_partOfGroups; + private: void writeSourceRefList(OutputList &ol,const char *scopeName, diff --git a/src/diagram.cpp b/src/diagram.cpp index e04719c..80e5c1b 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -166,7 +166,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h) { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - t << cd->getOutputFileBase() << ".html\" "; + t << cd->getOutputFileBase() << htmlFileExtension << "\" "; t << "alt=\"" << cd->name(); t << "\" shape=\"rect\" coords=\"" << x << "," << y << ","; t << (x+w) << "," << (y+h) << "\">" << endl; @@ -401,7 +401,7 @@ static QCString stripKnownExtensions(const char *text) { QCString result=text; if (result.right(4)==".tex") result=result.left(result.length()-4); - else if (result.right(5)==".html") result=result.left(result.length()-5); + else if (result.right(htmlFileExtensionLength)==htmlFileExtension) result=result.left(result.length()-htmlFileExtensionLength); //printf("%s stripKnowExtensions(%s)\n",result.data(),text); return result; } @@ -686,26 +686,6 @@ static void forceEndItemList() static void endArgumentList() { -#if 0 - IndentInfo *info; - while ((info=listIndentStack.pop())!=0) - { - delete info; - } - while (!currentListIndent.isEmpty()) - { - char c=*currentListIndent.pop(); - switch(c) - { - case 'O': outDoc->endEnumList(); break; - case 'U': outDoc->endItemList(); break; - case 'D': - if (!inBlock()) outDoc->endDescription(); - break; - } - } - insideItemList=FALSE; -#endif if (insideArgumentList) { insideArgumentList=FALSE; @@ -897,18 +877,20 @@ static void checkArgName(const QCString &name) Argument *a; for (ali.toFirst();(a=ali.current());++ali) { - if (name==a->name) + QCString argName = memberDef->isDefine() ? a->type : a->name; + if (aName==argName) { paramsFound.insert(name,(void *)(0x8)); return; } } + printf("member type=%d\n",memberDef->memberType()); QCString scope=memberDef->getScopeString(); if (!scope.isEmpty()) scope+="::"; else scope=""; warn(memberDef->docFile(),memberDef->docLine(), "Warning: argument `%s' of command @param " "is not found in the argument list of %s%s%s", - name.data(),scope.data(),memberDef->name().data(), + aName.data(),scope.data(),memberDef->name().data(), argListToString(al).data() ); p=i+l; @@ -1053,6 +1035,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) %x DocRtfImageOpt %x DocDotFile %x DocDotFileOpt +%x DocSkipLanguage %% @@ -1171,19 +1154,35 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) char c[2];c[0]=*yytext;c[1]='\0'; outDoc->codify(c); } +<DocScan>{CMD}"~"[a-z_A-Z0-9]*/{BN} { + if (yytext[2]) + { + if (theTranslator->idLanguage()!=&yytext[2]) // not current language + { + BEGIN(DocSkipLanguage); + } + } + } +<DocSkipLanguage>{CMD}"~"[a-z_A-Z0-9]*/{BN} { + if (yytext[2]) + { + if (theTranslator->idLanguage()==&yytext[2]) + { + BEGIN( DocScan ); // current language => include + } + } + else // back to "all language" processing. + { + BEGIN( DocScan ); + } + } +<DocSkipLanguage>[^\\\@\~\n]+ <DocScan>{CMD}"internal"/{BN} { - //if (!Config_getBool("INTERNAL_DOCS")) - //{ - // BEGIN( DocInternal ); - //} - //else - //{ - outDoc->newParagraph(); - outDoc->startBold(); - scanString(theTranslator->trForInternalUseOnly()+"\n"); - outDoc->endBold(); - outDoc->newParagraph(); - //} + outDoc->newParagraph(); + outDoc->startBold(); + scanString(theTranslator->trForInternalUseOnly()+"\n"); + outDoc->endBold(); + outDoc->newParagraph(); } <DocScan>"\\reimp"/{BN} { outDoc->newParagraph(); @@ -1269,6 +1268,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool b = inBlock(); if (!title.isEmpty()) { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (b) endBlock(); inParBlock=TRUE; @@ -1285,6 +1288,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) BEGIN(DocScan); } <DocScan>{CMD}"warning"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inWarningBlock) { @@ -1302,6 +1309,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"remark"[s]?{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inRemarkBlock) { @@ -1319,6 +1330,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"attention"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inAttentionBlock) { @@ -1336,6 +1351,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"note"[s]?{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inNoteBlock) { @@ -1353,6 +1372,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"pre"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inPreBlock) { @@ -1370,6 +1393,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"post"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inPostBlock) { @@ -1387,6 +1414,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"invariant"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inInvarBlock) { @@ -1404,6 +1435,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"version"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inVersionBlock) { @@ -1421,6 +1456,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"since"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inSinceBlock) { @@ -1438,6 +1477,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"date"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inDateBlock) { @@ -1462,6 +1505,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool ok; int num = numStr.toUInt(&ok); RefItem *item = todoList.getRefItem(num); ASSERT(item!=0); + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("P"); @@ -1482,6 +1529,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool ok; int num = numStr.toUInt(&ok); RefItem *item = testList.getRefItem(num); ASSERT(item!=0); + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("P"); @@ -1502,6 +1553,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) bool ok; int num = numStr.toUInt(&ok); RefItem *item = bugList.getRefItem(num); ASSERT(item!=0); + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("P"); @@ -1515,6 +1570,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}"deprecated"{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inDeprecatedBlock) { @@ -1537,6 +1596,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) tagName=tagName.left(i); QCString tagText=&yytext[i+2]; tagText=tagText.left(tagText.length()-1); + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("P"); @@ -1549,6 +1612,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) currentListIndent.pop(); } <DocScan>{CMD}"author"[s]?{BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inAuthorBlock) { @@ -1567,6 +1634,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}("return"([s])?|"result"){BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inReturnBlock) { @@ -1580,6 +1651,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocScan>{CMD}("sa"|"see"){BSEP} { + if (insideItemList) + { + forceEndItemList(); + } endArgumentList(); if (!inSeeBlock) { @@ -2701,7 +2776,8 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, bool found=FALSE; for (ali.toFirst();(a=ali.current());++ali) { - if (!a->name.isEmpty() && paramsFound.find(a->name)==0) + QCString argName = memberDef->isDefine() ? a->type : a->name; + if (!argName.isEmpty() && paramsFound.find(argName)==0) { found = TRUE; break; diff --git a/src/dot.cpp b/src/dot.cpp index 7cefcda..af77df0 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -344,7 +344,7 @@ void DotNode::writeBox(QTextStream &t, } else if (!m_url.isEmpty()) { - t << ",URL=\"" << m_url << ".html\""; + t << ",URL=\"" << m_url << htmlFileExtension << "\""; } t << "];" << endl; } @@ -1638,38 +1638,38 @@ void generateGraphLegend(const char *path) dotText << "{\n"; dotText << " Node7 [shape=\"box\",label=\"Inherited\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",style=\"filled\" fontcolor=\"white\"];\n"; dotText << " Node8 -> Node7 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node8 [shape=\"box\",label=\"PublicBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_publicbase.html\"];\n"; + dotText << " Node8 [shape=\"box\",label=\"PublicBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_publicbase" << htmlFileExtension << "\"];\n"; dotText << " Node9 -> Node8 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node9 [shape=\"box\",label=\"Truncated\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"red\",URL=\"$class_truncated.html\"];\n"; + dotText << " Node9 [shape=\"box\",label=\"Truncated\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"red\",URL=\"$class_truncated" << htmlFileExtension << "\"];\n"; dotText << " Node11 -> Node7 [dir=back,color=\"darkgreen\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node11 [shape=\"box\",label=\"ProtectedBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_protectedbase.html\"];\n"; + dotText << " Node11 [shape=\"box\",label=\"ProtectedBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_protectedbase" << htmlFileExtension << "\"];\n"; dotText << " Node12 -> Node7 [dir=back,color=\"firebrick4\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node12 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_privatebase.html\"];\n"; + dotText << " Node12 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_privatebase" << htmlFileExtension << "\"];\n"; dotText << " Node13 -> Node7 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; dotText << " Node13 [shape=\"box\",label=\"Undocumented\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"grey75\"];\n"; dotText << " Node14 -> Node7 [dir=back,color=\"darkorchid3\",fontsize=10,style=\"dashed\",label=\"m_usedClass\",fontname=\"doxfont\"];\n"; - dotText << " Node14 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_used.html\"];\n"; + dotText << " Node14 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_used" << htmlFileExtension << "\"];\n"; dotText << "}\n"; #endif dotText << "digraph inheritance\n"; dotText << "{\n"; dotText << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",style=\"filled\" fontcolor=\"white\"];\n"; dotText << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classPublicBase.html\"];\n"; + dotText << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classPublicBase" << htmlFileExtension << "\"];\n"; dotText << " Node11 -> Node10 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"red\",URL=\"$classTruncated.html\"];\n"; + dotText << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"red\",URL=\"$classTruncated" << htmlFileExtension << "\"];\n"; dotText << " Node13 -> Node9 [dir=back,color=\"darkgreen\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classProtectedBase.html\"];\n"; + dotText << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classProtectedBase" << htmlFileExtension << "\"];\n"; dotText << " Node14 -> Node9 [dir=back,color=\"firebrick4\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classPrivateBase.html\"];\n"; + dotText << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classPrivateBase" << htmlFileExtension << "\"];\n"; dotText << " Node15 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; dotText << " Node15 [shape=\"box\",label=\"Undocumented\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"grey75\"];\n"; dotText << " Node16 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; - dotText << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classTempl.html\"];\n"; + dotText << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classTempl" << htmlFileExtension << "\"];\n"; dotText << " Node17 -> Node16 [dir=back,color=\"orange\",fontsize=10,style=\"dashed\",label=\"< int >\",fontname=\"doxfont\"];\n"; - dotText << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classTempl.html\"];\n"; + dotText << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classTempl" << htmlFileExtension << "\"];\n"; dotText << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=10,style=\"dashed\",label=\"m_usedClass\",fontname=\"doxfont\"];\n"; - dotText << " Node18 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classUsed.html\"];\n"; + dotText << " Node18 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$classUsed" << htmlFileExtension << "\"];\n"; dotText << "}\n"; dotFile.close(); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6883495..c2833f8 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -182,6 +182,8 @@ static void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*"; QCString spaces; +QCString htmlFileExtension; +int htmlFileExtensionLength; //---------------------------------------------------------------------------- @@ -2837,7 +2839,7 @@ static bool findClassRelation( baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec); // the undocumented base was found in this file baseClass->insertUsedFile(root->fileName); - baseClass->setOuterScope(fd); + baseClass->setOuterScope(Doxygen::globalScope); return TRUE; } else @@ -3717,7 +3719,7 @@ static void findMember(Entry *root, //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); // rebuild the function declaration (needed to get the scope right). - if (!scopeName.isEmpty() && /*!isRelated &&*/ !isFriend && !Config_getBool("HIDE_SCOPE_NAMES")) + if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool("HIDE_SCOPE_NAMES")) { if (!funcType.isEmpty()) { @@ -4000,8 +4002,13 @@ static void findMember(Entry *root, { warn_cont(" template %s\n",tempArgListToString(md->templateArguments()).data()); } - warn_cont(" %s %s::%s%s\n", - md->typeString(),cd->name().data(), + warn_cont(" "); + if (md->typeString()) + { + warn_cont("%s",md->typeString()); + } + warn_cont("%s::%s%s\n", + cd->name().data(), md->name().data(),md->argsString()); } } @@ -4090,6 +4097,16 @@ static void findMember(Entry *root, { bool newMember=TRUE; // assume we have a new member bool newMemberName=FALSE; + bool isDefine=FALSE; + { + MemberName *mn = Doxygen::functionNameSDict[funcName]; + MemberDef *md = mn->first(); + while (md && !isDefine) + { + isDefine = isDefine || md->isDefine(); + md = mn->next(); + } + } if ((mn=Doxygen::memberNameSDict[funcName])==0) { mn=new MemberName(funcName); @@ -4115,7 +4132,9 @@ static void findMember(Entry *root, if (newMember) // need to create a new member { MemberDef::MemberType mtype; - if (root->mtype==Signal) + if (isDefine) + mtype=MemberDef::Define; + else if (root->mtype==Signal) mtype=MemberDef::Signal; else if (root->mtype==Slot) mtype=MemberDef::Slot; @@ -5419,9 +5438,9 @@ static void resolveUserReferences() // have to adjust the link file name to point to the group. if (!si->fileName.isEmpty() && (pi=Doxygen::pageSDict->find(si->fileName)) && - pi->inGroup) + pi->getGroupDef()) { - si->fileName=pi->inGroup->getOutputFileBase().copy(); + si->fileName=pi->getGroupDef()->getOutputFileBase().copy(); } @@ -5468,7 +5487,7 @@ static void generatePageDocs() PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && !pi->isReference()) + if (!pi->getGroupDef() && !pi->isReference()) { msg("Generating docs for page %s...\n",pi->name.data()); //outputList->disable(OutputGenerator::Man); @@ -5771,9 +5790,9 @@ static void generateSearchIndex() //outputList->generateExternalIndex(); outputList->pushGeneratorState(); outputList->disableAllBut(OutputGenerator::Html); - startFile(*outputList,"header.html",0,"Search Engine",TRUE); + startFile(*outputList,"header"+htmlFileExtension,0,"Search Engine",TRUE); outputList->endPlainFile(); - outputList->startPlainFile("footer.html"); + outputList->startPlainFile("footer"+htmlFileExtension); endFile(*outputList,TRUE); outputList->popGeneratorState(); } @@ -5818,6 +5837,7 @@ static void generateConfigFile(const char *configFile,bool shortList, bool writeToStdout=(configFile[0]=='-' && configFile[1]=='\0'); if (fileOpened) { + Config::instance()->init(); Config::instance()->writeTemplate(&f,shortList,updateOnly); if (!writeToStdout) { @@ -6611,6 +6631,9 @@ void readConfiguration(int argc, char **argv) s=includePath.next(); } + /* Set the global html file extension. */ + htmlFileExtension = Config_getString("HTML_FILE_EXTENSION"); + htmlFileExtensionLength = htmlFileExtension.length(); } void parseInput() diff --git a/src/doxygen.h b/src/doxygen.h index 3357c7d..d2331f0 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -50,6 +50,8 @@ class StringDict : public QDict<QCString> }; +extern QCString htmlFileExtension; +extern int htmlFileExtensionLength; extern QCString spaces; /*! \brief This class serves as a namespace for global variables used by doxygen. diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 0e63924..8c5f42d 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -31,5 +31,6 @@ DESTDIR = ../bin TARGET = doxygen unix:TARGETDEPS = ../lib/libdoxygen.a ../lib/libdoxycfg.a win32:TARGETDEPS = ..\lib\doxygen.lib ..\lib\doxycfg.lib +win32-g++:TARGETDEPS = ../lib/libdoxygen.a ../lib/libdoxycfg.a OBJECTS_DIR = ../objects diff --git a/src/filedef.cpp b/src/filedef.cpp index d2a2a84..fe5c70b 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -116,6 +116,7 @@ void FileDef::writeDocumentation(OutputList &ol) startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); parseText(ol,theTranslator->trFileReference(docname)); + addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),docName()); //ol.newParagraph(); @@ -124,7 +125,7 @@ void FileDef::writeDocumentation(OutputList &ol) Doxygen::tagFile << " <compound kind=\"file\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << ".html</filename>" << endl; + Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << htmlFileExtension << "</filename>" << endl; } ol.startTextBlock(); @@ -256,9 +257,9 @@ void FileDef::writeDocumentation(OutputList &ol) //ol.disableAllBut(OutputGenerator::Html); //ol.writeString((QCString)"<p>Interface collaboration diagram for " - // "<a href=\"usage_intf_graph_"+name()+".html\">here</a>"); + // "<a href=\"usage_intf_graph_"+name()+htmlFileExtension+"\">here</a>"); //ol.writeString((QCString)"<p>Include dependency diagram for "+fn+" can be found "+ - // "<a href=\""+diskname+"_incldep.html\">here</a>."); + // "<a href=\""+diskname+"_incldep+htmlFileExtension+"\">here</a>."); //ol.enableAll(); ol.endTextBlock(); diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 65c16d9..17fd9f7 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -264,7 +264,7 @@ static void generateFolderTreeViewData() } // Generate alternative index.html as a frame - fileName=Config_getString("HTML_OUTPUT")+"/index.html"; + fileName=Config_getString("HTML_OUTPUT")+"/index"+htmlFileExtension; f.setName(fileName); if (!f.open(IO_WriteOnly)) { @@ -291,15 +291,15 @@ static void generateFolderTreeViewData() } t << "</title></head>" << endl; t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl; - t << " <frame src=\"tree.html\" name=\"treefrm\">" << endl; - t << " <frame src=\"main.html\" name=\"basefrm\">" << endl; + t << " <frame src=\"tree" << htmlFileExtension << "\" name=\"treefrm\">" << endl; + t << " <frame src=\"main" << htmlFileExtension << "\" name=\"basefrm\">" << endl; t << "</frameset>" << endl; t << "</html>" << endl; f.close(); } // Generate tree view frame - fileName=Config_getString("HTML_OUTPUT")+"/tree.html"; + fileName=Config_getString("HTML_OUTPUT")+"/tree"+htmlFileExtension; f.setName(fileName); if (!f.open(IO_WriteOnly)) { @@ -476,7 +476,7 @@ void FTVHelp::addContentsItem(bool isDir, << name << "\", \"" << tagName << "\", "; if (file) // file optional param { - m_cts << "\"" << tagDir << file << ".html\"))"; + m_cts << "\"" << tagDir << file << htmlFileExtension << "\"))"; } else { @@ -489,7 +489,7 @@ void FTVHelp::addContentsItem(bool isDir, << name << "\", \"" << tagName << "\", "; if (file) // ref optional param { - m_cts << "\"" << tagDir << file << ".html"; + m_cts << "\"" << tagDir << file << htmlFileExtension; if (anchor) m_cts << "#" << anchor; m_cts << "\"))"; } diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 67408a3..b508c1c 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -38,7 +38,6 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : fileList = new FileList; classSDict = new ClassSDict(257); groupList = new GroupList; - parentGroupList = new GroupList; namespaceList = new NamespaceList; pageDict = new PageSDict(257); exampleDict = new PageSDict(257); @@ -72,7 +71,6 @@ GroupDef::~GroupDef() delete fileList; delete classSDict; delete groupList; - delete parentGroupList; delete namespaceList; delete pageDict; delete exampleDict; @@ -134,7 +132,7 @@ void GroupDef::addNamespace(const NamespaceDef *def) void GroupDef::addPage(PageInfo *def) { pageDict->append(def->name,def); - def->inGroup = this; + def->makePartOfGroup(this); } void GroupDef::addExample(const PageInfo *def) @@ -316,20 +314,11 @@ void GroupDef::addGroup(const GroupDef *def) groupList->append(def); } -void GroupDef::addParentGroup(const GroupDef *def) -{ - //if (Config_getBool("SORT_MEMBER_DOCS")) - // parentGroupList->inSort(def); - //else - parentGroupList->append(def); -} - bool GroupDef::isASubGroup() const { - return parentGroupList->count()!=0; + return m_partOfGroups && m_partOfGroups->count()!=0; } - int GroupDef::countMembers() const { return fileList->count()+ @@ -354,6 +343,7 @@ void GroupDef::writeDocumentation(OutputList &ol) startFile(ol,getOutputFileBase(),name(),title); startTitle(ol,getOutputFileBase()); ol.docify(title); + addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); //brief=brief.stripWhiteSpace(); @@ -379,7 +369,7 @@ void GroupDef::writeDocumentation(OutputList &ol) Doxygen::tagFile << " <compound kind=\"group\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << ".html</filename>" << endl; + Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << htmlFileExtension << "</filename>" << endl; } ol.startMemberSections(); @@ -597,6 +587,7 @@ void addClassToGroups(Entry *root,ClassDef *cd) if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) { gd->addClass(cd); + cd->makePartOfGroup(gd); //printf("Compound %s: in group %s\n",cd->name().data(),s->data()); } } @@ -614,6 +605,7 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd) if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) { gd->addNamespace(nd); + nd->makePartOfGroup(gd); //printf("Namespace %s: in group %s\n",nd->name().data(),s->data()); } } @@ -630,7 +622,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup) !gd->containsGroup(subGroup) ) { gd->addGroup(subGroup); - subGroup->addParentGroup(gd); + subGroup->makePartOfGroup(gd); } } } @@ -681,7 +673,9 @@ void addMemberToGroups(Entry *root,MemberDef *md) // - the new one has a higher priority // - the new entry has the same priority, but with docs where the old one had no docs if( md->getGroupPri() < pri ) + { moveit = TRUE; + } else { if( md->getGroupPri() == pri ) @@ -731,6 +725,7 @@ void addExampleToGroups(Entry *root,PageInfo *eg) if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) { gd->addExample(eg); + eg->makePartOfGroup(gd); //printf("Example %s: in group %s\n",eg->name().data(),s->data()); } } diff --git a/src/groupdef.h b/src/groupdef.h index a7d81d5..f371d49 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -118,7 +118,7 @@ class GroupDef : public Definition ClassSDict *classSDict; // list of classes in the group NamespaceList *namespaceList; // list of namespaces in the group GroupList *groupList; // list of sub groups. - GroupList *parentGroupList; // list of parent groups. + //GroupList *parentGroupList; // list of parent groups. PageSDict *pageDict; // list of pages in the group PageSDict *exampleDict; // list of examples in the group @@ -139,6 +139,13 @@ class GroupList : public QList<GroupDef> { }; +class GroupListIterator : public QListIterator<GroupDef> +{ + public: + GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {} + virtual ~GroupListIterator() {} +}; + void addClassToGroups(Entry *root,ClassDef *cd); void addNamespaceToGroups(Entry *root,NamespaceDef *nd); void addGroupToGroups(Entry *root,GroupDef *subGroup); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index fbd0c37..35002c5 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -200,7 +200,7 @@ void HtmlGenerator::startFile(const char *name,const char *, //printf("HtmlGenerator::startFile(%s)\n",name); QCString fileName=name; lastTitle=title; - if (fileName.right(5)!=".html") fileName+=".html"; + if (fileName.right(htmlFileExtensionLength)!=htmlFileExtension) fileName+=htmlFileExtension; startPlainFile(fileName); if (Config_getBool("GENERATE_HTMLHELP")) { @@ -379,7 +379,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << ".html\">"; + if (f) t << f << htmlFileExtension << "\">"; } else { @@ -396,7 +396,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, } //if (Config_getBool("GENERATE_HTMLHELP") && f) //{ - // htmlHelp->addItem(name,((QCString)f)+".html"); + // htmlHelp->addItem(name,((QCString)f)+htmlFileExtension); //} } @@ -405,12 +405,12 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, { t << "<li>"; if (path) docify(path); - t << "<a class=\"el\" href=\"" << f << ".html\">"; + t << "<a class=\"el\" href=\"" << f << htmlFileExtension << "\">"; docify(name); t << "</a> "; //if (Config_getBool("GENERATE_HTMLHELP") && f) //{ - // htmlHelp->addItem(name, ((QCString)f)+".html"); + // htmlHelp->addItem(name, ((QCString)f)+htmlFileExtension); //} } @@ -434,7 +434,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << ".html"; + if (f) t << f << htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; docify(name); @@ -461,7 +461,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << ".html"; + if (f) t << f << htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; docify(name); @@ -472,7 +472,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, void HtmlGenerator::startTextLink(const char *f,const char *anchor) { t << "<a href=\""; - if (f) t << f << ".html"; + if (f) t << f << htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; } @@ -531,7 +531,7 @@ void HtmlGenerator::writeSectionRef(const char *ref,const char *name, QCString *dest; //printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title); QCString refName=name; - if (refName.right(5)!=".html") refName+=".html"; + if (refName.right(htmlFileExtensionLength)!=htmlFileExtension) refName+=htmlFileExtension; t << "<a "; if (ref) { @@ -553,7 +553,7 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, const char *title) { QCString refName=name; - if (refName.right(5)!=".html") refName+=".html"; + if (refName.right(htmlFileExtensionLength)!=htmlFileExtension) refName+=htmlFileExtension; t << "<a href=\"" << refName << "#" << lab << "\">"; docify(title); t << "</a>"; diff --git a/src/index.cpp b/src/index.cpp index dfd7db9..9b20b51 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -181,11 +181,11 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (!compact) ol.writeListItem(); if (Config_getBool("GENERATE_TREEVIEW")) { - ol.startQuickIndexItem(extLink,"main.html"); + ol.startQuickIndexItem(extLink,"main"+htmlFileExtension); } else { - ol.startQuickIndexItem(extLink,"index.html"); + ol.startQuickIndexItem(extLink,"index"+htmlFileExtension); } parseText(ol,theTranslator->trMainPage()); ol.endQuickIndexItem(); @@ -193,28 +193,28 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (documentedPackages>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"packages.html"); + ol.startQuickIndexItem(extLink,"packages"+htmlFileExtension); parseText(ol,theTranslator->trPackages()); ol.endQuickIndexItem(); } if (documentedGroups>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"modules.html"); + ol.startQuickIndexItem(extLink,"modules"+htmlFileExtension); parseText(ol,theTranslator->trModules()); ol.endQuickIndexItem(); } if (documentedNamespaces>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"namespaces.html"); + ol.startQuickIndexItem(extLink,"namespaces"+htmlFileExtension); parseText(ol,theTranslator->trNamespaceList()); ol.endQuickIndexItem(); } if (hierarchyClasses>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"hierarchy.html"); + ol.startQuickIndexItem(extLink,"hierarchy"+htmlFileExtension); parseText(ol,theTranslator->trClassHierarchy()); ol.endQuickIndexItem(); } @@ -223,68 +223,68 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (Config_getBool("ALPHABETICAL_INDEX")) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"classes.html"); + ol.startQuickIndexItem(extLink,"classes"+htmlFileExtension); parseText(ol,theTranslator->trAlphabeticalList()); ol.endQuickIndexItem(); } if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"annotated.html"); + ol.startQuickIndexItem(extLink,"annotated"+htmlFileExtension); parseText(ol,theTranslator->trCompoundList()); ol.endQuickIndexItem(); } if (documentedHtmlFiles>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"files.html"); + ol.startQuickIndexItem(extLink,"files"+htmlFileExtension); parseText(ol,theTranslator->trFileList()); ol.endQuickIndexItem(); } //if (documentedIncludeFiles>0 && Config_getBool("VERBATIM_HEADERS")) //{ // if (!compact) ol.writeListItem(); - // ol.startQuickIndexItem(extLink,"headers.html"); + // ol.startQuickIndexItem(extLink,"headers"+htmlFileExtension); // parseText(ol,theTranslator->trHeaderFiles()); // ol.endQuickIndexItem(); //} //if (Config_getBool("SOURCE_BROWSER")) //{ // if (!compact) ol.writeListItem(); - // ol.startQuickIndexItem(extLink,"sources.html"); + // ol.startQuickIndexItem(extLink,"sources"+htmlFileExtension); // parseText(ol,theTranslator->trSources()); // ol.endQuickIndexItem(); //} if (documentedNamespaceMembers>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"namespacemembers.html"); + ol.startQuickIndexItem(extLink,"namespacemembers"+htmlFileExtension); parseText(ol,theTranslator->trNamespaceMembers()); ol.endQuickIndexItem(); } if (documentedMembers>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"functions.html"); + ol.startQuickIndexItem(extLink,"functions"+htmlFileExtension); parseText(ol,theTranslator->trCompoundMembers()); ol.endQuickIndexItem(); } if (documentedFunctions>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"globals.html"); + ol.startQuickIndexItem(extLink,"globals"+htmlFileExtension); parseText(ol,theTranslator->trFileMembers()); ol.endQuickIndexItem(); } if (indexedPages>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"pages.html"); + ol.startQuickIndexItem(extLink,"pages"+htmlFileExtension); parseText(ol,theTranslator->trRelatedPages()); ol.endQuickIndexItem(); } if (Doxygen::exampleSDict->count()>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"examples.html"); + ol.startQuickIndexItem(extLink,"examples"+htmlFileExtension); parseText(ol,theTranslator->trExamples()); ol.endQuickIndexItem(); } @@ -683,7 +683,10 @@ void writeHierarchicalIndex(OutputList &ol) QCString title = theTranslator->trClassHierarchy(); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; - if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); + if (!Config_getString("PROJECT_NAME").isEmpty()) + { + title.prepend(Config_getString("PROJECT_NAME")+" "); + } parseText(ol,title); endTitle(ol,0,0); ol.startTextBlock(); @@ -714,7 +717,6 @@ void writeHierarchicalIndex(OutputList &ol) ol.enable(OutputGenerator::RTF); } parseText(ol,theTranslator->trClassHierarchyDescription()); - //ol.newParagraph(); ol.endTextBlock(); writeClassHierarchy(ol); endFile(ol); @@ -1388,7 +1390,7 @@ void writeAlphabeticalIndex(OutputList &ol) if (annotatedClasses==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,"classes.html",0,"Alphabetical index"); + startFile(ol,"classes"+htmlFileExtension,0,"Alphabetical index"); startTitle(ol,0); parseText(ol,Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex()); endTitle(ol,0,0); @@ -2060,7 +2062,7 @@ void countRelatedPages(int &docPages,int &indexPages) PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && (!pi->isReference() || Config_getBool("ALLEXTERNALS"))) + if (!pi->getGroupDef() && (!pi->isReference() || Config_getBool("ALLEXTERNALS"))) { indexPages++; if (!pi->isReference()) docPages++; @@ -2125,7 +2127,7 @@ void writePageIndex(OutputList &ol) PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && (!pi->isReference() || Config_getBool("ALLEXTERNALS"))) + if (!pi->getGroupDef() && (!pi->isReference() || Config_getBool("ALLEXTERNALS"))) { QCString pageName,pageTitle; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 85a9bdf..4604a58 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -199,12 +199,12 @@ void LatexGenerator::init() << "\tmakeindex refman.idx" << endl << "\techo \"Rerunning latex....\"" << endl << "\tlatex refman.tex" << endl - << "\tlatex_count=5" << endl - << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $latex_count -gt 0 ] ;\\" << endl + << "\tlatex_count=5 ; \\" << endl + << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl << "\t do \\" << endl << "\t echo \"Rerunning latex....\" ;\\" << endl << "\t latex refman.tex ;\\" << endl - << "\t latex_count=`expr $latex_count - 1` ;\\" << endl + << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl << "\t done" << endl << endl << "clean:" << endl << "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out" << endl; @@ -787,7 +787,7 @@ void LatexGenerator::endIndexSection(IndexSections is) bool first=TRUE; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && !pi->isReference()) + if (!pi->getGroupDef() && !pi->isReference()) { QCString pageName; if (Config_getBool("CASE_SENSE_NAMES")) diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 323bb85..96affc7 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -177,13 +177,14 @@ void NamespaceDef::writeDocumentation(OutputList &ol) startTitle(ol,getOutputFileBase()); //ol.docify(pageTitle); parseText(ol,theTranslator->trNamespaceReference(name())); + addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),name()); if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { Doxygen::tagFile << " <compound kind=\"namespace\">" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << ".html</filename>" << endl; + Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << htmlFileExtension << "</filename>" << endl; } ol.startTextBlock(); @@ -25,7 +25,7 @@ class PageInfo public: PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : defFileName(f), defLine(l), name(n), - doc(d), title(t), todoId(0), testId(0),inGroup(0), sectionDict(0) {} + doc(d), title(t), todoId(0), testId(0),sectionDict(0), m_inGroup(0) {} // where the page definition was found QCString defFileName; @@ -92,9 +92,14 @@ class PageInfo int testId; int bugId; + void makePartOfGroup(GroupDef *gd) { m_inGroup = gd; } + GroupDef *getGroupDef() const { return m_inGroup; } + // is this page part of a group - GroupDef *inGroup; SectionDict *sectionDict; + + private: + GroupDef *m_inGroup; }; class PageSDict : public SDict<PageInfo> @@ -1050,7 +1050,7 @@ BN [ \t\r\n] } BEGIN(CopyLine); } -<Start>^{B}*[_A-Z][_A-Z0-9]*"("[^\)\n]*")"{B}*\n { // function like macro +<Start>^{B}*[_A-Z][_A-Z0-9]*{B}*"("[^\)\n]*")"{B}*\n { // function like macro static bool skipFuncMacros = Config_getBool("SKIP_FUNCTION_MACROS"); QCString name(yytext); name=name.left(name.find('(')).stripWhiteSpace(); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 85cc771..bd09fc6 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1328,7 +1328,7 @@ void RTFGenerator::endIndexSection(IndexSections is) bool first=TRUE; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && !pi->isReference()) + if (!pi->getGroupDef() && !pi->isReference()) { QCString pageName; if (Config_getBool("CASE_SENSE_NAMES")) diff --git a/src/scanner.l b/src/scanner.l index 4032a73..b644c96 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1,6 +1,6 @@ /***************************************************************************** * - * $Id$ + * * * Copyright (C) 1997-2002 by Dimitri van Heesch. * diff --git a/src/translator_jp.h b/src/translator_jp.h index 0dbfc90..1c17be8 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -29,7 +29,7 @@ #ifndef TRANSLATOR_JP_H #define TRANSLATOR_JP_H -class TranslatorJapanese : public TranslatorAdapter_1_2_13 +class TranslatorJapanese : public Translator { private: /*! The decode() can change euc into sjis */ @@ -484,7 +484,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_13 */ virtual QCString trWrittenBy() { - return decode("担当"); + return decode("作者"); } /*! this text is put before a class diagram */ @@ -1317,6 +1317,25 @@ class TranslatorJapanese : public TranslatorAdapter_1_2_13 return decode("参照"); } -}; +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return trWriteList(numEntries)+decode("を実装しています")+"."; + } + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return trWriteList(numEntries)+decode("に実装されています")+"."; + } + +}; #endif diff --git a/src/util.cpp b/src/util.cpp index 35b26be..ed55620 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2603,7 +2603,7 @@ bool generateLink(OutputDocInterface &od,const char *clName, } else if ((pi=Doxygen::pageSDict->find(linkRef))) // link to a page { - GroupDef *gd = pi->inGroup; + GroupDef *gd = pi->getGroupDef(); if (gd) { SectionInfo *si=0; @@ -3467,8 +3467,8 @@ void addRelatedPage(const char *name,const QCString &ptitle, QCString baseName=name; if (baseName.right(4)==".tex") baseName=baseName.left(baseName.length()-4); - else if (baseName.right(5)==".html") - baseName=baseName.left(baseName.length()-5); + else if (baseName.right(htmlFileExtensionLength)==htmlFileExtension) + baseName=baseName.left(baseName.length()-htmlFileExtensionLength); QCString title=ptitle.stripWhiteSpace(); pi=new PageInfo(fileName,startLine,baseName,doc,title); @@ -3504,9 +3504,9 @@ void addRelatedPage(const char *name,const QCString &ptitle, { si->fileName=gd->getOutputFileBase(); } - else if (pi->inGroup) + else if (pi->getGroupDef()) { - si->fileName=pi->inGroup->getOutputFileBase().copy(); + si->fileName=pi->getGroupDef()->getOutputFileBase().copy(); } else { @@ -3621,4 +3621,27 @@ void addRefItem(int todoId,int testId,int bugId,const char *prefix, } } +void addGroupListToTitle(OutputList &ol,Definition *d) +{ + if (d->partOfGroups()) // write list of group to which this definition belongs + { + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + ol.lineBreak(); + ol.startSmall(); + ol.docify("["); + GroupListIterator gli(*d->partOfGroups()); + GroupDef *gd; + bool first=TRUE; + for (gli.toFirst();(gd=gli.current());++gli) + { + if (!first) { ol.docify(","); ol.writeNonBreakableSpace(1); } else first=FALSE; + ol.writeObjectLink(gd->getReference(), + gd->getOutputFileBase(),0,gd->groupTitle()); + } + ol.docify("]"); + ol.endSmall(); + ol.popGeneratorState(); + } +} @@ -176,6 +176,7 @@ void addRelatedPage(const char *name,const QCString &ptitle, TagInfo *tagInfo=0 ); QCString escapeCharsInString(const char *name,bool allowDots); +void addGroupListToTitle(OutputList &ol,Definition *d); #endif diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index ac9b230..5a4a9d3 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -182,13 +182,13 @@ class XMLGenerator : public OutputDocInterface if (!m_inParStack.isEmpty() && !m_inParStack.top()) { m_inParStack.top() = TRUE; - m_t << "<para>" << endl; + m_t << "<para>"; XML_DB(("start par at level=%d\n",m_inParStack.count())); } else if (m_inParStack.isEmpty()) { m_inParStack.push(TRUE); - m_t << "<para>" << endl; + m_t << "<para>"; XML_DB(("start par at level=%d\n",m_inParStack.count())); } } @@ -1271,11 +1271,49 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, t << " </sectiondef>" << endl; } +static void writeTemplateLists(Definition *d,QTextStream &t) +{ + if (d->definitionType()==Definition::TypeClass) + { + if (d->getOuterScope()) writeTemplateLists(d->getOuterScope(),t); + ClassDef *cd = (ClassDef *)d; + ArgumentList *al = cd->templateArguments(); + if (al) + { + t << " <templateparamlist>" << endl; + ArgumentListIterator ali(*al); + Argument *a; + for (ali.toFirst();(a=ali.current());++ali) + { + t << " <param>" << endl; + if (!a->type.isEmpty()) + { + t << " <type>"; + linkifyText(TextGeneratorXMLImpl(t),d->name(),0,a->type); + t << "</type>" << endl; + } + if (!a->name.isEmpty()) + { + t << " <name>" << a->name << "</name>" << endl; + } + if (!a->defval.isEmpty()) + { + t << " <defval>"; + linkifyText(TextGeneratorXMLImpl(t),d->name(),0,a->defval); + t << "</defval>" << endl; + } + t << " </param>" << endl; + } + t << " </templateparamlist>" << endl; + } + } +} + static void generateXMLForClass(ClassDef *cd,QTextStream &ti) { // + brief description // + detailed description - // - template arguments + // + template argument list(s) // - include file // + member groups // + inheritance diagram @@ -1376,6 +1414,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl; } } + writeTemplateLists(cd,t); MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict); MemberGroup *mg; for (;(mg=mgli.current());++mgli) |