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

#include <memberlist.h>

Inheritance diagram for MemberList:

Public Member Functions

 MemberList ()
 
 MemberList (MemberListType lt)
 
 ~MemberList ()
 
MemberListType listType () const
 
void inSort (const MemberDef *md)
 
void append (const MemberDef *md)
 
void remove (const MemberDef *md)
 
void sort ()
 
uint count () const
 
int findRef (const MemberDef *md) const
 
MemberDefgetFirst () const
 
MemberDeftake (uint index)
 
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
 
bool needsSorting () const
 
void countDecMembers (bool countEnumValues=FALSE, GroupDef *gd=0)
 
void countDocMembers (bool countEnumValues=FALSE)
 
int countInheritableMembers (ClassDef *inheritedFrom) const
 
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, const char *title, const char *subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, ClassDef *inheritedFrom=0, MemberListType lt=MemberListType_pubMethods)
 
void writeDocumentation (OutputList &ol, const char *scopeName, Definition *container, const char *title, bool showEnumValues=FALSE, bool showInline=FALSE)
 
void writeSimpleDocumentation (OutputList &ol, Definition *container)
 
void writeDocumentationPage (OutputList &ol, const char *scopeName, Definition *container)
 
void writeTagFile (FTextStream &)
 
bool declVisible () const
 
void addMemberGroup (MemberGroup *mg)
 
void setInGroup (bool inGroup)
 
void setInFile (bool inFile)
 
void addListReferences (Definition *def)
 
void findSectionsInDocumentation ()
 
void setNeedsSorting (bool b)
 
MemberGroupListgetMemberGroupList () const
 
void marshal (StorageIntf *s)
 
void unmarshal (StorageIntf *s)
 

Static Public Member Functions

static QCString listTypeAsString (MemberListType type)
 

Private Member Functions

int compareValues (const MemberDef *item1, const MemberDef *item2) const
 
int countEnumValues (MemberDef *md, bool setAnonEnumType) const
 

Private Attributes

int m_varCnt
 
int m_funcCnt
 
int m_enumCnt
 
int m_enumValCnt
 
int m_typeCnt
 
int m_protoCnt
 
int m_defCnt
 
int m_friendCnt
 
int m_numDecMembers
 
int m_numDocMembers
 
MemberGroupListmemberGroupList
 
bool m_inGroup
 
bool m_inFile
 
MemberListType m_listType
 
bool m_needsSorting
 
QDict< int > m_overloadCount
 

Friends

class MemberListIterator
 

Detailed Description

A list of MemberDef objects.

Definition at line 32 of file memberlist.h.

Constructor & Destructor Documentation

MemberList::MemberList ( )

Definition at line 36 of file memberlist.cpp.

References m_defCnt, m_enumCnt, m_enumValCnt, m_friendCnt, m_funcCnt, m_inFile, m_inGroup, m_needsSorting, m_numDecMembers, m_numDocMembers, m_protoCnt, m_typeCnt, m_varCnt, and memberGroupList.

{
m_numDecMembers=-1; // special value indicating that value needs to be computed
m_numDocMembers=-1; // special value indicating that value needs to be computed
m_inGroup=FALSE;
m_inFile=FALSE;
}
MemberList::MemberList ( MemberListType  lt)

Definition at line 54 of file memberlist.cpp.

References m_defCnt, m_enumCnt, m_enumValCnt, m_friendCnt, m_funcCnt, m_inFile, m_inGroup, m_needsSorting, m_numDecMembers, m_numDocMembers, m_protoCnt, m_typeCnt, m_varCnt, and memberGroupList.

: m_listType(lt)
{
m_numDecMembers=-1; // special value indicating that value needs to be computed
m_numDocMembers=-1; // special value indicating that value needs to be computed
m_inGroup=FALSE;
m_inFile=FALSE;
}
MemberList::~MemberList ( )

Definition at line 72 of file memberlist.cpp.

References memberGroupList.

{
}

Member Function Documentation

void MemberList::addListReferences ( Definition def)

Definition at line 863 of file memberlist.cpp.

References MemberDef::addListReference(), MemberGroup::addListReferences(), DefinitionIntf::definitionType(), MemberDef::enumFieldList(), MemberDef::getGroupDef(), memberGroupList, MemberDef::memberType(), MemberType_Enumeration, and DefinitionIntf::TypeGroup.

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

{
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
{
md->addListReference(def);
MemberList *enumFields = md->enumFieldList();
if (md->memberType()==MemberType_Enumeration && enumFields)
{
//printf(" Adding enum values!\n");
MemberListIterator vmli(*enumFields);
MemberDef *vmd;
for ( ; (vmd=vmli.current()) ; ++vmli)
{
//printf(" adding %s\n",vmd->name().data());
vmd->addListReference(def);
}
}
}
}
{
for (;(mg=mgli.current());++mgli)
{
}
}
}
void MemberList::addMemberGroup ( MemberGroup mg)

Definition at line 853 of file memberlist.cpp.

References memberGroupList.

Referenced by MemberGroup::addToDeclarationSection().

{
{
}
//printf("addMemberGroup: this=%p mg=%p\n",this,mg);
memberGroupList->append(mg);
}
void MemberList::append ( const MemberDef md)
int MemberList::compareValues ( const MemberDef item1,
const MemberDef item2 
) const
private

Definition at line 77 of file memberlist.cpp.

References Config_getBool, Definition::getDefLine(), MemberDef::isConstructor(), MemberDef::isDestructor(), and Definition::name().

{
static bool sortConstructorsFirst = Config_getBool(SORT_MEMBERS_CTORS_1ST);
if (sortConstructorsFirst) {
int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0);
int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0);
if (ord1 > ord2)
return -1;
else if (ord2 > ord1)
return 1;
}
int cmp = qstricmp(c1->name(),c2->name());
return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine();
}
uint MemberList::count ( ) const
void MemberList::countDecMembers ( bool  countEnumValues = FALSE,
GroupDef gd = 0 
)

Count the number of members in this list that are visible in the declaration part of a compound's documentation page.

Definition at line 136 of file memberlist.cpp.

References MemberDef::argsString(), Config_getBool, MemberGroup::countDecMembers(), MemberGroup::defineCount(), MemberGroup::enumCount(), MemberGroup::enumValueCount(), err(), MemberGroup::friendCount(), MemberGroup::funcCount(), MemberDef::getClassDef(), MemberDef::hasDocumentation(), MemberDef::initializer(), MemberDef::isBriefSectionVisible(), MemberDef::isRelated(), m_defCnt, m_enumCnt, m_enumValCnt, m_friendCnt, m_funcCnt, m_numDecMembers, m_protoCnt, m_typeCnt, m_varCnt, memberGroupList, MemberDef::memberType(), MemberType_DCOP, MemberType_Define, MemberType_Enumeration, MemberType_EnumValue, MemberType_Event, MemberType_Friend, MemberType_Function, MemberType_Interface, MemberType_Property, MemberType_Service, MemberType_Signal, MemberType_Slot, MemberType_Typedef, MemberType_Variable, Definition::name(), MemberGroup::numDecMembers(), MemberGroup::protoCount(), MemberGroup::typedefCount(), and MemberGroup::varCount().

Referenced by MemberGroup::countDecMembers(), ClassDef::countMemberDeclarations(), writeDeclarations(), and writePlainDeclarations().

{
if (m_numDecMembers!=-1) return;
//printf("----- countDecMembers count=%d ----\n",count());
QListIterator<MemberDef> mli(*this);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
//printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
{
switch(md->memberType())
{
case MemberType_Variable: // fall through
case MemberType_Event: // fall through
break;
// apparently necessary to get this to show up in declarations section?
case MemberType_Interface: // fall through
case MemberType_Service: // fall through
case MemberType_Function: // fall through
case MemberType_Signal: // fall through
case MemberType_DCOP: // fall through
case MemberType_Slot: if (!md->isRelated() || md->getClassDef())
m_funcCnt++,m_numDecMembers++;
break;
case MemberType_Enumeration: m_enumCnt++,m_numDecMembers++; break;
m_enumValCnt++,m_numDecMembers++;
break;
case MemberType_Typedef: m_typeCnt++,m_numDecMembers++; break;
//case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break;
case MemberType_Define: if (Config_getBool(EXTRACT_ALL) ||
md->argsString() ||
!md->initializer().isEmpty() ||
) m_defCnt++,m_numDecMembers++;
break;
case MemberType_Friend: m_friendCnt++,m_numDecMembers++;
break;
default:
err("Unknown member type found for member `%s'\n!",md->name().data());
}
}
}
{
for (;(mg=mgli.current());++mgli)
{
mg->countDecMembers(gd);
m_numDecMembers+=mg->numDecMembers();
}
}
//printf("----- end countDecMembers ----\n");
//printf("MemberList::countDecMembers()=%d\n",m_numDecMembers);
}
void MemberList::countDocMembers ( bool  countEnumValues = FALSE)

Definition at line 208 of file memberlist.cpp.

References MemberGroup::countDocMembers(), MemberDef::isDetailedSectionVisible(), m_inFile, m_inGroup, m_numDocMembers, memberGroupList, MemberDef::memberType(), MemberType_EnumValue, and MemberGroup::numDocMembers().

Referenced by MemberGroup::countDocMembers(), NamespaceDef::countMembers(), writeDocumentation(), ClassDef::writeMemberPages(), and writeSimpleDocumentation().

{
if (m_numDocMembers!=-1) return; // used cached value
QListIterator<MemberDef> mli(*this);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
{
// do not count enum values, since they do not produce entries of their own
}
}
{
for (;(mg=mgli.current());++mgli)
{
}
}
//printf("MemberList::countDocMembers()=%d memberGroupList=%p\n",m_numDocMembers,memberGroupList);
}
int MemberList::countEnumValues ( MemberDef md,
bool  setAnonEnumType 
) const
private

