summaryrefslogtreecommitdiffstats
path: root/src/groupdef.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-09-01 19:53:48 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-09-01 19:53:48 (GMT)
commit0a37457c83248543ec84ee6cf7a64188a013fb8c (patch)
treeda974cfae9e6014de9194f883223647574559cba /src/groupdef.cpp
parent55d2ef8412008e1560b0d5a2ecc2031f269af4a1 (diff)
downloadDoxygen-0a37457c83248543ec84ee6cf7a64188a013fb8c.zip
Doxygen-0a37457c83248543ec84ee6cf7a64188a013fb8c.tar.gz
Doxygen-0a37457c83248543ec84ee6cf7a64188a013fb8c.tar.bz2
Doxygen-1.2.17-20020901
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r--src/groupdef.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index b2d3691..2a83ae6 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -162,7 +162,7 @@ void GroupDef::addMembersToMemberGroup()
}
-void GroupDef::insertMember(MemberDef *md,bool docOnly)
+bool GroupDef::insertMember(MemberDef *md,bool docOnly)
{
//printf("GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data());
MemberNameInfo *mni=0;
@@ -173,10 +173,17 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly)
for ( ; (srcMi=srcMnii.current()) ; ++srcMnii )
{
MemberDef *srcMd = srcMi->memberDef;
- if (matchArguments(srcMd->argumentList(),md->argumentList()) &&
- srcMd->getOuterScope()==md->getOuterScope())
+
+ bool sameScope = srcMd->getOuterScope()==md->getOuterScope() || // same class or namespace
+ // both inside a file => definition and declaration do not have to be in the same file
+ (srcMd->getOuterScope()->definitionType()==Definition::TypeFile &&
+ md->getOuterScope()->definitionType()==Definition::TypeFile);
+
+ if (matchArguments(srcMd->argumentList(),md->argumentList()) &&
+ sameScope
+ )
{
- return; // member already added
+ return FALSE; // member already added
}
}
mni->append(new MemberInfo(md,md->protection(),md->virtualness(),FALSE));
@@ -187,6 +194,7 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly)
mni->append(new MemberInfo(md,md->protection(),md->virtualness(),FALSE));
allMemberNameInfoSDict->append(mni->memberName(),mni);
}
+ //printf("Added member!\n");
allMemberList->append(md);
switch(md->memberType())
{
@@ -241,7 +249,7 @@ void GroupDef::insertMember(MemberDef *md,bool docOnly)
md->getClassDef() ? md->getClassDef()->name().data() : "",
name().data());
}
- //addMemberToGroup(md,groupId);
+ return TRUE;
}
void GroupDef::removeMember(MemberDef *md)
@@ -723,10 +731,13 @@ void addMemberToGroups(Entry *root,MemberDef *md)
if (insertit)
{
//printf("insertMember\n");
- fgd->insertMember(md);
- md->setGroupDef(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
- ClassDef *cd = md->getClassDefOfAnonymousType();
- if (cd) cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
+ bool success = fgd->insertMember(md);
+ if (success)
+ {
+ md->setGroupDef(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
+ ClassDef *cd = md->getClassDefOfAnonymousType();
+ if (cd) cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
+ }
}
}
}