Commit e92edc49 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge branch 'tagfile'

parents 2eece646 b9ad9a03
......@@ -1243,24 +1243,6 @@ void ClassDef::writeInheritanceGraph(OutputList &ol)
if (cd->isLinkable())
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <base";
if (bcd->prot==Protected)
{
Doxygen::tagFile << " protection=\"protected\"";
}
else if (bcd->prot==Private)
{
Doxygen::tagFile << " protection=\"private\"";
}
if (bcd->virt==Virtual)
{
Doxygen::tagFile << " virtualness=\"virtual\"";
}
Doxygen::tagFile << ">" << convertToXML(cd->name())
<< "</base>" << endl;
}
ol.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),
cd->anchor(),
......@@ -1574,36 +1556,118 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
ol.popGeneratorState();
}
void ClassDef::writeTagFileMarker()
void ClassDef::writeTagFile(FTextStream &tagFile)
{
// write section to the tag file
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
if (!isLinkableInProject()) return;
tagFile << " <compound kind=\"" << compoundTypeString();
tagFile << "\"";
if (isObjectiveC()) { tagFile << " objc=\"yes\""; }
tagFile << ">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
if (!anchor().isEmpty())
{
Doxygen::tagFile << " <compound kind=\"" << compoundTypeString();
Doxygen::tagFile << "\"";
if (isObjectiveC()) { Doxygen::tagFile << " objc=\"yes\""; }
Doxygen::tagFile << ">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
if (!anchor().isEmpty())
{
Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
}
QCString idStr = id();
if (!idStr.isEmpty())
tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
}
QCString idStr = id();
if (!idStr.isEmpty())
{
tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
if (m_impl->tempArgs)
{
ArgumentListIterator ali(*m_impl->tempArgs);
Argument *a;
for (;(a=ali.current());++ali)
{
Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
tagFile << " <templarg>" << convertToXML(a->name) << "</templarg>" << endl;
}
if (m_impl->tempArgs)
}
if (m_impl->inherits)
{
BaseClassListIterator it(*m_impl->inherits);
BaseClassDef *ibcd;
for (it.toFirst();(ibcd=it.current());++it)
{
ArgumentListIterator ali(*m_impl->tempArgs);
Argument *a;
for (;(a=ali.current());++ali)
ClassDef *cd=ibcd->classDef;
if (cd && cd->isLinkable())
{
Doxygen::tagFile << " <templarg>" << convertToXML(a->name) << "</templarg>" << endl;
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
tagFile << " <base";
if (ibcd->prot==Protected)
{
tagFile << " protection=\"protected\"";
}
else if (ibcd->prot==Private)
{
tagFile << " protection=\"private\"";
}
if (ibcd->virt==Virtual)
{
tagFile << " virtualness=\"virtual\"";
}
tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl;
}
}
}
}
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::ClassNestedClasses:
{
if (m_impl->innerClasses)
{
ClassSDict::Iterator cli(*m_impl->innerClasses);
ClassDef *innerCd;
for (cli.toFirst();(innerCd=cli.current());++cli)
{
if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
protectionLevelVisible(innerCd->protection()) &&
!innerCd->isEmbeddedInOuterScope()
)
{
tagFile << " <class kind=\"" << innerCd->compoundTypeString() <<
"\">" << convertToXML(innerCd->name()) << "</class>" << endl;
}
}
}
}
break;
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList * ml = getMemberList(lmd->type);
if (ml)
{
ml->writeTagFile(tagFile);
}
}
break;
case LayoutDocEntry::MemberGroups:
{
if (m_impl->memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*m_impl->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
/** Write class documentation inside another container (i.e. a group) */
......@@ -1722,9 +1786,6 @@ void ClassDef::writeInlineDocumentation(OutputList &ol)
ol.endIndent();
}
ol.popGeneratorState();
// part 4: write tag file information
writeTagFileMarker();
}
void ClassDef::writeMoreLink(OutputList &ol,const QCString &anchor)
......@@ -1810,12 +1871,6 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
ol.startMemberList();
found=TRUE;
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty() &&
!isReference()) // skip classes found in tag files
{
Doxygen::tagFile << " <class kind=\"" << compoundTypeString()
<< "\">" << convertToXML(name()) << "</class>" << endl;
}
ol.startMemberDeclaration();
ol.startMemberItem(anchor(),FALSE);
QCString ctype = compoundTypeString();
......@@ -1903,8 +1958,6 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString & /*page
pageType += compoundTypeString();
toupper(pageType.at(1));
writeTagFileMarker();
Doxygen::indexList->addIndexItem(this,0);
if (Doxygen::searchIndex)
......@@ -2017,11 +2070,6 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString & /*page
}
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
ol.endContents();
}
......@@ -4199,14 +4247,14 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
if (ml)
{
//printf(" writeDeclaration type=%d count=%d\n",lt,ml->numDecMembers());
ml->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt);
ml->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
tt.resize(0);
st.resize(0);
}
if (ml2)
{
//printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers());
ml2->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt);
ml2->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
}
static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
if (!inlineInheritedMembers) // show inherited members as separate lists
......@@ -4261,7 +4309,7 @@ void ClassDef::writePlainMemberDeclaration(OutputList &ol,
if (ml)
{
ml->setInGroup(inGroup);
ml->writePlainDeclarations(ol,this,0,0,0,definitionType(),inheritedFrom,inheritId);
ml->writePlainDeclarations(ol,this,0,0,0,inheritedFrom,inheritId);
}
}
......
......@@ -46,6 +46,7 @@ class StringDict;
struct IncludeInfo;
class ClassDefImpl;
class ArgumentList;
class FTextStream;
/** A class representing of a compound symbol.
*
......@@ -391,6 +392,7 @@ class ClassDef : public Definition
ClassDef *inheritedFrom,const QCString &inheritId);
int countMembersIncludingGrouped(MemberListType lt,ClassDef *inheritedFrom,bool additional);
int countInheritanceNodes();
void writeTagFile(FTextStream &);
bool visited;
......@@ -400,7 +402,6 @@ class ClassDef : public Definition
void showUsedFiles(OutputList &ol);
private:
void writeTagFileMarker();
void writeDocumentationContents(OutputList &ol,const QCString &pageTitle);
void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList);
void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief);
......
......@@ -511,9 +511,9 @@ void Definition::addSectionsToIndex()
}
}
void Definition::writeDocAnchorsToTagFile()
void Definition::writeDocAnchorsToTagFile(FTextStream &tagFile)
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_impl->sectionDict)
if (m_impl->sectionDict)
{
//printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count());
SDict<SectionInfo>::Iterator sdi(*m_impl->sectionDict);
......@@ -523,15 +523,13 @@ void Definition::writeDocAnchorsToTagFile()
if (!si->generated)
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) Doxygen::tagFile << " ";
Doxygen::tagFile << " <docanchor file=\""
<< si->fileName << "\"";
if (definitionType()==TypeMember) tagFile << " ";
tagFile << " <docanchor file=\"" << si->fileName << "\"";
if (!si->title.isEmpty())
{
Doxygen::tagFile << " title=\"" << convertToXML(si->title) << "\"";
tagFile << " title=\"" << convertToXML(si->title) << "\"";
}
Doxygen::tagFile << ">" << si->label
<< "</docanchor>" << endl;
tagFile << ">" << si->label << "</docanchor>" << endl;
}
}
}
......
......@@ -34,6 +34,7 @@ struct ListItemInfo;
struct SectionInfo;
class Definition;
class DefinitionImpl;
class FTextStream;
/** Data associated with a detailed description. */
struct DocInfo
......@@ -334,7 +335,7 @@ class Definition : public DefinitionIntf
/*! Writes the documentation anchors of the definition to
* the Doxygen::tagFile stream.
*/
void writeDocAnchorsToTagFile();
void writeDocAnchorsToTagFile(FTextStream &);
void setLocalName(const QCString name);
void addSectionsToIndex();
......
......@@ -235,10 +235,6 @@ void DirDef::writeSubDirList(OutputList &ol)
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription(dd->getOutputFileBase());
......@@ -297,10 +293,6 @@ void DirDef::writeFileList(OutputList &ol)
ol.endTextLink();
ol.popGeneratorState();
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
......@@ -341,6 +333,53 @@ bool DirDef::hasDetailedDescription() const
return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
void DirDef::writeTagFile(FTextStream &tagFile)
{
tagFile << " <compound kind=\"dir\">" << endl;
tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::DirSubDirs:
{
if (m_subdirs.count()>0)
{
DirDef *dd;
QListIterator<DirDef> it(m_subdirs);
for (;(dd=it.current());++it)
{
tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
}
}
break;
case LayoutDocEntry::DirFiles:
{
if (m_fileList->count()>0)
{
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
void DirDef::writeDocumentation(OutputList &ol)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
......@@ -367,14 +406,6 @@ void DirDef::writeDocumentation(OutputList &ol)
endTitle(ol,getOutputFileBase(),title);
ol.startContents();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"dir\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
Doxygen::tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
}
//---------------------------------------- start flexible part -------------------------------
SrcLangExt lang = getLanguage();
......@@ -450,12 +481,6 @@ void DirDef::writeDocumentation(OutputList &ol)
//---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
ol.endContents();
endFileWithNavPath(this,ol);
......
......@@ -72,6 +72,7 @@ class DirDef : public Definition
// generate output
void writeDocumentation(OutputList &ol);
void writeDepGraph(FTextStream &t);
void writeTagFile(FTextStream &t);
static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited;
......
......@@ -142,7 +142,6 @@ QDict<void> Doxygen::expandAsDefinedDict(257); // all macros that should be
QIntDict<MemberGroupInfo> Doxygen::memGrpInfoDict(1009); // dictionary of the member groups heading
PageDef *Doxygen::mainPage = 0;
bool Doxygen::insideMainPage = FALSE; // are we generating docs for the main page?
FTextStream Doxygen::tagFile;
NamespaceDef *Doxygen::globalScope = 0;
QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists
bool Doxygen::parseSourcesNeeded = FALSE;
......@@ -1670,26 +1669,6 @@ static void processTagLessClasses(ClassDef *rootCd,
}
}
static void writeMainPageTagFileData()
{
if (Doxygen::mainPage && !Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"page\">" << endl
<< " <name>"
<< convertToXML(Doxygen::mainPage->name())
<< "</name>" << endl
<< " <title>"
<< convertToXML(Doxygen::mainPage->title())
<< "</title>" << endl
<< " <filename>"
<< convertToXML(Doxygen::mainPage->getOutputFileBase())
<< "</filename>" << endl;
Doxygen::mainPage->writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
}
static void findTagLessClasses(ClassDef *cd)
{
if (cd->getClassSDict())
......@@ -10554,6 +10533,87 @@ static void stopDoxygen(int)
}
#endif
static void writeTagFile()
{
QCString &generateTagFile = Config_getString("GENERATE_TAGFILE");
if (generateTagFile.isEmpty()) return;
QFile tag(generateTagFile);
if (!tag.open(IO_WriteOnly))
{
err("cannot open tag file %s for writing\n",
generateTagFile.data()
);
return;
}
FTextStream tagFile(&tag);
tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>" << endl;
tagFile << "<tagfile>" << endl;
// for each file
FileNameListIterator fnli(*Doxygen::inputNameList);
FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (fni.toFirst();(fd=fni.current());++fni)
{
fd->writeTagFile(tagFile);
}
}
// for each class
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd;
for ( ; (cd=cli.current()) ; ++cli )
{
cd->writeTagFile(tagFile);
}
// for each namespace
NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
NamespaceDef *nd;
for ( ; (nd=nli.current()) ; ++nli )
{
nd->writeTagFile(tagFile);
}
// for each group
GroupSDict::Iterator gli(*Doxygen::groupSDict);
GroupDef *gd;
for (gli.toFirst();(gd=gli.current());++gli)
{
gd->writeTagFile(tagFile);
}
// for each page
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
pd->writeTagFile(tagFile);
}
if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile);
/*
if (Doxygen::mainPage && !Config_getString("GENERATE_TAGFILE").isEmpty())
{
tagFile << " <compound kind=\"page\">" << endl
<< " <name>"
<< convertToXML(Doxygen::mainPage->name())
<< "</name>" << endl
<< " <title>"
<< convertToXML(Doxygen::mainPage->title())
<< "</title>" << endl
<< " <filename>"
<< convertToXML(Doxygen::mainPage->getOutputFileBase())
<< "</filename>" << endl;
mainPage->writeDocAnchorsToTagFile();
tagFile << " </compound>" << endl;
}
*/
tagFile << "</tagfile>" << endl;
}
static void exitDoxygen()
{
if (!g_successfulRun) // premature exit
......@@ -11327,24 +11387,6 @@ void generateOutput()
* Generate documentation *
**************************************************************************/
QFile *tag=0;
QCString &generateTagFile = Config_getString("GENERATE_TAGFILE");
if (!generateTagFile.isEmpty())
{
tag=new QFile(generateTagFile);
if (!tag->open(IO_WriteOnly))
{
err("cannot open tag file %s for writing\n",
generateTagFile.data()
);
cleanUpDoxygen();
exit(1);
}
Doxygen::tagFile.setDevice(tag);
Doxygen::tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>" << endl;
Doxygen::tagFile << "<tagfile>" << endl;
}
if (generateHtml) writeDoxFont(Config_getString("HTML_OUTPUT"));
if (generateLatex) writeDoxFont(Config_getString("LATEX_OUTPUT"));
if (generateRtf) writeDoxFont(Config_getString("RTF_OUTPUT"));
......@@ -11440,8 +11482,6 @@ void generateOutput()
}
}
writeMainPageTagFileData();
if (g_outputList->count()>0)
{
writeIndexHierarchy(*g_outputList);
......@@ -11451,11 +11491,9 @@ void generateOutput()
Doxygen::indexList->finalize();
g_s.end();
if (!generateTagFile.isEmpty())
{
Doxygen::tagFile << "</tagfile>" << endl;
delete tag;
}
g_s.begin("writing tag file...\n");
writeTagFile();
g_s.end();
if (Config_getBool("DOT_CLEANUP"))
{
......
......@@ -114,7 +114,6 @@ class Doxygen
static QStrList tagfileList;
static MemberNameSDict *memberNameSDict;
static MemberNameSDict *functionNameSDict;
static FTextStream tagFile;
static SectionDict *sectionDict;
static StringDict namespaceAliasDict;
static GroupSDict *groupSDict;
......
......@@ -180,6 +180,112 @@ bool FileDef::hasDetailedDescription() const
);
}
void FileDef::writeTagFile(FTextStream &tagFile)
{
tagFile << " <compound kind=\"file\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl;
if (m_includeList && m_includeList->count()>0)
{
QListIterator<IncludeInfo> ili(*m_includeList);
IncludeInfo *ii;
for (;(ii=ili.current());++ili)
{
if (!ii->indirect)
{
FileDef *fd=ii->fileDef;
if (fd && fd->isLinkable() && !fd->isReference())
{
bool isIDLorJava = FALSE;
SrcLangExt lang = fd->getLanguage();
isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no";
tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase()) << "\" "
<< "name=\"" << convertToXML(fd->name()) << "\" "
<< "local=\"" << locStr << "\" "
<< "imported=\"" << impStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
<< endl;
}
}
}
}
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::FileClasses:
{
if (m_classSDict)
{
SDict<ClassDef>::Iterator ci(*m_classSDict);
ClassDef *cd;
for (ci.toFirst();(cd=ci.current());++ci)
{
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString() <<
"\">" << convertToXML(cd->name()) << "</class>" << endl;
}
}
}
}
break;
case LayoutDocEntry::FileNamespaces:
{
if (m_namespaceSDict)
{
SDict<NamespaceDef>::Iterator ni(*m_namespaceSDict);
NamespaceDef *nd;
for (ni.toFirst();(nd=ni.current());++ni)
{
if (nd->isLinkableInProject())
{
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
}
}
}
break;
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList * ml = getMemberList(lmd->type);
if (ml)
{
ml->writeTagFile(tagFile);
}
}
break;
case LayoutDocEntry::MemberGroups:
{
if (m_memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*m_memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
if (hasDetailedDescription())
......@@ -319,19 +425,6 @@ void FileDef::writeIncludeFiles(OutputList &ol)
ol.writeObjectLink(fd->getReference(),
fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(),
0,ii->includeName);
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference())
{
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase()) << "\" "
<< "name=\"" << convertToXML(fd->name()) << "\" "
<< "local=\"" << locStr << "\" "
<< "imported=\"" << impStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
<< endl;
}
}
else
{
......@@ -616,15 +709,6 @@ void FileDef::writeDocumentation(OutputList &ol)
Doxygen::searchIndex->addWord(localName(),TRUE);
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
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())
<< "</filename>" << endl;
}
//---------------------------------------- start flexible part -------------------------------
......@@ -738,12 +822,6 @@ void FileDef::writeDocumentation(OutputList &ol)
//---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
ol.endContents();
endFileWithNavPath(this,ol);
......
......@@ -39,6 +39,7 @@ class NamespaceSDict;
class MemberGroupSDict;
class PackageDef;
class DirDef;
class FTextStream;
/** Class representing the data associated with a \#include statement. */
struct IncludeInfo
......@@ -146,6 +147,7 @@ class FileDef : public Definition
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
void writeSummaryLinks(OutputList &ol);
void writeTagFile(FTextStream &t);
void startParsing();
void writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu);
......
......@@ -546,6 +546,149 @@ void GroupDef::computeAnchors()
setAnchors(allMemberList);
}
void GroupDef::writeTagFile(FTextStream &tagFile)
{
tagFile << " <compound kind=\"group\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <title>" << convertToXML(title) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Group));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::GroupClasses:
{
if (classSDict)
{
SDict<ClassDef>::Iterator ci(*classSDict);
ClassDef *cd;
for (ci.toFirst();(cd=ci.current());++ci)
{
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString()
<< "\">" << convertToXML(cd->name()) << "</class>" << endl;
}
}
}
}
break;
case LayoutDocEntry::GroupNamespaces:
{
if (namespaceSDict)
{
SDict<NamespaceDef>::Iterator ni(*namespaceSDict);
NamespaceDef *nd;
for (ni.toFirst();(nd=ni.current());++ni)
{
if (nd->isLinkableInProject())
{
tagFile << " <namespace>" << convertToXML(nd->name())
<< "</namespace>" << endl;
}
}
}
}
break;
case LayoutDocEntry::GroupFiles:
{
if (fileList)
{
QListIterator<FileDef> it(*fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
if (fd->isLinkableInProject())
{
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
}
}
}
break;
case LayoutDocEntry::GroupPageDocs:
{
if (pageDict)
{
PageSDict::Iterator pdi(*pageDict);
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
QCString pageName = pd->getOutputFileBase();
if (pd->isLinkableInProject())
{
tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
}
}
}
}
break;
case LayoutDocEntry::GroupDirs:
{
if (dirList)
{
QListIterator<DirDef> it(*dirList);
DirDef *dd;
for (;(dd=it.current());++it)
{
if (dd->isLinkableInProject())
{
tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
}
}
}
break;
case LayoutDocEntry::GroupNestedGroups:
{
if (groupList)
{
QListIterator<GroupDef> it(*groupList);
GroupDef *gd;
for (;(gd=it.current());++it)
{
if (gd->isVisible())
{
tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
}
}
}
}
break;
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList * ml = getMemberList(lmd->type);
if (ml)
{
ml->writeTagFile(tagFile);
}
}
break;
case LayoutDocEntry::MemberGroups:
{
if (memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
......@@ -670,10 +813,6 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
......@@ -728,10 +867,6 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
//ol.docify(" ");
ol.insertMemberAlign();
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
}
ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
......@@ -765,10 +900,6 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription(dd->getOutputFileBase());
......@@ -801,13 +932,6 @@ void GroupDef::writePageDocumentation(OutputList &ol)
{
if (!pd->isReference())
{
QCString pageName = pd->getOutputFileBase();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
}
SectionInfo *si=0;
if (!pd->title().isEmpty() && !pd->name().isEmpty() &&
(si=Doxygen::sectionDict->find(pd->name()))!=0)
......@@ -967,15 +1091,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
Doxygen::indexList->addIndexItem(this,0,0,title);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
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()) << Doxygen::htmlFileExtension << "</filename>" << endl;
}
//---------------------------------------- start flexible part -------------------------------
SrcLangExt lang=getLanguage();
......@@ -1100,12 +1215,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
allMemberList->sort();
......@@ -1527,3 +1636,4 @@ bool GroupDef::hasDetailedDescription() const
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty());
}
......@@ -39,6 +39,7 @@ class DirList;
class FTVHelp;
class Entry;
class MemberDef;
class FTextStream;
/** A model of a group of symbols. */
class GroupDef : public Definition
......@@ -67,6 +68,7 @@ class GroupDef : public Definition
void writeDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
void writeTagFile(FTextStream &);
int countMembers() const;
bool isLinkableInProject() const;
bool isLinkable() const;
......
......@@ -576,8 +576,6 @@ class MemberDefImpl
// FALSE => block is put before declaration.
ClassDef *category;
MemberDef *categoryRelation;
unsigned tagDataWritten;
};
MemberDefImpl::MemberDefImpl() :
......@@ -707,7 +705,6 @@ void MemberDefImpl::init(Definition *def,
hasDocumentedReturnType = FALSE;
docProvider = 0;
isDMember = def->getDefFileName().right(2).lower()==".d";
tagDataWritten = 0; // save separate written status for file, group, class, etc.
}
......@@ -1413,8 +1410,7 @@ QCString MemberDef::getDeclType() const
void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup, const DefType compoundType,
ClassDef *inheritedFrom,const char *inheritId)
bool inGroup, ClassDef *inheritedFrom,const char *inheritId)
{
//printf("%s MemberDef::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
......@@ -1426,7 +1422,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
_writeTagData(compoundType);
//_writeTagData(compoundType);
_addToSearchIndex();
QCString cname = d->name();
......@@ -1536,7 +1532,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ltype.left(i), // text
FALSE // autoBreak
);
getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType);
getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
//ol+=*getAnonymousEnumType()->enumDecl();
linkifyText(TextGeneratorOLImpl(ol),d,m_impl->fileDef,this,ltype.right(ltype.length()-i-l),TRUE);
}
......@@ -2618,7 +2614,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef(),definitionType());
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
found=TRUE;
......@@ -3554,89 +3550,83 @@ Specifier MemberDef::virtualness(int count) const
return v;
}
void MemberDef::_writeTagData(const DefType compoundType)
void MemberDef::writeTagFile(FTextStream &tagFile)
{
unsigned typeMask = 1 << compoundType;
if ((m_impl->tagDataWritten) & typeMask) return; // member already written for this type
if (m_impl->mtype==MemberType_EnumValue && m_impl->enumScope &&
m_impl->enumScope->isStrong()) return; // enum value is part of enum
static bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty();
// write tag file information of this member
if (generateTagFile && isLinkableInProject())
if (!isLinkableInProject()) return;
tagFile << " <member kind=\"";
switch (m_impl->mtype)
{
Doxygen::tagFile << " <member kind=\"";
switch (m_impl->mtype)
{
case MemberType_Define: Doxygen::tagFile << "define"; break;
case MemberType_EnumValue: Doxygen::tagFile << "enumvalue"; break;
case MemberType_Property: Doxygen::tagFile << "property"; break;
case MemberType_Event: Doxygen::tagFile << "event"; break;
case MemberType_Variable: Doxygen::tagFile << "variable"; break;
case MemberType_Typedef: Doxygen::tagFile << "typedef"; break;
case MemberType_Enumeration: Doxygen::tagFile << "enumeration"; break;
case MemberType_Function: Doxygen::tagFile << "function"; break;
case MemberType_Signal: Doxygen::tagFile << "signal"; break;
case MemberType_Friend: Doxygen::tagFile << "friend"; break;
case MemberType_DCOP: Doxygen::tagFile << "dcop"; break;
case MemberType_Slot: Doxygen::tagFile << "slot"; break;
case MemberType_Interface: Doxygen::tagFile << "interface"; break;
case MemberType_Service: Doxygen::tagFile << "service"; break;
}
if (m_impl->prot!=Public)
{
Doxygen::tagFile << "\" protection=\"";
if (m_impl->prot==Protected) Doxygen::tagFile << "protected";
else if (m_impl->prot==Package) Doxygen::tagFile << "package";
else /* Private */ Doxygen::tagFile << "private";
}
if (m_impl->virt!=Normal)
{
Doxygen::tagFile << "\" virtualness=\"";
if (m_impl->virt==Virtual) Doxygen::tagFile << "virtual";
else /* Pure */ Doxygen::tagFile << "pure";
}
if (isStatic())
{
Doxygen::tagFile << "\" static=\"yes";
}
Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
QCString idStr = id();
if (!idStr.isEmpty())
{
Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
if (isStrong())
case MemberType_Define: tagFile << "define"; break;
case MemberType_EnumValue: tagFile << "enumvalue"; break;
case MemberType_Property: tagFile << "property"; break;
case MemberType_Event: tagFile << "event"; break;
case MemberType_Variable: tagFile << "variable"; break;
case MemberType_Typedef: tagFile << "typedef"; break;
case MemberType_Enumeration: tagFile << "enumeration"; break;
case MemberType_Function: tagFile << "function"; break;
case MemberType_Signal: tagFile << "signal"; break;
case MemberType_Friend: tagFile << "friend"; break;
case MemberType_DCOP: tagFile << "dcop"; break;
case MemberType_Slot: tagFile << "slot"; break;
case MemberType_Interface: tagFile << "interface"; break;
case MemberType_Service: tagFile << "service"; break;
}
if (m_impl->prot!=Public)
{
tagFile << "\" protection=\"";
if (m_impl->prot==Protected) tagFile << "protected";
else if (m_impl->prot==Package) tagFile << "package";
else /* Private */ tagFile << "private";
}
if (m_impl->virt!=Normal)
{
tagFile << "\" virtualness=\"";
if (m_impl->virt==Virtual) tagFile << "virtual";
else /* Pure */ tagFile << "pure";
}
if (isStatic())
{
tagFile << "\" static=\"yes";
}
tagFile << "\">" << endl;
if (typeString()!=QCString("@"))
{
tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
}
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
QCString idStr = id();
if (!idStr.isEmpty())
{
tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
if (isStrong())
{
MemberList *fmdl=m_impl->enumFields;
if (fmdl)
{
MemberList *fmdl=m_impl->enumFields;
if (fmdl)
MemberListIterator mli(*fmdl);
MemberDef *fmd;
for (mli.toFirst();(fmd=mli.current());++mli)
{
MemberListIterator mli(*fmdl);
MemberDef *fmd;
for (mli.toFirst();(fmd=mli.current());++mli)
if (!fmd->isReference())
{
if (!fmd->isReference())
tagFile << " <enumvalue file=\"" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension);
tagFile << "\" anchor=\"" << convertToXML(fmd->anchor());
QCString idStr = fmd->id();
if (!idStr.isEmpty())
{
Doxygen::tagFile << " <enumvalue file=\"" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension);
Doxygen::tagFile << "\" anchor=\"" << convertToXML(fmd->anchor());
QCString idStr = fmd->id();
if (!idStr.isEmpty())
{
Doxygen::tagFile << "\" clangid=\"" << convertToXML(idStr);
}
Doxygen::tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl;
tagFile << "\" clangid=\"" << convertToXML(idStr);
}
tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl;
}
}
}
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </member>" << endl;
}
m_impl->tagDataWritten |= typeMask;
writeDocAnchorsToTagFile(tagFile);
tagFile << " </member>" << endl;
}
void MemberDef::_computeIsConstructor()
......@@ -3735,8 +3725,7 @@ bool MemberDef::isDestructor() const
}
void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const DefType compoundType)
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd)
{
int enumMemCount=0;
......@@ -3763,7 +3752,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
{
if (isLinkableInProject() || hasDocumentedEnumValues())
{
_writeTagData(compoundType);
//_writeTagData(compoundType);
_addToSearchIndex();
writeLink(typeDecl,cd,nd,fd,gd);
}
......@@ -3812,7 +3801,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
if (fmd->hasDocumentation()) // enum value has docs
{
fmd->_writeTagData(compoundType);
//fmd->_writeTagData(compoundType);
fmd->_addToSearchIndex();
fmd->writeLink(typeDecl,cd,nd,fd,gd);
}
......
......@@ -376,16 +376,15 @@ class MemberDef : public Definition
// output generation
void writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup, const DefType compoundType,
ClassDef *inheritFrom=0,const char *inheritId=0);
bool inGroup, ClassDef *inheritFrom=0,const char *inheritId=0);
void writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName,Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE);
void writeMemberDocSimple(OutputList &ol,Definition *container);
void writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const DefType compoundType);
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
void writeTagFile(FTextStream &);
void warnIfUndocumented();
MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs,
......
......@@ -112,7 +112,7 @@ void MemberGroup::writeDeclarations(OutputList &ol,
//printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,DefinitionIntf::TypeGroup,FALSE,showInline);
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
}
void MemberGroup::writePlainDeclarations(OutputList &ol,
......@@ -121,7 +121,7 @@ void MemberGroup::writePlainDeclarations(OutputList &ol,
)
{
//printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count());
memberList->writePlainDeclarations(ol,cd,nd,fd,gd,DefinitionIntf::TypeGroup,inheritedFrom,inheritId);
memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
......@@ -150,7 +150,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd,
{
MemberList ml(lt);
ml.append(md);
ml.writePlainDeclarations(ol,cd,0,0,0,DefinitionIntf::TypeGroup,inheritedFrom,inheritId);
ml.writePlainDeclarations(ol,cd,0,0,0,inheritedFrom,inheritId);
}
}
}
......@@ -388,6 +388,12 @@ void MemberGroup::setRefItems(const QList<ListItemInfo> *sli)
}
}
}
void MemberGroup::writeTagFile(FTextStream &tagFile)
{
memberList->writeTagFile(tagFile);
}
//--------------------------------------------------------------------------
void MemberGroupInfo::setRefItems(const QList<ListItemInfo> *sli)
......
......@@ -33,6 +33,7 @@ class GroupDef;
class OutputList;
class Definition;
class StorageIntf;
class FTextStream;
struct ListItemInfo;
/** A class representing a group of members. */
......@@ -57,6 +58,7 @@ class MemberGroup
Definition *container,bool showEnumValues,bool showInline);
void writeDocumentationPage(OutputList &ol,const char *scopeName,
Definition *container);
void writeTagFile(FTextStream &);
void addGroupedInheritedMembers(OutputList &ol,ClassDef *cd,
MemberListType lt,
ClassDef *inheritedFrom,const QCString &inheritId);
......
......@@ -301,8 +301,7 @@ bool MemberList::declVisible() const
void MemberList::writePlainDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,
GroupDef *gd, const DefinitionIntf::DefType compoundType,
ClassDef *inheritedFrom,const char *inheritId
GroupDef *gd,ClassDef *inheritedFrom,const char *inheritId
)
{
//printf("----- writePlainDeclaration() ----\n");
......@@ -344,7 +343,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberType_Event:
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
break;
}
case MemberType_Enumeration:
......@@ -386,7 +385,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
ol.writeString("enum ");
ol.insertMemberAlign();
md->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType);
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
if (!detailsLinkable)
{
ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor());
......@@ -431,7 +430,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
break;
}
case MemberType_EnumValue:
......@@ -440,7 +439,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{
//printf("EnumValue!\n");
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
}
}
break;
......@@ -466,7 +465,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType);
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
md->setFromAnonymousScope(TRUE);
}
......@@ -490,7 +489,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
* @param gd non-null if this list is part of group documentation.
* @param title Title to use for the member list.
* @param subtitle Sub title to use for the member list.
* @param compoundType Container type for this member list.
* @param showEnumValues Obsolete, always set to FALSE.
* @param showInline if set to TRUE if title is rendered differently
* @param inheritedFrom if not 0, the list is shown inside the
......@@ -500,8 +498,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
*/
void MemberList::writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,
const DefinitionIntf::DefType compoundType,bool showEnumValues,
const char *title,const char *subtitle, bool showEnumValues,
bool showInline,ClassDef *inheritedFrom,MemberListType lt)
{
(void)showEnumValues; // unused
......@@ -587,7 +584,7 @@ void MemberList::writeDeclarations(OutputList &ol,
}
else
{
writePlainDeclarations(ol,cd,nd,fd,gd,compoundType,inheritedFrom,inheritId);
writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
//printf("memberGroupList=%p\n",memberGroupList);
......@@ -943,6 +940,31 @@ QCString MemberList::listTypeAsString(MemberListType type)
return "";
}
void MemberList::writeTagFile(FTextStream &tagFile)
{
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
if (md->getLanguage()!=SrcLangExt_VHDL)
{
md->writeTagFile(tagFile);
}
else
{
VhdlDocGen::writeTagFile(md,tagFile);
}
}
if (memberGroupList)
{
MemberGroupListIterator mgli(*memberGroupList);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
//--------------------------------------------------------------------------
......
......@@ -55,12 +55,11 @@ class MemberList : public QList<MemberDef>
void countDocMembers(bool countEnumValues=FALSE);
int countInheritableMembers(ClassDef *inheritedFrom) const;
void writePlainDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,
GroupDef *gd,const DefinitionIntf::DefType compoundType,
ClassDef *cd,NamespaceDef *nd,FileDef *fd, GroupDef *gd,
ClassDef *inheritedFrom,const char *inheritId);
void writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,const DefinitionIntf::DefType compoundType,
const char *title,const char *subtitle,
bool showEnumValues=FALSE,bool showInline=FALSE,
ClassDef *inheritedFrom=0,MemberListType lt=MemberListType_pubMethods);
void writeDocumentation(OutputList &ol,const char *scopeName,
......@@ -68,6 +67,7 @@ class MemberList : public QList<MemberDef>
void writeSimpleDocumentation(OutputList &ol,Definition *container);
void writeDocumentationPage(OutputList &ol,
const char *scopeName, Definition *container);
void writeTagFile(FTextStream &);
bool declVisible() const;
void addMemberGroup(MemberGroup *mg);
void setInGroup(bool inGroup) { m_inGroup=inGroup; }
......
......@@ -259,6 +259,85 @@ bool NamespaceDef::hasDetailedDescription() const
!documentation().isEmpty());
}
void NamespaceDef::writeTagFile(FTextStream &tagFile)
{
tagFile << " <compound kind=\"namespace\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QCString idStr = id();
if (!idStr.isEmpty())
{
tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
case LayoutDocEntry::NamespaceNestedNamespaces:
{
if (namespaceSDict)
{
SDict<NamespaceDef>::Iterator ni(*namespaceSDict);
NamespaceDef *nd;
for (ni.toFirst();(nd=ni.current());++ni)
{
if (nd->isLinkableInProject())
{
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
}
}
}
break;
case LayoutDocEntry::NamespaceClasses:
{
if (classSDict)
{
SDict<ClassDef>::Iterator ci(*classSDict);
ClassDef *cd;
for (ci.toFirst();(cd=ci.current());++ci)
{
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString()
<< "\">" << convertToXML(cd->name()) << "</class>" << endl;
}
}
}
}
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList * ml = getMemberList(lmd->type);
if (ml)
{
ml->writeTagFile(tagFile);
}
}
break;
case LayoutDocEntry::MemberGroups:
{
if (memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeTagFile(tagFile);
}
}
}
break;
default:
break;
}
}
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
......@@ -496,19 +575,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
Doxygen::searchIndex->addWord(localName(),TRUE);
}
bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty();
if (generateTagFile)
{
Doxygen::tagFile << " <compound kind=\"namespace\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QCString idStr = id();
if (!idStr.isEmpty())
{
Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
}
Doxygen::indexList->addIndexItem(this,0);
//---------------------------------------- start flexible part -------------------------------
......@@ -619,12 +685,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
endFileWithNavPath(this,ol);
if (generateTagFile)
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
......@@ -939,10 +999,6 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
name = nd->displayName();
}
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && nd->isLinkableInProject())
{
Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
ol.endMemberItem();
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
......
......@@ -33,6 +33,7 @@ class MemberDef;
class NamespaceList;
class MemberGroupSDict;
class NamespaceSDict;
class FTextStream;
/** A model of a namespace symbol. */
class NamespaceDef : public Definition
......@@ -51,6 +52,7 @@ class NamespaceDef : public Definition
void writeDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
void writeTagFile(FTextStream &);
void insertClass(ClassDef *cd);
void insertNamespace(NamespaceDef *nd);
......
......@@ -99,6 +99,30 @@ bool PageDef::hasParentPage() const
getOuterScope()->definitionType()==Definition::TypePage;
}
void PageDef::writeTagFile(FTextStream &tagFile)
{
bool found = name()=="citelist";
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current()) && !found;++rli)
{
if (rl->listName()==name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
tagFile << " <compound kind=\"page\">" << endl;
tagFile << " <name>" << name() << "</name>" << endl;
tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl;
writeDocAnchorsToTagFile(tagFile);
tagFile << " </compound>" << endl;
}
}
void PageDef::writeDocumentation(OutputList &ol)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
......@@ -200,30 +224,6 @@ void PageDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
//1.}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
bool found = name()=="citelist";
QDictIterator<RefList> rli(*Doxygen::xrefLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current()) && !found;++rli)
{
if (rl->listName()==name())
{
found=TRUE;
break;
}
}
if (!found) // not one of the generated related pages
{
Doxygen::tagFile << " <compound kind=\"page\">" << endl;
Doxygen::tagFile << " <name>" << name() << "</name>" << endl;
Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl;
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
}
Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title()));
}
......
......@@ -23,6 +23,7 @@
class PageSDict;
class OutputList;
class FTextStream;
/** @brief A model of a page symbol. */
class PageDef : public Definition
......@@ -64,6 +65,7 @@ class PageDef : public Definition
QCString displayName(bool=TRUE) const { return !m_title.isEmpty() ? m_title : Definition::name(); }
void writeDocumentation(OutputList &ol);
void writeTagFile(FTextStream &);
private:
void setNestingLevel(int l);
......
......@@ -1950,6 +1950,48 @@ bool VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit
return hasParams;
}
void VhdlDocGen::writeTagFile(MemberDef *mdef,FTextStream &tagFile)
{
tagFile << " <member kind=\"";
if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic";
if (VhdlDocGen::isPort(mdef)) tagFile << "port";
if (VhdlDocGen::isEntity(mdef)) tagFile << "entity";
if (VhdlDocGen::isComponent(mdef)) tagFile << "component";
if (VhdlDocGen::isVType(mdef)) tagFile << "type";
if (VhdlDocGen::isConstant(mdef)) tagFile << "constant";
if (VhdlDocGen::isSubType(mdef)) tagFile << "subtype";
if (VhdlDocGen::isVhdlFunction(mdef)) tagFile << "function";
if (VhdlDocGen::isProcedure(mdef)) tagFile << "procedure";
if (VhdlDocGen::isProcess(mdef)) tagFile << "process";
if (VhdlDocGen::isSignals(mdef)) tagFile << "signal";
if (VhdlDocGen::isAttribute(mdef)) tagFile << "attribute";
if (VhdlDocGen::isRecord(mdef)) tagFile << "record";
if (VhdlDocGen::isLibrary(mdef)) tagFile << "library";
if (VhdlDocGen::isPackage(mdef)) tagFile << "package";
if (VhdlDocGen::isVariable(mdef)) tagFile << "shared variable";
if (VhdlDocGen::isFile(mdef)) tagFile << "file";
if (VhdlDocGen::isGroup(mdef)) tagFile << "group";
if (VhdlDocGen::isCompInst(mdef)) tagFile << "instantiation";
if (VhdlDocGen::isAlias(mdef)) tagFile << "alias";
if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration";
tagFile << "\">" << endl;
tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl;
tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl;
tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl;
if (VhdlDocGen::isVhdlFunction(mdef))
tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl;
else if (VhdlDocGen::isProcedure(mdef))
tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl;
else
tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl;
mdef->writeDocAnchorsToTagFile(tagFile);
tagFile << " </member>" << endl;
}
/* writes a vhdl type declaration */
void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
......@@ -1971,50 +2013,6 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
else if (gd) d=gd;
else d=(Definition*)mdef;
// write tag file information of this member
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <member kind=\"";
if (VhdlDocGen::isGeneric(mdef)) Doxygen::tagFile << "generic";
if (VhdlDocGen::isPort(mdef)) Doxygen::tagFile << "port";
if (VhdlDocGen::isEntity(mdef)) Doxygen::tagFile << "entity";
if (VhdlDocGen::isComponent(mdef)) Doxygen::tagFile << "component";
if (VhdlDocGen::isVType(mdef)) Doxygen::tagFile << "type";
if (VhdlDocGen::isConstant(mdef)) Doxygen::tagFile << "constant";
if (VhdlDocGen::isSubType(mdef)) Doxygen::tagFile << "subtype";
if (VhdlDocGen::isVhdlFunction(mdef)) Doxygen::tagFile << "function";
if (VhdlDocGen::isProcedure(mdef)) Doxygen::tagFile << "procedure";
if (VhdlDocGen::isProcess(mdef)) Doxygen::tagFile << "process";
if (VhdlDocGen::isSignals(mdef)) Doxygen::tagFile << "signal";
if (VhdlDocGen::isAttribute(mdef)) Doxygen::tagFile << "attribute";
if (VhdlDocGen::isRecord(mdef)) Doxygen::tagFile << "record";
if (VhdlDocGen::isLibrary(mdef)) Doxygen::tagFile << "library";
if (VhdlDocGen::isPackage(mdef)) Doxygen::tagFile << "package";
if (VhdlDocGen::isVariable(mdef)) Doxygen::tagFile << "shared variable";
if (VhdlDocGen::isFile(mdef)) Doxygen::tagFile << "file";
if (VhdlDocGen::isGroup(mdef)) Doxygen::tagFile << "group";
if (VhdlDocGen::isCompInst(mdef)) Doxygen::tagFile << " instantiation";
if (VhdlDocGen::isAlias(mdef)) Doxygen::tagFile << "alias";
if (VhdlDocGen::isCompInst(mdef)) Doxygen::tagFile << "configuration";
Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl;
Doxygen::tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl;
Doxygen::tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl;
if (VhdlDocGen::isVhdlFunction(mdef))
Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl;
else if (VhdlDocGen::isProcedure(mdef))
Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl;
else
Doxygen::tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl;
mdef->writeDocAnchorsToTagFile();
Doxygen::tagFile << " </member>" << endl;
}
// write search index info
if (Doxygen::searchIndex)
{
......
......@@ -119,6 +119,7 @@ class VhdlDocGen
static QCString getClassTitle(const ClassDef*);
static void writeInlineClassLink(const ClassDef*,
OutputList &ol);
static void writeTagFile(MemberDef *mdef,FTextStream &tagFile);
static bool isConstraint(const MemberDef *mdef);
static bool isConfig(const MemberDef *mdef);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment