From 6f7443e86a2b6633fafeba5e8baa0941c22c757d Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 27 Apr 2020 09:21:21 +0200 Subject: Refactoring: Improve encapsulation of MemberInfo class --- src/classdef.cpp | 103 +++++++++++++++++++++++++++-------------------------- src/context.cpp | 36 ++++++++++--------- src/context.h | 6 ++-- src/doxygen.cpp | 4 +-- src/groupdef.cpp | 4 +-- src/membername.cpp | 8 ++--- src/membername.h | 40 +++++++++++++++------ src/perlmodgen.cpp | 8 ++--- src/sqlite3gen.cpp | 6 ++-- src/xmlgen.cpp | 8 ++--- 10 files changed, 123 insertions(+), 100 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index 5670109..0cdd354 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2932,7 +2932,7 @@ void ClassDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *current MemberInfo *mi; for (mnii.toFirst();(mi=mnii.current());++mnii) { - MemberDef *md=mi->memberDef; + const MemberDef *md=mi->memberDef(); if (md->getClassDef()==this && md->isLinkable() && !md->isEnumValue()) { ol.writeString(" "); @@ -3059,9 +3059,9 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const MemberInfo *mi; for (;(mi=it.current());++it) { - MemberDef *md=mi->memberDef; + const MemberDef *md=mi->memberDef(); const ClassDef *cd=md->getClassDef(); - Protection prot = mi->prot; + Protection prot = mi->prot(); Specifier virt=md->virtualness(); //printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n", @@ -3073,7 +3073,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const if (cd->isLinkable() && md->isLinkable()) // create a link to the documentation { - QCString name=mi->ambiguityResolutionScope+md->name(); + QCString name=mi->ambiguityResolutionScope()+md->name(); //ol.writeListItem(); if (first) { @@ -3645,7 +3645,7 @@ void ClassDefImpl::mergeMembers() MemberInfo *srcMi; for ( ; (srcMi=srcMnii.current()) ; ++srcMnii ) { - MemberDef *srcMd = srcMi->memberDef; + MemberDef *srcMd = srcMi->memberDef(); bool found=FALSE; bool ambiguous=FALSE; bool hidden=FALSE; @@ -3654,7 +3654,7 @@ void ClassDefImpl::mergeMembers() const ClassDef *srcCd = srcMd->getClassDef(); for ( ; (dstMi=dstMnii.current()) && !found; ++dstMnii ) { - MemberDef *dstMd = dstMi->memberDef; + MemberDef *dstMd = dstMi->memberDef(); if (srcMd!=dstMd) // different members { const ClassDef *dstCd = dstMd->getClassDef(); @@ -3683,9 +3683,11 @@ void ClassDefImpl::mergeMembers() // dstMd->name().data(), // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data()); - QCString scope=dstMi->scopePath.left((uint)dstMi->scopePath.find(sep)+sepLen); - if (scope!=dstMi->ambiguityResolutionScope.left(scope.length())) - dstMi->ambiguityResolutionScope.prepend(scope); + QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen); + if (scope!=dstMi->ambiguityResolutionScope().left(scope.length())) + { + dstMi->setAmbiguityResolutionScope(scope+dstMi->ambiguityResolutionScope()); + } ambiguous=TRUE; } } @@ -3695,8 +3697,8 @@ void ClassDefImpl::mergeMembers() // if scope paths are equal or // if base class is an interface (and thus implicitly virtual). //printf("same member found srcMi->virt=%d dstMi->virt=%d\n",srcMi->virt,dstMi->virt); - if ((srcMi->virt!=Normal && dstMi->virt!=Normal) || - bClass->name()+sep+srcMi->scopePath == dstMi->scopePath || + if ((srcMi->virt()!=Normal && dstMi->virt()!=Normal) || + bClass->name()+sep+srcMi->scopePath() == dstMi->scopePath() || dstMd->getClassDef()->compoundType()==Interface ) { @@ -3710,10 +3712,10 @@ void ClassDefImpl::mergeMembers() // dstMd->name().data(), // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data()); - QCString scope=dstMi->scopePath.left((uint)dstMi->scopePath.find(sep)+sepLen); - if (scope!=dstMi->ambiguityResolutionScope.left(scope.length())) + QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen); + if (scope!=dstMi->ambiguityResolutionScope().left(scope.length())) { - dstMi->ambiguityResolutionScope.prepend(scope); + dstMi->setAmbiguityResolutionScope(dstMi->ambiguityResolutionScope()+scope); } ambiguous=TRUE; } @@ -3744,11 +3746,11 @@ void ClassDefImpl::mergeMembers() } } - Specifier virt=srcMi->virt; - if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt; + Specifier virt=srcMi->virt(); + if (virt==Normal && bcd->virt!=Normal) virt=bcd->virt; MemberInfo *newMi = new MemberInfo(srcMd,prot,virt,TRUE); - newMi->scopePath=bClass->name()+sep+srcMi->scopePath; + newMi->setScopePath(bClass->name()+sep+srcMi->scopePath()); if (ambiguous) { //printf("$$ New member %s %s add scope %s::\n", @@ -3757,23 +3759,22 @@ void ClassDefImpl::mergeMembers() // bClass->name().data()); QCString scope=bClass->name()+sep; - if (scope!=srcMi->ambiguityResolutionScope.left(scope.length())) + if (scope!=srcMi->ambiguityResolutionScope().left(scope.length())) { - newMi->ambiguityResolutionScope= - scope+srcMi->ambiguityResolutionScope.copy(); + newMi->setAmbiguityResolutionScope(scope+srcMi->ambiguityResolutionScope()); } } if (hidden) { - if (srcMi->ambigClass==0) + if (srcMi->ambigClass()==0) { - newMi->ambigClass=bClass; - newMi->ambiguityResolutionScope=bClass->name()+sep; + newMi->setAmbigClass(bClass); + newMi->setAmbiguityResolutionScope(bClass->name()+sep); } else { - newMi->ambigClass=srcMi->ambigClass; - newMi->ambiguityResolutionScope=srcMi->ambigClass->name()+sep; + newMi->setAmbigClass(srcMi->ambigClass()); + newMi->setAmbiguityResolutionScope(srcMi->ambigClass()->name()+sep); } } dstMni->append(newMi); @@ -3792,9 +3793,9 @@ void ClassDefImpl::mergeMembers() MemberInfo *mi; for (;(mi=mnii.current());++mnii) { - if (!mi->memberDef->isFriend()) // don't inherit friends + if (!mi->memberDef()->isFriend()) // don't inherit friends { - Protection prot = mi->prot; + Protection prot = mi->prot(); if (bcd->prot==Protected) { if (prot==Public) prot=Protected; @@ -3809,22 +3810,22 @@ void ClassDefImpl::mergeMembers() if (prot!=Private || extractPrivate) { - Specifier virt=mi->virt; - if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt; + Specifier virt=mi->virt(); + if (virt==Normal && bcd->virt!=Normal) virt=bcd->virt; if (inlineInheritedMembers) { - if (!isStandardFunc(mi->memberDef)) + if (!isStandardFunc(mi->memberDef())) { //printf(" insertMember '%s'\n",mi->memberDef->name().data()); - internalInsertMember(mi->memberDef,prot,FALSE); + internalInsertMember(mi->memberDef(),prot,FALSE); } } //printf("Adding!\n"); - MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,virt,TRUE); - newMi->scopePath=bClass->name()+sep+mi->scopePath; - newMi->ambigClass=mi->ambigClass; - newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope.copy(); + MemberInfo *newMi=new MemberInfo(mi->memberDef(),prot,virt,TRUE); + newMi->setScopePath(bClass->name()+sep+mi->scopePath()); + newMi->setAmbigClass(mi->ambigClass()); + newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope()); newMni->append(newMi); } } @@ -3910,10 +3911,10 @@ void ClassDefImpl::mergeCategory(ClassDef *category) MemberInfo *srcMi = srcMni->getFirst(); if (srcMi && dstMi) { - combineDeclarationAndDefinition(srcMi->memberDef,dstMi->memberDef); - dstMi->memberDef->setCategory(category); - dstMi->memberDef->setCategoryRelation(srcMi->memberDef); - srcMi->memberDef->setCategoryRelation(dstMi->memberDef); + combineDeclarationAndDefinition(srcMi->memberDef(),dstMi->memberDef()); + dstMi->memberDef()->setCategory(category); + dstMi->memberDef()->setCategoryRelation(srcMi->memberDef()); + srcMi->memberDef()->setCategoryRelation(dstMi->memberDef()); } } else // new method name @@ -3929,18 +3930,18 @@ void ClassDefImpl::mergeCategory(ClassDef *category) for (;(mi=mnii.current());++mnii) { //printf("Adding '%s'\n",mi->memberDef->name().data()); - Protection prot = mi->prot; + Protection prot = mi->prot(); //if (makePrivate) prot = Private; - std::unique_ptr newMd { mi->memberDef->deepCopy() }; + std::unique_ptr newMd { mi->memberDef()->deepCopy() }; if (newMd) { //printf("Copying member %s\n",mi->memberDef->name().data()); newMd->moveTo(this); - MemberInfo *newMi=new MemberInfo(newMd.get(),prot,mi->virt,mi->inherited); - newMi->scopePath=mi->scopePath; - newMi->ambigClass=mi->ambigClass; - newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope; + MemberInfo *newMi=new MemberInfo(newMd.get(),prot,mi->virt(),mi->inherited()); + newMi->setScopePath(mi->scopePath()); + newMi->setAmbigClass(mi->ambigClass()); + newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope()); newMni->append(newMi); // also add the newly created member to the global members list @@ -3949,8 +3950,8 @@ void ClassDefImpl::mergeCategory(ClassDef *category) MemberName *mn = Doxygen::memberNameLinkedMap->add(name); newMd->setCategory(category); - newMd->setCategoryRelation(mi->memberDef); - mi->memberDef->setCategoryRelation(newMd.get()); + newMd->setCategoryRelation(mi->memberDef()); + mi->memberDef()->setCategoryRelation(newMd.get()); if (makePrivate || isExtension) { newMd->makeImplementationDetail(); @@ -4139,7 +4140,7 @@ void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pr MemberInfo *mi; for (mnii.toFirst();(mi=mnii.current());++mnii) { - MemberDef *md=mi->memberDef; + MemberDef *md=mi->memberDef(); md->setGroupDef(gd,pri,fileName,startLine,hasDocs); gd->insertMember(md,TRUE); ClassDef *innerClass = md->getClassDefOfAnonymousType(); @@ -4255,7 +4256,7 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const char *t for (mnii.toFirst();(mi=mnii.current());++mnii) { auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec); - MemberDef *md = mi->memberDef; + MemberDef *md = mi->memberDef(); std::unique_ptr imd { md->createTemplateInstanceMember( cd->templateArguments(),actualArguments_p) }; //printf("%s->setMemberClass(%p)\n",imd->name().data(),this); @@ -4444,14 +4445,14 @@ MemberDef *ClassDefImpl::getMemberByName(const QCString &name) const MemberInfo *mi; for (mnii.toFirst();(mi=mnii.current());++mnii) { - const ClassDef *mcd=mi->memberDef->getClassDef(); + const ClassDef *mcd=mi->memberDef()->getClassDef(); int m=minClassDistance(this,mcd); //printf("found member in %s linkable=%d m=%d\n", // mcd->name().data(),mcd->isLinkable(),m); if (misLinkable()) { mdist=m; - xmd=mi->memberDef; + xmd=mi->memberDef(); } } } diff --git a/src/context.cpp b/src/context.cpp index 53b63f9..718bbd8 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -3976,7 +3976,7 @@ TemplateVariant createLinkedText(const Definition *def,const QCString &relPath,c class MemberContext::Private : public DefinitionContext { public: - Private(MemberDef *md) : DefinitionContext(md) , m_memberDef(md) + Private(const MemberDef *md) : DefinitionContext(md) , m_memberDef(md) { static bool init=FALSE; if (!init) @@ -4437,8 +4437,9 @@ class MemberContext::Private : public DefinitionContext { scopeName = m_memberDef->getNamespaceDef()->name(); } - cache.initializer = parseCode(m_memberDef,scopeName,relPathAsString(), - m_memberDef->initializer()); + cache.initializer = parseCode(const_cast(m_memberDef), + scopeName,relPathAsString(), + m_memberDef->initializer()); cache.initializerParsed = TRUE; } return cache.initializer; @@ -4775,12 +4776,13 @@ class MemberContext::Private : public DefinitionContext if (m_memberDef->argumentList().hasDocumentation()) { QCString paramDocs; - for (Argument &a : m_memberDef->argumentList()) + for (const Argument &a : m_memberDef->argumentList()) { if (a.hasDocumentation()) { - QCString direction = extractDirection(a.docs); - paramDocs+="@param"+direction+" "+a.name+" "+a.docs; + QCString docs = a.docs; + QCString direction = extractDirection(docs); + paramDocs+="@param"+direction+" "+a.name+" "+docs; } } cache.paramDocs.reset(new TemplateVariant(parseDoc(m_memberDef, @@ -4982,7 +4984,9 @@ class MemberContext::Private : public DefinitionContext { scopeName = m_memberDef->getNamespaceDef()->name(); } - cache.sourceCode = parseCode(m_memberDef,scopeName,relPathAsString(),codeFragment,startLine,endLine,TRUE); + cache.sourceCode = parseCode(const_cast(m_memberDef), + scopeName,relPathAsString(), + codeFragment,startLine,endLine,TRUE); cache.sourceCodeParsed = TRUE; } } @@ -5185,10 +5189,10 @@ class MemberContext::Private : public DefinitionContext return TemplateVariant::Delegate::fromMethod(this); } private: - MemberDef *m_memberDef; + const MemberDef *m_memberDef; struct Cachable : public DefinitionContext::Cachable { - Cachable(MemberDef *md) : DefinitionContext::Cachable(md), + Cachable(const MemberDef *md) : DefinitionContext::Cachable(md), initializerParsed(FALSE), sourceCodeParsed(FALSE), declArgsParsed(FALSE), declTypeParsed(FALSE) { } SharedPtr templateArgs; @@ -5238,7 +5242,7 @@ class MemberContext::Private : public DefinitionContext PropertyMapper MemberContext::Private::s_inst; -MemberContext::MemberContext(MemberDef *md) : RefCountedContext("MemberContext") +MemberContext::MemberContext(const MemberDef *md) : RefCountedContext("MemberContext") { p = new Private(md); } @@ -8693,7 +8697,7 @@ class MemberInfoContext::Private } TemplateVariant protection() const { - switch (m_memberInfo->prot) + switch (m_memberInfo->prot()) { case ::Public: return "public"; case ::Protected: return "protected"; @@ -8704,7 +8708,7 @@ class MemberInfoContext::Private } TemplateVariant virtualness() const { - switch (m_memberInfo->virt) + switch (m_memberInfo->virt()) { case ::Normal: return "normal"; case ::Virtual: return "virtual"; @@ -8714,13 +8718,13 @@ class MemberInfoContext::Private } TemplateVariant ambiguityScope() const { - return m_memberInfo->ambiguityResolutionScope; + return m_memberInfo->ambiguityResolutionScope(); } TemplateVariant member() const { - if (!m_member && m_memberInfo->memberDef) + if (!m_member && m_memberInfo->memberDef()) { - m_member.reset(MemberContext::alloc(m_memberInfo->memberDef)); + m_member.reset(MemberContext::alloc(m_memberInfo->memberDef())); } if (m_member) { @@ -8775,7 +8779,7 @@ class AllMembersListContext::Private : public GenericNodeListContext MemberInfo *mi; for (mnii2.toFirst();(mi=mnii2.current());++mnii2) { - MemberDef *md=mi->memberDef; + const MemberDef *md=mi->memberDef(); const ClassDef *cd=md->getClassDef(); if (cd && !md->isAnonymous()) { diff --git a/src/context.h b/src/context.h index 8af74f8..ae61a08 100644 --- a/src/context.h +++ b/src/context.h @@ -47,7 +47,7 @@ class MemberDef; struct Argument; class ArgumentList; class MemberNameInfoSDict; -struct MemberInfo; +class MemberInfo; class MemberGroup; class MemberGroupSDict; class MemberGroupList; @@ -348,7 +348,7 @@ class PageContext : public RefCountedContext, public TemplateStructIntf class MemberContext : public RefCountedContext, public TemplateStructIntf { public: - static MemberContext *alloc(MemberDef *md) { return new MemberContext(md); } + static MemberContext *alloc(const MemberDef *md) { return new MemberContext(md); } // TemplateStructIntf methods virtual TemplateVariant get(const char *name) const; @@ -356,7 +356,7 @@ class MemberContext : public RefCountedContext, public TemplateStructIntf virtual int release() { return RefCountedContext::release(); } private: - MemberContext(MemberDef *); + MemberContext(const MemberDef *); ~MemberContext(); class Private; Private *p; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 2ceece9..13d1651 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1896,7 +1896,7 @@ static void findUsingDeclImports(const Entry *root) MemberInfo *mi; for ( ; (mi=mnii.current()) ; ++mnii ) { - MemberDef *md = mi->memberDef; + MemberDef *md = mi->memberDef(); if (md && md->protection()!=Private) { //printf("found member %s\n",mni->memberName()); @@ -3905,7 +3905,7 @@ static void findUsedClassesForClass(const Entry *root, MemberInfo *mi; for (mnii.toFirst();(mi=mnii.current());++mnii) { - MemberDef *md=mi->memberDef; + MemberDef *md=mi->memberDef(); if (md->isVariable() || md->isObjCProperty()) // for each member variable in this class { //printf(" Found variable %s in class %s\n",md->name().data(),masterCd->name().data()); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 90de94b..d4f4f5d 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -385,7 +385,7 @@ bool GroupDefImpl::insertMember(MemberDef *md,bool docOnly) const MemberInfo *srcMi; for ( ; (srcMi=srcMnii.current()) ; ++srcMnii ) { - const MemberDef *srcMd = srcMi->memberDef; + const MemberDef *srcMd = srcMi->memberDef(); if (srcMd==md) return FALSE; // already added before! bool sameScope = srcMd->getOuterScope()==md->getOuterScope() || // same class or namespace @@ -545,7 +545,7 @@ void GroupDefImpl::removeMember(MemberDef *md) MemberNameInfoIterator mnii(*mni); while( mnii.current() ) { - if( mnii.current()->memberDef == md ) + if( mnii.current()->memberDef() == md ) { mni->remove(mnii.current()); break; diff --git a/src/membername.cpp b/src/membername.cpp index 64bf49b..f969df8 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -28,10 +28,10 @@ MemberNameInfo::MemberNameInfo(const char *n) : QList() int MemberNameInfo::compareValues(const MemberInfo *m1,const MemberInfo *m2) const { - const ClassDef *c1=m1->memberDef->getClassDef(); - const ClassDef *c2=m2->memberDef->getClassDef(); - const FileDef *f1=m1->memberDef->getFileDef(); - const FileDef *f2=m2->memberDef->getFileDef(); + const ClassDef *c1=m1->memberDef()->getClassDef(); + const ClassDef *c2=m2->memberDef()->getClassDef(); + const FileDef *f1=m1->memberDef()->getFileDef(); + const FileDef *f2=m2->memberDef()->getFileDef(); if (c1 && c2) return qstrcmp(c1->name(),c2->name()); else if (f1 && f2) diff --git a/src/membername.h b/src/membername.h index 8d0ad7c..aa2ce5f 100644 --- a/src/membername.h +++ b/src/membername.h @@ -63,18 +63,36 @@ class MemberNameLinkedMap : public LinkedMap }; /** Data associated with a MemberDef in an inheritance relation. */ -struct MemberInfo +class MemberInfo { - MemberInfo(MemberDef *md,Protection p,Specifier v,bool inh) : - memberDef(md), prot(p), virt(v), inherited(inh), ambigClass(0) {} - ~MemberInfo() {} - MemberDef *memberDef; - Protection prot; - Specifier virt; - bool inherited; - QCString scopePath; - QCString ambiguityResolutionScope; - ClassDef *ambigClass; + public: + MemberInfo(MemberDef *md,Protection p,Specifier v,bool inh) : + m_memberDef(md), m_prot(p), m_virt(v), m_inherited(inh) {} + ~MemberInfo() {} + + // getters + MemberDef *memberDef() { return m_memberDef; } + const MemberDef *memberDef() const { return m_memberDef; } + Protection prot() const { return m_prot; } + Specifier virt() const { return m_virt; } + bool inherited() const { return m_inherited; } + QCString scopePath() const { return m_scopePath; } + QCString ambiguityResolutionScope() const { return m_ambiguityResolutionScope; } + const ClassDef *ambigClass() const { return m_ambigClass; } + + // setters + void setAmbiguityResolutionScope(const QCString &s) { m_ambiguityResolutionScope = s; } + void setScopePath(const QCString &s) { m_scopePath = s; } + void setAmbigClass(const ClassDef *cd) { m_ambigClass = cd; } + + private: + MemberDef *m_memberDef; + Protection m_prot; + Specifier m_virt; + bool m_inherited; + QCString m_scopePath; + QCString m_ambiguityResolutionScope; + const ClassDef *m_ambigClass = 0; }; /** Class representing all MemberInfo objects with the same name */ diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 3c44b69..04ddfb4 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1760,7 +1760,7 @@ void PerlModGenerator::addListOfAllMembers(const ClassDef *cd) MemberInfo *mi; for (mii.toFirst();(mi=mii.current());++mii) { - const MemberDef *md=mi->memberDef; + const MemberDef *md=mi->memberDef(); const ClassDef *mcd=md->getClassDef(); const Definition *d=md->getGroupDef(); if (d==0) d = mcd; @@ -1768,10 +1768,10 @@ void PerlModGenerator::addListOfAllMembers(const ClassDef *cd) m_output.openHash() .addFieldQuotedString("name", md->name()) .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness())) - .addFieldQuotedString("protection", getProtectionName(mi->prot)); + .addFieldQuotedString("protection", getProtectionName(mi->prot())); - if (!mi->ambiguityResolutionScope.isEmpty()) - m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope); + if (!mi->ambiguityResolutionScope().isEmpty()) + m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope()); m_output.addFieldQuotedString("scope", mcd->name()) .closeHash(); diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index 62e5576..895f70c 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -1668,8 +1668,8 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref if (isFunc) { const ArgumentList &al = md->argumentList(); - bindIntParameter(memberdef_insert,":const",al.constSpecifier); - bindIntParameter(memberdef_insert,":volatile",al.volatileSpecifier); + bindIntParameter(memberdef_insert,":const",al.constSpecifier()); + bindIntParameter(memberdef_insert,":volatile",al.volatileSpecifier()); bindIntParameter(memberdef_insert,":explicit",md->isExplicit()); bindIntParameter(memberdef_insert,":inline",md->isInline()); bindIntParameter(memberdef_insert,":final",md->isFinal()); @@ -1914,7 +1914,7 @@ static void associateAllClassMembers(const ClassDef *cd, struct Refid scope_refi MemberInfo *mi; for (mii.toFirst();(mi=mii.current());++mii) { - MemberDef *md = mi->memberDef; + MemberDef *md = mi->memberDef(); QCString qrefid = md->getOutputFileBase() + "_1" + md->anchor(); associateMember(md, insertRefid(qrefid), scope_refid); } diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 445916f..e918f24 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1086,10 +1086,10 @@ static void writeListOfAllMembers(const ClassDef *cd,FTextStream &t) MemberInfo *mi; for (mii.toFirst();(mi=mii.current());++mii) { - const MemberDef *md=mi->memberDef; + const MemberDef *md=mi->memberDef(); if (!md->isAnonymous()) { - Protection prot = mi->prot; + Protection prot = mi->prot(); Specifier virt=md->virtualness(); t << " anchor() << "\" prot=\""; @@ -1108,9 +1108,9 @@ static void writeListOfAllMembers(const ClassDef *cd,FTextStream &t) case Pure: t << "pure-virtual"; break; } t << "\""; - if (!mi->ambiguityResolutionScope.isEmpty()) + if (!mi->ambiguityResolutionScope().isEmpty()) { - t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope) << "\""; + t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope()) << "\""; } t << ">" << convertToXML(cd->name()) << "" << convertToXML(md->name()) << "" << endl; -- cgit v0.12