diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-04-27 19:44:46 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-04-27 19:44:46 (GMT) |
commit | 9b0cf1e08f786c5fbc0583fdeecd9b6fefda2b76 (patch) | |
tree | 73dfea63810e8b2a57aee5b37ecd2f360c69f440 /src/classdef.cpp | |
parent | 4088d90d9abafaa51250e55a5f48a787a921ed98 (diff) | |
download | Doxygen-9b0cf1e08f786c5fbc0583fdeecd9b6fefda2b76.zip Doxygen-9b0cf1e08f786c5fbc0583fdeecd9b6fefda2b76.tar.gz Doxygen-9b0cf1e08f786c5fbc0583fdeecd9b6fefda2b76.tar.bz2 |
Release-1.3.6-20040427
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r-- | src/classdef.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 0ba7b6e..67fe145 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -129,8 +129,10 @@ ClassDef::~ClassDef() QCString ClassDef::displayName() const { + static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); + static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); QCString n; - if (Config_getBool("HIDE_SCOPE_NAMES")) + if (hideScopeNames) { n=m_className; } @@ -138,7 +140,7 @@ QCString ClassDef::displayName() const { n=qualifiedNameWithTemplateParameters(); } - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + if (optimizeOutputForJava) { n=substitute(n,"::","."); } @@ -1932,10 +1934,15 @@ bool ClassDef::hasDocumentation() const // returns TRUE iff class definition `bcd' represents an (in)direct base // class of class definition `cd'. -bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances) +bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) { bool found=FALSE; //printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data()); + if (level>256) + { + err("Possible recursive class relation while inside %s and looking for %s\n",name().data(),bcd->name().data()); + return FALSE; + } BaseClassListIterator bcli(*baseClasses()); for ( ; bcli.current() && !found ; ++bcli) { @@ -1945,7 +1952,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances) if (ccd==bcd) found=TRUE; else - found=ccd->isBaseClass(bcd,followInstances); + found=ccd->isBaseClass(bcd,followInstances,level+1); } return found; } @@ -2843,4 +2850,3 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) return xmd; } - |