Definition at line 281 of file memberlist.cpp.

References Definition::name(), MemberDef::setAnonymousEnumType(), and MemberDef::typeString().

Referenced by declVisible(), and writePlainDeclarations().

{
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
QCString name(md->name());
int i=name.findRev("::");
if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
if (name[0]=='@') // anonymous enum => append variables
{
for ( ; (vmd=vmli.current()) ; ++vmli)
{
QCString vtype=vmd->typeString();
if ((vtype.find(name))!=-1)
{
enumVars++;
if (setAnonEnumType)
{
}
}
}
}
return enumVars;
}
int MemberList::countInheritableMembers ( ClassDef inheritedFrom) const

Definition at line 92 of file memberlist.cpp.

References count(), MemberGroup::countInheritableMembers(), MemberDef::isBriefSectionVisible(), MemberDef::isReimplementedBy(), memberGroupList, MemberDef::memberType(), MemberType_EnumValue, MemberType_Friend, and MemberType_Function.

Referenced by MemberGroup::countInheritableMembers(), and ClassDef::countMembersIncludingGrouped().

{
int count=0;
QListIterator<MemberDef> mli(*this);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
{
{
//printf("member %s: isReimplementedBy(%s)=%d\n",md->name().data(),
// inheritedFrom->name().data(),
// md->isReimplementedBy(inheritedFrom));
{
if (!md->isReimplementedBy(inheritedFrom)) count++;
}
else
{
count++;
}
}
}
}
{
for (;(mg=mgli.current());++mgli)
{
count+=mg->countInheritableMembers(inheritedFrom);
}
}
//printf("%s::countInheritableMembers(%s)=%d\n",
// listTypeAsString().data(),
// inheritedFrom->name().data(),count);
return count;
}
bool MemberList::declVisible ( ) const

Definition at line 307 of file memberlist.cpp.

References countEnumValues(), MemberDef::isBriefSectionVisible(), m_inGroup, MemberDef::memberType(), MemberType_DCOP, MemberType_Define, MemberType_Enumeration, MemberType_EnumValue, MemberType_Event, MemberType_Friend, MemberType_Function, MemberType_Interface, MemberType_Property, MemberType_Service, MemberType_Signal, MemberType_Slot, MemberType_Typedef, and MemberType_Variable.

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

{
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()); ++mli )
{
{
switch (md->memberType())
{
case MemberType_Define: // fall through
case MemberType_Typedef: // fall through
case MemberType_Variable: // fall through
case MemberType_Function: // fall through
case MemberType_Signal: // fall through
case MemberType_Slot: // fall through
case MemberType_DCOP: // fall through
case MemberType_Property: // fall through
case MemberType_Interface: // fall through
case MemberType_Service: // fall through
return TRUE;
{
// if this is an anonymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (countEnumValues(md,FALSE)==0) // show enum here
{
return TRUE;
}
}
break;
return TRUE;
{
if (m_inGroup)
{
return TRUE;
}
}
break;
}
}
}
return FALSE;
}
int MemberList::defineCount ( ) const
inline

Definition at line 59 of file memberlist.h.

References m_defCnt, and m_numDecMembers.

Referenced by MemberGroup::defineCount().

{ ASSERT(m_numDecMembers!=-1); return m_defCnt; }
int MemberList::enumCount ( ) const
inline

Definition at line 55 of file memberlist.h.

References m_enumCnt, and m_numDecMembers.

Referenced by MemberGroup::enumCount().

{ ASSERT(m_numDecMembers!=-1); return m_enumCnt; }
int MemberList::enumValueCount ( ) const
inline

Definition at line 56 of file memberlist.h.

References m_enumValCnt, and m_numDecMembers.

Referenced by MemberGroup::enumValueCount().

{ ASSERT(m_numDecMembers!=-1); return m_enumValCnt; }
int MemberList::findRef ( const MemberDef md) const

Definition at line 261 of file memberlist.cpp.

Referenced by FileDef::insertMember(), and MemberDef::insertReimplementedBy().

{
return QList<MemberDef>::findRef(md);
}
void MemberList::findSectionsInDocumentation ( )
int MemberList::friendCount ( ) const
inline

Definition at line 60 of file memberlist.h.

References m_friendCnt, and m_numDecMembers.

Referenced by MemberGroup::friendCount().

{ ASSERT(m_numDecMembers!=-1); return m_friendCnt; }
int MemberList::funcCount ( ) const
inline

Definition at line 54 of file memberlist.h.

References m_funcCnt, and m_numDecMembers.

Referenced by MemberGroup::funcCount().

{ ASSERT(m_numDecMembers!=-1); return m_funcCnt; }
MemberDef * MemberList::getFirst ( ) const

Definition at line 266 of file memberlist.cpp.

Referenced by MemberGroup::insertMember().

