summaryrefslogtreecommitdiffstats
path: root/src/doxygen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2003-04-12 09:32:03 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2003-04-12 09:32:03 (GMT)
commit7e0aeda8a19448b44750f2530864432c964b0374 (patch)
tree97a61f449c3cd2b31dba7908cce7881ee2f0da85 /src/doxygen.cpp
parentb69146af8dce22431fc50dc3fcea6c7fd5fb1063 (diff)
downloadDoxygen-7e0aeda8a19448b44750f2530864432c964b0374.zip
Doxygen-7e0aeda8a19448b44750f2530864432c964b0374.tar.gz
Doxygen-7e0aeda8a19448b44750f2530864432c964b0374.tar.bz2
Release-1.3
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r--src/doxygen.cpp75
1 files changed, 58 insertions, 17 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 15dc65e..f51be68 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -799,20 +799,20 @@ static void addClassToContext(Entry *root)
Doxygen::classSDict.append(fullName,cd);
// also add class to the correct structural context
- Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
- if (d==0)
- {
- //warn(root->fileName,root->startLine,
- // "Warning: Internal inconsistency: scope for class %s not "
- // "found!\n",fullName.data()
- // );
- }
- else
- {
- //printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
- d->addInnerCompound(cd);
- cd->setOuterScope(d);
- }
+ //Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
+ //if (d==0)
+ //{
+ // warn(root->fileName,root->startLine,
+ // "Warning: Internal inconsistency: scope for class %s not "
+ // "found!\n",fullName.data()
+ // );
+ //}
+ //else
+ //{
+ // //printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
+ // d->addInnerCompound(cd);
+ // cd->setOuterScope(d);
+ //}
}
}
@@ -850,6 +850,46 @@ static void buildClassDocList(Entry *root)
buildClassDocList(e);
}
}
+
+static void resolveClassNestingRelations()
+{
+ int nestingLevel=0;
+ bool done=FALSE;
+ while (!done)
+ {
+ // iterate over all classes searching for a class with right nesting
+ // level (starting with 0 and going up until no more classes are found)
+ done=TRUE;
+ ClassSDict::Iterator cli(Doxygen::classSDict);
+ ClassDef *cd=0;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ if (cd->name().contains("::")==nestingLevel)
+ {
+ //printf("Level=%d processing=%s\n",nestingLevel,cd->name().data());
+ done=FALSE;
+ // also add class to the correct structural context
+ Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,cd->name());
+ if (d==0)
+ {
+ warn(cd->getDefFileName(),cd->getDefLine(),
+ "Warning: Internal inconsistency: scope for class %s not "
+ "found!\n",cd->name().data()
+ );
+ }
+ else
+ {
+ //printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
+ d->addInnerCompound(cd);
+ cd->setOuterScope(d);
+ }
+ }
+ }
+ nestingLevel++;
+ }
+}
+
+
//----------------------------------------------------------------------
// build a list of all namespaces mentioned in the documentation
// and all namespaces that have a documentation block before their definition.
@@ -1710,7 +1750,7 @@ done:
// Searches the Entry tree for Variable documentation sections.
// If found they are stored in their class or in the global list.
-void buildVarList(Entry *root)
+static void buildVarList(Entry *root)
{
if (!root->name.isEmpty() &&
(root->type.isEmpty() || compoundKeywordDict.find(root->type)==0) &&
@@ -1914,7 +1954,7 @@ nextMember:
// Searches the Entry tree for Function sections.
// If found they are stored in their class or in the global list.
-void addMethodToClass(Entry *root,ClassDef *cd,
+static void addMethodToClass(Entry *root,ClassDef *cd,
const QCString &rname,/*const QCString &scope,*/bool isFriend)
{
int l,i;
@@ -2790,7 +2830,7 @@ static QDict<int> *getTemplateArgumentsInName(ArgumentList *templateArguments,co
* This function differs from getResolvedClass in that it also takes
* using declarations and definition into account.
*/
-ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
+static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
{
ClassDef *result=0;
@@ -7861,6 +7901,7 @@ void parseInput()
msg("Building class list...\n");
buildClassList(root);
buildClassDocList(root);
+ resolveClassNestingRelations();
findUsingDeclarations(root);
msg("Building example list...\n");