My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
MemberGroup Class Reference

#include <membergroup.h>

Public Member Functions

 MemberGroup ()
 
 MemberGroup (Definition *parent, int id, const char *header, const char *docs, const char *docFile, int docLine)
 
 ~MemberGroup ()
 
QCString header () const
 
int groupId () const
 
void insertMember (MemberDef *md)
 
void setAnchors ()
 
void writePlainDeclarations (OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
 
void writeDeclarations (OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool showInline=FALSE)
 
void writeDocumentation (OutputList &ol, const char *scopeName, Definition *container, bool showEnumValues, bool showInline)
 
void writeDocumentationPage (OutputList &ol, const char *scopeName, Definition *container)
 
void writeTagFile (FTextStream &)
 
void addGroupedInheritedMembers (OutputList &ol, ClassDef *cd, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
 
const QCString & documentation () const
 
bool allMembersInSameSection () const
 
void addToDeclarationSection ()
 
int countDecMembers (GroupDef *gd=0)
 
int countDocMembers ()
 
int countGroupedInheritedMembers (MemberListType lt)
 
void distributeMemberGroupDocumentation ()
 
void findSectionsInDocumentation ()
 
int varCount () const
 
int funcCount () const
 
int enumCount () const
 
int enumValueCount () const
 
int typedefCount () const
 
int protoCount () const
 
int defineCount () const
 
int friendCount () const
 
int numDecMembers () const
 
int numDocMembers () const
 
int countInheritableMembers (ClassDef *inheritedFrom) const
 
void setInGroup (bool b)
 
void addListReferences (Definition *d)
 
void setRefItems (const QList< ListItemInfo > *sli)
 
MemberListmembers () const
 
Definitionparent () const
 
QCString anchor () const
 
QCString docFile () const
 
int docLine () const
 
void marshal (StorageIntf *s)
 
void unmarshal (StorageIntf *s)
 

Private Attributes

MemberListmemberList
 
MemberListinDeclSection
 
int grpId
 
QCString grpHeader
 
QCString fileName
 
Definitionscope
 
QCString doc
 
bool inSameSection
 
int m_numDecMembers
 
int m_numDocMembers
 
Definitionm_parent
 
QCString m_docFile
 
int m_docLine
 
QList< ListItemInfo > * m_xrefListItems
 

Detailed Description

A class representing a group of members.

Definition at line 40 of file membergroup.h.

Constructor & Destructor Documentation

MemberGroup::MemberGroup ( )

Definition at line 40 of file membergroup.cpp.

{
}
MemberGroup::MemberGroup ( Definition parent,
int  id,
const char *  header,
const char *  docs,
const char *  docFile,
int  docLine 
)

Definition at line 44 of file membergroup.cpp.

References doc, docFile(), docLine(), grpHeader, grpId, inDeclSection, inSameSection, m_docFile, m_docLine, m_numDecMembers, m_numDocMembers, m_parent, m_xrefListItems, memberList, MemberListType_memberGroup, parent(), and scope.

{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
grpId = id;
grpHeader = hdr;
doc = d;
scope = 0;
inSameSection = TRUE;
//printf("Member group docs=`%s'\n",doc.data());
}
MemberGroup::~MemberGroup ( )

Definition at line 64 of file membergroup.cpp.

References memberList.

{
delete memberList;
}

Member Function Documentation

void MemberGroup::addGroupedInheritedMembers ( OutputList ol,
ClassDef cd,
MemberListType  lt,
ClassDef inheritedFrom,
const QCString &  inheritId 
)

Definition at line 140 of file membergroup.cpp.

References MemberList::append(), MemberDef::getSectionList(), MemberList::listType(), m_parent, memberList, and MemberList::writePlainDeclarations().

Referenced by ClassDef::addGroupedInheritedMembers().

{
//printf("** addGroupedInheritedMembers()\n");
MemberDef *md;
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList(m_parent)->listType());
if (ml && lt==ml->listType())
{
MemberList ml(lt);
ml.append(md);
ml.writePlainDeclarations(ol,cd,0,0,0,inheritedFrom,inheritId);
}
}
}
void MemberGroup::addListReferences ( Definition d)
void MemberGroup::addToDeclarationSection ( )

Add this group as a subsection of the declaration section, instead of rendering it in its own section

Definition at line 182 of file membergroup.cpp.