{
return QList<MemberDef>::getFirst();
}
MemberGroupList* MemberList::getMemberGroupList ( ) const
inline
void MemberList::inSort ( const MemberDef md)

Definition at line 236 of file memberlist.cpp.

Referenced by NamespaceDef::addMemberToList(), FileDef::addMemberToList(), and MemberDef::insertReimplementedBy().

{
QList<MemberDef>::inSort(md);
}
MemberListType MemberList::listType ( ) const
inline
QCString MemberList::listTypeAsString ( MemberListType  type)
static

Definition at line 986 of file memberlist.cpp.

References MemberListType_dcopMethods, MemberListType_decDefineMembers, MemberListType_decEnumMembers, MemberListType_decEnumValMembers, MemberListType_decEventMembers, MemberListType_decFriendMembers, MemberListType_decFuncMembers, MemberListType_decPriSlotMembers, MemberListType_decPropMembers, MemberListType_decProSlotMembers, MemberListType_decProtoMembers, MemberListType_decPubSlotMembers, MemberListType_decSignalMembers, MemberListType_decTypedefMembers, MemberListType_decVarMembers, MemberListType_enumFields, MemberListType_events, MemberListType_friends, MemberListType_interfaces, MemberListType_memberGroup, MemberListType_pacAttribs, MemberListType_pacMethods, MemberListType_pacStaticAttribs, MemberListType_pacStaticMethods, MemberListType_pacTypes, MemberListType_priAttribs, MemberListType_priMethods, MemberListType_priSlots, MemberListType_priStaticAttribs, MemberListType_priStaticMethods, MemberListType_priTypes, MemberListType_proAttribs, MemberListType_proMethods, MemberListType_properties, MemberListType_proSlots, MemberListType_proStaticAttribs, MemberListType_proStaticMethods, MemberListType_proTypes, MemberListType_pubAttribs, MemberListType_pubMethods, MemberListType_pubSlots, MemberListType_pubStaticAttribs, MemberListType_pubStaticMethods, MemberListType_pubTypes, MemberListType_related, MemberListType_services, and MemberListType_signals.

Referenced by MemberListInfoContext::Private::anchor(), InheritedMemberInfoContext::Private::id(), writeDeclarations(), NamespaceDef::writeSummaryLinks(), GroupDef::writeSummaryLinks(), FileDef::writeSummaryLinks(), and ClassDef::writeSummaryLinks().

{
switch(type)
{
case MemberListType_pubMethods: return "pub-methods";
case MemberListType_proMethods: return "pro-methods";
case MemberListType_pacMethods: return "pac-methods";
case MemberListType_priMethods: return "pri-methods";
case MemberListType_pubStaticMethods: return "pub-static-methods";
case MemberListType_proStaticMethods: return "pro-static-methods";
case MemberListType_pacStaticMethods: return "pac-static-methods";
case MemberListType_priStaticMethods: return "pri-static-methods";
case MemberListType_pubSlots: return "pub-slots";
case MemberListType_proSlots: return "pro-slots";
case MemberListType_priSlots: return "pri-slots";
case MemberListType_pubAttribs: return "pub-attribs";
case MemberListType_proAttribs: return "pro-attribs";
case MemberListType_pacAttribs: return "pac-attribs";
case MemberListType_priAttribs: return "pri-attribs";
case MemberListType_pubStaticAttribs: return "pub-static-attribs";
case MemberListType_proStaticAttribs: return "pro-static-attribs";
case MemberListType_pacStaticAttribs: return "pac-static-attribs";
case MemberListType_priStaticAttribs: return "pri-static-attribs";
case MemberListType_pubTypes: return "pub-types";
case MemberListType_proTypes: return "pro-types";
case MemberListType_pacTypes: return "pac-types";
case MemberListType_priTypes: return "pri-types";
case MemberListType_related: return "related";
case MemberListType_signals: return "signals";
case MemberListType_friends: return "friends";
case MemberListType_dcopMethods: return "dcop-methods";
case MemberListType_properties: return "properties";
case MemberListType_events: return "events";
case MemberListType_interfaces: return "interfaces";
case MemberListType_services: return "services";
case MemberListType_decDefineMembers: return "define-members";
case MemberListType_decProtoMembers: return "proto-members";
case MemberListType_decTypedefMembers: return "typedef-members";
case MemberListType_decEnumMembers: return "enum-members";
case MemberListType_decFuncMembers: return "func-members";
case MemberListType_decVarMembers: return "var-members";
case MemberListType_decEnumValMembers: return "enumval-members";
case MemberListType_decPubSlotMembers: return "pub-slot-members";
case MemberListType_decProSlotMembers: return "pro-slot-members";
case MemberListType_decPriSlotMembers: return "pri-slot-members";
case MemberListType_decSignalMembers: return "signal-members";
case MemberListType_decEventMembers: return "event-members";
case MemberListType_decFriendMembers: return "friend-members";
case MemberListType_decPropMembers: return "prop-members";
case MemberListType_enumFields: return "enum-fields";
case MemberListType_memberGroup: return "member-group";
default: break;
}
return "";
}
void MemberList::marshal ( StorageIntf s)
bool MemberList::needsSorting ( ) const
inline
int MemberList::numDecMembers ( ) const
inline
int MemberList::numDocMembers ( ) const
inline
int MemberList::protoCount ( ) const
inline

