summaryrefslogtreecommitdiffstats
path: root/src/classdef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r--src/classdef.cpp164
1 files changed, 106 insertions, 58 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 1e0a15f..d02dd5d 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -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);
}
}