diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2004-04-27 19:44:46 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2004-04-27 19:44:46 (GMT) |
commit | 08b4b96ea20ded173b851aeb452c5d3c98e08cc4 (patch) | |
tree | 73dfea63810e8b2a57aee5b37ecd2f360c69f440 /src/classdef.cpp | |
parent | f08c77a2ead21877f1cbd49a5b325ab7be0fc599 (diff) | |
download | Doxygen-08b4b96ea20ded173b851aeb452c5d3c98e08cc4.zip Doxygen-08b4b96ea20ded173b851aeb452c5d3c98e08cc4.tar.gz Doxygen-08b4b96ea20ded173b851aeb452c5d3c98e08cc4.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; } - |