Definition at line 58 of file memberlist.h.

References m_numDecMembers, and m_protoCnt.

Referenced by MemberGroup::protoCount().

{ ASSERT(m_numDecMembers!=-1); return m_protoCnt; }
void MemberList::remove ( const MemberDef md)

Definition at line 246 of file memberlist.cpp.

Referenced by ClassDef::reclassifyMember(), GroupDef::removeMemberFromList(), and ClassDef::removeMemberFromLists().

{
QList<MemberDef>::remove(md);
}
void MemberList::setInFile ( bool  inFile)
inline

Definition at line 84 of file memberlist.h.

References m_inFile.

Referenced by FileDef::addMemberToList().

{ m_inFile=inFile; }
void MemberList::setInGroup ( bool  inGroup)
inline
void MemberList::setNeedsSorting ( bool  b)
void MemberList::sort ( )
MemberDef * MemberList::take ( uint  index)

Definition at line 271 of file memberlist.cpp.

Referenced by addMembersToMemberGroup().

{
return QList<MemberDef>::take(index);
}
int MemberList::typedefCount ( ) const
inline

Definition at line 57 of file memberlist.h.

References m_numDecMembers, and m_typeCnt.

Referenced by MemberGroup::typedefCount().

{ ASSERT(m_numDecMembers!=-1); return m_typeCnt; }
void MemberList::unmarshal ( StorageIntf s)
int MemberList::varCount ( ) const
inline

Definition at line 53 of file memberlist.h.

References m_numDecMembers, and m_varCnt.

Referenced by MemberGroup::varCount().

{ ASSERT(m_numDecMembers!=-1); return m_varCnt; }
void MemberList::writeDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
const char *  title,
const char *  subtitle,
bool  showEnumValues = FALSE,
bool  showInline = FALSE,
ClassDef inheritedFrom = 0,
MemberListType  lt = MemberListType_pubMethods 
)

Writes the list of members to the output.

Parameters
olOutput list to write to
cdnon-null if this list is part of class documentation.
ndnon-null if this list is part of namespace documentation.
fdnon-null if this list is part of file documentation.
gdnon-null if this list is part of group documentation.
titleTitle to use for the member list.
subtitleSub title to use for the member list.
showEnumValuesObsolete, always set to FALSE.
showInlineif set to TRUE if title is rendered differently
inheritedFromif not 0, the list is shown inside the given class as inherited members, parameter cd points to the class containing the members.
ltType of list that is inherited from.

Definition at line 535 of file memberlist.cpp.

References ClassDef::addGroupedInheritedMembers(), ClassDef::anchor(), Config_getBool, countDecMembers(), ClassDef::countMembersIncludingGrouped(), OutputList::disableAllBut(), ClassDef::displayName(), MemberGroup::docFile(), MemberGroup::docLine(), MemberGroup::documentation(), OutputList::endInlineHeader(), OutputList::endMemberGroup(), OutputList::endMemberGroupDocs(), OutputList::endMemberGroupHeader(), OutputList::endMemberHeader(), OutputList::endMemberSubtitle(), OutputList::generateDoc(), ClassDef::getOutputFileBase(), ClassDef::getReference(), MemberGroup::header(), OutputGenerator::Html, listTypeAsString(), m_listType, memberGroupList, numDecMembers(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startInlineHeader(), OutputList::startMemberGroup(), OutputList::startMemberGroupDocs(), OutputList::startMemberGroupHeader(), OutputList::startMemberHeader(), OutputList::startMemberSubtitle(), stripPath(), substitute(), OutputList::writeInheritedSectionTitle(), MemberGroup::writePlainDeclarations(), writePlainDeclarations(), and VhdlDocGen::writeVhdlDeclarations().

Referenced by MemberGroup::writeDeclarations(), NamespaceDef::writeMemberDeclarations(), GroupDef::writeMemberDeclarations(), FileDef::writeMemberDeclarations(), and ClassDef::writeMemberDeclarations().

{
(void)showEnumValues; // unused
//printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
static bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString inheritId;
countDecMembers(/*showEnumValues*/FALSE,gd); // count members shown in this section
Definition *ctx = cd;
if (ctx==0 && nd) ctx = nd;
if (ctx==0 && gd) ctx = gd;
if (ctx==0 && fd) ctx = fd;
//printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d inheritedFrom=%p\n",
// this,title,subtitle,numDecMembers(),inheritedFrom);
int num = numDecMembers();
if (inheritedFrom)
{
//if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
if ( cd && !optimizeVhdl && cd->countMembersIncludingGrouped(
m_listType,inheritedFrom,TRUE)>0 )
{
inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
if (title)
{
cd->anchor(),title,cd->displayName());
}
}
}
else if (num>0)
{
if (title)
{
if (showInline)
{
}
else
{
}
ol.parseText(title);
if (showInline)
{
}
else
{
}
}
if (subtitle)
{
QCString st=subtitle;
st = st.stripWhiteSpace();
if (!st.isEmpty())
{
ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,0,FALSE,FALSE);
}
}
}
if (num>0)
{
// TODO: Two things need to be worked out for proper VHDL output:
// 1. Signals and types under the group need to be
// formatted to associate them with the group somehow
// indentation, or at the very least, extra space after
// the group is done
// 2. This might need to be repeated below for memberGroupLists
if (optimizeVhdl) // use specific declarations function
{
}
else
{
writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
//printf("memberGroupList=%p\n",memberGroupList);
{
while ((mg=mgli.current()))
{
bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
if (inheritId.isEmpty())
{
//printf("mg->header=%s hasHeader=%d\n",mg->header().data(),hasHeader);
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
ol.parseText(mg->header());
}
if (!mg->documentation().isEmpty())
{
//printf("Member group has docs!\n");
ol.generateDoc(mg->docFile(),mg->docLine(),ctx,0,mg->documentation()+"\n",FALSE,FALSE);
}
}
//printf("--- mg->writePlainDeclarations ---\n");
mg->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
if (inheritId.isEmpty())
{
ol.endMemberGroup(hasHeader);
}
++mgli;
}
}
}
if (inheritedFrom && cd)
{
// also add members that of this list type, that are grouped together
// in a separate list in class 'inheritedFrom'
cd->addGroupedInheritedMembers(ol,m_listType,inheritedFrom,inheritId);
}
//printf("----- end writeDeclaration() ----\n");
}
void MemberList::writeDocumentation ( OutputList ol,
const char *  scopeName,
Definition container,
const char *  title,
bool  showEnumValues = FALSE,
bool  showInline = FALSE 
)

