Commit 1f22d19e authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 704412 - doxygen don't hide private Inherited Members

parent 1f5147ee
...@@ -1521,7 +1521,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol) ...@@ -1521,7 +1521,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type); MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible()) if (ml && ml->declVisible())
{ {
ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first); ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE; first=FALSE;
} }
} }
...@@ -3901,6 +3901,20 @@ void ClassDef::sortMemberLists() ...@@ -3901,6 +3901,20 @@ void ClassDef::sortMemberLists()
} }
} }
/** Computes for a given list type \a inListType, which are the
* the corresponding list type(s) in the base class that are to be
* added to this list.
*
* So for public inheritance, the mapping is 1-1, so outListType1=inListType
* Private members are to be hidden completely.
*
* For protected inheritance, both protected and public members of the
* base class should be joined in the protected member section.
*
* For private inheritance, both protected and public members of the
* base class should be joined in the private member section.
*/
static void convertProtectionLevel( static void convertProtectionLevel(
MemberListType inListType, MemberListType inListType,
Protection inProt, Protection inProt,
...@@ -3908,7 +3922,8 @@ static void convertProtectionLevel( ...@@ -3908,7 +3922,8 @@ static void convertProtectionLevel(
int *outListType2 int *outListType2
) )
{ {
// default representing Public inheritance static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
// default representing 1-1 mapping
*outListType1=inListType; *outListType1=inListType;
*outListType2=-1; *outListType2=-1;
if (inProt==Public) if (inProt==Public)
...@@ -3953,28 +3968,22 @@ static void convertProtectionLevel( ...@@ -3953,28 +3968,22 @@ static void convertProtectionLevel(
break; break;
case MemberListType_proMethods: case MemberListType_proMethods:
*outListType1=MemberListType_pubMethods; *outListType2=MemberListType_pubMethods;
*outListType2=MemberListType_proMethods;
break; break;
case MemberListType_proStaticMethods: case MemberListType_proStaticMethods:
*outListType1=MemberListType_pubStaticMethods; *outListType2=MemberListType_pubStaticMethods;
*outListType2=MemberListType_proStaticMethods;
break; break;
case MemberListType_proSlots: case MemberListType_proSlots:
*outListType1=MemberListType_pubSlots; *outListType2=MemberListType_pubSlots;
*outListType1=MemberListType_proSlots;
break; break;
case MemberListType_proAttribs: case MemberListType_proAttribs:
*outListType1=MemberListType_pubAttribs; *outListType2=MemberListType_pubAttribs;
*outListType2=MemberListType_proAttribs;
break; break;
case MemberListType_proStaticAttribs: case MemberListType_proStaticAttribs:
*outListType1=MemberListType_pubStaticAttribs; *outListType2=MemberListType_pubStaticAttribs;
*outListType2=MemberListType_proStaticAttribs;
break; break;
case MemberListType_proTypes: case MemberListType_proTypes:
*outListType1=MemberListType_pubTypes; *outListType2=MemberListType_pubTypes;
*outListType2=MemberListType_proTypes;
break; break;
default: default:
break; break;
...@@ -4003,28 +4012,76 @@ static void convertProtectionLevel( ...@@ -4003,28 +4012,76 @@ static void convertProtectionLevel(
break; break;
case MemberListType_priMethods: case MemberListType_priMethods:
*outListType1=MemberListType_pubMethods; if (extractPrivate)
*outListType2=MemberListType_proMethods; {
*outListType1=MemberListType_pubMethods;
*outListType2=MemberListType_proMethods;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
case MemberListType_priStaticMethods: case MemberListType_priStaticMethods:
*outListType1=MemberListType_pubStaticMethods; if (extractPrivate)
*outListType2=MemberListType_proStaticMethods; {
*outListType1=MemberListType_pubStaticMethods;
*outListType2=MemberListType_proStaticMethods;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
case MemberListType_priSlots: case MemberListType_priSlots:
*outListType1=MemberListType_pubSlots; if (extractPrivate)
*outListType1=MemberListType_proSlots; {
*outListType1=MemberListType_pubSlots;
*outListType1=MemberListType_proSlots;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
case MemberListType_priAttribs: case MemberListType_priAttribs:
*outListType1=MemberListType_pubAttribs; if (extractPrivate)
*outListType2=MemberListType_proAttribs; {
*outListType1=MemberListType_pubAttribs;
*outListType2=MemberListType_proAttribs;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
case MemberListType_priStaticAttribs: case MemberListType_priStaticAttribs:
*outListType1=MemberListType_pubStaticAttribs; if (extractPrivate)
*outListType2=MemberListType_proStaticAttribs; {
*outListType1=MemberListType_pubStaticAttribs;
*outListType2=MemberListType_proStaticAttribs;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
case MemberListType_priTypes: case MemberListType_priTypes:
*outListType1=MemberListType_pubTypes; if (extractPrivate)
*outListType2=MemberListType_proTypes; {
*outListType1=MemberListType_pubTypes;
*outListType2=MemberListType_proTypes;
}
else
{
*outListType1=-1;
*outListType2=-1;
}
break; break;
default: default:
break; break;
...@@ -4034,67 +4091,95 @@ static void convertProtectionLevel( ...@@ -4034,67 +4091,95 @@ static void convertProtectionLevel(
// inListType,inProt,*outListType1,*outListType2); // inListType,inProt,*outListType1,*outListType2);
} }
int ClassDef::countInheritedDecMembersRec(MemberListType lt, int ClassDef::countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom,
ClassDef *inheritedFrom) int lt2,bool invert,bool showAlways,QPtrDict<void> *visitedClasses)
{ {
//printf("> %s::countedInheritedDecMembersRec(%d)\n",name().data(),lt); //printf("%s: countMemberDeclarations for %d and %d\n",name().data(),lt,lt2);
int count=0; int count=0;
if (m_impl->inherits) MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (getLanguage()!=SrcLangExt_VHDL) // use specific declarations function
{ {
BaseClassListIterator it(*m_impl->inherits); if (ml)
BaseClassDef *ibcd;
for (it.toFirst();(ibcd=it.current());++it)
{ {
ClassDef *icd=ibcd->classDef; count+=ml->numDecMembers();
int lt1,lt2; //printf("-> ml=%d\n",ml->numDecMembers());
// an inherited member with protection level lt }
// could have come from a section with protection levels lt1 or lt2 if (ml2)
// in the bass class (e.g. for protected inheritance, the protected {
// member comes from protected and public methods in the base class) count+=ml2->numDecMembers();
convertProtectionLevel(lt,ibcd->prot,&lt1,&lt2); //printf("-> ml2=%d\n",ml2->numDecMembers());
MemberList *ml1 = icd->getMemberList((MemberListType)lt1); }
MemberList *ml2 = icd->getMemberList((MemberListType)lt2); static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
if (ml1) if (!inlineInheritedMembers) // show inherited members as separate lists
{ {
count+=icd->countMembersIncludingGrouped((MemberListType)lt1,inheritedFrom,TRUE); QPtrDict<void> visited(17);
} count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
if (ml2)
{
count+=icd->countMembersIncludingGrouped((MemberListType)lt2,inheritedFrom,TRUE);
}
if (lt1!=-1)
{
count+=icd->countInheritedDecMembersRec((MemberListType)lt1,inheritedFrom);
}
if (lt2!=-1)
{
count+=icd->countInheritedDecMembersRec((MemberListType)lt2,inheritedFrom);
}
} }
} }
//printf("< %s::countedInheritedDecMembersRec(%d) count=%d\n",name().data(),lt,count); //printf("-> %d\n",count);
return count; return count;
} }
int ClassDef::countInheritedDecMembers(MemberListType lt)
int ClassDef::countInheritedDecMembers(MemberListType lt,
ClassDef *inheritedFrom,bool invert,bool showAlways,
QPtrDict<void> *visitedClasses)
{ {
int count=0; int inhCount = 0;
MemberList *ml = getMemberList(lt); int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0;
if (ml) bool process = count>0;
{ //printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n",
count = ml->countInheritableMembers(this); // name().data(),lt,process,count,invert);
} if ((process^invert) || showAlways)
if (count==0) // for this class the (non-private) member list is empty
// see if we need to create a section for it under
// Additional Inherited Members
{ {
count = countInheritedDecMembersRec(lt,this); if (m_impl->inherits)
{
BaseClassListIterator it(*m_impl->inherits);
BaseClassDef *ibcd;
for (it.toFirst();(ibcd=it.current());++it)
{
ClassDef *icd=ibcd->classDef;
int lt1,lt2;
convertProtectionLevel(lt,ibcd->prot,&lt1,&lt2);
//printf("%s: convert %d->(%d,%d) prot=%d\n",
// icd->name().data(),lt,lt1,lt2,ibcd->prot);
if (visitedClasses->find(icd)==0)
{
visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance
if (lt1!=-1)
{
inhCount+=icd->countMemberDeclarations((MemberListType)lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
}
}
}
}
} }
else // member list is not empty, so we will add the inherited members there return inhCount;
}
void ClassDef::getTitleForMemberListType(MemberListType type,
QCString &title,QCString &subtitle)
{
SrcLangExt lang = getLanguage();
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
for (eli.toFirst();(lde=eli.current());++eli)
{ {
count = 0; if (lde->kind()==LayoutDocEntry::MemberDecl)
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
if (lmd->type==type)
{
title = lmd->title(lang);
subtitle = lmd->subtitle(lang);
return;
}
}
} }
return count; title="";
subtitle="";
} }
int ClassDef::countAdditionalInheritedMembers() int ClassDef::countAdditionalInheritedMembers()
...@@ -4110,7 +4195,12 @@ int ClassDef::countAdditionalInheritedMembers() ...@@ -4110,7 +4195,12 @@ int ClassDef::countAdditionalInheritedMembers()
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
if (lmd->type!=MemberListType_friends) // friendship is not inherited if (lmd->type!=MemberListType_friends) // friendship is not inherited
{ {
totalCount+=countInheritedDecMembers(lmd->type); //MemberList *ml = getMemberList(lmd->type);
//if (ml==0 || ml->numDecMembers()==0)
//{
QPtrDict<void> visited(17);
totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,&visited);
//}
} }
} }
} }
...@@ -4129,11 +4219,10 @@ void ClassDef::writeAdditionalInheritedMembers(OutputList &ol) ...@@ -4129,11 +4219,10 @@ void ClassDef::writeAdditionalInheritedMembers(OutputList &ol)
if (lde->kind()==LayoutDocEntry::MemberDecl) if (lde->kind()==LayoutDocEntry::MemberDecl)
{ {
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
MemberList *ml = getMemberList(lmd->type); if (lmd->type!=MemberListType_friends)
if (ml==0 || ml->numDecMembers()==0)
{ {
QPtrDict<void> visited(17); QPtrDict<void> visited(17);
writeInheritedMemberDeclarations(ol,lmd->type,lmd->title(getLanguage()),this,TRUE,&visited); writeInheritedMemberDeclarations(ol,lmd->type,-1,lmd->title(getLanguage()),this,TRUE,FALSE,&visited);
} }
} }
} }
...@@ -4164,21 +4253,22 @@ int ClassDef::countMembersIncludingGrouped(MemberListType lt, ...@@ -4164,21 +4253,22 @@ int ClassDef::countMembersIncludingGrouped(MemberListType lt,
} }
} }
//printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n", //printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n",
// name().data(),lt,ml?ml->listTypeAsString().data():"<none>",count); // name().data(),lt,ml?ml->listTypeAsString(ml->listType()).data():"<none>",count);
return count; return count;
} }
void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, void ClassDef::writeInheritedMemberDeclarations(OutputList &ol,
MemberListType lt,const QCString &title, MemberListType lt,int lt2,const QCString &title,
ClassDef *inheritedFrom,bool invert, ClassDef *inheritedFrom,bool invert,bool showAlways,
QPtrDict<void> *visitedClasses) QPtrDict<void> *visitedClasses)
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
bool process = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0; int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0;
//printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d\n", bool process = count>0;
// name().data(),lt,process,invert); //printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d always=%d\n",
if (process^invert) // name().data(),lt,process,invert,showAlways);
if ((process^invert) || showAlways)
{ {
if (m_impl->inherits) if (m_impl->inherits)
{ {
...@@ -4187,18 +4277,26 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, ...@@ -4187,18 +4277,26 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol,
for (it.toFirst();(ibcd=it.current());++it) for (it.toFirst();(ibcd=it.current());++it)
{ {
ClassDef *icd=ibcd->classDef; ClassDef *icd=ibcd->classDef;
int lt1,lt2; int lt1,lt3;
convertProtectionLevel(lt,ibcd->prot,&lt1,&lt2); convertProtectionLevel(lt,ibcd->prot,&lt1,&lt3);
//printf("%s:convert %d->(%d,%d)\n",icd->name().data(),lt,lt1,lt2); if (lt2==-1 && lt3!=-1)
{
lt2=lt3;
}
//printf("%s:convert %d->(%d,%d) prot=%d\n",icd->name().data(),lt,lt1,lt2,ibcd->prot);
if (visitedClasses->find(icd)==0) if (visitedClasses->find(icd)==0)
{ {
visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance
if (lt1!=-1) if (lt1!=-1)
{ {
icd->writeMemberDeclarations(ol,(MemberListType)lt1, icd->writeMemberDeclarations(ol,(MemberListType)lt1,
title,QCString(),FALSE,inheritedFrom,lt2,invert,visitedClasses); title,QCString(),FALSE,inheritedFrom,lt2,FALSE /*invert*/,TRUE,visitedClasses);
} }
} }
else
{
//printf("%s: class already visited!\n",icd->name().data());
}
} }
} }
} }
...@@ -4206,10 +4304,12 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, ...@@ -4206,10 +4304,12 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol,
} }
void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title, void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title,
const char *subTitle,bool showInline,ClassDef *inheritedFrom,int lt2,bool invert,QPtrDict<void> *visitedClasses) const char *subTitle,bool showInline,ClassDef *inheritedFrom,int lt2,
bool invert,bool showAlways,QPtrDict<void> *visitedClasses)
{ {
//printf("%s: ClassDef::writeMemberDeclarations for %s\n",name().data(),ml->listTypeAsString().data()); //printf("%s: ClassDef::writeMemberDeclarations lt=%d lt2=%d\n",name().data(),lt,lt2);
MemberList * ml = getMemberList(lt); MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
{ {
if (ml) if (ml)
...@@ -4219,27 +4319,31 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC ...@@ -4219,27 +4319,31 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
} }
else else
{ {
//printf("%s::writeMemberDeclarations(%s)\n",name().data(),title.data()); //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",name().data(),title.data(),ml,ml2);
//static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); QCString tt = title, st = subTitle;
if (ml) if (ml)
{ {
ml->writeDeclarations(ol,this,0,0,0,title,subTitle,definitionType(),FALSE,showInline,inheritedFrom); //printf(" writeDeclaration type=%d count=%d\n",lt,ml->numDecMembers());
if (lt2!=-1) ml->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt);
{ tt.resize(0);
MemberList * ml2 = getMemberList((MemberListType)lt2); st.resize(0);
if (ml2) }
{ if (ml2)
ml2->writeDeclarations(ol,this,0,0,0,0,0,definitionType(),FALSE,showInline,inheritedFrom); {
} //printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers());
} ml2->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt);
} }
static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB"); static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
if (!inlineInheritedMembers) // show inherited members as separate lists if (!inlineInheritedMembers) // show inherited members as separate lists
{ {
QPtrDict<void> visited(17); if (lt!=-1)
writeInheritedMemberDeclarations(ol,lt,title, {
inheritedFrom ? inheritedFrom : this, QPtrDict<void> visited(17);
invert,visitedClasses==0 ? &visited: visitedClasses); writeInheritedMemberDeclarations(ol,lt,lt2,title,
inheritedFrom ? inheritedFrom : this,
invert,showAlways,
visitedClasses==0 ? &visited: visitedClasses);
}
} }
} }
} }
......
...@@ -383,9 +383,9 @@ class ClassDef : public Definition ...@@ -383,9 +383,9 @@ class ClassDef : public Definition
QCString getMemberListFileName() const; QCString getMemberListFileName() const;
void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief); void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief);
MemberList *createMemberList(MemberListType lt); MemberList *createMemberList(MemberListType lt);
void writeInheritedMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title,ClassDef *inheritedFrom,bool invert,QPtrDict<void> *visitedClasses); void writeInheritedMemberDeclarations(OutputList &ol,MemberListType lt,int lt2,const QCString &title,ClassDef *inheritedFrom,bool invert,bool showAlways,QPtrDict<void> *visitedClasses);
void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title, void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title,
const char *subTitle=0,bool showInline=FALSE,ClassDef *inheritedFrom=0,int lt2=-1,bool invert=FALSE,QPtrDict<void> *visitedClasses=0); const char *subTitle=0,bool showInline=FALSE,ClassDef *inheritedFrom=0,int lt2=-1,bool invert=FALSE,bool showAlways=FALSE,QPtrDict<void> *visitedClasses=0);
void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE); void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE);
void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt); void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt);
void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,ClassDef *inheritedFrom,const char *inheritId); void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,ClassDef *inheritedFrom,const char *inheritId);
...@@ -407,11 +407,16 @@ class ClassDef : public Definition ...@@ -407,11 +407,16 @@ class ClassDef : public Definition
void writeMoreLink(OutputList &ol,const QCString &anchor); void writeMoreLink(OutputList &ol,const QCString &anchor);
void writeDetailedDocumentationBody(OutputList &ol); void writeDetailedDocumentationBody(OutputList &ol);
int countInheritedDecMembersRec(MemberListType lt,ClassDef *inheritedFrom);
int countInheritedDecMembers(MemberListType lt);
int countAdditionalInheritedMembers(); int countAdditionalInheritedMembers();
void writeAdditionalInheritedMembers(OutputList &ol); void writeAdditionalInheritedMembers(OutputList &ol);
void addClassAttributes(OutputList &ol); void addClassAttributes(OutputList &ol);
int countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom,
int lt2,bool invert,bool showAlways,QPtrDict<void> *visitedClasses);
int countInheritedDecMembers(MemberListType lt,
ClassDef *inheritedFrom,bool invert,bool showAlways,
QPtrDict<void> *visitedClasses);
void getTitleForMemberListType(MemberListType type,
QCString &title,QCString &subtitle);
ClassDefImpl *m_impl; ClassDefImpl *m_impl;
......
...@@ -514,7 +514,7 @@ void FileDef::writeSummaryLinks(OutputList &ol) ...@@ -514,7 +514,7 @@ void FileDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type); MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible()) if (ml && ml->declVisible())
{ {
ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first); ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE; first=FALSE;
} }
} }
......
...@@ -913,7 +913,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol) ...@@ -913,7 +913,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type); MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible()) if (ml && ml->declVisible())
{ {
ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first); ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE; first=FALSE;
} }
} }
......
...@@ -315,7 +315,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -315,7 +315,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
return; // no members in this list return; // no members in this list
} }
//printf(" --> writePlainDeclaration() numDecMembers()=%d\n", //printf(" --> writePlainDeclaration() numDecMembers()=%d\n",
// numDecMembers()); // numDecMembers());
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -329,6 +329,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -329,6 +329,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) && if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible()) md->isBriefSectionVisible())
{ {
//printf(">>> rendering\n");
switch(md->memberType()) switch(md->memberType())
{ {
case MemberType_Define: // fall through case MemberType_Define: // fall through
...@@ -493,7 +494,7 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -493,7 +494,7 @@ void MemberList::writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle, const char *title,const char *subtitle,
const DefinitionIntf::DefType compoundType,bool showEnumValues, const DefinitionIntf::DefType compoundType,bool showEnumValues,
bool showInline,ClassDef *inheritedFrom) bool showInline,ClassDef *inheritedFrom,MemberListType lt)
{ {
(void)showEnumValues; // unused (void)showEnumValues; // unused
...@@ -507,8 +508,8 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -507,8 +508,8 @@ void MemberList::writeDeclarations(OutputList &ol,
if (ctx==0 && gd) ctx = gd; if (ctx==0 && gd) ctx = gd;
if (ctx==0 && fd) ctx = fd; if (ctx==0 && fd) ctx = fd;
//printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d\n", //printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d inheritedFrom=%p\n",
// this,title,subtitle,numDecMembers()); // this,title,subtitle,numDecMembers(),inheritedFrom);
int num = numDecMembers(); int num = numDecMembers();
if (inheritedFrom) if (inheritedFrom)
...@@ -519,7 +520,7 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -519,7 +520,7 @@ void MemberList::writeDeclarations(OutputList &ol,
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
inheritId = substitute(listTypeAsString(),"-","_")+"_"+ inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
stripPath(cd->getOutputFileBase()); stripPath(cd->getOutputFileBase());
if (title) if (title)
{ {
...@@ -540,7 +541,7 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -540,7 +541,7 @@ void MemberList::writeDeclarations(OutputList &ol,
} }
else else
{ {
ol.startMemberHeader(listTypeAsString()); ol.startMemberHeader(listTypeAsString(m_listType));
} }
ol.parseText(title); ol.parseText(title);
if (showInline) if (showInline)
...@@ -872,9 +873,14 @@ void MemberList::unmarshal(StorageIntf *s) ...@@ -872,9 +873,14 @@ void MemberList::unmarshal(StorageIntf *s)
} }
} }
QCString MemberList::listTypeAsString() const void MemberList::setNeedsSorting(bool b)
{
m_needsSorting = b;
}
QCString MemberList::listTypeAsString(MemberListType type) const
{ {
switch(m_listType) switch(type)
{ {
case MemberListType_pubMethods: return "pub-methods"; case MemberListType_pubMethods: return "pub-methods";
case MemberListType_proMethods: return "pro-methods"; case MemberListType_proMethods: return "pro-methods";
...@@ -928,10 +934,6 @@ QCString MemberList::listTypeAsString() const ...@@ -928,10 +934,6 @@ QCString MemberList::listTypeAsString() const
return ""; return "";
} }
void MemberList::setNeedsSorting(bool b)
{
m_needsSorting = b;
}
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
...@@ -36,7 +36,7 @@ class MemberList : public QList<MemberDef> ...@@ -36,7 +36,7 @@ class MemberList : public QList<MemberDef>
MemberList(MemberListType lt); MemberList(MemberListType lt);
~MemberList(); ~MemberList();
MemberListType listType() const { return m_listType; } MemberListType listType() const { return m_listType; }
QCString listTypeAsString() const; QCString listTypeAsString(MemberListType type) const;
bool insert(uint index,const MemberDef *md); bool insert(uint index,const MemberDef *md);
void inSort(const MemberDef *md); void inSort(const MemberDef *md);
void append(const MemberDef *md); void append(const MemberDef *md);
...@@ -63,7 +63,7 @@ class MemberList : public QList<MemberDef> ...@@ -63,7 +63,7 @@ class MemberList : public QList<MemberDef>
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,const DefinitionIntf::DefType compoundType, const char *title,const char *subtitle,const DefinitionIntf::DefType compoundType,
bool showEnumValues=FALSE,bool showInline=FALSE, bool showEnumValues=FALSE,bool showInline=FALSE,
ClassDef *inheritedFrom=0); ClassDef *inheritedFrom=0,MemberListType lt=MemberListType_pubMethods);
void writeDocumentation(OutputList &ol,const char *scopeName, void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container,const char *title,bool showEnumValues=FALSE,bool showInline=FALSE); Definition *container,const char *title,bool showEnumValues=FALSE,bool showInline=FALSE);
void writeSimpleDocumentation(OutputList &ol,Definition *container); void writeSimpleDocumentation(OutputList &ol,Definition *container);
......
...@@ -429,7 +429,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol) ...@@ -429,7 +429,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type); MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible()) if (ml && ml->declVisible())
{ {
ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first); ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE; first=FALSE;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment