summaryrefslogtreecommitdiff
path: root/src/membergroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/membergroup.cpp')
-rw-r--r--src/membergroup.cpp37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 523b577..e229835 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -29,33 +29,14 @@
#include "entry.h"
#include "md5.h"
-//static QCString idToName(int id)
-//{
-// QCString result;
-// result.sprintf("mgroup_%d",id);
-// return result;
-//}
-
-MemberGroup::MemberGroup()
-{
-}
-
-MemberGroup::MemberGroup(int id,const char *hdr,const char *d,const char *docFile,int docLine)
+MemberGroup::MemberGroup(const Definition *container,int id,const char *hdr,const char *d,const char *docFile,int docLine)
+ : m_container(container), grpId(id), grpHeader(hdr), doc(d), m_docFile(docFile), m_docLine(docLine)
{
static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList = new MemberList(MemberListType_memberGroup);
memberList->setNeedsSorting(sortBriefDocs); // detailed sections are already sorted elsewhere.
- grpId = id;
- grpHeader = hdr;
- doc = d;
- inSameSection = TRUE;
- inDeclSection = 0;
- m_numDecMembers = -1;
- m_numDocMembers = -1;
- m_docFile = docFile;
- m_docLine = docLine;
//printf("Member group docs='%s'\n",doc.data());
}
@@ -74,13 +55,14 @@ void MemberGroup::insertMember(MemberDef *md)
// md,md->name().data());
MemberDef *firstMd = memberList->getFirst();
- if (inSameSection && firstMd && firstMd->getSectionList()!=md->getSectionList())
+ if (inSameSection && firstMd &&
+ firstMd->getSectionList(m_container)!=md->getSectionList(m_container))
{
inSameSection=FALSE;
}
else if (inDeclSection==0)
{
- inDeclSection = const_cast<MemberList*>(md->getSectionList());
+ inDeclSection = const_cast<MemberList*>(md->getSectionList(m_container));
//printf("inDeclSection=%p type=%d\n",inDeclSection,inDeclSection->listType());
}
memberList->append(md);
@@ -125,6 +107,7 @@ void MemberGroup::writePlainDeclarations(OutputList &ol,
void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
const Definition *container,bool showEnumValues,bool showInline) const
{
+ //printf("MemberGroup::writeDocumentation() %s\n",grpHeader.data());
memberList->writeDocumentation(ol,scopeName,container,0,showEnumValues,showInline);
}
@@ -149,7 +132,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList()->listType());
- const MemberList *ml = md->getSectionList();
+ const MemberList *ml = md->getSectionList(m_container);
if (ml && lt==ml->listType())
{
MemberList mml(lt);
@@ -169,7 +152,7 @@ int MemberGroup::countGroupedInheritedMembers(MemberListType lt)
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList()->listType());
- const MemberList *ml = md->getSectionList();
+ const MemberList *ml = md->getSectionList(m_container);
if (ml && lt==ml->listType())
{
count++;
@@ -202,6 +185,10 @@ void MemberGroup::countDocMembers()
memberList->countDocMembers();
}
+const Definition *MemberGroup::container() const
+{
+ return m_container;
+}
int MemberGroup::countInheritableMembers(const ClassDef *inheritedFrom) const
{