summaryrefslogtreecommitdiffstats
path: root/src/vhdldocgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-12-30 13:43:03 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-12-30 13:43:03 (GMT)
commitefa76fb818ff37ed2bde1675a11d36dc852727e5 (patch)
treecaf401f707b19e5a51d670e58ac426f6a0a29c04 /src/vhdldocgen.cpp
parent62f341f2ff134f65aa9ccb10056d40bcefbb167f (diff)
downloadDoxygen-efa76fb818ff37ed2bde1675a11d36dc852727e5.zip
Doxygen-efa76fb818ff37ed2bde1675a11d36dc852727e5.tar.gz
Doxygen-efa76fb818ff37ed2bde1675a11d36dc852727e5.tar.bz2
Refactoring: modernise MemberGroupList
Diffstat (limited to 'src/vhdldocgen.cpp')
-rw-r--r--src/vhdldocgen.cpp58
1 files changed, 23 insertions, 35 deletions
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index dd208aa..f75cf35 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2169,17 +2169,11 @@ static bool membersHaveSpecificType(const MemberList *ml,uint64 type)
return TRUE;
}
}
- if (ml->getMemberGroupList())
+ for (const auto &mg : ml->getMemberGroupList())
{
- MemberGroupListIterator mgli(*ml->getMemberGroupList());
- MemberGroup *mg;
- while ((mg=mgli.current()))
+ if (mg->members())
{
- if (mg->members())
- {
- if (membersHaveSpecificType(mg->members(),type)) return TRUE;
- }
- ++mgli;
+ if (membersHaveSpecificType(mg->members(),type)) return TRUE;
}
}
return FALSE;
@@ -2208,36 +2202,30 @@ void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
VhdlDocGen::writePlainVHDLDeclarations(ml,ol,cd,nd,fd,gd,type);
- if (ml->getMemberGroupList())
+ for (const auto &mg : ml->getMemberGroupList())
{
- MemberGroupListIterator mgli(*ml->getMemberGroupList());
- MemberGroup *mg;
- while ((mg=mgli.current()))
+ if (membersHaveSpecificType(mg->members(),type))
{
- if (membersHaveSpecificType(mg->members(),type))
+ //printf("mg->header=%s\n",mg->header().data());
+ bool hasHeader=mg->header()!="[NOHEADER]";
+ ol.startMemberGroupHeader(hasHeader);
+ if (hasHeader)
{
- //printf("mg->header=%s\n",mg->header().data());
- bool hasHeader=mg->header()!="[NOHEADER]";
- ol.startMemberGroupHeader(hasHeader);
- if (hasHeader)
- {
- ol.parseText(mg->header());
- }
- ol.endMemberGroupHeader();
- if (!mg->documentation().isEmpty())
- {
- //printf("Member group has docs!\n");
- ol.startMemberGroupDocs();
- ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
- ol.endMemberGroupDocs();
- }
- ol.startMemberGroup();
- //printf("--- mg->writePlainDeclarations ---\n");
- VhdlDocGen::writePlainVHDLDeclarations(mg->members(),ol,cd,nd,fd,gd,type);
- ol.endMemberGroup(hasHeader);
+ ol.parseText(mg->header());
+ }
+ ol.endMemberGroupHeader();
+ if (!mg->documentation().isEmpty())
+ {
+ //printf("Member group has docs!\n");
+ ol.startMemberGroupDocs();
+ ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE,
+ 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ ol.endMemberGroupDocs();
}
- ++mgli;
+ ol.startMemberGroup();
+ //printf("--- mg->writePlainDeclarations ---\n");
+ VhdlDocGen::writePlainVHDLDeclarations(mg->members(),ol,cd,nd,fd,gd,type);
+ ol.endMemberGroup(hasHeader);
}
}
}// writeVHDLDeclarations