summaryrefslogtreecommitdiffstats
path: root/src/filedef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2003-02-01 13:59:42 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2003-02-01 13:59:42 (GMT)
commit8fda55cdfe71d9e23407169499e918478161328d (patch)
tree95791f3a49cf176781e5089ddcf643f2aa8e93a1 /src/filedef.cpp
parentdaa0336ab06f76a07f59499cbc47fd919073749d (diff)
downloadDoxygen-8fda55cdfe71d9e23407169499e918478161328d.zip
Doxygen-8fda55cdfe71d9e23407169499e918478161328d.tar.gz
Doxygen-8fda55cdfe71d9e23407169499e918478161328d.tar.bz2
Release-1.3-rc3
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r--src/filedef.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 9d9edcc..d360813 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -615,6 +615,7 @@ MemberDef *FileDef::getSourceMember(int lineNr)
return result;
}
+
void FileDef::addUsingDirective(NamespaceDef *nd)
{
if (usingDirList==0)
@@ -648,6 +649,49 @@ void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local)
}
}
+void FileDef::addIncludedUsingDirectives()
+{
+ if (!visited)
+ {
+ visited=TRUE;
+ NamespaceList nl;
+ if (includeList) // file contains #includes
+ {
+ QListIterator<IncludeInfo> iii(*includeList);
+ IncludeInfo *ii;
+ for (;(ii=iii.current());++iii) // foreach #include...
+ {
+ if (ii->fileDef) // ...that is a known file
+ {
+ // recurse into this file
+ ii->fileDef->addIncludedUsingDirectives();
+ }
+ }
+ // iterate through list from last to first
+ for (iii.toLast();(ii=iii.current());--iii)
+ {
+ if (ii->fileDef)
+ {
+ NamespaceList *unl = ii->fileDef->usingDirList;
+ if (unl)
+ {
+ NamespaceListIterator nli(*unl);
+ NamespaceDef *nd;
+ for (nli.toLast();(nd=nli.current());--nli)
+ {
+ // append each using directive found in a #include file
+ if (usingDirList==0) usingDirList = new NamespaceList;
+ usingDirList->prepend(nd);
+ }
+ }
+ }
+ }
+ }
+ // add elements of nl to usingDirList
+ }
+}
+
+
void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local)
{
//printf("FileDef::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);