summaryrefslogtreecommitdiff
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp242
1 files changed, 128 insertions, 114 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index af4a690..952be64 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
@@ -1422,6 +1422,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
Definition *d=0;
ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
+ if (d==gd) // see bug 753608
+ {
+ if (getClassDef()) d = getClassDef();
+ else if (getNamespaceDef()) d = getNamespaceDef();
+ else if (getFileDef()) d = getFileDef();
+ }
//_writeTagData(compoundType);
_addToSearchIndex();
@@ -1602,11 +1608,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
// *** write name
if (!name().isEmpty() && name().at(0)!='@') // hide anonymous stuff
{
- //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
+ 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
- !(m_impl->prot==Private && !Config_getBool("EXTRACT_PRIVATE") && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
- !(isStatic() && m_impl->classDef==0 && !Config_getBool("EXTRACT_STATIC")) // hidden due to static-ness
+ !(m_impl->prot==Private && !extractPrivate && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
+ !(isStatic() && m_impl->classDef==0 && !extractStatic) // hidden due to static-ness
)
{
if (m_impl->annMemb)
@@ -1657,7 +1665,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(
@@ -1732,7 +1740,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() ||
@@ -1798,7 +1806,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
// write brief description
if (!briefDescription().isEmpty() &&
- Config_getBool("BRIEF_MEMBER_DESC")
+ Config_getBool(BRIEF_MEMBER_DESC)
/* && !annMemb */
)
{
@@ -1812,12 +1820,13 @@ 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();
ol.docify(" ");
- if (separateMemberPages ||
+ if (inheritedFrom ||
+ separateMemberPages ||
(m_impl->group!=0 && gd==0) ||
(m_impl->nspace!=0 && nd==0)
) // forward link to the page or group or namespace
@@ -1851,12 +1860,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 =
@@ -1903,7 +1912,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" ||
@@ -1919,9 +1928,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 &&
@@ -1937,7 +1946,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()) &&
@@ -1957,7 +1966,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()));
@@ -1968,7 +1977,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");
@@ -2056,7 +2065,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);
@@ -2068,11 +2077,9 @@ void MemberDef::_writeCallGraph(OutputList &ol)
{
msg("Generating call graph for function %s\n",qPrint(qualifiedName()));
ol.disable(OutputGenerator::Man);
- ol.startParagraph();
ol.startCallGraph();
ol.parseText(theTranslator->trCallGraph());
ol.endCallGraph(callGraph);
- ol.endParagraph();
ol.enableAll();
}
}
@@ -2081,7 +2088,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);
@@ -2093,11 +2100,9 @@ void MemberDef::_writeCallerGraph(OutputList &ol)
{
msg("Generating caller graph for function %s\n",qPrint(qualifiedName()));
ol.disable(OutputGenerator::Man);
- ol.startParagraph();
ol.startCallGraph();
ol.parseText(theTranslator->trCallerGraph());
ol.endCallGraph(callerGraph);
- ol.endParagraph();
ol.enableAll();
}
}
@@ -2144,7 +2149,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());
}
@@ -2337,6 +2342,7 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
ol.startDescTable(theTranslator->trEnumerationValues());
}
+ ol.startDescTableRow();
ol.addIndexItem(fmd->name(),ciname);
ol.addIndexItem(ciname,fmd->name());
@@ -2386,6 +2392,7 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
fmd,fmd->documentation()+"\n",TRUE,FALSE);
}
ol.endDescTableData();
+ ol.endDescTableRow();
}
}
}
@@ -2483,7 +2490,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();
@@ -2523,7 +2530,9 @@ void MemberDef::_writeGroupInclude(OutputList &ol,bool inGroup)
/*! Writes the "detailed documentation" section of this member to
* all active output formats.
*/
-void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
+void MemberDef::writeDocumentation(MemberList *ml,
+ int memCount,int memTotal,
+ OutputList &ol,
const char *scName,
Definition *container,
bool inGroup,
@@ -2539,8 +2548,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
// name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
- if ( !hasDocs ) return;
- if (isEnumValue() && !showEnumValues) return;
+ //if ( !hasDocs ) return;
+ //if (isEnumValue() && !showEnumValues) return;
SrcLangExt lang = getLanguage();
//printf("member=%s lang=%d\n",name().data(),lang);
@@ -2550,11 +2559,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString scopeName = scName;
QCString memAnchor = anchor();
QCString ciname = container->name();
+ Definition *scopedContainer = container; // see bug 753608
if (container->definitionType()==TypeGroup)
{
- if (getClassDef()) scopeName=getClassDef()->displayName();
- else if (getNamespaceDef()) scopeName=getNamespaceDef()->displayName();
- else if (getFileDef()) scopeName=getFileDef()->displayName();
+ if (getClassDef()) { scopeName=getClassDef()->displayName(); scopedContainer=getClassDef(); }
+ else if (getNamespaceDef()) { scopeName=getNamespaceDef()->displayName(); scopedContainer=getNamespaceDef(); }
+ else if (getFileDef()) { scopeName=getFileDef()->displayName(); scopedContainer=getFileDef(); }
ciname = ((GroupDef *)container)->groupTitle();
}
else if (container->definitionType()==TypeFile && getNamespaceDef())
@@ -2602,7 +2612,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else if (isFunction())
{
- title+=argsString();
+ title += "()";
}
int i=0,l;
static QRegExp r("@[0-9]+");
@@ -2613,12 +2623,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
bool htmlEndLabelTable=FALSE;
QStrList sl;
- getLabels(sl,container);
+ getLabels(sl,scopedContainer);
if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1)
{
// find enum type and insert it in the definition
- QListIterator<MemberDef> vmli(*ml);
+ MemberListIterator vmli(*ml);
MemberDef *vmd;
bool found=FALSE;
for ( ; (vmd=vmli.current()) && !found ; ++vmli)
@@ -2626,10 +2636,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
+ ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.right(ldef.length()-i-l));
found=TRUE;
}
@@ -2638,7 +2648,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
//printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
+ ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
// search for the last anonymous compound name in the definition
int si=ldef.find(' '),pi,ei=i+l;
if (si==-1) si=0;
@@ -2654,17 +2664,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-ei));
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.right(ldef.length()-ei));
}
}
else // not an enum value or anonymous compound
{
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,title,showInline);
+ ol.startMemberDoc(ciname,name(),memAnchor,title,memCount,memTotal,showInline);
ClassDef *cd=getClassDef();
NamespaceDef *nd=getNamespaceDef();
- if (!Config_getBool("HIDE_SCOPE_NAMES"))
+ if (!Config_getBool(HIDE_SCOPE_NAMES))
{
bool first=TRUE;
SrcLangExt lang = getLanguage();
@@ -2764,12 +2774,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (optVhdl)
{
- hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,container,ol);
+ hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,scopedContainer,ol);
}
else
{
linkifyText(TextGeneratorOLImpl(ol),
- container,
+ scopedContainer,
getBodyDef(),
this,
substitute(ldef,"::",sep)
@@ -2786,12 +2796,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//ol.docify(" = ");
ol.docify(" ");
QCString init = m_impl->initializer.simplifyWhiteSpace();
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,init);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,init);
}
else
{
ol.writeNonBreakableSpace(3);
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,m_impl->initializer);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,m_impl->initializer);
}
}
if (excpString()) // add exception list
@@ -2892,14 +2902,14 @@ 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)
)
)
{
ol.startParagraph();
ol.generateDoc(briefFile(),briefLine(),
- getOuterScope()?getOuterScope():container,this,
+ scopedContainer,this,
brief,FALSE,FALSE,0,TRUE,FALSE);
ol.endParagraph();
}
@@ -2916,22 +2926,22 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else
{
- ol.generateDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
+ ol.generateDoc(docFile(),docLine(),scopedContainer,this,detailed+"\n",TRUE,FALSE);
}
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),
- getOuterScope()?getOuterScope():container,this,
+ scopedContainer,this,
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())
{
- ol.generateDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
+ ol.generateDoc(inbodyFile(),inbodyLine(),scopedContainer,this,inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
@@ -2956,7 +2966,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// feed the result to the documentation parser
ol.generateDoc(
docFile(),docLine(),
- getOuterScope()?getOuterScope():container,
+ scopedContainer,
this, // memberDef
paramDocs, // docStr
TRUE, // indexWords
@@ -2965,7 +2975,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
- _writeEnumValues(ol,container,cfname,ciname,cname);
+ _writeEnumValues(ol,scopedContainer,cfname,ciname,cname);
_writeReimplements(ol);
_writeReimplementedBy(ol);
_writeCategoryRelation(ol);
@@ -2992,14 +3002,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())
@@ -3110,43 +3120,47 @@ void MemberDef::writeMemberDocSimple(OutputList &ol, Definition *container)
ClassDef *cd = m_impl->accessorClass;
//printf("===> %s::anonymous: %s\n",name().data(),cd?cd->name().data():"<none>");
- ol.startInlineMemberType();
- ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
+ if (container && container->definitionType()==Definition::TypeClass &&
+ !((ClassDef*)container)->isJavaEnum())
+ {
+ ol.startInlineMemberType();
+ ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- QCString ts = fieldType();
+ QCString ts = fieldType();
- if (cd) // cd points to an anonymous struct pointed to by this member
- // so we add a link to it from the type column.
- {
- int i=0;
- const char *prefixes[] = { "struct ","union ","class ", 0 };
- const char **p = prefixes;
- while (*p)
+ if (cd) // cd points to an anonymous struct pointed to by this member
+ // so we add a link to it from the type column.
{
- int l=qstrlen(*p);
- if (ts.left(l)==*p)
+ int i=0;
+ const char *prefixes[] = { "struct ","union ","class ", 0 };
+ const char **p = prefixes;
+ while (*p)
{
- ol.writeString(*p);
- i=l;
+ int l=qstrlen(*p);
+ if (ts.left(l)==*p)
+ {
+ ol.writeString(*p);
+ i=l;
+ }
+ p++;
}
- p++;
+ ol.writeObjectLink(cd->getReference(),
+ cd->getOutputFileBase(),
+ cd->anchor(),ts.mid(i));
}
- ol.writeObjectLink(cd->getReference(),
- cd->getOutputFileBase(),
- cd->anchor(),ts.mid(i));
- }
- else // use standard auto linking
- {
- linkifyText(TextGeneratorOLImpl(ol), // out
- scope, // scope
- getBodyDef(), // fileScope
- this, // self
- ts, // text
- TRUE // autoBreak
- );
+ else // use standard auto linking
+ {
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ scope, // scope
+ getBodyDef(), // fileScope
+ this, // self
+ ts, // text
+ TRUE // autoBreak
+ );
+ }
+ ol.endDoxyAnchor(cfname,memAnchor);
+ ol.endInlineMemberType();
}
- ol.endDoxyAnchor(cfname,memAnchor);
- ol.endInlineMemberType();
ol.startInlineMemberName();
ol.docify(doxyName);
@@ -3230,7 +3244,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(),
@@ -3480,10 +3494,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;
@@ -3799,7 +3813,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("{ ");
@@ -3936,9 +3950,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
@@ -5101,7 +5115,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" ||