diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-28 18:16:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-28 18:16:38 (GMT) |
commit | 1426e2fbce1e3e4c8089b228c843042c90b2d1c4 (patch) | |
tree | 26b976ebd24f845a5cf88ab76f81f928c47c4548 /src/groupdef.cpp | |
parent | bf4bb2e1e1fb5e61fa5a7458f6354002994fa5ee (diff) | |
download | Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.zip Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.tar.gz Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.tar.bz2 |
Release-1.2.4-20010128
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r-- | src/groupdef.cpp | 123 |
1 files changed, 70 insertions, 53 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 4bf262a..43ff8f3 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -42,7 +42,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : pageDict = new PageSDict(257); exampleDict = new PageSDict(257); allMemberList = new MemberList; - allMemberDict = new QDict<MemberDef>; + allMemberNameInfoDict = new MemberNameInfoDict(1009); if (t) title = t; else @@ -67,7 +67,7 @@ GroupDef::~GroupDef() delete pageDict; delete exampleDict; delete allMemberList; - delete allMemberDict; + delete allMemberNameInfoDict; delete memberGroupList; delete memberGroupDict; } @@ -161,60 +161,77 @@ void GroupDef::addMembersToMemberGroup() void GroupDef::insertMember(MemberDef *md) { - QCString funcDecl=md->name()+md->argsString(); - if (allMemberDict->find(funcDecl)==0) - { - allMemberList->append(md); - allMemberDict->insert(funcDecl,md); - switch(md->memberType()) + //printf("GroupDef::insertMember(%s)\n",md->name().data()); + MemberNameInfo *mni=0; + if ((mni=(*allMemberNameInfoDict)[md->name()])) + { // member with this name already found + MemberNameInfoIterator srcMnii(*mni); + MemberInfo *srcMi; + for ( ; (srcMi=srcMnii.current()) ; ++srcMnii ) { - case MemberDef::Variable: - if (Config::sortMembersFlag) - varMembers.inSort(md); - else - varMembers.append(md); - break; - case MemberDef::Function: - if (Config::sortMembersFlag) - funcMembers.inSort(md); - else - funcMembers.append(md); - break; - case MemberDef::Typedef: - if (Config::sortMembersFlag) - typedefMembers.inSort(md); - else - typedefMembers.append(md); - break; - case MemberDef::Enumeration: - if (Config::sortMembersFlag) - enumMembers.inSort(md); - else - enumMembers.append(md); - break; - case MemberDef::EnumValue: - if (Config::sortMembersFlag) - enumValMembers.inSort(md); - else - enumValMembers.append(md); - break; - case MemberDef::Prototype: - if (Config::sortMembersFlag) - protoMembers.inSort(md); - else - protoMembers.append(md); - break; - case MemberDef::Define: - if (Config::sortMembersFlag) - defineMembers.inSort(md); - else - defineMembers.append(md); - break; - default: - err("FileDef::insertMembers(): unexpected member insert in file!\n"); + MemberDef *srcMd = srcMi->memberDef; + if (matchArguments(srcMd->argumentList(),md->argumentList())) + { + return; // member already added + } } - //addMemberToGroup(md,groupId); + mni->append(new MemberInfo(md,Public,Normal)); + } + else + { + mni = new MemberNameInfo(md->name()); + mni->append(new MemberInfo(md,Public,Normal)); + allMemberNameInfoDict->insert(mni->memberName(),mni); + } + allMemberList->append(md); + switch(md->memberType()) + { + case MemberDef::Variable: + if (Config::sortMembersFlag) + varMembers.inSort(md); + else + varMembers.append(md); + break; + case MemberDef::Function: + if (Config::sortMembersFlag) + funcMembers.inSort(md); + else + funcMembers.append(md); + break; + case MemberDef::Typedef: + if (Config::sortMembersFlag) + typedefMembers.inSort(md); + else + typedefMembers.append(md); + break; + case MemberDef::Enumeration: + if (Config::sortMembersFlag) + enumMembers.inSort(md); + else + enumMembers.append(md); + break; + case MemberDef::EnumValue: + if (Config::sortMembersFlag) + enumValMembers.inSort(md); + else + enumValMembers.append(md); + break; + case MemberDef::Prototype: + if (Config::sortMembersFlag) + protoMembers.inSort(md); + else + protoMembers.append(md); + break; + case MemberDef::Define: + if (Config::sortMembersFlag) + defineMembers.inSort(md); + else + defineMembers.append(md); + break; + default: + err("FileDef::insertMembers(): unexpected member insert in file!\n"); } + //addMemberToGroup(md,groupId); } void GroupDef::addGroup(const GroupDef *def) |