56 void init(
const char *defFileName,
const char *name,
57 const QCString &ctStr,
const char *fName);
207 const QCString &ctStr,
const char *fName)
296 const char *defFileName,
int defLine,
int defColumn,
298 const char *lref,
const char *fName,
299 bool isSymbol,
bool isJavaEnum)
356 n=
"<"+n.left(n.length()-2)+
">";
408 for (mli.toFirst();(ml=mli.current());++mli)
421 for (;(mg=mgli.current());++mgli)
576 isSimple=QCString(md->
typeString()).find(
")(")==-1;
694 if (md->
name()==
"operator->")
703 (QCString(md->
typeString())==
"friend class" ||
704 QCString(md->
typeString())==
"friend struct" ||
742 for (mli.toFirst();(ml=mli.current());++mli)
754 for (;(mg=mgli.current());++mgli)
767 for (;(mg=mgli.current());++mgli)
781 for (;(mg=mgli.current());++mgli)
788 for (mli.toFirst();(ml=mli.current());++mli)
807 for (qdi.toFirst();(cd=qdi.current());++qdi)
824 const char *s=sl.first();
837 const char *includeName,
bool local,
bool force)
850 if (force && includeName)
876 QList<ArgumentList> &result,
887 if (!name.isEmpty()) name+=
"::";
889 if ( clName.right(2)==
"-p")
891 clName = clName.left(clName.length()-2);
898 if (!isSpecialization)
913 QList<ArgumentList> specs;
919 QListIterator<ArgumentList> spi(specs);
921 for (spi.toFirst();(al=spi.current());++spi)
924 QListIterator<Argument> ali(*al);
926 while ((a=ali.current()))
929 if (!a->
name.isEmpty())
934 if (a->
defval.length()!=0)
946 ol.
docify(type.lower()+
" "+name);
1034 const QCString &title,
const QCString &anchor)
1048 if (!anchor.isEmpty())
1112 for (;(fd=li.current());++li)
1127 QCString fname = fd->
name();
1179 for (;(ibcd=it.current());++it)
1188 for (;(ibcd=it.current());++it)
1202 bool renderDiagram = FALSE;
1216 renderDiagram = TRUE;
1228 renderDiagram = TRUE;
1243 QRegExp marker(
"@[0-9]+");
1244 int index=0,newIndex,matchLen;
1246 while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
1248 ol.
parseText(inheritLine.mid(index,newIndex-index));
1250 uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
1275 err(
"invalid marker %d in inherits list!\n",entryIndex);
1277 index=newIndex+matchLen;
1279 ol.
parseText(inheritLine.right(inheritLine.length()-index));
1288 QRegExp marker(
"@[0-9]+");
1289 int index=0,newIndex,matchLen;
1291 while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
1293 ol.
parseText(inheritLine.mid(index,newIndex-index));
1295 uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
1310 index=newIndex+matchLen;
1312 ol.
parseText(inheritLine.right(inheritLine.length()-index));
1404 void ClassDef::writeAllMembersLink(
OutputList &ol)
1432 for (;(mg=mgli.current());++mgli)
1493 static bool inlineInheritedMembers =
Config_getBool(INLINE_INHERITED_MEMB);
1521 QListIterator<LayoutDocEntry> eli(
1529 for (eli.toFirst();(lde=eli.current());++eli)
1563 for (li.toFirst();li.current();++li)
1582 tagFile <<
">" <<
endl;
1589 QCString idStr =
id();
1590 if (!idStr.isEmpty())
1598 for (;(a=ali.current());++ali)
1607 for (it.toFirst();(ibcd=it.current());++it)
1614 tagFile <<
" <base";
1617 tagFile <<
" protection=\"protected\"";
1621 tagFile <<
" protection=\"private\"";
1625 tagFile <<
" virtualness=\"virtual\"";
1632 QListIterator<LayoutDocEntry> eli(
1635 for (eli.toFirst();(lde=eli.current());++eli)
1637 switch (lde->
kind())
1645 for (cli.toFirst();(innerCd=cli.current());++cli)
1675 for (;(mg=mgli.current());++mgli)
1687 tagFile <<
" </compound>" <<
endl;
1697 QListIterator<LayoutDocEntry> eli(
1742 for (eli.toFirst();(lde=eli.current());++eli)
1744 switch (lde->
kind())
1821 anchor.isEmpty() ? QCString(
"details") :
anchor);
1826 if (!anchor.isEmpty())
1832 if (!(usePDFLatex && pdfHyperlinks))
1854 static bool hideUndocClasses =
Config_getBool(HIDE_UNDOC_CLASSES);
1855 static bool extractLocalClasses =
Config_getBool(EXTRACT_LOCAL_CLASSES);
1859 (linkable || (!hideUndocClasses && (!
isLocal() || extractLocalClasses)))
1929 if (rootNode && !rootNode->
isEmpty())
1948 if (
isFinal()) sl.append(
"final");
1949 if (
isSealed()) sl.append(
"sealed");
1958 const char *s=sl.first();
1961 const char *ns = sl.next();
1974 QCString pageType =
" ";
1990 QListIterator<LayoutDocEntry> eli(
1993 for (eli.toFirst();(lde=eli.current());++eli)
1995 switch (lde->
kind())
2083 err(
"Internal inconsistency: member %d should not be part of "
2084 "LayoutDocManager::Class entry list\n",lde->
kind());
2138 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
2141 QCString pageTitle =
title();
2144 if (!generateTreeView)
2179 for (mli.toFirst();(ml=mli.current());++mli)
2202 for (;(mni=mnili.current());++mnili)
2206 for (mnii.toFirst();(mi=mnii.current());++mnii)
2249 for (cli.toFirst();(innerCd=cli.current());++cli)
2256 msg(
"Generating docs for nested compound %s...\n",qPrint(innerCd->
name()));
2270 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
2279 if (!generateTreeView)
2304 for (mnii.toFirst();(mni=mnii.current());++mnii)
2308 for (;(mi=it.current());++it)
2318 if (cd && !md->
name().isEmpty() && md->
name()[0]!=
'@')
2320 bool memberWritten=FALSE;
2327 if ((idx&1)==0) ol.
writeString(
" class=\"even\"");
2380 if ((idx&1)==0) ol.
writeString(
" class=\"even\"");
2388 ol.
writeString(
"+ </td><td class=\"entry\">");
2390 ol.
writeString(
"- </td><td class=\"entry\">");
2459 else if (md->
isFriend()) sl.append(
"friend");
2460 else if (md->
isRelated()) sl.append(
"related");
2464 sl.append(
"inline");
2466 if (md->
isMutable()) sl.append(
"mutable");
2467 if (prot==
Protected) sl.append(
"protected");
2468 else if (prot==
Private) sl.append(
"private");
2469 else if (prot==
Package) sl.append(
"package");
2471 sl.append(
"virtual");
2472 else if (virt==
Pure) sl.append(
"pure virtual");
2473 if (md->
isStatic()) sl.append(
"static");
2474 if (md->
isSignal()) sl.append(
"signal");
2475 if (md->
isSlot()) sl.append(
"slot");
2481 if (md->
isBound()) sl.append(
"bound");
2489 const char *s=sl.first();
2494 if (s) ol.
writeString(
"</span><span class=\"mlabel\">");
2548 static bool hideUndocRelation =
Config_getBool(HIDE_UNDOC_RELATIONS);
2549 if (typeConstraint.isEmpty() || type.isEmpty())
return;
2551 if (cd==0 && !hideUndocRelation)
2586 for (;(a=ali.current());++ali)
2590 QCString typeConstraint;
2613 for (;(a=ali.current());++ali)
2627 for (;(a=ali.current());++ali)
2646 for ( ; bcli.current() && !found ; ++bcli )
2648 ClassDef *bcd=bcli.current()->classDef;
2657 QDictIterator<ClassDef> tidi(*cil);
2658 for ( ; tidi.current() && !found ; ++tidi)
2661 found = found || tidi.current()->hasNonReferenceSuperClass();
2674 ClassDef *inheritedFrom,
const char *inheritId)
2702 for (;(mg=mgli.current());++mgli)
2709 QListIterator<LayoutDocEntry> eli(
2712 for (eli.toFirst();(lde=eli.current());++eli)
2725 static bool extractLocal =
Config_getBool(EXTRACT_LOCAL_CLASSES);
2734 return !
name().isEmpty() &&
2762 static bool hideUndocClasses =
Config_getBool(HIDE_UNDOC_CLASSES);
2775 !hideUndocClasses ||
2799 err(
"Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(
name()),qPrint(bcd->
name()));
2807 for ( ; bcli.current() && !found ; ++bcli)
2809 ClassDef *ccd=bcli.current()->classDef;
2815 found=ccd->
isBaseClass(bcd,followInstances,level+1);
2828 err(
"Possible recursive class relation while inside %s and looking for derived class %s\n",qPrint(
name()),qPrint(cd->
name()));
2834 for ( ; bcli.current() && !found ; ++bcli)
2836 ClassDef *ccd=bcli.current()->classDef;
2850 return md->
name()==
"operator=" ||
2868 int sepLen = sep.length();
2872 bool inlineInheritedMembers =
Config_getBool(INLINE_INHERITED_MEMB);
2878 for ( ; (bcd=bcli.current()) ; ++bcli )
2892 for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
2904 for ( ; (srcMi=srcMnii.current()) ; ++srcMnii )
2913 for ( ; (dstMi=dstMnii.current()) && !found; ++dstMnii )
2920 if (srcCd==dstCd || dstCd->
isBaseClass(srcCd,TRUE))
2934 hidden = hidden || !found;
2996 if (inlineInheritedMembers)
3017 QCString scope=bClass->
name()+sep;
3037 dstMni->append(newMi);
3051 for (;(mi=mnii.current());++mnii)
3073 if (inlineInheritedMembers)
3086 newMni->append(newMi);
3113 static bool extractLocalMethods =
Config_getBool(EXTRACT_LOCAL_METHODS);
3114 bool makePrivate = category->
isLocal();
3117 if (makePrivate && !extractLocalMethods)
return;
3130 for ( ; (bcd=bcli.current()) ; ++bcli )
3132 insertBaseClass(bcd->classDef,bcd->usedName,bcd->prot,bcd->virt,bcd->templSpecifiers);
3135 if (bcd->classDef->subClasses())
3139 for ( ; (scd=scli.current()) ; ++scli )
3141 if (scd->classDef==category)
3157 if (srcMnd && dstMnd)
3161 for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
3197 for (;(mi=mnii.current());++mnii)
3212 newMni->append(newMi);
3232 if (makePrivate || isExtension)
3254 if (prot==
Private && !extractPrivate)
return;
3269 QCString acc = accessName;
3274 case Public: acc.prepend(
"+");
break;
3275 case Private: acc.prepend(
"-");
break;
3276 case Protected: acc.prepend(
"#");
break;
3277 case Package: acc.prepend(
"~");
break;
3288 if (prot==
Private && !extractPrivate)
return;
3303 QCString acc = accessName;
3308 case Public: acc.prepend(
"+");
break;
3309 case Private: acc.prepend(
"-");
break;
3310 case Protected: acc.prepend(
"#");
break;
3311 case Package: acc.prepend(
"~");
break;
3324 void ClassDef::determineImplUsageRelation()
3328 for (;(mni=mnili.current());++mnili)
3332 for (mnii.toFirst();(mi=mnii.current());++mnii)
3341 QCString usedClassName;
3354 for (ali.toFirst();(arg=ali.current());++ali,++count)
3356 if (arg->name==usedClassName)
3362 cd->setIsTemplateBaseClass(count);
3413 if (
m_impl->usesClassDict)
3415 msg(
"Class %s uses the following classes:\n",
name().data());
3418 for (;(ucd=ucdi.current());++ucdi)
3421 QDictIterator<void> dvi(*ucd->
accessors);
3423 for (;(s=dvi.currentKey());++dvi)
3440 QCString type = typeStr;
3441 static const QRegExp re(
"[a-z_A-Z][a-z_A-Z0-9:]*");
3443 while ((i=re.match(type,p,&l))!=-1)
3446 if (cd==0) cd=
getClass(type.mid(i,l));
3469 void ClassDef::determineIntfUsageRelation()
3473 for (;(mni=mnili.current());++mnili)
3477 for (mnii.toFirst();(mi=mnii.current());++mnii)
3489 if (!md->
name().isEmpty() && md->
name()[0]!=
'@' &&
3501 for (;(a=ali.current());++ali)
3503 if (!a->
type.isEmpty() && a->
type.at(0)!=
'@')
3521 case Class:
return "module";
3522 case Struct:
return "type";
3523 case Union:
return "union";
3528 default:
return "unknown";
3536 case Struct:
return "struct";
3537 case Union:
return "union";
3542 case Service:
return "service";
3544 default:
return "unknown";
3551 static bool inlineGroupedClasses =
Config_getBool(INLINE_GROUPED_CLASSES);
3552 static bool inlineSimpleClasses =
Config_getBool(INLINE_SIMPLE_STRUCTS);
3610 for (;(mni=mnili.current());++mnili)
3614 for (mnii.toFirst();(mi=mnii.current());++mnii)
3617 md->
setGroupDef(gd,pri,fileName,startLine,hasDocs);
3642 if (name==0)
return 0;
3691 int startLine,
int startColumn,
const QCString &templSpec,
bool &freshInstance)
3693 freshInstance = FALSE;
3699 if (templateClass==0)
3711 return templateClass;
3722 if (templateClass==0)
3726 templateClass =
new ClassDef(
"<code>",1,1,tcname,
3732 return templateClass;
3737 if (templateNames==0)
return;
3744 QDictIterator<int> qdi(*templateNames);
3745 for (;qdi.current();++qdi)
3765 for (;(mni=mnili.current());++mnili)
3769 for (mnii.toFirst();(mi=mnii.current());++mnii)
3776 delete actualArguments;
3844 QList<ArgumentList> *actualParams,
int *actualParamIndex)
const
3858 else if (!hideScopeNames)
3866 if (!scName.isEmpty()) scName+=scopeSeparator;
3881 if (actualParams && *actualParamIndex<(
int)actualParams->count())
3883 al = actualParams->at(*actualParamIndex);
3884 if (!isSpecialization)
3888 (*actualParamIndex)++;
3892 if (!isSpecialization)
3940 for (;(mg=mgli.current());++mgli)
3947 for (mli.toFirst();(ml=mli.current());++mli)
3968 for (mnii.toFirst();(mi=mnii.current());++mnii)
3996 for (mli.toFirst();(ml=mli.current());++mli)
4013 for (;(ml=mli.current());++mli)
4028 ml->
setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4039 for (;(ml=mli.current());++mli)
4050 int lt2,
bool invert,
bool showAlways,QPtrDict<void> *visitedClasses)
4075 for (;(mg=mgli.current());++mgli)
4081 static bool inlineInheritedMembers =
Config_getBool(INLINE_INHERITED_MEMB);
4082 if (!inlineInheritedMembers)
4093 ClassDef *inheritedFrom,
bool invert,
bool showAlways,
4094 QPtrDict<void> *visitedClasses)
4098 bool process = count>0;
4101 if ((process^invert) || showAlways)
4107 for (it.toFirst();(ibcd=it.current());++it)
4116 if (visitedClasses->find(icd)==0)
4118 visitedClasses->insert(icd,icd);
4132 QCString &title,QCString &subtitle)
4135 QListIterator<LayoutDocEntry> eli(
4138 for (eli.toFirst();(lde=eli.current());++eli)
4143 if (lmd->
type==type)
4145 title = lmd->
title(lang);
4158 QListIterator<LayoutDocEntry> eli(
4161 for (eli.toFirst();(lde=eli.current());++eli)
4184 QListIterator<LayoutDocEntry> eli(
4187 for (eli.toFirst();(lde=eli.current());++eli)
4202 ClassDef *inheritedFrom,
bool additional)
4215 for (;(mg=mgli.current());++mgli)
4219 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4232 ClassDef *inheritedFrom,
bool invert,
bool showAlways,
4233 QPtrDict<void> *visitedClasses)
4238 bool process = count>0;
4241 if ((process^invert) || showAlways)
4247 for (it.toFirst();(ibcd=it.current());++it)
4254 if (lt2==-1 && lt3!=-1)
4259 if (visitedClasses->find(icd)==0)
4261 visitedClasses->insert(icd,icd);
4265 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4280 const char *subTitle,
bool showInline,
ClassDef *inheritedFrom,
int lt2,
4281 bool invert,
bool showAlways,QPtrDict<void> *visitedClasses)
4302 QCString tt =
title, st = subTitle;
4306 ml->
writeDeclarations(ol,
this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
4313 ml2->
writeDeclarations(ol,
this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
4315 static bool inlineInheritedMembers =
Config_getBool(INLINE_INHERITED_MEMB);
4316 if (!inlineInheritedMembers)
4320 inheritedFrom ? inheritedFrom :
this,
4322 visitedClasses==0 ? &visited: visitedClasses);
4328 ClassDef *inheritedFrom,
const QCString &inheritId)
4335 for (;(mg=mgli.current());++mgli)
4361 ClassDef *inheritedFrom,
const char *inheritId)
4587 for (;(ml=mli.current());++mli)
4614 static bool inlineGroupedClasses =
Config_getBool(INLINE_GROUPED_CLASSES);
4615 static bool inlineSimpleClasses =
Config_getBool(INLINE_SIMPLE_STRUCTS);
4619 bool containerLinkable =
4623 container->isLinkableInProject()
4630 (containerLinkable ||
4670 for (;(ml=mli.current());++mli)
4693 QCString n =
name();
4694 int si = n.find(
'(');
4695 int ei = n.find(
')');
4696 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();