Definition at line 671 of file memberlist.cpp.

References countDocMembers(), DefinitionIntf::definitionType(), OutputList::disable(), OutputList::endGroupHeader(), OutputList::endMemberDocList(), OutputGenerator::Html, MemberDef::isDetailedSectionVisible(), MemberDef::isEnumValue(), m_inGroup, memberGroupList, Definition::name(), numDocMembers(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), OutputList::startMemberDocList(), DefinitionIntf::TypeFile, MemberGroup::writeDocumentation(), MemberDef::writeDocumentation(), and OutputList::writeRuler().

Referenced by MemberGroup::writeDocumentation(), NamespaceDef::writeMemberDocumentation(), GroupDef::writeMemberDocumentation(), FileDef::writeMemberDocumentation(), and ClassDef::writeMemberDocumentation().

{
//printf("MemberList::writeDocumentation()\n");
countDocMembers(showEnumValues);
if (numDocMembers()==0) return;
if (title)
{
ol.writeRuler();
ol.startGroupHeader(showInline ? 2 : 0);
ol.parseText(title);
ol.endGroupHeader(showInline ? 2 : 0);
}
MemberListIterator mli(*this);
MemberDef *md;
// count the number of overloaded members
QDict<uint> overloadTotalDict(67);
QDict<uint> overloadCountDict(67);
overloadTotalDict.setAutoDelete(TRUE);
overloadCountDict.setAutoDelete(TRUE);
for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
!(md->isEnumValue() && !showInline))
{
uint *pCount = overloadTotalDict.find(md->name());
if (pCount)
{
(*pCount)++;
}
else
{
overloadTotalDict.insert(md->name(),new uint(1));
overloadCountDict.insert(md->name(),new uint(1));
}
}
}
for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
!(md->isEnumValue() && !showInline))
{
uint overloadCount = *overloadTotalDict.find(md->name());
uint *pCount = overloadCountDict.find(md->name());
md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,
m_inGroup,showEnumValues,showInline);
(*pCount)++;
}
}
{
printf("MemberList::writeDocumentation() -- member groups %d\n",memberGroupList->count());
for (;(mg=mgli.current());++mgli)
{
mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
}
}
}
void MemberList::writeDocumentationPage ( OutputList ol,
const char *  scopeName,
Definition container 
)

Definition at line 767 of file memberlist.cpp.

References Config_getBool, OutputList::endContents(), endFile(), endFileWithNavPath(), OutputList::endQuickIndices(), MemberDef::getOutputFileBase(), HLI_None, MemberDef::isDetailedSectionLinkable(), m_inGroup, memberGroupList, Definition::name(), MemberDef::qualifiedName(), OutputList::startContents(), startFile(), MemberDef::writeDocumentation(), MemberGroup::writeDocumentationPage(), Definition::writeNavigationPath(), Definition::writeQuickMemberLinks(), and OutputList::writeString().

Referenced by MemberGroup::writeDocumentationPage(), NamespaceDef::writeMemberPages(), GroupDef::writeMemberPages(), FileDef::writeMemberPages(), and ClassDef::writeMemberPages().

{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
// count the number of overloaded members
QDict<uint> overloadTotalDict(67);
QDict<uint> overloadCountDict(67);
overloadTotalDict.setAutoDelete(TRUE);
overloadCountDict.setAutoDelete(TRUE);
MemberListIterator mli(*this);
MemberDef *md;
for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
{
uint *pCount = overloadTotalDict.find(md->name());
if (pCount)
{
(*pCount)++;
}
else
{
overloadTotalDict.insert(md->name(),new uint(1));
overloadCountDict.insert(md->name(),new uint(1));
}
}
}
for ( mli.toFirst() ; (md=mli.current()) ; ++mli)
{
{
uint overloadCount = *overloadTotalDict.find(md->name());
uint *pCount = overloadCountDict.find(md->name());
QCString diskName=md->getOutputFileBase();
QCString title=md->qualifiedName();
startFile(ol,diskName,md->name(),title,HLI_None,!generateTreeView,diskName);
if (!generateTreeView)
{
container->writeNavigationPath(ol);
}
if (generateTreeView)
{
md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,m_inGroup);
(*pCount)++;
endFileWithNavPath(container,ol);
}
else
{
ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"
" <tr>\n"
" <td valign=\"top\">\n");
container->writeQuickMemberLinks(ol,md);
ol.writeString(" </td>\n");
ol.writeString(" <td valign=\"top\" class=\"mempage\">\n");
md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,m_inGroup);
(*pCount)++;
ol.writeString(" </td>\n");
ol.writeString(" </tr>\n");
ol.writeString("</table>\n");
endFile(ol);
}
}
}
{
//printf("MemberList::writeDocumentation() -- member groups\n");
for (;(mg=mgli.current());++mgli)
{
mg->writeDocumentationPage(ol,scopeName,container);
}
}
}
void MemberList::writePlainDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
ClassDef inheritedFrom,
const char *  inheritId 
)

Definition at line 355 of file memberlist.cpp.

References MemberDef::anchor(), MemberDef::anonymousDeclShown(), MemberDef::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, countDecMembers(), countEnumValues(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enableAll(), OutputList::endDoxyAnchor(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberItem(), OutputList::endMemberList(), OutputList::endTextLink(), MemberDef::fromAnonymousScope(), MemberDef::getOutputFileBase(), OutputGenerator::Html, OutputList::insertMemberAlign(), MemberDef::isBriefSectionVisible(), MemberDef::isDetailedSectionLinkable(), DocRoot::isEmpty(), MemberDef::isReimplementedBy(), m_inGroup, MemberDef::memberType(), MemberType_DCOP, MemberType_Define, MemberType_Enumeration, MemberType_EnumValue, MemberType_Event, MemberType_Friend, MemberType_Function, MemberType_Interface, MemberType_Property, MemberType_Service, MemberType_Signal, MemberType_Slot, MemberType_Typedef, MemberType_Variable, Definition::name(), numDecMembers(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), MemberDef::setFromAnonymousScope(), OutputList::startDoxyAnchor(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberItem(), OutputList::startMemberList(), OutputList::startTextLink(), theTranslator, Translator::trMore(), validatingParseDoc(), MemberDef::warnIfUndocumented(), MemberDef::writeDeclaration(), OutputList::writeDoc(), MemberDef::writeEnumDeclaration(), and OutputList::writeString().

Referenced by MemberGroup::addGroupedInheritedMembers(), writeDeclarations(), MemberGroup::writePlainDeclarations(), and ClassDef::writePlainMemberDeclaration().

{
//printf("----- writePlainDeclaration() ----\n");
static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
if (numDecMembers()==0)
{
//printf(" --> no members!\n");
return; // no members in this list
}
//printf(" --> writePlainDeclaration() numDecMembers()=%d\n",
// numDecMembers());
bool first=TRUE;
MemberDef *md;
MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli )
{
//printf(">>> Member `%s' type=%d visible=%d\n",
// md->name().data(),md->memberType(),md->isBriefSectionVisible());
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
{
//printf(">>> rendering\n");
switch(md->memberType())
{
case MemberType_Define: // fall through
//case MemberType_Prototype: // fall through
case MemberType_Typedef: // fall through
case MemberType_Variable: // fall through
case MemberType_Function: // fall through
case MemberType_Signal: // fall through
case MemberType_Slot: // fall through
case MemberType_DCOP: // fall through
case MemberType_Property: // fall through
case MemberType_Interface: // fall through
case MemberType_Service: // fall through
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
break;
}
{
// if this is an anonymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (countEnumValues(md,TRUE)==0) // show enum here
{
//printf("Enum!!\n");
if (first)
{
first=FALSE;
}
ol.startMemberItem(md->anchor(),0,inheritId);
bool detailsLinkable = md->isDetailedSectionLinkable();
if (!detailsLinkable)
{
ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString());
}
ol.writeString("enum ");
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
if (!detailsLinkable)
{
}
if (!md->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
md->briefFile(),md->briefLine(),
cd,md,
TRUE,FALSE,0,TRUE,FALSE
);
if (rootNode && !rootNode->isEmpty())
{
ol.startMemberDescription(md->anchor());
ol.writeDoc(rootNode,cd,md);
if (md->isDetailedSectionLinkable())
{
ol.docify(" ");
ol.startTextLink(md->getOutputFileBase(),
md->anchor());
ol.enableAll();
}
}
delete rootNode;
}
ol.endMemberDeclaration(md->anchor(),inheritId);
}
md->warnIfUndocumented();
break;
}
if (inheritedFrom==0)
{
if (first)
{
first=FALSE;
}
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
break;
}
{
if (m_inGroup)
{
//printf("EnumValue!\n");
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
}
}
break;
}
}
}
// handle members that are inside anonymous compounds and for which
// no variables of the anonymous compound type exist.
if (cd)
{
MemberListIterator mli(*this);
for ( ; (md=mli.current()) ; ++mli )
{
if (md->fromAnonymousScope() && !md->anonymousDeclShown())
{
md->setFromAnonymousScope(FALSE);
//printf("anonymous compound members\n");
if (md->isBriefSectionVisible())
{
if (first)
{
first=FALSE;
}
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
md->setFromAnonymousScope(TRUE);
}
}
}
if (!first)
{
}
//printf("----- end writePlainDeclaration() ----\n");
}
void MemberList::writeSimpleDocumentation ( OutputList ol,
Definition container 
)

Definition at line 744 of file memberlist.cpp.

References countDocMembers(), DefinitionIntf::definitionType(), OutputList::endMemberDocSimple(), ClassDef::isJavaEnum(), numDocMembers(), OutputList::startMemberDocSimple(), DefinitionIntf::TypeClass, and MemberDef::writeMemberDocSimple().

Referenced by ClassDef::writeSimpleMemberDocumentation().

{
//printf("MemberList count=%d\n",numDocMembers());
if (numDocMembers()==0) return;
ClassDef *cd = 0;
if (container && container->definitionType()==Definition::TypeClass)
{
cd = (ClassDef*)container;
}
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
md->writeMemberDocSimple(ol,container);
}
ol.endMemberDocSimple(cd && cd->isJavaEnum());
}
void MemberList::writeTagFile ( FTextStream tagFile)

Friends And Related Function Documentation

friend class MemberListIterator
friend

Definition at line 34 of file memberlist.h.

Member Data Documentation

int MemberList::m_defCnt
private

Definition at line 102 of file memberlist.h.

Referenced by countDecMembers(), defineCount(), marshal(), MemberList(), and unmarshal().

int MemberList::m_enumCnt
private

Definition at line 98 of file memberlist.h.

Referenced by countDecMembers(), enumCount(), marshal(), MemberList(), and unmarshal().

int MemberList::m_enumValCnt
private

Definition at line 99 of file memberlist.h.

Referenced by countDecMembers(), enumValueCount(), marshal(), MemberList(), and unmarshal().

int MemberList::m_friendCnt
private

Definition at line 103 of file memberlist.h.

Referenced by countDecMembers(), friendCount(), marshal(), MemberList(), and unmarshal().

int MemberList::m_funcCnt
private

Definition at line 97 of file memberlist.h.

Referenced by countDecMembers(), funcCount(), marshal(), MemberList(), and unmarshal().

bool MemberList::m_inFile
private

Definition at line 108 of file memberlist.h.

Referenced by countDocMembers(), marshal(), MemberList(), setInFile(), and unmarshal().

bool MemberList::m_inGroup
private
MemberListType MemberList::m_listType
private

Definition at line 109 of file memberlist.h.

Referenced by listType(), marshal(), unmarshal(), and writeDeclarations().

bool MemberList::m_needsSorting
private

Definition at line 110 of file memberlist.h.

Referenced by marshal(), MemberList(), needsSorting(), setNeedsSorting(), and unmarshal().

int MemberList::m_numDecMembers
private
int MemberList::m_numDocMembers
private

Definition at line 105 of file memberlist.h.

Referenced by countDocMembers(), marshal(), MemberList(), numDocMembers(), and unmarshal().

QDict<int> MemberList::m_overloadCount
private

Definition at line 111 of file memberlist.h.

int MemberList::m_protoCnt
private

Definition at line 101 of file memberlist.h.

Referenced by countDecMembers(), marshal(), MemberList(), protoCount(), and unmarshal().

int MemberList::m_typeCnt
private

Definition at line 100 of file memberlist.h.

Referenced by countDecMembers(), marshal(), MemberList(), typedefCount(), and unmarshal().

int MemberList::m_varCnt
private

Definition at line 96 of file memberlist.h.

Referenced by countDecMembers(), marshal(), MemberList(), unmarshal(), and varCount().

MemberGroupList* MemberList::memberGroupList
private

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