summaryrefslogtreecommitdiffstats
path: root/src/classdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-01-20 13:31:30 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-01-20 13:31:30 (GMT)
commitdcd4714c4413348d02eb7224dafee5d06be43dfb (patch)
tree3872f0367bbee22883a702d1d2f799c9a9c2e8ac /src/classdef.cpp
parent775ab3be95c02dd805aadc73ffbe3c18877c12a4 (diff)
downloadDoxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.zip
Doxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.tar.gz
Doxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.tar.bz2
Release-1.8.3.1
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r--src/classdef.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 8517893..b285325 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2,7 +2,7 @@
*
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -2206,7 +2206,7 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
- else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
+ else if (md->isFriend() && !qstrcmp(md->typeString(),"friend class"))
ol.docify(" class");
//ol.writeString("\n");
}
@@ -2574,8 +2574,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
//printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
if (level>256)
{
- err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(name()),qPrint(bcd->name()));
- abort();
+ err("Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(name()),qPrint(bcd->name()));
return FALSE;
}
if (baseClasses())
@@ -2597,6 +2596,31 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
return found;
}
+//----------------------------------------------------------------------
+
+bool ClassDef::isSubClass(ClassDef *cd,int level)
+{
+ bool found=FALSE;
+ if (level>256)
+ {
+ err("Possible recursive class relation while inside %s and looking for derived class %s\n",qPrint(name()),qPrint(cd->name()));
+ return FALSE;
+ }
+ if (subClasses())
+ {
+ BaseClassListIterator bcli(*subClasses());
+ for ( ; bcli.current() && !found ; ++bcli)
+ {
+ ClassDef *ccd=bcli.current()->classDef;
+ if (ccd==cd)
+ found=TRUE;
+ else
+ found=ccd->isSubClass(cd,level+1);
+ }
+ }
+ return found;
+}
+
//----------------------------------------------------------------------------
static bool isStandardFunc(MemberDef *md)