References MemberList::addMemberGroup(), and inDeclSection.

Referenced by NamespaceDef::addMembersToMemberGroup(), FileDef::addMembersToMemberGroup(), and ClassDef::addMembersToMemberGroup().

{
{
//printf("Adding group %p to list %p (type=%d)\n",this,
// inDeclSection,inDeclSection->listType());
}
}
bool MemberGroup::allMembersInSameSection ( ) const
inline
QCString MemberGroup::anchor ( ) const

Definition at line 311 of file membergroup.cpp.

References grpHeader.

Referenced by addListReferences(), MemberGroupInfoContext::Private::groupAnchor(), and writeDeclarations().

{
uchar md5_sig[16];
QCString sigStr(33);
QCString locHeader = grpHeader;
if (locHeader.isEmpty()) locHeader="[NOHEADER]";
MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
return "amgrp"+sigStr;
}
int MemberGroup::countDecMembers ( GroupDef gd = 0)

Definition at line 192 of file membergroup.cpp.

References MemberList::countDecMembers(), m_numDecMembers, memberList, and MemberList::numDecMembers().

Referenced by MemberList::countDecMembers().

{
if (m_numDecMembers==-1) /* number of member not cached */
{
}
}
int MemberGroup::countDocMembers ( )
int MemberGroup::countGroupedInheritedMembers ( MemberListType  lt)

Definition at line 160 of file membergroup.cpp.

References MemberDef::getSectionList(), MemberList::listType(), m_parent, and memberList.

Referenced by ClassDef::countMemberDeclarations(), and ClassDef::countMembersIncludingGrouped().

{
//printf("** countGroupedInheritedMembers()\n");
int count=0;
MemberDef *md;
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList(m_parent)->listType());
if (ml && lt==ml->listType())
{
count++;
}
}
return count;
}
int MemberGroup::countInheritableMembers ( ClassDef inheritedFrom) const

Definition at line 212 of file membergroup.cpp.

References MemberList::countInheritableMembers(), and memberList.

Referenced by MemberList::countInheritableMembers().

{
return memberList->countInheritableMembers(inheritedFrom);
}
int MemberGroup::defineCount ( ) const

Definition at line 286 of file membergroup.cpp.

References MemberList::defineCount(), and memberList.

Referenced by MemberList::countDecMembers().

{
return memberList->defineCount();
}
void MemberGroup::distributeMemberGroupDocumentation ( )

Definition at line 218 of file membergroup.cpp.

References MemberDef::briefDescription(), Definition::briefFile(), Definition::briefLine(), Definition::docFile(), Definition::docLine(), MemberDef::documentation(), Definition::inbodyDocumentation(), Definition::inbodyFile(), Definition::inbodyLine(), memberList, MemberDef::setBriefDescription(), MemberDef::setDocumentation(), and MemberDef::setInbodyDocumentation().

Referenced by GroupDef::distributeMemberGroupDocumentation(), NamespaceDef::distributeMemberGroupDocumentation(), FileDef::distributeMemberGroupDocumentation(), and ClassDef::distributeMemberGroupDocumentation().

{
//printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data());
MemberDef *md;
for (li.toFirst();(md=li.current());++li)
{
//printf("checking md=%s\n",md->name().data());
// find the first member of the group with documentation
if (!md->documentation().isEmpty() ||
!md->briefDescription().isEmpty() ||
!md->inbodyDocumentation().isEmpty()
)
{
//printf("found it!\n");
break;
}
}
if (md) // distribute docs of md to other members of the list
{
//printf("Member %s has documentation!\n",md->name().data());
MemberDef *omd;
for (li.toFirst();(omd=li.current());++li)
{
if (md!=omd && omd->documentation().isEmpty() &&
omd->briefDescription().isEmpty() &&
omd->inbodyDocumentation().isEmpty()
)
{
//printf("Copying documentation to member %s\n",omd->name().data());
omd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
}
}
}
}
QCString MemberGroup::docFile ( ) const
inline

Definition at line 92 of file membergroup.h.

References m_docFile.

Referenced by MemberGroup(), and MemberList::writeDeclarations().

{ return m_docFile; }
int MemberGroup::docLine ( ) const
inline

Definition at line 93 of file membergroup.h.

References m_docLine.

Referenced by MemberGroup(), and MemberList::writeDeclarations().

