summaryrefslogtreecommitdiffstats
path: root/src/groupdef.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-23 21:30:39 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-01-23 21:30:39 (GMT)
commit38c6a14b15d87348076be142abea8663009ace82 (patch)
treed75127a33593cfe4d77e951e6df541294dc1e9b4 /src/groupdef.cpp
parentd37b4be374f200ce57ee228d0f33e52e10add15f (diff)
downloadDoxygen-38c6a14b15d87348076be142abea8663009ace82.zip
Doxygen-38c6a14b15d87348076be142abea8663009ace82.tar.gz
Doxygen-38c6a14b15d87348076be142abea8663009ace82.tar.bz2
Release-1.5.4-20080123
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r--src/groupdef.cpp40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index de41fe7..af0e83b 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -161,22 +161,32 @@ void GroupDef::addFile(const FileDef *def)
fileList->append(def);
}
-void GroupDef::addClass(const ClassDef *cd)
+bool GroupDef::addClass(const ClassDef *cd)
{
- if (cd->isHidden()) return;
- if (Config_getBool("SORT_BRIEF_DOCS"))
- classSDict->inSort(cd->name(),cd);
- else
- classSDict->append(cd->name(),cd);
+ if (cd->isHidden()) return FALSE;
+ if (classSDict->find(cd->name())==0)
+ {
+ if (Config_getBool("SORT_BRIEF_DOCS"))
+ classSDict->inSort(cd->name(),cd);
+ else
+ classSDict->append(cd->name(),cd);
+ return TRUE;
+ }
+ return FALSE;
}
-void GroupDef::addNamespace(const NamespaceDef *def)
+bool GroupDef::addNamespace(const NamespaceDef *def)
{
- if (def->isHidden()) return;
- if (Config_getBool("SORT_BRIEF_DOCS"))
- namespaceSDict->inSort(def->name(),def);
- else
- namespaceSDict->append(def->name(),def);
+ if (def->isHidden()) return FALSE;
+ if (namespaceSDict->find(def->name())==0)
+ {
+ if (Config_getBool("SORT_BRIEF_DOCS"))
+ namespaceSDict->inSort(def->name(),def);
+ else
+ namespaceSDict->append(def->name(),def);
+ return TRUE;
+ }
+ return FALSE;
}
void GroupDef::addDir(const DirDef *def)
@@ -926,8 +936,7 @@ void addClassToGroups(Entry *root,ClassDef *cd)
GroupDef *gd=0;
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
- gd->addClass(cd);
- cd->makePartOfGroup(gd);
+ if (gd->addClass(cd)) cd->makePartOfGroup(gd);
//printf("Compound %s: in group %s\n",cd->name().data(),s->data());
}
}
@@ -944,8 +953,7 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
//printf("group `%s'\n",s->data());
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
- gd->addNamespace(nd);
- nd->makePartOfGroup(gd);
+ if (gd->addNamespace(nd)) nd->makePartOfGroup(gd);
//printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
}
}