summaryrefslogtreecommitdiffstats
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-06-22 19:58:32 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-06-22 19:58:32 (GMT)
commitd63fb8488a84c7a0304ddd1024c07cc5756aa48a (patch)
treeeb68bfd8c17802b0dc8d47eb9668b606d272d012 /src/memberdef.cpp
parent0651fff25fe4e2e5752e222871257a37e530c805 (diff)
downloadDoxygen-d63fb8488a84c7a0304ddd1024c07cc5756aa48a.zip
Doxygen-d63fb8488a84c7a0304ddd1024c07cc5756aa48a.tar.gz
Doxygen-d63fb8488a84c7a0304ddd1024c07cc5756aa48a.tar.bz2
Add support for writing and importing C++11 style enums to and from tag files
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 4c9e900..d9b9ce9 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -3397,6 +3397,8 @@ void MemberDef::_writeTagData(const DefType compoundType)
{
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())
@@ -3447,37 +3449,32 @@ void MemberDef::_writeTagData(const DefType compoundType)
Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
}
Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
- writeDocAnchorsToTagFile();
- Doxygen::tagFile << " </member>" << endl;
- _addToSearchIndex();
- }
- MemberList *fmdl=m_impl->enumFields;
- if (fmdl)
- {
- MemberListIterator mli(*fmdl);
- MemberDef *fmd;
- for (mli.toFirst();(fmd=mli.current());++mli)
+ if (isStrong())
{
- if (!fmd->isReference())
+ MemberList *fmdl=m_impl->enumFields;
+ if (fmdl)
{
- if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ MemberListIterator mli(*fmdl);
+ MemberDef *fmd;
+ for (mli.toFirst();(fmd=mli.current());++mli)
{
- Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
- Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
- Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
- Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
- QCString idStr = fmd->id();
- if (!idStr.isEmpty())
+ if (!fmd->isReference())
{
- Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
+ 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;
}
- Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
- Doxygen::tagFile << " </member>" << endl;
- fmd->m_impl->tagDataWritten |= typeMask;
- fmd->_addToSearchIndex();
}
}
}
+ writeDocAnchorsToTagFile();
+ Doxygen::tagFile << " </member>" << endl;
+ _addToSearchIndex();
}
m_impl->tagDataWritten |= typeMask;
}