diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-06-22 19:58:32 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-06-22 19:58:32 (GMT) |
commit | d63fb8488a84c7a0304ddd1024c07cc5756aa48a (patch) | |
tree | eb68bfd8c17802b0dc8d47eb9668b606d272d012 /src/memberdef.cpp | |
parent | 0651fff25fe4e2e5752e222871257a37e530c805 (diff) | |
download | Doxygen-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.cpp | 43 |
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; } |