summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-03-05 18:16:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-03-05 18:16:47 (GMT)
commit000241f7603af61328b25cd9a9defc40be43e558 (patch)
treefea55c7f521b9b8d4c7cdecc6579109f17cae89a /src/util.cpp
parent75cfc919c930dc2a5c9e6770d6b1e7b09e5e8883 (diff)
downloadDoxygen-000241f7603af61328b25cd9a9defc40be43e558.zip
Doxygen-000241f7603af61328b25cd9a9defc40be43e558.tar.gz
Doxygen-000241f7603af61328b25cd9a9defc40be43e558.tar.bz2
Release_1.1.0-20000305
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index b70e3a5..70b8ebc 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1968,3 +1968,47 @@ int getPrefixIndex(const QCString &name)
}
return 0;
}
+
+//----------------------------------------------------------------------------
+
+static void initBaseClassHierarchy(BaseClassList *bcl)
+{
+ BaseClassListIterator bcli(*bcl);
+ for ( ; bcli.current(); ++bcli)
+ {
+ ClassDef *cd=bcli.current()->classDef;
+ if (cd->baseClasses()->count()==0) // no base classes => new root
+ {
+ initBaseClassHierarchy(cd->baseClasses());
+ }
+ cd->visited=FALSE;
+ }
+}
+
+//----------------------------------------------------------------------------
+
+void initClassHierarchy(ClassList *cl)
+{
+ ClassListIterator cli(*cl);
+ ClassDef *cd;
+ for ( ; (cd=cli.current()); ++cli)
+ {
+ cd->visited=FALSE;
+ initBaseClassHierarchy(cd->baseClasses());
+ }
+}
+
+//----------------------------------------------------------------------------
+
+bool hasVisibleRoot(BaseClassList *bcl)
+{
+ BaseClassListIterator bcli(*bcl);
+ for ( ; bcli.current(); ++bcli)
+ {
+ ClassDef *cd=bcli.current()->classDef;
+ if (cd->isVisibleInHierarchy()) return TRUE;
+ hasVisibleRoot(cd->baseClasses());
+ }
+ return FALSE;
+}
+