{ return m_docLine; }
const QCString& MemberGroup::documentation ( ) const
inline

Definition at line 66 of file membergroup.h.

References doc.

Referenced by MemberGroupInfoContext::Private::docs(), and MemberList::writeDeclarations().

{ return doc; }
int MemberGroup::enumCount ( ) const

Definition at line 266 of file membergroup.cpp.

References MemberList::enumCount(), and memberList.

Referenced by MemberList::countDecMembers().

{
return memberList->enumCount();
}
int MemberGroup::enumValueCount ( ) const

Definition at line 271 of file membergroup.cpp.

References MemberList::enumValueCount(), and memberList.

Referenced by MemberList::countDecMembers().

{
}
void MemberGroup::findSectionsInDocumentation ( )
int MemberGroup::friendCount ( ) const

Definition at line 291 of file membergroup.cpp.

References MemberList::friendCount(), and memberList.

Referenced by MemberList::countDecMembers().

{
return memberList->friendCount();
}
int MemberGroup::funcCount ( ) const

Definition at line 261 of file membergroup.cpp.

References MemberList::funcCount(), and memberList.

Referenced by MemberList::countDecMembers().

{
return memberList->funcCount();
}
int MemberGroup::groupId ( ) const
inline

Definition at line 48 of file membergroup.h.

References grpId.

Referenced by MemberGroupSDict::compareValues().

{ return grpId; }
QCString MemberGroup::header ( ) const
inline
void MemberGroup::insertMember ( MemberDef md)

Definition at line 69 of file membergroup.cpp.

References MemberList::append(), MemberList::getFirst(), MemberDef::getGroupDef(), MemberDef::getGroupFileName(), MemberDef::getGroupHasDocs(), MemberDef::getGroupPri(), MemberDef::getGroupStartLine(), MemberDef::getSectionList(), inDeclSection, inSameSection, GroupDef::insertMember(), m_parent, memberList, and MemberDef::setGroupDef().

Referenced by addMembersToMemberGroup().

{
//printf("MemberGroup::insertMember m_parent=%s memberList=%p count=%d"
// " member section list: %p: md=%p:%s\n",
// m_parent ? m_parent->name().data() : "<null>",
// memberList->first() ? memberList->first()->getSectionList(m_parent) : 0,
// memberList->count(),
// md->getSectionList(m_parent),
// md,md->name().data());
MemberDef *firstMd = memberList->getFirst();
if (inSameSection && firstMd &&
{
}
else if (inDeclSection==0)
{
//printf("inDeclSection=%p type=%d\n",inDeclSection,inDeclSection->listType());
}
// copy the group of the first member in the memberGroup
GroupDef *gd;
if (firstMd && (gd=firstMd->getGroupDef()))
{
md->setGroupDef(gd, firstMd->getGroupPri(),
firstMd->getGroupFileName(), firstMd->getGroupStartLine(),
firstMd->getGroupHasDocs());
gd->insertMember(md);
}
}
void MemberGroup::marshal ( StorageIntf s)
MemberList* MemberGroup::members ( ) const
inline

Definition at line 88 of file membergroup.h.

References memberList.

Referenced by MemberGroupInfoContext::Private::members(), and writeBoxMemberList().

{ return memberList; }
int MemberGroup::numDecMembers ( ) const

Definition at line 296 of file membergroup.cpp.

References memberList, and MemberList::numDecMembers().

Referenced by MemberList::countDecMembers().

{
}
int MemberGroup::numDocMembers ( ) const

Definition at line 301 of file membergroup.cpp.

References memberList, and MemberList::numDocMembers().

Referenced by MemberList::countDocMembers().

{
}
Definition* MemberGroup::parent ( ) const
inline

Definition at line 89 of file membergroup.h.

References m_parent.

Referenced by MemberGroup().

{ return m_parent; }
int MemberGroup::protoCount ( ) const

Definition at line 281 of file membergroup.cpp.

References memberList, and MemberList::protoCount().

Referenced by MemberList::countDecMembers().

{
return memberList->protoCount();
}
void MemberGroup::setAnchors ( )

Definition at line 104 of file membergroup.cpp.

References memberList.

Referenced by ClassDef::computeAnchors().

void MemberGroup::setInGroup ( bool  b)
void MemberGroup::setRefItems ( const QList< ListItemInfo > *  sli)

Definition at line 376 of file membergroup.cpp.

References m_xrefListItems.

Referenced by addMembersToMemberGroup().

{
if (sli)
{
// deep copy the list
if (m_xrefListItems==0)
{
m_xrefListItems=new QList<ListItemInfo>;
m_xrefListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*sli);
for (slii.toFirst();(lii=slii.current());++slii)
{
m_xrefListItems->append(new ListItemInfo(*lii));
}
}
}
int MemberGroup::typedefCount ( ) const

Definition at line 276 of file membergroup.cpp.

References memberList, and MemberList::typedefCount().

Referenced by MemberList::countDecMembers().

{
}
void MemberGroup::unmarshal ( StorageIntf s)
int MemberGroup::varCount ( ) const

Definition at line 256 of file membergroup.cpp.

References memberList, and MemberList::varCount().

Referenced by MemberList::countDecMembers().

{
return memberList->varCount();
}
void MemberGroup::writeDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
bool  showInline = FALSE 
)

