54 static QCString
addTemplateNames(
const QCString &s,
const QCString &n,
const QCString &t)
57 QCString clRealName=n;
59 if ((i=clRealName.find(
'<'))!=-1)
61 clRealName=clRealName.left(i);
63 if ((i=clRealName.findRev(
"::"))!=-1)
65 clRealName=clRealName.right(clRealName.length()-i-2);
67 while ((i=s.find(clRealName,p))!=-1)
70 uint j=clRealName.length()+i;
71 if (s.length()==j || (s.at(j)!=
'<' && !
isId(s.at(j))))
81 p=i+clRealName.length();
83 result+=s.right(s.length()-p);
134 if (defArgList->count()==0)
return FALSE;
142 for (;(a=ali.current());++ali)
187 int il=cName.find(
'<');
188 int ir=cName.findRev(
'>');
189 if (il!=-1 && ir!=-1 && ir>il)
191 cName=cName.mid(il,ir-il+1);
207 bool paramTypeStarted=FALSE;
213 if (isDefine || first)
216 paramTypeStarted=TRUE;
223 QRegExp re(
")("),res(
"(.*\\*");
224 int vp=a->
type.find(re);
225 int wp=a->
type.find(res);
228 bool hasFuncPtrType=FALSE;
237 QCString n=a->
type.left(vp);
238 if (hasFuncPtrType) n=a->
type.left(wp);
239 if (md->
isObjCMethod()) { n.prepend(
"("); n.append(
")"); }
246 if (md->
isObjCMethod()) { n.prepend(
"("); n.append(
")"); }
255 if (paramTypeStarted)
258 paramTypeStarted=FALSE;
266 if (!a->
name.isEmpty() || a->
type==
"...")
287 if (!a->
array.isEmpty())
295 md,a->
type.right(a->
type.length()-vp));
321 if (key!=
",") key+=
":";
324 if (paramTypeStarted)
329 paramTypeStarted=TRUE;
379 int index = exception.find(
'(');
384 for (
int comma = exception.find(
',', index); comma!=-1; )
388 exception.mid(index,comma-index));
391 comma = exception.find(
',', index);
393 int close = exception.find(
')', index);
403 "missing ) in exception list on member %s",qPrint(md->
name()));
446 if (a->
defval.length()!=0)
589 classSectionSDict(0),
609 const char *t,
const char *a,
const char *e,
737 const char *t,
const char *na,
const char *a,
const char *e,
744 m_impl->
init(
this,t,a,e,p,v,s,r,mt,tal,al);
779 for (mli.toFirst();(md=mli.current());++mli)
788 for (it.toFirst();(e=it.current());++it)
797 for (mli.toFirst();(md=mli.current());++mli)
820 for (it.toFirst();(ml=it.current());++it)
894 for (mi.toFirst();(md=mi.current());++mi)
943 static bool separateMemberPages =
Config_getBool(SEPARATE_MEMBER_PAGES);
944 static bool inlineSimpleClasses =
Config_getBool(INLINE_SIMPLE_STRUCTS);
979 if (baseName.isEmpty())
982 "Internal inconsistency: member %s does not belong to any"
983 " container!",qPrint(
name())
1048 result.prepend(
"g");
1071 if (
name().isEmpty() ||
name().at(0)==
'@')
1189 QCString n =
name();
1190 if (!hideScopeNames)
1253 ltype.stripPrefix(
"friend ");
1254 static QRegExp r(
"@[0-9]+");
1255 int l,i=r.match(ltype,0,&l);
1263 while (il>=0 && (
isId(ltype.at(il)) || ltype.at(il)==
':' || ltype.at(il)==
'@')) il--;
1264 if (il>0) il++;
else if (il<0) il=0;
1265 while (ir<(
int)ltype.length() && (
isId(ltype.at(ir)) || ltype.at(ir)==
':' || ltype.at(ir)==
'@')) ir++;
1267 QCString annName = ltype.mid(il,ir-il);
1270 if (!cname.isEmpty() && annName.left(cname.length()+2)!=cname+
"::")
1276 if (annoClassDef==0)
1283 return annoClassDef;
1292 static bool hideUndocMembers =
Config_getBool(HIDE_UNDOC_MEMBERS);
1295 static bool hideFriendCompounds =
Config_getBool(HIDE_FRIEND_COMPOUNDS);
1319 bool visibleIfDocumented = (!hideUndocMembers ||
1326 bool visibleIfEnabled = !(hideUndocMembers &&
1333 bool visibleIfFriendCompound = !(hideFriendCompounds &&
1358 bool visibleIfNotDefaultCDTor = !(cOrDTor &&
1374 bool visible = visibleIfStatic && visibleIfDocumented &&
1375 visibleIfEnabled && visibleIfPrivate &&
1376 visibleIfNotDefaultCDTor &&
1377 visibleIfFriendCompound &&
1388 ltype.prepend(
"typedef ");
1395 ltype.stripPrefix(
"friend ");
1413 bool inGroup,
ClassDef *inheritedFrom,
const char *inheritId)
1423 ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0);
1424 if (cd) d=cd;
else if (nd) d=nd;
else if (fd) d=fd;
else d=gd;
1435 QCString cname = d->
name();
1454 bool writeAnchor = (inGroup ||
m_impl->
group==0) &&
1459 QCString doxyName=
name();
1460 if (!cname.isEmpty())
1467 if (!detailsVisible)
1501 ltype.stripPrefix(
"friend ");
1502 static QRegExp r(
"@[0-9]+");
1504 bool endAnonScopeNeeded=FALSE;
1505 int l,i=r.match(ltype,0,&l);
1524 QCString
varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
1527 if (varName.isEmpty() && (
name().isEmpty() ||
name().at(0)==
'@'))
1531 else if (!varName.isEmpty() && (varName.at(0)==
'*' || varName.at(0)==
'&'))
1536 endAnonScopeNeeded=TRUE;
1566 else if (ltype==
"@")
1586 if (htmlOn && !ltype.isEmpty())
1590 if (!ltype.isEmpty()) ol.
docify(
" ");
1609 if (!
name().isEmpty() &&
name().at(0)!=
'@')
1614 if (!(
name().isEmpty() ||
name().at(0)==
'@') &&
1739 ol.
docify(
" [implementation]");
1763 const char *s=sl.first();
1783 const char *s=sl.first();
1802 if (endAnonScopeNeeded)
1815 TRUE,FALSE,0,TRUE,FALSE);
1817 if (rootNode && !rootNode->
isEmpty())
1823 static bool separateMemberPages =
Config_getBool(SEPARATE_MEMBER_PAGES);
1828 if (inheritedFrom ||
1829 separateMemberPages ||
1864 static bool alwaysDetailedSec =
Config_getBool(ALWAYS_DETAILED_SEC);
1867 static bool hideUndocMembers =
Config_getBool(HIDE_UNDOC_MEMBERS);
1884 (alwaysDetailedSec &&
1915 bool friendCompoundFilter = !(
Config_getBool(HIDE_FRIEND_COMPOUNDS) &&
1924 bool result = ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !
isHidden()));
1931 static bool separateMemPages =
Config_getBool(SEPARATE_MEMBER_PAGES);
1932 static bool inlineSimpleStructs =
Config_getBool(INLINE_SIMPLE_STRUCTS);
1933 static bool hideUndocMembers =
Config_getBool(HIDE_UNDOC_MEMBERS);
1934 bool groupFilter =
getGroupDef()==0 || inGroup || separateMemPages;
1936 bool simpleFilter = (
hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs &&
1941 bool result = visible || simpleFilter;
1976 if (
isFriend()) sl.append(
"friend");
1977 else if (
isRelated()) sl.append(
"related");
1983 if (
isStatic()) sl.append(
"static");
1998 if (
isFinal()) sl.append(
"final");
2002 if (
isSealed()) sl.append(
"sealed");
2003 if (
isNew()) sl.append(
"new");
2011 if (
isAssign()) sl.append(
"assign");
2012 else if (
isCopy()) sl.append(
"copy");
2013 else if (
isRetain()) sl.append(
"retain");
2014 else if (
isWeak()) sl.append(
"weak");
2015 else if (
isStrong()) sl.append(
"strong");
2016 else if (
isUnretained()) sl.append(
"unsafe_unretained");
2024 if (lvirt==
Virtual) sl.append(
"virtual");
2025 else if (lvirt==
Pure) sl.append(
"pure virtual");
2026 if (
isSignal()) sl.append(
"signal");
2027 if (
isSlot()) sl.append(
"slot");
2029 if (
isDelete()) sl.append(
"delete");
2034 if (
isBound()) sl.append(
"bound");
2045 sl.append(
"implementation");
2054 sl.append(
"inherited");
2060 sl.append(
"implementation");
2074 warn_uncond(
"Call graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(
qualifiedName()));
2097 warn_uncond(
"Caller graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(
qualifiedName()));
2121 QCString reimplFromLine;
2130 int markerPos = reimplFromLine.find(
"@0");
2133 ol.
parseText(reimplFromLine.left(markerPos));
2158 reimplFromLine.length()-markerPos-2));
2163 err(
"translation error: no marker in trReimplementsFromList()\n");
2179 for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->
getClassDef());++mli)
2194 QCString reimplInLine;
2203 static QRegExp marker(
"@[0-9]+");
2204 int index=0,newIndex,matchLen;
2206 while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
2208 ol.
parseText(reimplInLine.mid(index,newIndex-index));
2210 uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
2215 for (mli.toLast();(bmd=mli.current()) && (bcd=bmd->
getClassDef());--mli)
2219 if (count==entryIndex)
break;
2224 if (ok && bcd && bmd)
2237 index=newIndex+matchLen;
2239 ol.
parseText(reimplInLine.right(reimplInLine.length()-index));
2287 if (i!=-1 && !name.isEmpty())
2320 const QCString &cfname,
const QCString &ciname,
2321 const QCString &cname)
2333 for (;(fmd=it.current());++it)
2413 QCString title =
name();
2416 if (title.at(0)==
'@')
2418 ldef = title =
"anonymous enum";
2426 ldef.prepend(
"enum ");
2431 if (ldef.at(0)==
'@')
2436 static QRegExp r(
"@[0-9]+");
2437 int l,i=r.match(ldef,0,&l);
2440 int si=ldef.find(
' '),pi,ei=i+l;
2442 while ((pi=r.match(ldef,i+l,&l))!=-1)
2447 int ni=ldef.find(
"::",si);
2448 if (ni>=ei) ei=ni+2;
2449 ldef = ldef.left(si) +
" { ... } " + ldef.right(ldef.length()-ei);
2455 int ep = ldef.find(
"::");
2458 int sp=ldef.findRev(
' ',ep);
2461 ldef=ldef.left(sp+1)+ldef.mid(ep+2);
2465 int dp = ldef.find(
':');
2468 ldef=ldef.left(dp+1);
2473 while (i>=0 && (
isId(ldef.at(i)) || ldef.at(i)==
':')) i--;
2474 while (i>=0 && isspace((uchar)ldef.at(i))) i--;
2478 QCString
tmp(
"("+ldef.left(i+1)+
")"+ldef.mid(i+1));
2482 if (
isStatic()) ldef.prepend(
"+ ");
else ldef.prepend(
"- ");
2493 static bool showGroupedMembInc =
Config_getBool(SHOW_GROUPED_MEMB_INC);
2497 if (inGroup && fd && showGroupedMembInc && !nm.isEmpty())
2534 int memCount,
int memTotal,
2539 bool showEnumValues,
2544 bool hasParameterList = FALSE;
2559 QCString scopeName = scName;
2560 QCString memAnchor =
anchor();
2561 QCString ciname = container->
name();
2568 ciname = ((
GroupDef *)container)->groupTitle();
2573 memAnchor.prepend(
"file_");
2576 QCString cname = container->
name();
2580 QCString doxyName=
name();
2582 if (!scopeName.isEmpty())
2584 doxyName.prepend(scopeName+sep);
2589 QCString title =
name();
2593 if (title.at(0)==
'@')
2595 ldef = title =
"anonymous enum";
2603 ldef.prepend(
"enum ");
2608 if (ldef.at(0)==
'@')
2618 static QRegExp r(
"@[0-9]+");
2624 bool htmlEndLabelTable=FALSE;
2634 for ( ; (vmd=vmli.current()) && !found ; ++vmli)
2653 int si=ldef.find(
' '),pi,ei=i+l;
2655 while ((pi=r.match(ldef,i+l,&l))!=-1)
2662 ol.
docify(ldef.left(si));
2665 int ni=ldef.find(
"::",si);
2666 if (ni>=ei) ei=ni+2;
2686 for (ali.toFirst();(tal=ali.current());++ali)
2690 if (!first) ol.
docify(
" ");
2702 QList<ArgumentList> tempParamLists;
2705 QListIterator<ArgumentList> ali(tempParamLists);
2707 for (ali.toFirst();(tal=ali.current());++ali)
2711 if (!first) ol.
docify(
" ");
2736 htmlEndLabelTable=TRUE;
2743 int ep = ldef.find(
"::");
2746 int sp=ldef.findRev(
' ',ep);
2749 ldef=ldef.left(sp+1)+ldef.mid(ep+2);
2751 ldef=ldef.mid(ep+2);
2755 int dp = ldef.find(
':');
2758 ldef=ldef.left(dp+1);
2760 int l=ldef.length();
2763 while (i>=0 && (
isId(ldef.at(i)) || ldef.at(i)==
':')) i--;
2764 while (i>=0 && isspace((uchar)ldef.at(i))) i--;
2768 QCString
tmp(
"("+ldef.left(i+1)+
")"+ldef.mid(i+1));
2772 if (
isStatic()) ldef.prepend(
"+ ");
else ldef.prepend(
"- ");
2788 if (scope==0) scope = nd;
2810 hasParameterList=
true;
2819 const char *s=sl.first();
2822 const char *ns = sl.next();
2830 if (hasParameterList)
2845 if (htmlEndLabelTable)
2848 ol.
writeString(
" <td class=\"mlabels-right\">\n");
2850 const char *s=sl.first();
2853 const char *ns = sl.next();
2889 -1,-1,TRUE,
this,FALSE,
this);
2904 if (!brief.isEmpty() &&
2912 scopedContainer,
this,
2913 brief,FALSE,FALSE,0,TRUE,FALSE);
2918 if (!detailed.isEmpty() ||
2935 scopedContainer,
this,
2958 for (ali.toFirst();(a=ali.current());++ali)
2963 paramDocs+=
"@param"+direction+
" "+a->
name+
" "+a->
docs;
2995 QCString cmd =
"<? $root=$_SERVER['DOCUMENT_ROOT']; "
2996 "passthru(\"$root/doxynotes --lookup "+
3018 "parameters of member %s are not (all) documented",
3024 "return type of member %s is not documented",
3035 if (ts.right(2)==
"::") ts = ts.left(ts.length()-2);
3036 static QRegExp re(
"[A-Z_a-z0-9]+::");
3038 while ((i=re.match(ts,0,&l))!=-1)
3040 ts=ts.left(i)+ts.mid(i+l);
3043 if (i!=-1) ts = ts.left(i);
3045 if (i!=-1) ts = ts.right(ts.length()-i-1);
3068 int l = name.length()+templSpec.length();
3069 if (!templSpec.isEmpty())
3078 printf(
"getClassFromType: type=%s name=%s start=%d length=%d\n",type.data(),name.data(),start,length);
3085 printf(
"getClassFromType: type=%s name=%s start=%d length=%d\n",type.data(),name.data(),start,length);
3102 if (
isTypedef()) type.prepend(
"typedef ");
3109 QCString doxyName =
name();
3111 QCString memAnchor =
anchor();
3114 if (scope) cname = scope->
name();
3115 if (doxyName.at(0)==
'@')
3117 doxyName=
"__unnamed__";
3124 !((
ClassDef*)container)->isJavaEnum())
3135 const char *prefixes[] = {
"struct ",
"union ",
"class ", 0 };
3136 const char **p = prefixes;
3183 if (!brief.isEmpty())
3187 brief,FALSE,FALSE,0,TRUE,FALSE);
3191 if (!detailed.isEmpty())
3195 detailed+
"\n",FALSE,FALSE,0,FALSE,FALSE);
3220 default:
return "unknown";
3254 name().find(
'@')==-1 && d && d->
name().find(
'@')==-1 &&
3276 QCString baseName=
name();
3277 int i=baseName.find(
'<');
3278 if (i!=-1) baseName=baseName.left(i);
3324 static QCString escapeAnchor(
const QCString &anchor)
3327 int l = anchor.length(),i;
3330 char c = anchor.at(i);
3331 if ((c>=
'a' && c<=
'z') || (c>=
'A' && c<=
'Z'))
3337 static char hexStr[]=
"0123456789ABCDEF";
3338 char escChar[]={
'_', 0, 0, 0 };
3339 escChar[1]=hexStr[c>>4];
3340 escChar[2]=hexStr[c&0xf];
3350 QCString memAnchor =
name();
3365 memAnchor.prepend(buf);
3370 QCString sigStr(33);
3371 MD5Buffer((
const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
3373 MD5SigToString(md5_sig,sigStr.rawData(),33);
3378 const QCString &fileName,
int startLine,
3432 for (;(arg=ali.current());++ali)
3440 QCString methodName=
name();
3441 if (methodName.left(9)==
"operator ")
3497 static bool optimizeOutputForC =
Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
3505 if (optimizeOutputForC)
3517 QCString memName =
name();
3520 ((
ClassDef*)pd)->displayName() : pd->name();
3537 memName =
"[" + pd->name() +
" " +
name() +
"]";
3558 sprintf(key,
"%p",d);
3566 sprintf(key,
"%p",d);
3579 "Internal inconsistency: recursion detected in overload relation for member %s!"
3597 tagFile <<
" <member kind=\"";
3617 tagFile <<
"\" protection=\"";
3620 else tagFile <<
"private";
3624 tagFile <<
"\" virtualness=\"";
3626 else tagFile <<
"pure";
3630 tagFile <<
"\" static=\"yes";
3632 tagFile <<
"\">" <<
endl;
3640 QCString idStr =
id();
3641 if (!idStr.isEmpty())
3653 for (mli.toFirst();(fmd=mli.current());++mli)
3659 QCString idStr = fmd->
id();
3660 if (!idStr.isEmpty())
3670 tagFile <<
" </member>" <<
endl;
3688 else if (
name()==
"__init__" &&
3702 int i=locName.find(
'<');
3733 isDestructor =
name()==
"~this";
3737 isDestructor =
name()==
"__destruct";
3741 isDestructor =
name()==
"destructor";
3743 else if (
name()==
"__del__" &&
3751 (
name().find(
'~')!=-1 ||
name().find(
'!')!=-1)
3752 &&
name().find(
"operator")==-1;
3774 uint numVisibleEnumValues=0;
3779 for (mli.toFirst();(fmd=mli.current());++mli)
3789 QCString n =
name();
3790 int i=n.findRev(
"::");
3791 if (i!=-1) n=n.right(n.length()-i-2);
3816 uint enumValuesPerLine = (uint)
Config_getInt(ENUM_VALUES_PER_LINE);
3817 if (numVisibleEnumValues>0 && enumValuesPerLine>0)
3830 if (numVisibleEnumValues>enumValuesPerLine
3831 && (enumMemCount%enumValuesPerLine)==0
3863 bool prevVisible = fmdVisible;
3878 if (numVisibleEnumValues>enumValuesPerLine)
3910 for (;(a=ali.current());++ali)
3961 const char *docFile,
int docLine)
3963 m_impl->inbodyDocs = docs;
3964 m_impl->inbodyDocs =
m_impl->inbodyDocs.stripWhiteSpace();
3987 if (
isStatic()) qm=
"+";
else qm=
"-";
4022 if (
isStatic()) qm=
"+ ";
else qm=
"- ";
4859 for (;(argDst=aliDst.current()) && (argSrc=aliSrc.current());++aliDst,++aliSrc)
4872 for (;(argDst=aliDst.current()) && (argSrc=aliSrc.current());++aliDst,++aliSrc)
4886 for (ali.toFirst();(a=ali.current());++ali)
4940 for (decAli.toFirst(),defAli.toFirst();
4941 (decA=decAli.current()) && (defA=defAli.current());
4948 if (decA->
docs.isEmpty() && !defA->
docs.isEmpty())
4952 else if (defA->
docs.isEmpty() && !decA->
docs.isEmpty())
5118 static bool hideFriendCompounds =
Config_getBool(HIDE_FRIEND_COMPOUNDS);