Skip to content

Commit 657295e

Browse files
committed
issue #10972 Derived class documention no longer contains related functions using protected inheritance on Doxygen trunk
1 parent 43bdc95 commit 657295e

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

src/classdef.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,7 +4345,7 @@ void ClassDefImpl::sortMemberLists()
43454345
int ClassDefImpl::countMemberDeclarations(MemberListType lt,const ClassDef *inheritedFrom,
43464346
MemberListType lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const
43474347
{
4348-
//printf("%s: countMemberDeclarations for %d and %d\n",qPrint(name()),lt,lt2);
4348+
//printf("%s: countMemberDeclarations for %d and %d\n",qPrint(name()),lt.to_int(),lt2.to_int());
43494349
int count=0;
43504350
MemberList * ml = getMemberList(lt);
43514351
MemberList * ml2 = getMemberList(lt2);
@@ -4428,7 +4428,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
44284428
int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
44294429
bool process = count>0;
44304430
//printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n",
4431-
// qPrint(name()),lt,process,count,invert);
4431+
// qPrint(name()),lt.to_int(),process,count,invert);
44324432
if ((process^invert) || showAlways)
44334433
{
44344434
for (const auto &ibcd : m_impl->inherits)
@@ -4440,7 +4440,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
44404440
{
44414441
convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
44424442
//printf("%s: convert %d->(%d,%d) prot=%d\n",
4443-
// qPrint(icd->name()),lt,lt1,lt2,ibcd->prot);
4443+
// qPrint(icd->name()),lt.to_int(),lt1.to_int(),lt2.to_int(),ibcd.prot);
44444444
if (visitedClasses.find(icd)==visitedClasses.end())
44454445
{
44464446
visitedClasses.insert(icd); // guard for multiple virtual inheritance

src/types.h

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ struct Grouping
122122
ML_TYPE(ProTypes, Protected, PubTypes, Invalid, "pro-types", "protected-type" ) \
123123
ML_TYPE(PacTypes, Package, Invalid, Invalid, "pac-types", "package-type" ) \
124124
ML_TYPE(PriTypes, Private, PubTypes, ProTypes, "pri-types", "private-type" ) \
125-
ML_TYPE(Related, Public, Invalid, Invalid, "related", "related" ) \
126-
ML_TYPE(Signals, Public, Invalid, Invalid, "signals", "signal" ) \
127-
ML_TYPE(Friends, Public, Invalid, Invalid, "friends", "friend" ) \
128-
ML_TYPE(DcopMethods, Public, Invalid, Invalid, "dcop-methods", "dcop-func" ) \
129-
ML_TYPE(Properties, Public, Invalid, Invalid, "properties", "property" ) \
130-
ML_TYPE(Events, Public, Invalid, Invalid, "events", "event" ) \
131-
ML_TYPE(AllMembersList, Public, Invalid, Invalid, "", "" ) \
132-
ML_TYPE(EnumFields, Public, Invalid, Invalid, "enum-fields", "" ) \
133-
ML_TYPE(MemberGroup, Public, Invalid, Invalid, "", "" ) \
134-
ML_TYPE(Interfaces, Public, Invalid, Invalid, "interfaces", "interfaces" ) \
135-
ML_TYPE(Services, Public, Invalid, Invalid, "services", "services" ) \
125+
ML_TYPE(Related, OnlyPublic, Invalid, Invalid, "related", "related" ) \
126+
ML_TYPE(Signals, OnlyPublic, Invalid, Invalid, "signals", "signal" ) \
127+
ML_TYPE(Friends, OnlyPublic, Invalid, Invalid, "friends", "friend" ) \
128+
ML_TYPE(DcopMethods, OnlyPublic, Invalid, Invalid, "dcop-methods", "dcop-func" ) \
129+
ML_TYPE(Properties, OnlyPublic, Invalid, Invalid, "properties", "property" ) \
130+
ML_TYPE(Events, OnlyPublic, Invalid, Invalid, "events", "event" ) \
131+
ML_TYPE(AllMembersList, OnlyPublic, Invalid, Invalid, "", "" ) \
132+
ML_TYPE(EnumFields, OnlyPublic, Invalid, Invalid, "enum-fields", "" ) \
133+
ML_TYPE(MemberGroup, OnlyPublic, Invalid, Invalid, "", "" ) \
134+
ML_TYPE(Interfaces, OnlyPublic, Invalid, Invalid, "interfaces", "interfaces" ) \
135+
ML_TYPE(Services, OnlyPublic, Invalid, Invalid, "services", "services" ) \
136136
ML_TYPE(DecDefineMembers, Declaration, Invalid, Invalid, "define-members", "define" ) \
137137
ML_TYPE(DecProtoMembers, Declaration, Invalid, Invalid, "proto-members", "prototype" ) \
138138
ML_TYPE(DecTypedefMembers, Declaration, Invalid, Invalid, "typedef-members", "typedef" ) \
@@ -188,16 +188,17 @@ class MemberListType
188188
Protected = (1<<17),
189189
Package = (1<<18),
190190
Private = (1<<19),
191-
Detailed = (1<<20),
192-
Declaration = (1<<21),
193-
Documentation = (1<<22),
191+
OnlyPublic = (1<<20),
192+
Detailed = (1<<21),
193+
Declaration = (1<<22),
194+
Documentation = (1<<23),
194195
TypeMask = 0x0000FFFF,
195196
CategoryMask = 0xFFFF0000
196197
};
197198

198199
enum TypeName
199200
{
200-
Invalid_,
201+
Invalid_ = -1,
201202
#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
202203
x##_,
203204
ML_TYPES
@@ -213,6 +214,7 @@ class MemberListType
213214
ML_TYPES
214215
#undef ML_TYPE
215216
constexpr bool isPublic() const { return (m_type & Public)!=0; }
217+
constexpr bool isOnlyPublic() const { return (m_type & OnlyPublic)!=0; }
216218
constexpr bool isProtected() const { return (m_type & Protected)!=0; }
217219
constexpr bool isPackage() const { return (m_type & Package)!=0; }
218220
constexpr bool isPrivate() const { return (m_type & Private)!=0; }
@@ -231,6 +233,10 @@ class MemberListType
231233
}
232234
return "[unknown]";
233235
}
236+
int to_int() const
237+
{
238+
return m_type!=Invalid_ ? m_type&TypeMask : -1;
239+
}
234240
constexpr const char *toLabel() const
235241
{
236242
switch (type())
@@ -291,12 +297,13 @@ class MemberListType
291297
if (m_type&Protected) result+=",Protected";
292298
if (m_type&Package) result+=",Package";
293299
if (m_type&Private) result+=",Private";
300+
if (m_type&OnlyPublic) result+=",OnlyPublic";
294301
if (m_type&Detailed) result+=",Detailed";
295302
if (m_type&Documentation) result+=",Documentation";
296303
return result;
297304
}
298305
constexpr TypeName type() const { return static_cast<TypeName>(m_type & TypeMask); }
299-
unsigned int m_type = static_cast<unsigned int>(Invalid_);
306+
int m_type = static_cast<int>(Invalid_);
300307
};
301308

302309
enum class MemberListContainer

0 commit comments

Comments
 (0)