Definition at line 109 of file membergroup.cpp.

References anchor(), doc, grpHeader, memberList, and MemberList::writeDeclarations().

Referenced by NamespaceDef::writeMemberGroups(), GroupDef::writeMemberGroups(), FileDef::writeMemberGroups(), and ClassDef::writeMemberGroups().

{
//printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
}
void MemberGroup::writeDocumentation ( OutputList ol,
const char *  scopeName,
Definition container,
bool  showEnumValues,
bool  showInline 
)

Definition at line 128 of file membergroup.cpp.

References memberList, and MemberList::writeDocumentation().

Referenced by MemberList::writeDocumentation().

{
memberList->writeDocumentation(ol,scopeName,container,0,showEnumValues,showInline);
}
void MemberGroup::writeDocumentationPage ( OutputList ol,
const char *  scopeName,
Definition container 
)

Definition at line 134 of file membergroup.cpp.

References memberList, and MemberList::writeDocumentationPage().

Referenced by MemberList::writeDocumentationPage().

{
memberList->writeDocumentationPage(ol,scopeName,container);
}
void MemberGroup::writePlainDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
ClassDef inheritedFrom,
const char *  inheritId 
)

Definition at line 119 of file membergroup.cpp.

References memberList, and MemberList::writePlainDeclarations().

Referenced by ClassDef::writeDeclaration(), and MemberList::writeDeclarations().

{
//printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count());
memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
void MemberGroup::writeTagFile ( FTextStream tagFile)

Member Data Documentation

QCString MemberGroup::doc
private
QCString MemberGroup::fileName
private
QCString MemberGroup::grpHeader
private
int MemberGroup::grpId
private

Definition at line 101 of file membergroup.h.

Referenced by groupId(), marshal(), MemberGroup(), and unmarshal().

MemberList* MemberGroup::inDeclSection
private

Definition at line 100 of file membergroup.h.

Referenced by addToDeclarationSection(), insertMember(), marshal(), MemberGroup(), and unmarshal().

bool MemberGroup::inSameSection
private

Definition at line 106 of file membergroup.h.

Referenced by allMembersInSameSection(), insertMember(), marshal(), MemberGroup(), and unmarshal().

QCString MemberGroup::m_docFile
private

Definition at line 110 of file membergroup.h.

Referenced by docFile(), findSectionsInDocumentation(), marshal(), MemberGroup(), and unmarshal().

int MemberGroup::m_docLine
private

Definition at line 111 of file membergroup.h.

Referenced by docLine(), and MemberGroup().

int MemberGroup::m_numDecMembers
private

Definition at line 107 of file membergroup.h.

Referenced by countDecMembers(), marshal(), MemberGroup(), and unmarshal().

int MemberGroup::m_numDocMembers
private

Definition at line 108 of file membergroup.h.

Referenced by countDocMembers(), marshal(), MemberGroup(), and unmarshal().

Definition* MemberGroup::m_parent
private
QList<ListItemInfo>* MemberGroup::m_xrefListItems
private

Definition at line 112 of file membergroup.h.

Referenced by addListReferences(), marshal(), MemberGroup(), setRefItems(), and unmarshal().

MemberList* MemberGroup::memberList
private
Definition* MemberGroup::scope
private

Definition at line 104 of file membergroup.h.

Referenced by marshal(), MemberGroup(), and unmarshal().


The documentation for this class was generated from the following files: