diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 12:06:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 15:04:33 (GMT) |
commit | a93ec7221d1a258f0268e0c081782478372efe0b (patch) | |
tree | 5f7e41dd02582a699a6f6f6540c463c5d168983e /src/memberdef.cpp | |
parent | 4dfc5887660284b345eb93b6c07dc1f91e780fac (diff) | |
download | Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.zip Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.gz Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.bz2 |
Changed configuration mechanism to directly access options in order to improve performance
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r-- | src/memberdef.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index c5d8334..5aa8154 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -658,7 +658,7 @@ void MemberDefImpl::init(Definition *def, explExt=FALSE; tspec=FALSE; cachedAnonymousType=0; - maxInitLines=Config_getInt("MAX_INITIALIZER_LINES"); + maxInitLines=Config_getInt(MAX_INITIALIZER_LINES); userInitLines=-1; docEnumValues=FALSE; // copy function template arguments (if any) @@ -940,8 +940,8 @@ bool MemberDef::hasExamples() QCString MemberDef::getOutputFileBase() const { - static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES"); - static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS"); + static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES); + static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS); QCString baseName; //printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n", @@ -1053,7 +1053,7 @@ QCString MemberDef::anchor() const void MemberDef::_computeLinkableInProject() { - static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + static bool extractStatic = Config_getBool(EXTRACT_STATIC); m_isLinkableCached = 2; // linkable //printf("MemberDef::isLinkableInProject(name=%s)\n",name().data()); if (isHidden()) @@ -1184,7 +1184,7 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, FileDef *fd,GroupDef *gd,bool onlyText) { SrcLangExt lang = getLanguage(); - static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); + static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES); QCString sep = getLanguageSpecificSeparator(lang,TRUE); QCString n = name(); if (!hideScopeNames) @@ -1288,11 +1288,11 @@ ClassDef *MemberDef::getClassDefOfAnonymousType() */ bool MemberDef::isBriefSectionVisible() const { - static bool extractStatic = Config_getBool("EXTRACT_STATIC"); - static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); - static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC"); - static bool repeatBrief = Config_getBool("REPEAT_BRIEF"); - static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); + static bool extractStatic = Config_getBool(EXTRACT_STATIC); + static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS); + static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC); + static bool repeatBrief = Config_getBool(REPEAT_BRIEF); + static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS); //printf("Member %s grpId=%d docs=%s file=%s args=%s\n", // name().data(), @@ -1347,7 +1347,7 @@ bool MemberDef::isBriefSectionVisible() const // hide member if it overrides a member in a superclass and has no // documentation of its own //bool visibleIfDocVirtual = !reimplements() || - // !Config_getBool("INHERIT_DOCS") || + // !Config_getBool(INHERIT_DOCS) || // hasDocs; // true if this member is a constructor or destructor @@ -1602,8 +1602,8 @@ void MemberDef::writeDeclaration(OutputList &ol, // *** write name if (!name().isEmpty() && name().at(0)!='@') // hide anonymous stuff { - static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); - static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); + static bool extractStatic = Config_getBool(EXTRACT_STATIC); //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation()); if (!(name().isEmpty() || name().at(0)=='@') && // name valid (hasDocumentation() || isReference()) && // has docs @@ -1659,7 +1659,7 @@ void MemberDef::writeDeclaration(OutputList &ol, } else // index member { - //static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES"); + //static bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES); //QCString cfname = getOutputFileBase(); //QCString cfiname = d->getOutputFileBase(); //Doxygen::indexList->addIndexItem( @@ -1734,7 +1734,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.endTypewriter(); } - bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); + bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (isProperty() && (isSettable() || isGettable() || isPrivateSettable() || isPrivateGettable() || @@ -1800,7 +1800,7 @@ void MemberDef::writeDeclaration(OutputList &ol, // write brief description if (!briefDescription().isEmpty() && - Config_getBool("BRIEF_MEMBER_DESC") + Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */ ) { @@ -1814,7 +1814,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.writeDoc(rootNode,getOuterScope()?getOuterScope():d,this); if (detailsVisible) { - static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES"); + static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); //ol.endEmphasis(); @@ -1854,12 +1854,12 @@ void MemberDef::writeDeclaration(OutputList &ol, bool MemberDef::isDetailedSectionLinkable() const { - static bool extractAll = Config_getBool("EXTRACT_ALL"); - static bool alwaysDetailedSec = Config_getBool("ALWAYS_DETAILED_SEC"); - static bool repeatBrief = Config_getBool("REPEAT_BRIEF"); - static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC"); - static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); - static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + static bool extractAll = Config_getBool(EXTRACT_ALL); + static bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC); + static bool repeatBrief = Config_getBool(REPEAT_BRIEF); + static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC); + static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS); + static bool extractStatic = Config_getBool(EXTRACT_STATIC); // the member has details documentation for any of the following reasons bool docFilter = @@ -1906,7 +1906,7 @@ bool MemberDef::isDetailedSectionLinkable() const // hide friend (class|struct|union) member if HIDE_FRIEND_COMPOUNDS // is true - bool friendCompoundFilter = !(Config_getBool("HIDE_FRIEND_COMPOUNDS") && + bool friendCompoundFilter = !(Config_getBool(HIDE_FRIEND_COMPOUNDS) && isFriend() && (m_impl->type=="friend class" || m_impl->type=="friend struct" || @@ -1922,9 +1922,9 @@ bool MemberDef::isDetailedSectionLinkable() const bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const { - static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES"); - static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS"); - static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); + static bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES); + static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS); + static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS); bool groupFilter = getGroupDef()==0 || inGroup || separateMemPages; bool fileFilter = getNamespaceDef()==0 || !getNamespaceDef()->isLinkable() || !inFile; bool simpleFilter = (hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs && @@ -1940,7 +1940,7 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const void MemberDef::getLabels(QStrList &sl,Definition *container) const { - static bool inlineInfo = Config_getBool("INLINE_INFO"); + static bool inlineInfo = Config_getBool(INLINE_INFO); Specifier lvirt=virtualness(); if ((!isObjCMethod() || isOptional() || isRequired()) && @@ -1960,7 +1960,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const //ol.docify(" ["); SrcLangExt lang = getLanguage(); bool optVhdl = lang==SrcLangExt_VHDL; - bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); + bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (optVhdl) { sl.append(VhdlDocGen::trTypeString(getMemberSpecifiers())); @@ -1971,7 +1971,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const else if (isRelated()) sl.append("related"); else { - if (Config_getBool("INLINE_INFO") && isInline()) sl.append("inline"); + if (Config_getBool(INLINE_INFO) && isInline()) sl.append("inline"); if (isExplicit()) sl.append("explicit"); if (isMutable()) sl.append("mutable"); if (isStatic()) sl.append("static"); @@ -2059,7 +2059,7 @@ void MemberDef::_writeCallGraph(OutputList &ol) { // write call graph if (m_impl->hasCallGraph - && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT") + && (isFunction() || isSlot() || isSignal()) && Config_getBool(HAVE_DOT) ) { DotCallGraph callGraph(this,FALSE); @@ -2084,7 +2084,7 @@ void MemberDef::_writeCallGraph(OutputList &ol) void MemberDef::_writeCallerGraph(OutputList &ol) { if (m_impl->hasCallerGraph - && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT") + && (isFunction() || isSlot() || isSignal()) && Config_getBool(HAVE_DOT) ) { DotCallGraph callerGraph(this, TRUE); @@ -2147,7 +2147,7 @@ void MemberDef::_writeReimplements(OutputList &ol) { ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), 0,bcd->displayName()); - if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ ) + if (bcd->isLinkableInProject()/* && !Config_getBool(PDF_HYPERLINKS)*/ ) { writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor()); } @@ -2486,7 +2486,7 @@ void MemberDef::_writeGroupInclude(OutputList &ol,bool inGroup) { // only write out the include file if this is not part of a class or file // definition - static bool showGroupedMembInc = Config_getBool("SHOW_GROUPED_MEMB_INC"); + static bool showGroupedMembInc = Config_getBool(SHOW_GROUPED_MEMB_INC); FileDef *fd = getFileDef(); QCString nm; if (fd) nm = getFileDef()->docName(); @@ -2667,7 +2667,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ClassDef *cd=getClassDef(); NamespaceDef *nd=getNamespaceDef(); - if (!Config_getBool("HIDE_SCOPE_NAMES")) + if (!Config_getBool(HIDE_SCOPE_NAMES)) { bool first=TRUE; SrcLangExt lang = getLanguage(); @@ -2895,8 +2895,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, /* write brief description */ if (!brief.isEmpty() && - (Config_getBool("REPEAT_BRIEF") || - !Config_getBool("BRIEF_MEMBER_DESC") + (Config_getBool(REPEAT_BRIEF) || + !Config_getBool(BRIEF_MEMBER_DESC) ) ) { @@ -2929,8 +2929,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, inbodyDocumentation()+"\n",TRUE,FALSE); } } - else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") || - !Config_getBool("BRIEF_MEMBER_DESC"))) + else if (!brief.isEmpty() && (Config_getBool(REPEAT_BRIEF) || + !Config_getBool(BRIEF_MEMBER_DESC))) { if (!inbodyDocumentation().isEmpty()) { @@ -2995,14 +2995,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.endIndent(); // enable LaTeX again - //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex); + //if (Config_getBool(EXTRACT_ALL) && !hasDocs) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); //------------------------------------------------ - if (!Config_getBool("EXTRACT_ALL") && - Config_getBool("WARN_IF_UNDOCUMENTED") && - Config_getBool("WARN_NO_PARAMDOC") && + if (!Config_getBool(EXTRACT_ALL) && + Config_getBool(WARN_IF_UNDOCUMENTED) && + Config_getBool(WARN_NO_PARAMDOC) && !Doxygen::suppressDocWarnings) { if (!hasDocumentedParams()) @@ -3233,7 +3233,7 @@ void MemberDef::warnIfUndocumented() t="group", d=gd; else t="file", d=fd; - static bool extractAll = Config_getBool("EXTRACT_ALL"); + static bool extractAll = Config_getBool(EXTRACT_ALL); //printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n", // name().data(), @@ -3483,10 +3483,10 @@ void MemberDef::setInitializer(const char *initializer) void MemberDef::addListReference(Definition *) { - static bool optimizeOutputForC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C"); - //static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); - //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); - //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); + static bool optimizeOutputForC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C); + //static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES); + //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA); + //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); SrcLangExt lang = getLanguage(); visited=TRUE; if (!isLinkableInProject()) return; @@ -3802,7 +3802,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, typeDecl.writeChar(' '); } - uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE"); + uint enumValuesPerLine = (uint)Config_getInt(ENUM_VALUES_PER_LINE); if (numVisibleEnumValues>0 && enumValuesPerLine>0) { typeDecl.docify("{ "); @@ -3939,9 +3939,9 @@ void MemberDef::enableCallerGraph(bool e) bool MemberDef::protectionVisible() const { return m_impl->prot==Public || - (m_impl->prot==Private && Config_getBool("EXTRACT_PRIVATE")) || - (m_impl->prot==Protected && Config_getBool("EXTRACT_PROTECTED")) || - (m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE")); + (m_impl->prot==Private && Config_getBool(EXTRACT_PRIVATE)) || + (m_impl->prot==Protected && Config_getBool(EXTRACT_PROTECTED)) || + (m_impl->prot==Package && Config_getBool(EXTRACT_PACKAGE)); } #endif @@ -5104,7 +5104,7 @@ const ArgumentList *MemberDef::typeConstraints() const bool MemberDef::isFriendToHide() const { - static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); + static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS); bool isFriendToHide = hideFriendCompounds && (m_impl->type=="friend class" || m_impl->type=="friend struct" || |