summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-05-12 17:38:45 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-05-12 17:38:45 (GMT)
commit697375aff0beddb756025e867289213dc46ca45f (patch)
tree2f87712e9d2e8da7138ca908bf03c9937ba71bdb /src
parent62d3c6501af58ceb48ce8e56327d07ad69e79374 (diff)
downloadDoxygen-697375aff0beddb756025e867289213dc46ca45f.zip
Doxygen-697375aff0beddb756025e867289213dc46ca45f.tar.gz
Doxygen-697375aff0beddb756025e867289213dc46ca45f.tar.bz2
Release-1.2.15-20020512
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in2
-rw-r--r--src/classdef.cpp198
-rw-r--r--src/classdef.h3
-rw-r--r--src/config.l8
-rw-r--r--src/dot.cpp12
-rw-r--r--src/doxygen.cpp29
-rw-r--r--src/doxygen.h4
-rw-r--r--src/filedef.cpp118
-rw-r--r--src/filedef.h1
-rw-r--r--src/groupdef.cpp77
-rw-r--r--src/groupdef.h1
-rw-r--r--src/index.cpp60
-rw-r--r--src/index.h6
-rw-r--r--src/latexgen.cpp96
-rw-r--r--src/memberdef.cpp6
-rw-r--r--src/namespacedef.cpp95
-rw-r--r--src/namespacedef.h2
-rw-r--r--src/pre.l33
-rw-r--r--src/rtfgen.cpp80
-rw-r--r--src/tagreader.cpp23
-rw-r--r--src/translator_br.h13
-rw-r--r--src/translator_tw.h8
-rw-r--r--src/util.cpp323
-rw-r--r--src/xmlgen.cpp125
24 files changed, 631 insertions, 692 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index e791c61..fcb5f70 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -53,6 +53,6 @@ clean: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag Makefile.doxysearch
distclean: clean
-$(RM) scanner.cpp doc.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
- declinfo.cpp defargs.cpp
+ declinfo.cpp defargs.cpp commentcnv.cpp
FORCE:
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 822cc3d..31ea207 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -596,22 +596,22 @@ void ClassDef::setIncludeFile(FileDef *fd,const char *includeName,bool local)
}
// TODO: fix this: a nested template class can have multiple outer templates
-ArgumentList *ClassDef::outerTemplateArguments() const
-{
- int ti;
- ClassDef *pcd=0;
- int pi=0;
- if (m_tempArgs) return m_tempArgs;
- // find the outer most class scope
- while ((ti=name().find("::",pi))!=-1 &&
- (pcd=getClass(name().left(ti)))==0
- ) pi=ti+2;
- if (pcd)
- {
- return pcd->templateArguments();
- }
- return 0;
-}
+//ArgumentList *ClassDef::outerTemplateArguments() const
+//{
+// int ti;
+// ClassDef *pcd=0;
+// int pi=0;
+// if (m_tempArgs) return m_tempArgs;
+// // find the outer most class scope
+// while ((ti=name().find("::",pi))!=-1 &&
+// (pcd=getClass(name().left(ti)))==0
+// ) pi=ti+2;
+// if (pcd)
+// {
+// return pcd->templateArguments();
+// }
+// return 0;
+//}
static void searchTemplateSpecs(/*in*/ Definition *d,
/*out*/ QList<ArgumentList> &result,
@@ -684,6 +684,68 @@ static void writeTemplateSpec(OutputList &ol,Definition *d,
ol.writeString("\n");
}
}
+
+// write the detailed description for this class
+void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, const QCString &pageType, bool exampleFlag)
+{
+ if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
+ !documentation().isEmpty() ||
+ /*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
+ exampleFlag)
+ {
+ 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();
+ ol.startTextBlock();
+
+ writeTemplateSpec(ol,this,pageType);
+
+ // repeat brief description
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ {
+ ol+=briefOutput;
+ }
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ !documentation().isEmpty())
+ {
+ ol.newParagraph();
+ }
+ // write documentation
+ if (!documentation().isEmpty())
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::RTF);
+ ol.newParagraph();
+ ol.popGeneratorState();
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
+ }
+ // write examples
+ if (exampleFlag)
+ {
+ ol.startDescList(BaseOutputDocInterface::Examples);
+ parseText(ol,theTranslator->trExamples()+": ");
+ ol.endDescTitle();
+ ol.writeDescItem();
+ ol.newParagraph();
+ writeExample(ol,m_exampleSDict);
+ //ol.endDescItem();
+ ol.endDescList();
+ }
+ ol.newParagraph();
+ writeSourceDef(ol,name());
+ ol.endTextBlock();
+ }
+ else
+ {
+ writeTemplateSpec(ol,this,pageType);
+ }
+}
// write all documentation for this class
void ClassDef::writeDocumentation(OutputList &ol)
@@ -691,16 +753,15 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write title
QCString pageTitle=name().copy();
QCString pageType;
- ArgumentList *outerTempArgList = outerTemplateArguments();
QCString cType=compoundTypeString();
toupper(cType.at(0));
pageType+=" ";
pageType+=cType;
pageTitle+=pageType+" Reference";
- if (outerTempArgList) pageTitle.prepend(" Template");
+ if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
- parseText(ol,theTranslator->trCompoundReference(displayName(),m_compType,outerTempArgList!=0));
+ parseText(ol,theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
@@ -714,24 +775,27 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty())
{
parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
- ol+=briefOutput;
- ol.writeString(" \n");
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"_details");
-
- if (Config_getBool("REPEAT_BRIEF") ||
- !documentation().isEmpty() ||
- exampleFlag
- )
+ if (!Config_getBool("DETAILS_AT_TOP"))
{
- parseText(ol,theTranslator->trMore());
+ ol+=briefOutput;
+ ol.writeString(" \n");
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.startTextLink(0,"_details");
+
+ if (Config_getBool("REPEAT_BRIEF") ||
+ !documentation().isEmpty() ||
+ exampleFlag
+ )
+ {
+ parseText(ol,theTranslator->trMore());
+ }
+ ol.endTextLink();
+ ol.popGeneratorState();
+ ol.disable(OutputGenerator::Man);
+ ol.newParagraph();
+ ol.enable(OutputGenerator::Man);
}
- ol.endTextLink();
- ol.popGeneratorState();
- ol.disable(OutputGenerator::Man);
- ol.newParagraph();
- ol.enable(OutputGenerator::Man);
}
ol.writeSynopsis();
@@ -990,6 +1054,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endTextBlock();
+ // write detailed description if the user wants it near the top
+ if (Config_getBool("DETAILS_AT_TOP")) {
+ writeDetailedDescription(ol,briefOutput,pageType,exampleFlag);
+ }
+
// write member groups
ol.startMemberSections();
@@ -1062,64 +1131,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endMemberSections();
// write detailed description
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
- !documentation().isEmpty() ||
- /*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
- exampleFlag)
- {
- 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();
- ol.startTextBlock();
-
- writeTemplateSpec(ol,this,pageType);
-
- // repeat brief description
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
- {
- ol+=briefOutput;
- }
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
- !documentation().isEmpty())
- {
- ol.newParagraph();
- }
- // write documentation
- if (!documentation().isEmpty())
- {
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::RTF);
- ol.newParagraph();
- ol.popGeneratorState();
- parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
- }
- // write examples
- if (exampleFlag)
- {
- ol.startDescList(BaseOutputDocInterface::Examples);
- parseText(ol,theTranslator->trExamples()+": ");
- ol.endDescTitle();
- ol.writeDescItem();
- ol.newParagraph();
- writeExample(ol,m_exampleSDict);
- //ol.endDescItem();
- ol.endDescList();
- }
- ol.newParagraph();
- writeSourceDef(ol,name());
- ol.endTextBlock();
+ if (!Config_getBool("DETAILS_AT_TOP")) {
+ writeDetailedDescription(ol,briefOutput,pageType,exampleFlag);
}
- else
- {
- writeTemplateSpec(ol,this,pageType);
- }
-
typedefMembers.writeDocumentation(ol,name(),this,
diff --git a/src/classdef.h b/src/classdef.h
index e33ec4e..67c620f 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -102,6 +102,7 @@ class ClassDef : public Definition
void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberList(OutputList &ol);
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);
+ void writeDetailedDescription(OutputList &ol,OutputList &briefOutput,const QCString &pageType,bool exampleFlag);
/*! Return the protection level (Public,Protected,Private) in which
* this compound was found.
@@ -129,7 +130,7 @@ class ClassDef : public Definition
* from its outer class (doxygen assumes there is only one!).
* Will return 0 if not applicable.
*/
- ArgumentList *outerTemplateArguments() const;
+ //ArgumentList *outerTemplateArguments() const;
/*! Returns the namespace this compound is in, or 0 if it has a global
* scope.
diff --git a/src/config.l b/src/config.l
index c3409d8..ceffb23 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1481,6 +1481,14 @@ void Config::create()
FALSE
);
cb = addBool(
+ "DETAILS_AT_TOP",
+ "If the DETAILS_AT_TOP tag is set to YES then Doxygen \n"
+ "will output the detailed description near the top, like JavaDoc.\n"
+ "If set to NO, the detailed description appears after the member \n"
+ "documentation. \n",
+ FALSE
+ );
+ cb = addBool(
"INHERIT_DOCS",
"If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n"
"member inherits the documentation from any documented member that it \n"
diff --git a/src/dot.cpp b/src/dot.cpp
index c421c2c..ffd4abd 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1753,6 +1753,18 @@ void writeDotGraphFromFile(const char *inFile,const char *outFile,
{
err("Problems running dot. Check your installation!\n");
}
+ // Added by Nils Strom
+ if ( (format==EPS) && (Config_getBool("USE_PDFLATEX")) )
+ {
+ QCString epstopdfArgs(4096);
+ epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
+ outFile,outFile);
+ if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0)
+ {
+ err("Error: Problems running epstopdf. Check your TeX installation!\n");
+ }
+ }
+
if (format==BITMAP) checkDotResult(imgName);
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 5824c07..6c1aff5 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -58,7 +58,7 @@
#include "defgen.h"
#include "reflist.h"
#include "page.h"
-#include "packagedef.h"
+//#include "packagedef.h"
#include "bufstr.h"
#include "commentcnv.h"
@@ -88,7 +88,7 @@ FormulaList Doxygen::formulaList; // all formulas
FormulaDict Doxygen::formulaDict(1009); // all formulas
FormulaDict Doxygen::formulaNameDict(1009); // the label name of all formulas
-PackageSDict Doxygen::packageDict(257); // java packages
+//PackageSDict Doxygen::packageDict(257); // java packages
PageSDict *Doxygen::pageSDict = new PageSDict(1009); // all doc pages
PageSDict *Doxygen::exampleSDict = new PageSDict(1009); // all examples
@@ -889,6 +889,7 @@ static void buildNamespaceList(Entry *root)
// also add namespace to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
+ //printf("adding namespace %s to context %s\n",nd->name().data(),d?d->name().data():"none");
if (d==0)
{
// TODO: Due to the order in which the tag file is written
@@ -5646,16 +5647,16 @@ static void findMainPage(Entry *root)
//----------------------------------------------------------------------------
/*! Add Java classes to their respective packages */
-static void addClassesToPackages()
-{
- ClassDef *cd;
- ClassSDict::Iterator cli(Doxygen::classSDict);
- for (;(cd=cli.current());++cli)
- {
- PackageDef *pd = cd->packageDef();
- if (pd) pd->addClass(cd);
- }
-}
+//static void addClassesToPackages()
+//{
+// ClassDef *cd;
+// ClassSDict::Iterator cli(Doxygen::classSDict);
+// for (;(cd=cli.current());++cli)
+// {
+// PackageDef *pd = cd->packageDef();
+// if (pd) pd->addClass(cd);
+// }
+//}
//----------------------------------------------------------------------------
@@ -7336,8 +7337,8 @@ void parseInput()
msg("Computing member relations...\n");
computeMemberRelations();
- msg("Adding classes to their packages...\n");
- addClassesToPackages();
+ //msg("Adding classes to their packages...\n");
+ //addClassesToPackages();
msg("Building full member lists recursively...\n");
buildCompleteMemberLists();
diff --git a/src/doxygen.h b/src/doxygen.h
index d2331f0..1dfafc2 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -32,7 +32,7 @@
#include "formula.h"
#include "section.h"
#include "membergroup.h"
-#include "packagedef.h"
+//#include "packagedef.h"
class PageSList;
class PageSDict;
@@ -92,7 +92,7 @@ class Doxygen
static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
static QDict<void> expandAsDefinedDict;
- static PackageSDict packageDict;
+ //static PackageSDict packageDict;
static NamespaceDef *globalScope;
};
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 177cfa6..b48ba25 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -98,6 +98,57 @@ void FileDef::distributeMemberGroupDocumentation()
}
}
+void FileDef::writeDetailedDocumentation(OutputList &ol)
+{
+ if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
+ !documentation().isEmpty()
+ )
+ {
+ ol.writeRuler();
+ ol.pushGeneratorState();
+ //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
+ //if (latexOn) ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::RTF);
+ ol.writeAnchor(0,"_details");
+ //if (latexOn) ol.enable(OutputGenerator::Latex);
+ ol.popGeneratorState();
+ ol.startGroupHeader();
+ parseText(ol,theTranslator->trDetailedDescription());
+ ol.endGroupHeader();
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ {
+ parseDoc(ol,filepath,1,0,0,briefDescription());
+ }
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ !documentation().isEmpty())
+ {
+ ol.newParagraph();
+ }
+ if (!documentation().isEmpty())
+ {
+ //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
+ // doc+='.';
+ parseDoc(ol,filepath,1,0,0,documentation()+"\n");
+ }
+ //printf("Writing source ref for file %s\n",name().data());
+ if (Config_getBool("SOURCE_BROWSER"))
+ {
+ ol.newParagraph();
+ QCString refText = theTranslator->trDefinedInSourceFile();
+ int fileMarkerPos = refText.find("@0");
+ if (fileMarkerPos!=-1) // should always pass this.
+ {
+ parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
+ ol.writeObjectLink(0,getSourceFileBase(),
+ 0,name());
+ parseText(ol,refText.right(
+ refText.length()-fileMarkerPos-2)); // text right from marker 2
+ }
+ }
+ }
+}
+
/*! Write the documentation page for this file to the file of output
generators \a ol.
*/
@@ -132,15 +183,13 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.startTextBlock();
- //brief=brief.stripWhiteSpace();
- //int bl=brief.length();
- OutputList briefOutput(&ol);
- if (briefDescription())
+ if (Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
+ else if (briefDescription())
{
- //if (brief.at(bl-1)!='.' && brief.at(bl-1)!='!' && brief.at(bl!='?'))
- // brief+='.';
- parseDoc(briefOutput,filepath,1,0,0,briefDescription());
- ol+=briefOutput;
+ parseDoc(ol,filepath,1,0,0,briefDescription());
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
@@ -198,6 +247,8 @@ void FileDef::writeDocumentation(OutputList &ol)
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase())
+ << "\" name=\""
+ << convertToXML(fd->name())
<< "\" local=\"" << locStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
@@ -347,56 +398,9 @@ void FileDef::writeDocumentation(OutputList &ol)
decVarMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trVariables(),0);
ol.endMemberSections();
- //doc=doc.stripWhiteSpace();
- //int bl=brief.length();
- //int dl=doc.length();
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
- !documentation().isEmpty()
- /* || startBodyLine!=-1 */
- )
+ if (!Config_getBool("DETAILS_AT_TOP"))
{
- ol.writeRuler();
- ol.pushGeneratorState();
- //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
- //if (latexOn) ol.disable(OutputGenerator::Latex);
- ol.disable(OutputGenerator::Latex);
- ol.disable(OutputGenerator::RTF);
- ol.writeAnchor(0,"_details");
- //if (latexOn) ol.enable(OutputGenerator::Latex);
- ol.popGeneratorState();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trDetailedDescription());
- ol.endGroupHeader();
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
- {
- ol+=briefOutput;
- }
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
- !documentation().isEmpty())
- {
- ol.newParagraph();
- }
- if (!documentation().isEmpty())
- {
- //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
- // doc+='.';
- parseDoc(ol,filepath,1,0,0,documentation()+"\n");
- }
- //printf("Writing source ref for file %s\n",name().data());
- if (Config_getBool("SOURCE_BROWSER"))
- {
- ol.newParagraph();
- QCString refText = theTranslator->trDefinedInSourceFile();
- int fileMarkerPos = refText.find("@0");
- if (fileMarkerPos!=-1) // should always pass this.
- {
- parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
- ol.writeObjectLink(0,getSourceFileBase(),
- 0,name());
- parseText(ol,refText.right(
- refText.length()-fileMarkerPos-2)); // text right from marker 2
- }
- }
+ writeDetailedDocumentation(ol);
}
docDefineMembers.writeDocumentation(ol,name(),this,
diff --git a/src/filedef.h b/src/filedef.h
index 4841d1c..acd39ed 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -119,6 +119,7 @@ class FileDef : public Definition
}
bool isIncluded(const QCString &name) const;
+ void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
friend void generatedFileNames();
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index fdb12b0..e1b27da 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -336,6 +336,40 @@ void GroupDef::computeAnchors()
setAnchors(0,'a',allMemberList);
}
+void GroupDef::writeDetailedDocumentation(OutputList &ol)
+{
+ if (!briefDescription().isEmpty() || !documentation().isEmpty())
+ {
+
+ if (pageDict->count()!=countMembers()) // classical layout
+ {
+ 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_getBool("REPEAT_BRIEF"))
+ {
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
+ ol.newParagraph();
+ }
+ }
+
+ // write documentation
+ if (!documentation().isEmpty())
+ {
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
+ }
+ }
+}
+
+
void GroupDef::writeDocumentation(OutputList &ol)
{
ol.pushGeneratorState();
@@ -346,13 +380,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
- //brief=brief.stripWhiteSpace();
- //int bl=brief.length();
- OutputList briefOutput(&ol);
- if (!briefDescription().isEmpty())
+ if (Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
+ else if (!briefDescription().isEmpty())
{
- parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
- ol+=briefOutput;
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
@@ -490,36 +524,11 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberSections();
-
- if (!briefDescription().isEmpty() || !documentation().isEmpty())
+ if (!Config_getBool("DETAILS_AT_TOP"))
{
-
- if (pageDict->count()!=countMembers()) // classical layout
- {
- 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_getBool("REPEAT_BRIEF"))
- {
- ol+=briefOutput;
- ol.newParagraph();
- }
- }
-
- // write documentation
- if (!documentation().isEmpty())
- {
- parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
- }
+ writeDetailedDocumentation(ol);
}
+
PageInfo *pi=0;
PageSDict::Iterator pdi(*pageDict);
for (pdi.toFirst();(pi=pdi.current());++pdi)
diff --git a/src/groupdef.h b/src/groupdef.h
index f371d49..a119d61 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -58,6 +58,7 @@ class GroupDef : public Definition
void insertMember(MemberDef *def,bool docOnly=FALSE);
void removeMember(MemberDef *md);
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
+ void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject() const
diff --git a/src/index.cpp b/src/index.cpp
index 534cd42..d82e923 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -36,7 +36,7 @@
#include "ftvhelp.h"
#include "dot.h"
#include "page.h"
-#include "packagedef.h"
+//#include "packagedef.h"
int annotatedClasses;
int hierarchyClasses;
@@ -50,7 +50,7 @@ int documentedNamespaceMembers;
int documentedIncludeFiles;
int documentedPages;
int indexedPages;
-int documentedPackages;
+//int documentedPackages;
int countClassHierarchy();
int countClassMembers();
@@ -62,7 +62,7 @@ int countAnnotatedClasses();
int countNamespaceMembers();
int countIncludeFiles();
void countRelatedPages(int &docPages,int &indexPages);
-int countPackages();
+//int countPackages();
void countDataStructures()
{
@@ -75,7 +75,7 @@ void countDataStructures()
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers();
- documentedPackages = countPackages();
+ //documentedPackages = countPackages();
}
static void startIndexHierarchy(OutputList &ol,int level)
@@ -2116,20 +2116,20 @@ void countRelatedPages(int &docPages,int &indexPages)
//----------------------------------------------------------------------------
-int countPackages()
-{
- int count=0;
- PackageSDict::Iterator pdi(Doxygen::packageDict);
- PackageDef *pd=0;
- for (pdi.toFirst();(pd=pdi.current());++pdi)
- {
- if (!pd->isReference())
- {
- count++;
- }
- }
- return count;
-}
+//int countPackages()
+//{
+// int count=0;
+// PackageSDict::Iterator pdi(Doxygen::packageDict);
+// PackageDef *pd=0;
+// for (pdi.toFirst();(pd=pdi.current());++pdi)
+// {
+// if (!pd->isReference())
+// {
+// count++;
+// }
+// }
+// return count;
+//}
//----------------------------------------------------------------------------
@@ -2808,12 +2808,12 @@ void writeIndex(OutputList &ol)
}
- if (documentedPackages>0)
- {
- ol.startIndexSection(isPackageIndex);
- parseText(ol,projPrefix+theTranslator->trPackageList());
- ol.endIndexSection(isPackageIndex);
- }
+ //if (documentedPackages>0)
+ //{
+ // ol.startIndexSection(isPackageIndex);
+ // parseText(ol,projPrefix+theTranslator->trPackageList());
+ // ol.endIndexSection(isPackageIndex);
+ //}
if (documentedGroups>0)
{
ol.startIndexSection(isModuleIndex);
@@ -2851,12 +2851,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 (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 383b5dd..6acf4a7 100644
--- a/src/index.h
+++ b/src/index.h
@@ -26,14 +26,14 @@ enum IndexSections
isTitlePageStart,
isTitlePageAuthor,
isMainPage,
- isPackageIndex,
+// isPackageIndex,
isModuleIndex,
isNamespaceIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
isPageIndex,
- isPackageDocumentation,
+// isPackageDocumentation,
isModuleDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
@@ -82,7 +82,7 @@ extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern int indexedPages;
-extern int documentedPackages;
+//extern int documentedPackages;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 4ecc4d1..6665d1f 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -473,10 +473,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Introduction}\n"
break;
- case isPackageIndex:
- if (compactLatex) t << "\\section"; else t << "\\chapter";
- t << "{"; //Package Index}\n"
- break;
+ //case isPackageIndex:
+ // if (compactLatex) t << "\\section"; else t << "\\chapter";
+ // t << "{"; //Package Index}\n"
+ // break;
case isModuleIndex:
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n"
@@ -501,21 +501,21 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Annotated Page Index}\n"
break;
- case isPackageDocumentation:
- {
- PackageSDict::Iterator pdi(Doxygen::packageDict);
- PackageDef *pd=pdi.toFirst();
- bool found=FALSE;
- while (pd && !found)
- {
- if (compactLatex) t << "\\section"; else t << "\\chapter";
- t << "{";
- found=TRUE;
- ++pdi;
- pd=pdi.current();
- }
- }
- break;
+// case isPackageDocumentation:
+// {
+// PackageSDict::Iterator pdi(Doxygen::packageDict);
+// PackageDef *pd=pdi.toFirst();
+// bool found=FALSE;
+// while (pd && !found)
+// {
+// if (compactLatex) t << "\\section"; else t << "\\chapter";
+// t << "{";
+// found=TRUE;
+// ++pdi;
+// pd=pdi.current();
+// }
+// }
+// break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
@@ -629,9 +629,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "\\input{" << indexName << "}\n";
}
break;
- case isPackageIndex:
- t << "}\n\\input{packages}\n";
- break;
+ //case isPackageIndex:
+ // t << "}\n\\input{packages}\n";
+ // break;
case isModuleIndex:
t << "}\n\\input{modules}\n";
break;
@@ -650,27 +650,27 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isPageIndex:
t << "}\n\\input{pages}\n";
break;
- case isPackageDocumentation:
- {
- PackageSDict::Iterator pdi(Doxygen::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 (compactLatex) t << "\\input"; else t << "\\include";
- t << "{" << pd->getOutputFileBase() << "}\n";
- ++pdi;
- pd=pdi.current();
- }
- }
- break;
+ //case isPackageDocumentation:
+ // {
+ // PackageSDict::Iterator pdi(Doxygen::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 (compactLatex) t << "\\input"; else t << "\\include";
+ // t << "{" << pd->getOutputFileBase() << "}\n";
+ // ++pdi;
+ // pd=pdi.current();
+ // }
+ // }
+ // break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
@@ -1761,7 +1761,15 @@ void LatexGenerator::startDotFile(const char *name,bool hasCaption)
else
t << "\\mbox{";
t << "\\includegraphics";
- t << "{" << baseName << ".eps}";
+ if( Config_getBool("USE_PDFLATEX") )
+ {
+ t << "{" << baseName << ".pdf}";
+ }
+ else
+ {
+ t << "{" << baseName << ".eps}";
+ }
+
if (hasCaption)
t << "\\caption{";
else
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 7adc450..7d8c8d2 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -872,7 +872,6 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
ol.startTextLink(0,anchor());
}
- parseText(ol,theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.popGeneratorState();
@@ -1049,7 +1048,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
bool first=TRUE;
if (m_defTmpArgLists)
- // definition has explicate template parameter declarations
+ // definition has explicit template parameter declarations
{
QListIterator<ArgumentList> ali(*m_defTmpArgLists);
ArgumentList *tal;
@@ -1064,7 +1063,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
}
- else
+ else // definition gets it template parameters from its class
+ // (since no definition was found)
{
if (cd)
{
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 3a98438..56c92ca 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -72,6 +72,19 @@ void NamespaceDef::insertUsedFile(const char *f)
}
}
+void NamespaceDef::addInnerCompound(Definition *d)
+{
+ m_innerCompounds->append(d->localName(),d);
+ if (d->definitionType()==Definition::TypeNamespace)
+ {
+ insertNamespace((NamespaceDef *)d);
+ }
+ else if (d->definitionType()==Definition::TypeClass)
+ {
+ insertClass((ClassDef *)d);
+ }
+}
+
void NamespaceDef::insertClass(ClassDef *cd)
{
if (classSDict->find(cd->name())==0)
@@ -170,6 +183,41 @@ void NamespaceDef::computeAnchors()
setAnchors(0,'a',&allMemberList);
}
+void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
+{
+ if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
+ !documentation().isEmpty())
+ {
+ ol.writeRuler();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
+ //if (latexOn) ol.disable(OutputGenerator::Latex);
+ ol.writeAnchor(0,"_details");
+ //if (latexOn) ol.enable(OutputGenerator::Latex);
+ ol.popGeneratorState();
+ ol.startGroupHeader();
+ parseText(ol,theTranslator->trDetailedDescription());
+ ol.endGroupHeader();
+ ol.startTextBlock();
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ {
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
+ }
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ !documentation().isEmpty())
+ {
+ ol.newParagraph();
+ }
+ if (!documentation().isEmpty())
+ {
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
+ ol.newParagraph();
+ }
+ ol.endTextBlock();
+ }
+}
+
void NamespaceDef::writeDocumentation(OutputList &ol)
{
QCString pageTitle=name()+" Namespace Reference";
@@ -196,11 +244,13 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startTextBlock();
- OutputList briefOutput(&ol);
- if (!briefDescription().isEmpty())
+ if (Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
+ else if (!briefDescription().isEmpty())
{
- parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
- ol+=briefOutput;
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -226,7 +276,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
mg->writeDeclarations(ol,0,this,0,0);
}
-
//allMemberList.writeDeclarations(ol,0,this,0,0,0,0);
decDefineMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trDefines(),0);
@@ -237,36 +286,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
decVarMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trVariables(),0);
ol.endMemberSections();
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
- !documentation().isEmpty())
+ if (!Config_getBool("DETAILS_AT_TOP"))
{
- ol.writeRuler();
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
- //if (latexOn) ol.disable(OutputGenerator::Latex);
- ol.writeAnchor(0,"_details");
- //if (latexOn) ol.enable(OutputGenerator::Latex);
- ol.popGeneratorState();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trDetailedDescription());
- ol.endGroupHeader();
- ol.startTextBlock();
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
- {
- ol+=briefOutput;
- }
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
- !documentation().isEmpty())
- {
- ol.newParagraph();
- }
- if (!documentation().isEmpty())
- {
- parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
- ol.newParagraph();
- }
- ol.endTextBlock();
+ writeDetailedDocumentation(ol);
}
docDefineMembers.writeDocumentation(ol,name(),this,
@@ -340,11 +362,6 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
return m_innerCompounds->find(n);
}
-void NamespaceDef::addInnerCompound(Definition *d)
-{
- m_innerCompounds->append(d->localName(),d);
-}
-
void NamespaceDef::addListReferences()
{
addRefItem(todoId(),testId(),bugId(),
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 5df8fa6..825242e 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -43,6 +43,8 @@ class NamespaceDef : public Definition
DefType definitionType() { return TypeNamespace; }
QCString getOutputFileBase() const;
void insertUsedFile(const char *fname);
+
+ void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd);
diff --git a/src/pre.l b/src/pre.l
index 19694f2..f429133 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -167,6 +167,26 @@ static FILE *checkAndOpenFile(const QCString &absName)
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
+ // check include stack for absFileName
+
+ QStack<FileState> tmpStack;
+ g_includeStack.setAutoDelete(FALSE);
+ FileState *fs;
+ bool alreadyIncluded=FALSE;
+ while ((fs=g_includeStack.pop()))
+ {
+ if (fs->fileName==absName) alreadyIncluded=TRUE;
+ tmpStack.push(fs);
+ }
+ while ((fs=tmpStack.pop()))
+ {
+ g_includeStack.push(fs);
+ }
+ g_includeStack.setAutoDelete(TRUE);
+
+ if (alreadyIncluded) return 0;
+
+
if (!Config_getString("INPUT_FILTER").isEmpty())
{
QCString cmd = Config_getString("INPUT_FILTER")+" "+absName;
@@ -934,6 +954,7 @@ static void readIncludeFile(const QCString &inc)
// add included by dependency
if (g_yyFileDef)
{
+ //printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data());
g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
}
}
@@ -952,6 +973,7 @@ static void readIncludeFile(const QCString &inc)
//lineStr.sprintf("# 1 \"%s\" 1\n",g_yyFileName.data());
//outputArray(lineStr.data(),lineStr.length());
+ //fprintf(stderr,"Switching to include file %s\n",incFileName.data());
preYYin=f;
yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE));
}
@@ -966,12 +988,13 @@ static void readIncludeFile(const QCString &inc)
// add included by dependency
if (fd)
{
+ //printf("Adding include dependency (2) %s->%s ambig=%d\n",oldFileDef->name().data(),fd->name().data(),ambig);
fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
}
}
if (Debug::isFlagSet(Debug::Preprocessor))
{
- msg("#include %s: not found! skipping...\n",incFileName.data());
+ msg("#include %s: not found or already included! skipping...\n",incFileName.data());
//printf("Error: include file %s not found\n",yytext);
}
}
@@ -1751,11 +1774,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipSingleQuote>. { g_defText += *yytext; g_defLitText+=yytext; }
<DefineText>. { g_defText += *yytext; g_defLitText+=yytext; }
<<EOF>> {
- //printf("End of include file\n");
+ //fprintf(stderr,"End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (g_includeStack.isEmpty())
{
- //printf("Terminating scanner!\n");
+ //fprintf(stderr,"Terminating scanner!\n");
yyterminate();
}
else
@@ -1771,7 +1794,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
yy_delete_buffer( oldBuf );
g_yyLineNr=fs->lineNr;
setFileName(fs->fileName.copy());
- //printf("######## FileName %s\n",g_yyFileName.data());
+ //fprintf(stderr,"######## FileName %s\n",g_yyFileName.data());
// TODO: Enable this to deal with file changes due to
// #include's within { .. } blocks
@@ -1780,8 +1803,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
//outputArray(lineStr.data(),lineStr.length());
delete fs; fs=0;
-
-
}
}
<*>"/*" {
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index d84c54f..1dc2d2b 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -926,10 +926,10 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Introduction
beginRTFChapter();
break;
- case isPackageIndex:
- //Package Index
- beginRTFChapter();
- break;
+ //case isPackageIndex:
+ // //Package Index
+ // beginRTFChapter();
+ // break;
case isModuleIndex:
//Module Index
beginRTFChapter();
@@ -955,21 +955,21 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Related Page Index
beginRTFChapter();
break;
- case isPackageDocumentation:
- {
- //Package Documentation
- PackageSDict::Iterator pdi(Doxygen::packageDict);
- PackageDef *pd=pdi.toFirst();
- bool found=FALSE;
- while (pd && !found)
- {
- beginRTFChapter();
- found=TRUE;
- ++pdi;
- pd=pdi.current();
- }
- }
- break;
+ //case isPackageDocumentation:
+ // {
+ // //Package Documentation
+ // PackageSDict::Iterator pdi(Doxygen::packageDict);
+ // PackageDef *pd=pdi.toFirst();
+ // bool found=FALSE;
+ // while (pd && !found)
+ // {
+ // beginRTFChapter();
+ // found=TRUE;
+ // ++pdi;
+ // pd=pdi.current();
+ // }
+ // }
+ // break;
case isModuleDocumentation:
{
//Module Documentation
@@ -1136,11 +1136,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index";
t << ".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 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;
@@ -1171,22 +1171,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(Doxygen::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 isPackageDocumentation:
+ // {
+ // PackageSDict::Iterator pdi(Doxygen::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:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index c40a442..acbcb0c 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -96,6 +96,7 @@ class TagIncludeInfo
public:
QString id;
QString name;
+ QString text;
bool isLocal;
};
@@ -446,6 +447,7 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curIncludes = new TagIncludeInfo;
m_curIncludes->id = attrib.value("id");
+ m_curIncludes->name = attrib.value("name");
m_curIncludes->isLocal = attrib.value("local")=="yes" ? TRUE : FALSE;
m_curFile->includes.append(m_curIncludes);
}
@@ -457,7 +459,7 @@ class TagFileParser : public QXmlDefaultHandler
}
void endIncludes()
{
- m_curIncludes->name = m_curString;
+ m_curIncludes->text = m_curString;
}
void endTemplateArg()
{
@@ -1170,16 +1172,21 @@ void TagFileParser::addIncludes()
TagIncludeInfo *ii;
for (;(ii=mii.current());++mii)
{
+ //printf("ii->name=`%s'\n",ii->name.data());
FileName *ifn = Doxygen::inputNameDict->find(ii->name);
- FileNameIterator ifni(*ifn);
- FileDef *ifd;
- for (;(ifd=ifni.current());++ifni)
+ ASSERT(ifn!=0);
+ if (ifn)
{
- printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
- ifd->getOutputFileBase().data(),ii->id.data());
- if (ifd->getOutputFileBase()==QCString(ii->id))
+ FileNameIterator ifni(*ifn);
+ FileDef *ifd;
+ for (;(ifd=ifni.current());++ifni)
{
- fd->addIncludeDependency(ifd,ii->name,ii->isLocal);
+ //printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
+ // ifd->getOutputFileBase().data(),ii->id.data());
+ if (ifd->getOutputFileBase()==QCString(ii->id))
+ {
+ fd->addIncludeDependency(ifd,ii->text,ii->isLocal);
+ }
}
}
}
diff --git a/src/translator_br.h b/src/translator_br.h
index e81ef2b..74e1dea 100644
--- a/src/translator_br.h
+++ b/src/translator_br.h
@@ -13,7 +13,12 @@
* Brazilian Portuguese version by
* Fabio "FJTC" Jun Takada Chino <chino@icmc.sc.usp.br>
* http://www.icmc.sc.usp.br/~chino
- * Version: 1.2.13 (2002/01/24)
+ * Version: 1.2.13.2 (2002/05/10)
+ *
+ * History:
+ * 1.2.13.2 (2002/05/10):
+ * - Latex Babel package language name fixed.
+ * - "Estrura" bug identified and fixed (Thanks to Jorge Ramos).
*/
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
@@ -33,9 +38,7 @@ class TranslatorBrazilian: public Translator
*/
virtual QCString idLanguage()
{
- /* I'm not sure if it is correct. I did not found the documentation
- of BabelPackage. If you know the right string, please contact me. */
- return "portuges";
+ return "brazil";
}
/*! Used to get the command(s) for the language support. This method
@@ -737,7 +740,7 @@ class TranslatorBrazilian: public Translator
switch(compType)
{
case ClassDef::Class: result+="classe "; break;
- case ClassDef::Struct: result+="estrura "; break;
+ case ClassDef::Struct: result+="estrutura "; break;
case ClassDef::Union: result+="uni緌 "; break;
case ClassDef::Interface: result+="interface "; break;
case ClassDef::Exception: result+="exce誽o "; break;
diff --git a/src/translator_tw.h b/src/translator_tw.h
index abd798a..6cef372 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -292,11 +292,11 @@ class TranslatorChinesetraditional : public Translator
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- result+="這些結構/聯合型態是屬於:";
+ result+="這些結構/聯合型態所屬:";
}
else
{
- result+="這些類別是屬於:";
+ result+="這些類別所屬:";
}
}
return result;
@@ -647,7 +647,7 @@ class TranslatorChinesetraditional : public Translator
case ClassDef::Exception: result+=" 例外"; break;
}
if (isTemplate) result+=" 樣版";
- result+=" 參考";
+ result+=" 參考文件";
return result;
}
@@ -1192,7 +1192,7 @@ class TranslatorChinesetraditional : public Translator
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
- return "值:";
+ return "巨集內容:";
}
//////////////////////////////////////////////////////////////////////////
diff --git a/src/util.cpp b/src/util.cpp
index d55b53d..1b7b78c 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1301,10 +1301,17 @@ void stripIrrelevantConstVolatile(QCString &s)
if (i!=-1)
{
// no & or * after the const
- if (s.find('*',i+6)==-1 && s.find('&',i+6)==-1)
+ int i1=s.find('*',i+6);
+ int i2=s.find('&',i+6);
+ if (i1==-1 && i2==-1)
{
s=s.left(i)+s.right(s.length()-i-6);
}
+ else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // const before * or &
+ {
+ // move const to front
+ s=(QCString)"const "+s.left(i)+s.right(s.length()-i-6);
+ }
}
// strip occurrences of volatile
@@ -1312,10 +1319,17 @@ void stripIrrelevantConstVolatile(QCString &s)
if (i!=-1)
{
// no & or * after the volatile
- if (s.find('*',i+9)==-1 && s.find('&',i+9)==-1)
+ int i1=s.find('*',i+9);
+ int i2=s.find('&',i+9);
+ if (i1==-1 && i2==-1)
{
s=s.left(i)+s.right(s.length()-i-9);
}
+ else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // volatile before * or &
+ {
+ // move volatile to front
+ s=(QCString)"volatile "+s.left(i)+s.right(s.length()-i-9);
+ }
}
}
@@ -1442,6 +1456,9 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
}
}
+ //printf("2. srcA=%s:%s dstA=%s:%s\n",srcAType.data(),srcA->name.data(),
+ // dstAType.data(),dstA->name.data());
+
if (!srcA->name.isEmpty() && !dstA->type.isEmpty() &&
(srcAType+" "+srcA->name)==dstAType)
{
@@ -1455,8 +1472,6 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
return TRUE;
}
- //printf("2. srcA=%s:%s dstA=%s:%s\n",srcAType.data(),srcA->name.data(),
- // dstAType.data(),dstA->name.data());
uint srcPos=0,dstPos=0;
bool equal=TRUE;
@@ -1567,242 +1582,6 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
return TRUE;
}
-#if 0
-static void mergeArgument(Argument *srcA,Argument *dstA,
- const QCString &className,
- const QCString &namespaceName,
- NamespaceList *usingNamespaces,
- ClassList *usingClasses)
-{
- //printf("merge argument start %s:%s <-> %s:%s\n",
- // srcA->type.data(),srcA->name.data(),
- // dstA->type.data(),dstA->name.data());
-
- if ((srcA->type=="const" || srcA->type=="volatile") && !srcA->name.isEmpty())
- {
- srcA->type+=" ";
- srcA->type+=srcA->name;
- srcA->name.resize(0);
- }
- if ((dstA->type=="const" || dstA->type=="volatile") && !dstA->name.isEmpty())
- {
- dstA->type+=" ";
- dstA->type+=dstA->name;
- dstA->name.resize(0);
- }
- if (srcA->name=="const" || srcA->name=="volatile")
- {
- srcA->type+=" ";
- srcA->type+=srcA->name;
- srcA->type=removeRedundantWhiteSpace(srcA->type);
- srcA->name.resize(0);
- }
- if (dstA->name=="const" || dstA->name=="volatile")
- {
- dstA->type+=" ";
- dstA->type+=dstA->name;
- dstA->type=removeRedundantWhiteSpace(dstA->type);
- dstA->name.resize(0);
- }
-
- QCString srcAType=trimTemplateSpecifiers(namespaceName,className,srcA->type);
- QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type);
- if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
- if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
-
- stripIrrelevantConstVolatile(srcAType);
- stripIrrelevantConstVolatile(dstAType);
-
- if (srcAType!=dstAType) // check if the argument only differs on name
- {
- //printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
-
- // remove a namespace scope that is only in one type
- // (assuming a using statement was used)
- trimNamespaceScope(srcAType,dstAType,namespaceName);
-
-
- //QCString srcScope;
- //QCString dstScope;
-
- // strip redundant scope specifiers
- if (!className.isEmpty())
- {
- srcAType=trimScope(className,srcAType);
- dstAType=trimScope(className,dstAType);
- //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
- ClassDef *cd;
- if (!namespaceName.isEmpty())
- cd=getClass(namespaceName+"::"+className);
- else
- cd=getClass(className);
- if (cd && cd->baseClasses()->count()>0)
- {
- trimBaseClassScope(cd->baseClasses(),srcAType);
- trimBaseClassScope(cd->baseClasses(),dstAType);
- }
- //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
- }
- if (!namespaceName.isEmpty())
- {
- srcAType=trimScope(namespaceName,srcAType);
- dstAType=trimScope(namespaceName,dstAType);
- }
- if (usingNamespaces && usingNamespaces->count()>0)
- {
- NamespaceListIterator nli(*usingNamespaces);
- NamespaceDef *nd;
- for (;(nd=nli.current());++nli)
- {
- srcAType=trimScope(nd->name(),srcAType);
- dstAType=trimScope(nd->name(),dstAType);
- }
- }
- if (usingClasses && usingClasses->count()>0)
- {
- ClassListIterator cli(*usingClasses);
- ClassDef *cd;
- for (;(cd=cli.current());++cli)
- {
- srcAType=trimScope(cd->name(),srcAType);
- dstAType=trimScope(cd->name(),dstAType);
- }
- }
-
- if (!srcA->name.isEmpty() && !dstA->type.isEmpty() &&
- (srcAType+" "+srcA->name)==dstAType)
- {
- srcA->type=srcAType+" "+srcA->name;
- srcA->name.resize(0);
- goto done;
- }
- else if (!dstA->name.isEmpty() && !srcA->type.isEmpty() &&
- (dstAType+" "+dstA->name)==srcAType)
- {
- dstA->type=dstAType+" "+dstA->name;
- dstA->name.resize(0);
- goto done;
- }
- //printf("srcA=%s::%s dstA=%s::%s\n",srcAType.data(),srcA->name.data(),
- // dstAType.data(),dstA->name.data());
-
- uint srcPos=0,dstPos=0;
- bool equal=TRUE;
- while (srcPos<srcAType.length() && dstPos<dstAType.length() && equal)
- {
- equal=srcAType.at(srcPos)==dstAType.at(dstPos);
- if (equal) srcPos++,dstPos++;
- }
- if (srcPos<srcAType.length() && dstPos<dstAType.length())
- {
- // if nothing matches or the match ends in the middle or at the
- // end of a string then there is no match
- int srcStart=srcPos;
- int dstStart=dstPos;
- if (isId(srcAType.at(srcPos)) && isId(dstAType.at(dstPos)))
- {
- // find the start of the name
- while (srcStart>=0 && isId(srcAType.at(srcStart))) srcStart--;
- while (dstStart>=0 && isId(dstAType.at(dstStart))) dstStart--;
- if (srcStart>0) // move the name from the type to the name field
- {
- srcA->name=srcAType.right(srcAType.length()-srcStart-1);
- srcA->type=srcAType.left(srcStart+1).stripWhiteSpace();
- }
- if (dstStart>0) // move the name from the type to the name field
- {
- dstA->name=dstAType.right(dstAType.length()-dstStart-1);
- dstA->type=dstAType.left(dstStart+1).stripWhiteSpace();
- }
- }
- else
- {
- dstA->name=dstAType.right(dstAType.length()-dstStart);
- dstA->type=dstAType.left(dstStart).stripWhiteSpace();
- srcA->name=srcAType.right(dstAType.length()-srcStart);
- srcA->type=srcAType.left(srcStart).stripWhiteSpace();
- }
- }
- else if (dstPos<dstAType.length())
- {
- if (!isspace(dstAType.at(dstPos))) // maybe the names differ
- {
- int startPos=dstPos;
- while (startPos>=0 && isId(dstAType.at(startPos))) startPos--;
- if (startPos>0)
- {
- dstA->name=dstAType.right(dstAType.length()-startPos-1);
- dstA->type=dstAType.left(startPos+1).stripWhiteSpace();
- }
- }
- else // maybe dst has a name while src has not
- {
- dstPos++;
- int startPos=dstPos;
- dstA->name=dstAType.right(dstAType.length()-startPos);
- dstA->type=dstAType.left(startPos).stripWhiteSpace();
- }
- }
- else if (srcPos<srcAType.length())
- {
- if (!isspace(srcAType.at(srcPos))) // maybe the names differ
- {
- int startPos=srcPos;
- while (startPos>=0 && isId(srcAType.at(startPos))) startPos--;
- if (startPos>0)
- {
- srcA->name=srcAType.right(srcAType.length()-startPos-1);
- srcA->type=srcAType.left(startPos+1).stripWhiteSpace();
- }
- }
- else // maybe src has a name while dst has not
- {
- srcPos++;
- int startPos=srcPos;
- srcA->name=srcAType.right(srcAType.length()-startPos);
- srcA->type=srcAType.left(startPos).stripWhiteSpace();
- }
- }
- goto done;
- }
- //printf("match exactly\n");
- if (srcA->name.isEmpty() && dstA->name.isEmpty())
- // arguments match exactly but no name ->
- // see if we can find the name
- {
- int i=srcAType.length()-1;
- while (i>=0 && isId(srcAType.at(i))) i--;
- if (i>0 && i<(int)srcAType.length()-1 && srcAType.at(i)!=':')
- // there is (probably) a name
- {
- QCString srcAName=srcAType.right(srcAType.length()-i-1);
- QCString dstAName=dstAType.right(dstAType.length()-i-1);
- if (srcAName!="const" && srcAName!="volatile" &&
- dstAName!="const" && dstAName!="volatile")
- {
- srcA->name=srcAName;
- srcA->type=srcAType.left(i+1).stripWhiteSpace();
- dstA->name=dstAName;
- dstA->type=dstAType.left(i+1).stripWhiteSpace();
- }
- }
- }
- else if (!dstA->name.isEmpty())
- {
- srcA->name = dstA->name.copy();
- }
- else if (!srcA->name.isEmpty())
- {
- dstA->name = srcA->name.copy();
- }
-done:
- //printf("merge argument result %s:%s <-> %s:%s\n",
- // srcA->type.data(),srcA->name.data(),
- // dstA->type.data(),dstA->name.data());
- return;
-}
-#endif
-
/*!
* Matches the arguments list srcAl with the argument list dstAl
@@ -1902,15 +1681,6 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
return FALSE;
}
}
- // merge/correct argument type/names
- for (srcAli.toFirst(),dstAli.toFirst();
- (srcA=srcAli.current(),dstA=dstAli.current());
- ++srcAli,++dstAli
- )
- {
- //mergeArgument(srcA,dstA,className,namespaceName,
- // usingNamespaces,usingClasses);
- }
MATCH
return TRUE; // all arguments match
}
@@ -1962,6 +1732,28 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
srcA->name = dstA->name.copy();
}
}
+ else
+ {
+ //printf("merging %s:%s <-> %s:%s\n",srcA->type.data(),srcA->name.data(),dstA->type.data(),dstA->name.data());
+ if (srcA->type+" "+srcA->name==dstA->type) // "unsigned long:int" <-> "unsigned long int:bla"
+ {
+ srcA->type+=" "+srcA->name;
+ srcA->name=dstA->name;
+ }
+ else if (dstA->type+" "+dstA->name==srcA->type) // "unsigned long int bla" <-> "unsigned long int"
+ {
+ dstA->type+=" "+dstA->name;
+ dstA->name=srcA->name;
+ }
+ else if (srcA->name.isEmpty() && !dstA->name.isEmpty())
+ {
+ srcA->name = dstA->name;
+ }
+ else if (dstA->name.isEmpty() && !srcA->name.isEmpty())
+ {
+ dstA->name = srcA->name;
+ }
+ }
int i1=srcA->type.find("::"),
i2=dstA->type.find("::"),
j1=srcA->type.length()-i1-2,
@@ -2248,7 +2040,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{
QList<MemberDef> members;
- //printf(" Function with global scope `%s' args=`%s'\n",namespaceName.data(),args);
+ //printf(" Function with global scope `%s' name `%s' args=`%s'\n",namespaceName.data(),memberName.data(),args);
MemberListIterator mli(*mn);
for (mli.toFirst();(md=mli.current());++mli)
{
@@ -2280,7 +2072,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
}
}
}
- if (!strcmp(args,"()"))
+ if (members.count()!=1 && !strcmp(args,"()"))
{
// no exact match found, but if args="()" an arbitrary
// member will do
@@ -2288,17 +2080,14 @@ bool getDefs(const QCString &scName,const QCString &memberName,
while (md)
{
//printf("Found member `%s'\n",md->name().data());
- if (1 /* md->isLinkable() */)
+ //printf("member is linkable md->name()=`%s'\n",md->name().data());
+ fd=md->getFileDef();
+ gd=md->getGroupDef();
+ if (
+ (gd && gd->isLinkable()) || (fd && fd->isLinkable())
+ )
{
- //printf("member is linkable md->name()=`%s'\n",md->name().data());
- fd=md->getFileDef();
- gd=md->getGroupDef();
- if (
- (gd && gd->isLinkable()) || (fd && fd->isLinkable())
- )
- {
- members.append(md);
- }
+ members.append(md);
}
md=mn->prev();
}
@@ -2309,9 +2098,15 @@ bool getDefs(const QCString &scName,const QCString &memberName,
}
else if (members.count()>1)
{
+ //printf("Found more than one matching member!\n");
// use some C scoping rules to determine the correct link
// 1. member in current file
// 2. non-static member in different file
+ if (currentFile==0)
+ {
+ bool ambig;
+ currentFile = findFileDef(Doxygen::inputNameDict,namespaceName,ambig);
+ }
MemberDef *bmd = 0;
for (md=members.first(); md; md=members.next())
{
@@ -2776,7 +2571,11 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig)
{
if (fn->count()==1)
{
- return fn->getFirst();
+ FileDef *fd = fn->getFirst();
+ if (path.isEmpty() || fd->getPath().right(path.length())==path)
+ {
+ return fd;
+ }
}
else // file name alone is ambigious
{
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 691ae13..435c7dc 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -76,6 +76,7 @@ QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
return "illegal";
}
+
inline void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
@@ -707,14 +708,14 @@ class XMLGenerator : public OutputDocInterface
{
XML_DB(("(writeAnchor)\n"));
startParMode();
- m_t << "<anchor id=\"" << id << "_" << name << "\"/>";
+ m_t << "<anchor id=\"" << id << "_1" << name << "\"/>";
}
void writeSectionRef(const char *,const char *id,
const char *name,const char *text)
{
XML_DB(("(writeSectionRef)\n"));
startParMode();
- m_t << "<link linkend=\"" << id << "_" << name << "\">";
+ m_t << "<link linkend=\"" << id << "_1" << name << "\">";
docify(text);
m_t << "</link>";
}
@@ -773,7 +774,7 @@ class XMLGenerator : public OutputDocInterface
void endTextLink()
{
XML_DB(("(endTextLink)\n"));
- m_t << "<ulink>";
+ m_t << "</ulink>";
}
void startPageRef()
{
@@ -938,6 +939,56 @@ class XMLGenerator : public OutputDocInterface
friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd);
};
+static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char *name,int indent)
+{
+ QCString indentStr;
+ indentStr.fill(' ',indent);
+ if (al)
+ {
+ t << indentStr << "<templateparamlist>" << endl;
+ ArgumentListIterator ali(*al);
+ Argument *a;
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ t << indentStr << " <param>" << endl;
+ if (!a->type.isEmpty())
+ {
+ t << indentStr << " <type>";
+ linkifyText(TextGeneratorXMLImpl(t),name,0,a->type);
+ t << "</type>" << endl;
+ }
+ if (!a->name.isEmpty())
+ {
+ t << indentStr << " <declname>" << a->name << "</declname>" << endl;
+ t << indentStr << " <defname>" << a->name << "</defname>" << endl;
+ }
+ if (!a->defval.isEmpty())
+ {
+ t << indentStr << " <defval>";
+ linkifyText(TextGeneratorXMLImpl(t),name,0,a->defval);
+ t << "</defval>" << endl;
+ }
+ t << indentStr << " </param>" << endl;
+ }
+ t << indentStr << "</templateparamlist>" << endl;
+ }
+}
+
+static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
+{
+ ClassDef *cd = md->getClassDef();
+ const char *cname = cd ? cd->name().data() : 0;
+ if (md->templateArguments()) // function template prefix
+ {
+ writeTemplateArgumentList(md->templateArguments(),t,cname,8);
+ }
+}
+
+static void writeTemplateList(ClassDef *cd,QTextStream &t)
+{
+ writeTemplateArgumentList(cd->templateArguments(),t,cd->name(),4);
+}
+
static void writeXMLDocBlock(QTextStream &t,
const QCString &fileName,
int lineNr,
@@ -1021,7 +1072,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
// + source references
// + source referenced by
// - body code
- // - template arguments
+ // + template arguments
// (templateArguments(), definitionTemplateParameterLists())
if (md->memberType()==MemberDef::EnumValue) return;
@@ -1091,6 +1142,10 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
md->memberType()!=MemberDef::Enumeration
)
{
+ if (md->memberType()!=MemberDef::Typedef)
+ {
+ writeMemberTemplateLists(md,t);
+ }
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
@@ -1278,44 +1333,6 @@ 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 writeListOfAllMembers(ClassDef *cd,QTextStream &t)
{
t << " <listofallmembers>" << endl;
@@ -1333,7 +1350,7 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
if (d==0) d = cd;
Protection prot = mi->prot;
Specifier virt=md->virtualness();
- t << " <member refid=\"" << d->getOutputFileBase() << "_" <<
+ t << " <member refid=\"" << d->getOutputFileBase() << "_1" <<
md->anchor() << "\" prot=\"";
switch (prot)
{
@@ -1351,7 +1368,7 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
t << "\"";
if (!mi->ambiguityResolutionScope.isEmpty())
{
- t << " ambiguityscope=\"" << mi->ambiguityResolutionScope << "\"";
+ t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope) << "\"";
}
t << "><scope>" << convertToXML(cd->name()) << "</scope><name>" <<
convertToXML(md->name()) << "</name></member>" << endl;
@@ -1425,7 +1442,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
- t << "\"/>" << endl;
+ t << "\">" << convertToXML(bcd->classDef->displayName())
+ << "</basecompoundref>" << endl;
}
}
if (cd->subClasses()->count()>0)
@@ -1450,7 +1468,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
}
- t << "\"/>" << endl;
+ t << "\">" << convertToXML(bcd->classDef->displayName())
+ << "</basecompoundref>" << endl;
}
}
@@ -1465,7 +1484,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
- writeTemplateLists(cd,t);
+ writeTemplateList(cd,t);
writeListOfAllMembers(cd,t);
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
@@ -1834,6 +1853,18 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
}
}
+ GroupList *gl = gd->getSubGroups();
+ if (gl)
+ {
+ GroupListIterator gli(*gl);
+ GroupDef *sgd;
+ for (gli.toFirst();(sgd=gli.current());++gli)
+ {
+ t << " <innergroup refid=\"" << gd->getOutputFileBase()
+ << "\"/>" << convertToXML(sgd->groupTitle()) << "</innergroup>" << endl;
+ }
+ }
+
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)