@@ -220,6 +220,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
220220 virtual bool hasReferencesRelation () const override ;
221221 virtual bool hasReferencedByRelation () const override ;
222222 virtual bool hasInlineSource () const override ;
223+ virtual bool hasEnumValues () const override ;
223224 virtual const MemberDef *templateMaster () const override ;
224225 virtual QCString getScopeString () const override ;
225226 virtual ClassDef *getClassDefOfAnonymousType () const override ;
@@ -303,6 +304,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
303304 virtual void mergeEnableReferencesRelation (bool other) override ;
304305 virtual void enableInlineSource (bool e) override ;
305306 virtual void mergeEnableInlineSource (bool other) override ;
307+ virtual void enableEnumValues (bool e) override ;
306308 virtual void setTemplateMaster (MemberDef *mt) override ;
307309 virtual void addListReference (Definition *d) override ;
308310 virtual void setDocsForDefinition (bool b) override ;
@@ -494,6 +496,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
494496 bool m_hasReferencedByRelation = false ;
495497 bool m_hasReferencesRelation = false ;
496498 bool m_hasInlineSource = false ;
499+ bool m_hasEnumValues = false ;
497500 bool m_explExt = false ; // member was explicitly declared external
498501 bool m_tspec = false ; // member is a template specialization
499502 bool m_groupHasDocs = false ; // true if the entry that caused the grouping was documented
@@ -855,6 +858,8 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
855858 { return getMdAlias ()->hasReferencedByRelation (); }
856859 virtual bool hasInlineSource () const
857860 { return getMdAlias ()->hasInlineSource (); }
861+ virtual bool hasEnumValues () const
862+ { return getMdAlias ()->hasEnumValues (); }
858863 virtual StringVector getQualifiers () const
859864 { return getMdAlias ()->getQualifiers (); }
860865 virtual const MemberDef *templateMaster () const
@@ -1331,6 +1336,7 @@ void MemberDefImpl::init(Definition *d,
13311336 m_hasReferencedByRelation = FALSE ;
13321337 m_hasReferencesRelation = FALSE ;
13331338 m_hasInlineSource = FALSE ;
1339+ m_hasEnumValues = FALSE ;
13341340 m_initLines=0 ;
13351341 m_type=t;
13361342 if (mt==MemberType_Typedef) m_type.stripPrefix (" typedef " );
@@ -1508,6 +1514,7 @@ MemberDefImpl::MemberDefImpl(const MemberDefImpl &md) : DefinitionMixin(md)
15081514 m_hasReferencedByRelation = md.m_hasReferencedByRelation ;
15091515 m_hasReferencesRelation = md.m_hasReferencesRelation ;
15101516 m_hasInlineSource = md.m_hasInlineSource ;
1517+ m_hasEnumValues = md.m_hasEnumValues ;
15111518 m_explExt = md.m_explExt ;
15121519 m_tspec = md.m_tspec ;
15131520 m_groupHasDocs = md.m_groupHasDocs ;
@@ -3179,14 +3186,17 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
31793186 bool first=true ;
31803187 // printf("** %s: enum values=%zu\n",qPrint(name()),enumFieldList().size());
31813188 bool hasInits = false ;
3182- for ( const auto &fmd : enumFieldList ())
3189+ if ( hasEnumValues ())
31833190 {
3184- if ( fmd-> isLinkable ())
3191+ for ( const auto & fmd : enumFieldList ())
31853192 {
3186- if (! fmd->initializer (). isEmpty ())
3193+ if (fmd->isLinkable ())
31873194 {
3188- hasInits = true ;
3189- break ;
3195+ if (!fmd->initializer ().isEmpty ())
3196+ {
3197+ hasInits = true ;
3198+ break ;
3199+ }
31903200 }
31913201 }
31923202 }
@@ -4934,6 +4944,11 @@ void MemberDefImpl::mergeEnableInlineSource(bool other)
49344944 }
49354945}
49364946
4947+ void MemberDefImpl::enableEnumValues (bool e)
4948+ {
4949+ m_hasEnumValues=e;
4950+ }
4951+
49374952bool MemberDefImpl::isObjCMethod () const
49384953{
49394954 if (getClassDef () && getClassDef ()->isObjectiveC () && isFunction ()) return TRUE ;
@@ -5676,6 +5691,11 @@ bool MemberDefImpl::hasInlineSource() const
56765691 return m_hasInlineSource;
56775692}
56785693
5694+ bool MemberDefImpl::hasEnumValues () const
5695+ {
5696+ return m_hasEnumValues;
5697+ }
5698+
56795699const MemberDef *MemberDefImpl::templateMaster () const
56805700{
56815701 return m_templateMaster;
0 commit comments