summaryrefslogtreecommitdiffstats
path: root/src/classdef.cpp
diff options
context:
space:
mode:
authorAdrian Negreanu <adrian.m.negreanu@intel.com>2014-08-04 09:29:01 (GMT)
committerAdrian Negreanu <adrian.m.negreanu@intel.com>2014-08-04 09:31:09 (GMT)
commit34a5a051a8b91215ae4f93e5541d43c33aa887c1 (patch)
tree7ea7ea82e1611f7620b34cd15a383dbd38f51785 /src/classdef.cpp
parentd4601735b582b903f1ccb144f59b2030a7797b05 (diff)
downloadDoxygen-34a5a051a8b91215ae4f93e5541d43c33aa887c1.zip
Doxygen-34a5a051a8b91215ae4f93e5541d43c33aa887c1.tar.gz
Doxygen-34a5a051a8b91215ae4f93e5541d43c33aa887c1.tar.bz2
cache anonymous into ClassDefImpl::isAnonymous
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r--src/classdef.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index cef4720..88f1497 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -187,6 +187,8 @@ class ClassDefImpl
bool isGeneric;
+ bool isAnonymous;
+
uint64 spec;
};
@@ -248,6 +250,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
isLocal=FALSE;
}
isGeneric = lang==SrcLangExt_CSharp && QCString(name).find('<')!=-1;
+ isAnonymous = QCString(name).find('@')!=-1;
}
ClassDefImpl::ClassDefImpl() : vhdlSummaryTitles(17)
@@ -1772,7 +1775,7 @@ bool ClassDef::visibleInParentsDeclList() const
static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
bool linkable = isLinkable();
- return (name().find('@')==-1 && !isExtension() &&
+ return (!isAnonymous() && !isExtension() &&
(protection()!=::Private || extractPrivate) &&
(linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
);
@@ -2597,7 +2600,7 @@ bool ClassDef::isLinkableInProject() const
{
return !name().isEmpty() && /* has a name */
!isArtificial() && !isHidden() && /* not hidden */
- name().find('@')==-1 && /* not anonymous */
+ !isAnonymous() && /* not anonymous */
protectionLevelVisible(m_impl->prot) && /* private/internal */
(!m_impl->isLocal || extractLocal) && /* local */
(hasDocumentation() || !hideUndoc) && /* documented */
@@ -2629,7 +2632,7 @@ bool ClassDef::isVisibleInHierarchy()
return // show all classes or a subclass is visible
(allExternals || hasNonReferenceSuperClass()) &&
// and not an anonymous compound
- name().find('@')==-1 &&
+ !isAnonymous() &&
// not an artificially introduced class
/*!isArtificial() &&*/ // 1.8.2: allowed these to appear
// and not privately inherited
@@ -4603,3 +4606,13 @@ bool ClassDef::subGrouping() const
return m_impl->subGrouping;
}
+void ClassDef::setName(const char *name)
+{
+ m_impl->isAnonymous = QCString(name).find('@')!=-1;
+ Definition::setName(name);
+}
+
+bool ClassDef::isAnonymous() const
+{
+ return m_impl->isAnonymous;
+}