22#include <unordered_map>
117#include <clang/Basic/Version.h>
123#if !defined(_WIN32) || defined(__CYGWIN__)
192{
"template class",
"template struct",
"class",
"struct",
"union",
"interface",
"exception" };
228 stats.emplace_back(name,0);
229 startTime = std::chrono::steady_clock::now();
233 std::chrono::steady_clock::time_point endTime = std::chrono::steady_clock::now();
234 stats.back().elapsed =
static_cast<double>(std::chrono::duration_cast<
235 std::chrono::microseconds>(endTime -
startTime).count())/1000000.0;
246 msg(
"----------------------\n");
247 for (
const auto &s :
stats)
249 msg(
"Spent %.6f seconds in %s",s.elapsed,s.name);
312 scope+=
"::"+pd->
name();
352 ((!includeExternal && root->
tagInfo()==
nullptr) ||
353 ( includeExternal && root->
tagInfo()!=
nullptr))
356 AUTO_TRACE(
"additional={} includeExternal={}",additional,includeExternal);
372 "group %s: ignoring title \"%s\" that does not match old title \"%s\"",
391 std::unique_ptr<GroupDef>(
398 std::unique_ptr<GroupDef>(
447 scope+=
"::"+gd->
name();
499 bool save_ambig = ambig;
510 fn = fn.
left(newIndex)+
"/"+root->
name;
513 if (!fd) ambig = save_ambig;
543 "Found non-existing group '%s' for the command '%s', ignoring command",
552 text.
sprintf(
"the name '%s' supplied as "
553 "the argument in the \\file statement ",
557 text+=
"matches the following input files:\n";
560 text+=
"Please use a more specific name by "
561 "including a (larger) part of the path!";
565 text+=
"is not an input file";
573template<
class DefMutable>
587 if (!includeFile.
isEmpty() && includeFile.
at(0)==
'"')
590 includeFile=includeFile.
mid(1,includeFile.
length()-2);
592 else if (!includeFile.
isEmpty() && includeFile.
at(0)==
'<')
595 includeFile=includeFile.
mid(1,includeFile.
length()-2);
607 text.
sprintf(
"the name '%s' supplied as "
608 "the argument of the \\class, \\struct, \\union, or \\include command ",
613 text+=
"matches the following input files:\n";
616 text+=
"Please use a more specific name by "
617 "including a (larger) part of the path!";
621 text+=
"is not an input file";
625 else if (includeFile.
isEmpty() && ifd &&
639 if (iName.
at(0)==
'<') local=
FALSE;
640 else if (iName.
at(0)==
'"') local=
TRUE;
641 if (iName.
at(0)==
'"' || iName.
at(0)==
'<')
664 cd->setIncludeFile(
nullptr,iName,local,
TRUE);
677 for (
size_t i=0;i<l;i++)
681 else if (c==
')' && round>0) round--;
682 else if (c==
'<' && round==0) count++;
687 if (c==
'>' && round==0 && count>0) count--;
710 if (idx==-1)
return prevScope;
712 if (nsName.
isEmpty())
return prevScope;
713 if (!fullScope.
isEmpty()) fullScope+=
"::";
718 if (nd==
nullptr) cd =
getClass(fullScope);
719 if (nd==
nullptr && cd)
723 else if (nd==
nullptr && cd==
nullptr && fullScope.
find(
'<')==-1)
731 "[generated]",1,1,fullScope,
749 if (prevScopeMutable)
781 int p=i1+l1,l2=0,i2=0;
789 if (resultScope==
nullptr)
800 if (resultScope!=
nullptr)
break;
859 auto alIt = tArgLists.begin();
860 while ((i=name.
find(
"::",p))!=-1 && alIt!=tArgLists.end())
876 return alIt!=tArgLists.end() ?
877 std::make_unique<ArgumentList>(*alIt) :
878 std::unique_ptr<ArgumentList>();
886 if (specifier.isStruct())
888 else if (specifier.isUnion())
890 else if (specifier.isCategory())
892 else if (specifier.isInterface())
894 else if (specifier.isProtocol())
896 else if (specifier.isException())
898 else if (specifier.isService())
900 else if (specifier.isSingleton())
903 if (section.isUnionDoc())
905 else if (section.isStructDoc())
907 else if (section.isInterfaceDoc())
909 else if (section.isProtocolDoc())
911 else if (section.isCategoryDoc())
913 else if (section.isExceptionDoc())
915 else if (section.isServiceDoc())
917 else if (section.isSingletonDoc())
944 qualifiedName.
prepend(scName+
"::");
950 AUTO_TRACE_ADD(
"Found class with name '{}', qualifiedName '{}'", cd ? cd->
name() : root->
name, qualifiedName);
1005 AUTO_TRACE_ADD(
"New class: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1015 if (fullName.
find(
"::")!=-1)
1022 std::unique_ptr<ArgumentList> tArgList;
1029 fullName=fullName.
left(i);
1039 fullName,sec,tagName,refFileName,
TRUE,root->
spec.isEnum()) ));
1042 AUTO_TRACE_ADD(
"New class '{}' type={} #tArgLists={} tagInfo={} hidden={} artificial={}",
1075 AUTO_TRACE_ADD(
"Class {} not added, already exists as alias", fullName);
1083 if (!root->
spec.isForwardDecl())
1144 qualifiedName.
prepend(scName+
"::");
1150 AUTO_TRACE_ADD(
"Found concept with name '{}' (qualifiedName='{}')", cd ? cd->
name() : root->
name, qualifiedName);
1154 qualifiedName=cd->
name();
1168 AUTO_TRACE_ADD(
"New concept: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1169 qualifiedName,namespaceName,className,root->
brief,root->
doc);
1178 if (qualifiedName.
find(
"::")!=-1)
1190 qualifiedName,tagName,refFileName)));
1194 qualifiedName,root->
tArgLists.size(),fmt::ptr(tagInfo));
1225 AUTO_TRACE_ADD(
"Concept '{}' not added, already exists (as alias)", qualifiedName);
1246 if (root->
section.isModuleDoc())
1256 if (root->
section.isConcept())
1266 if (root->
section.isConceptDoc())
1285 if (cd!=ocd && cd->groupId()==ocd->groupId() &&
1286 !cd->partOfGroups().empty() && ocd->partOfGroups().empty())
1291 for (
const auto &gd : cd->partOfGroups())
1297 gd->addConcept(ocd.get());
1322 aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
1324 std::unique_ptr<ClassDef> aliasCd;
1327 std::vector<ClassAlias> aliases;
1331 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1337 name,icd->getFileDef(),
nullptr);
1363 aliases.emplace_back(aliasFullName,std::move(aliasCd),dm);
1374 visitedClasses.insert(icd.get());
1384 for (
auto &alias : aliases)
1389 alias.aliasContext->addInnerCompound(aliasCd);
1398 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1417 "Internal inconsistency: scope for class %s not "
1436 if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
1440 for (
auto &ncd : cd->getClasses())
1451 visitedClasses.insert(cd.get());
1462 fullName+=
"."+fieldName;
1505 for (
const auto &md : *ml)
1508 auto newMd =
createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
1509 md->typeString(),md->name(),md->argsString(),md->excpString(),
1557 for (
const auto &md : *ml)
1560 if (type.
find(
"::@")!=-1)
1566 if (type.
find(icd->name())!=-1)
1569 if (md->isAnonymous()) name =
"__unnamed" +
QCString().
setNum(pos++)+
"__";
1589 for (
const auto &pmd : *pml)
1592 if (pmdm && pmd->
name()==md->name())
1612 if (icd->name().find(
"@")==-1)
1621 candidates.push_back(cdm);
1627 std::vector<ClassDefMutable *> candidates;
1639 for (
auto &cd : candidates)
1652 (root->
section.isNamespace() ||
1653 root->
section.isNamespaceDoc() ||
1662 if (root->
section.isPackageDoc())
1725 root->
type,root->
spec.isPublished())));
1791 QCString aliasName = aliasNd->name();
1820 for (
auto &und : unl)
1824 if (usingNd!=
nullptr)
break;
1831 if (root->
section.isUsingDir())
1863 int scopeOffset =
static_cast<int>(nsName.
length());
1874 else if ((scopeOffset=nsName.
findRev(
"::",scopeOffset-1))==-1)
1878 }
while (scopeOffset>=0 && usingNd==
nullptr);
1880 if (usingNd==
nullptr && nd)
1884 while (pnd && usingNd==
nullptr)
1901 if (usingNd==
nullptr && fd)
1973 if (root->
section.isUsingDecl() &&
1986 if (root->
section.isUsingDecl() &&
1991 AUTO_TRACE(
"Found using declaration '{}' at line {} of {} inside section {}",
2021 if (nd==
nullptr) scope = fd;
2091 AUTO_TRACE(
"creating new member {} for class {}",memName,cd->
name());
2102 newMmd->setMemberClass(cd);
2120 newMmd->addSectionsToDefinition(root->
anchors);
2126 newMmd->setMemberGroupId(root->
mGrpId);
2129 newMmd->setLanguage(root->
lang);
2130 newMmd->setId(root->
id);
2139 if (root->
section.isUsingDecl() &&
2166 for (
auto &mi : *mni)
2184 for (
const auto ©Cd : it->second)
2197 else if (root->
section.isUsingDecl() &&
2232 memName = root->
name;
2254 newMmd->setNamespace(nd);
2259 newMmd->setFileDef(fd);
2278 newMmd->addSectionsToDefinition(root->
anchors);
2284 newMmd->setMemberGroupId(root->
mGrpId);
2287 newMmd->setLanguage(root->
lang);
2288 newMmd->setId(root->
id);
2296 if (nd && aliasMd.get())
2300 if (fd && aliasMd.get())
2329 if (nd) ncdm->
moveTo(nd);
2358 aliasFullName = aliasCd->localName();
2362 aliasFullName = nd->
qualifiedName()+
"::"+aliasCd->localName();
2394 for (
const auto &fd : *fn)
2397 fd->addIncludedUsingDirectives(visitedFiles);
2424 AUTO_TRACE(
"class variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} ann={} init='{}'",
2432 if (root->
spec.isAlias())
2438 def=type+
" "+name+args;
2443 if (root->
spec.isAlias())
2445 def=
"using "+qualScope+scopeSeparator+name;
2449 def=type+
" "+qualScope+scopeSeparator+name+args;
2461 def=qualScope+scopeSeparator+name+args;
2472 for (
const auto &imd : *mn)
2513 mmd->setTagInfo(root->
tagInfo());
2514 mmd->setMemberClass(cd);
2518 mmd->setDefinition(def);
2520 mmd->addSectionsToDefinition(root->
anchors);
2521 mmd->setFromAnonymousScope(fromAnnScope);
2522 mmd->setFromAnonymousMember(fromAnnMemb);
2526 mmd->setInitializer(init.c_str());
2528 mmd->setMemberGroupId(root->
mGrpId);
2529 mmd->setMemberSpecifiers(root->
spec);
2530 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2531 mmd->setReadAccessor(root->
read);
2532 mmd->setWriteAccessor(root->
write);
2534 mmd->setHidden(root->
hidden);
2536 mmd->setLanguage(root->
lang);
2537 mmd->setId(root->
id);
2540 mmd->setBodyDef(root->
fileDef());
2545 mmd->setRefItems(root->
sli);
2575 AUTO_TRACE(
"global variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} init='{}'",
2587 static const reg::Ex re(R
"(\a\w*)");
2589 std::string typ = ttype.str();
2611 if (scope.
find(
'@')!=-1)
return nullptr;
2627 if (root->
spec.isAlias())
2629 def=
"using "+nd->
name()+sep+name;
2633 def=type+
" "+nd->
name()+sep+name+args;
2638 def=nd->
name()+sep+name+args;
2645 if (name.
at(0)==
'@')
2651 if (root->
spec.isAlias())
2653 def=
"using "+root->
name;
2657 def=type+
" "+name+args;
2678 for (
const auto &imd : *mn)
2695 bool staticsInDifferentFiles =
2701 !staticsInDifferentFiles
2742 mmd->setTagInfo(root->
tagInfo());
2743 mmd->setMemberSpecifiers(root->
spec);
2744 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2748 mmd->addSectionsToDefinition(root->
anchors);
2749 mmd->setFromAnonymousScope(fromAnnScope);
2750 mmd->setFromAnonymousMember(fromAnnMemb);
2752 mmd->setInitializer(init.c_str());
2754 mmd->setMemberGroupId(root->
mGrpId);
2755 mmd->setDefinition(def);
2756 mmd->setLanguage(root->
lang);
2757 mmd->setId(root->
id);
2765 mmd->setBodyDef(fd);
2770 mmd->setRefItems(root->
sli);
2773 mmd->setNamespace(nd);
2781 mmd->setFileDef(fd);
2814 static const reg::Ex re(R
"(\([^)]*[*&^][^)]*\))");
2816 size_t i=std::string::npos;
2820 i = match.position();
2823 if (i!=std::string::npos)
2825 size_t di = type.find(
"decltype(");
2826 if (di!=std::string::npos && di<i)
2828 i = std::string::npos;
2831 size_t bb=type.find(
'<');
2832 size_t be=type.rfind(
'>');
2833 bool templFp =
false;
2834 if (be!=std::string::npos) {
2835 size_t cc_ast = type.find(
"::*");
2836 size_t cc_amp = type.find(
"::&");
2837 templFp = (cc_ast != std::string::npos && cc_ast>be) || (cc_amp != std::string::npos && cc_amp>be);
2840 if (!type.empty() &&
2841 i!=std::string::npos &&
2842 type.find(
"operator")==std::string::npos &&
2843 (type.find(
")(")==std::string::npos || type.find(
"typedef ")!=std::string::npos) &&
2845 (!(bb<i && i<be) || templFp)
2848 if (pLength) *pLength=
static_cast<int>(l);
2851 return static_cast<int>(i);
2868 bool result =
false;
2869 bool typeIsClass =
false;
2870 bool typePtrType =
false;
2904 typePtrType = type.
find(
'*')!=-1 || type.
find(
'&')!=-1;
2907 typeIsClass = resolver.
resolveClass(ctx,type)!=
nullptr;
2909 if (!typeIsClass && (ti=type.
find(
'<'))!=-1)
2926 static const reg::Ex initChars(R
"([\d"'&*!^]+)");
2930 std::string name = a.
name.
str();
2931 if (
reg::search(name,match,initChars) && match.position()==0)
2963 std::string atype = a.
type.
str();
2964 if (
reg::search(atype,match,initChars) && match.position()==0)
2971 if (resType.empty()) resType=atype;
2972 static const reg::Ex idChars(R
"(\a\w*)");
2973 if (
reg::search(resType,match,idChars) && match.position()==0)
2975 resType=match.str();
2976 if (resType==
"int" || resType==
"long" ||
2977 resType==
"float" || resType==
"double" ||
2978 resType==
"char" || resType==
"void" ||
2979 resType==
"signed" || resType==
"unsigned" ||
2980 resType==
"const" || resType==
"volatile" )
3010static int findEndOfTemplate(
const QCString &s,
size_t startPos)
3017 bool insideString=
FALSE;
3018 bool insideChar=
FALSE;
3020 while (e<len && brCount!=0)
3026 if (!insideString && !insideChar)
3028 if (e<len-1 && s.
at(e+1)==
'<')
3030 else if (roundCount==0)
3035 if (!insideString && !insideChar)
3037 if (e<len-1 && s.
at(e+1)==
'>')
3039 else if (roundCount==0)
3044 if (!insideString && !insideChar)
3048 if (!insideString && !insideChar)
3054 if (insideString && pc!=
'\\')
3063 if (insideChar && pc!=
'\\')
3073 return brCount==0 ?
static_cast<int>(e) : -1;
3082 AUTO_TRACE(
"VARIABLE_SEC: type='{}' name='{}' args='{}' bodyLine={} endBodyLine={} mGrpId={} relates='{}'",
3089 if (type.
isEmpty() && name.
find(
"operator")==-1 &&
3090 (name.
find(
'*')!=-1 || name.
find(
'&')!=-1))
3097 std::string sargs = args.
str();
3098 static const reg::Ex reName(R
"(\a\w*)");
3103 sargs = match.suffix().str();
3104 size_t j = sargs.find(
')');
3105 if (j!=std::string::npos) args=sargs.substr(0,j);
3115 int ai = type.
find(
'[',i);
3121 else if (type.
find(
')',i)!=-1)
3128 AUTO_TRACE_ADD(
"after correction: type='{}' name='{}' args='{}'",type,name,args);
3139 scope=name.
left(index);
3140 name=name.
mid(index+2);
3159 bool isRelated=
FALSE;
3160 bool isMemberOf=
FALSE;
3169 for (
size_t i=0;i<name.
length()-1;i++)
3171 if (name[i]==
':' && name[i+1]==
':')
3173 p=
static_cast<int>(i);
3175 else if (name[i]==
'<')
3179 int e = findEndOfTemplate(name,i+1);
3180 if (e!=-1) i=
static_cast<int>(e);
3186 if (type==
"friend class" || type==
"friend struct" ||
3187 type==
"friend union")
3231 else if (type.
find(
"sequence<") != -1)
3233 else if (type.
find(
"dictionary<") != -1)
3257 int si=scope.
find(
'@');
3261 bool inlineSimpleStructs =
Config_getBool(INLINE_SIMPLE_STRUCTS);
3265 if (si!=-1 && !inlineSimpleStructs)
3269 pScope = scope.
left(std::max(si-2,0));
3271 pScope.
prepend(annScopePrefix);
3272 else if (annScopePrefix.
length()>2)
3273 pScope=annScopePrefix.
left(annScopePrefix.
length()-2);
3274 if (name.
at(0)!=
'@')
3342 scope=rname.
left(index);
3343 rname=rname.
mid(index+2);
3355 for (
auto &imd : *mn)
3357 if (!imd->isTypedef())
3366 bool notBothGrouped = root->
groups.empty() || imd->getGroupDef()==
nullptr;
3367 bool bothSameScope = (!cd && !nd) || (cd && imd->getClassDef() == cd) || (nd && imd->getNamespaceDef() == nd);
3370 if (notBothGrouped && bothSameScope && imd->typeString()==rtype)
3417 for (
const auto &e : root->
children())
3418 if (!e->section.isEnum())
3435 for (
const auto &e : root->
children())
3436 if (!e->section.isEnum())
3453 for (
const auto &e : root->
children())
3454 if (!e->section.isEnum())
3469 (root->
section.isVariable() &&
3472 (root->
section.isFunction() &&
3475 (root->
section.isFunction() &&
3484 for (
const auto &e : root->
children())
3485 if (!e->section.isEnum())
3511 mmd->setTagInfo(root->
tagInfo());
3512 mmd->setMemberClass(cd);
3514 mmd->setDocsForDefinition(
false);
3518 mmd->setMemberSpecifiers(root->
spec);
3519 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3520 mmd->setMemberGroupId(root->
mGrpId);
3522 mmd->setLanguage(root->
lang);
3523 mmd->setBodyDef(fd);
3524 mmd->setFileDef(fd);
3525 mmd->addSectionsToDefinition(root->
anchors);
3527 mmd->setDefinition(def);
3531 AUTO_TRACE(
"Interface member: fileName='{}' type='{}' name='{}' mtype='{}' prot={} virt={} state={} proto={} def='{}'",
3549 mmd->setRefItems(root->
sli);
3558 if (root->
section.isExportedInterface() || root->
section.isIncludedService())
3560 AUTO_TRACE(
"Exported interface/included service: type='{}' scope='{}' name='{}' args='{}'"
3561 " relates='{}' relatesType='{}' file='{}' line={} bodyLine={} #tArgLists={}"
3562 " mGrpId={} spec={} proto={} docFile='{}'",
3588 "Illegal member name found.");
3634 (i=name.
find(
'<'))!=-1 &&
3635 (j=name.
find(
'>'))!=-1 &&
3636 (j!=i+2 || name.
at(i+1)!=
'=')
3665 mmd->setTagInfo(root->
tagInfo());
3666 mmd->setMemberClass(cd);
3668 mmd->setDocsForDefinition(!root->
proto);
3672 mmd->setMemberSpecifiers(spec);
3673 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3674 mmd->setMemberGroupId(root->
mGrpId);
3676 mmd->setLanguage(root->
lang);
3677 mmd->setRequiresClause(root->
req);
3678 mmd->setId(root->
id);
3679 mmd->setBodyDef(fd);
3680 mmd->setFileDef(fd);
3681 mmd->addSectionsToDefinition(root->
anchors);
3686 if (scopeSeparator!=
"::")
3688 qualScope =
substitute(qualScope,
"::",scopeSeparator);
3693 scopeSeparator=
"::";
3711 def=type+
" "+qualScope+scopeSeparator+name;
3715 def=qualScope+scopeSeparator+name;
3719 mmd->setDefinition(def);
3723 AUTO_TRACE(
"function member: type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
3724 type, qualScope, rname, args, root->
proto, def);
3734 mmd->setRefItems(root->
sli);
3758 mmd->setTagInfo(root->
tagInfo());
3759 mmd->setLanguage(root->
lang);
3760 mmd->setId(root->
id);
3765 mmd->setDocsForDefinition(!root->
proto);
3771 mmd->addSectionsToDefinition(root->
anchors);
3772 mmd->setMemberSpecifiers(root->
spec);
3773 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3774 mmd->setMemberGroupId(root->
mGrpId);
3775 mmd->setRequiresClause(root->
req);
3810 def=root->
type+
" "+scope+name;
3816 AUTO_TRACE(
"new non-member function type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
3818 mmd->setDefinition(def);
3822 mmd->setRefItems(root->
sli);
3826 mmd->setNamespace(nd);
3833 mmd->setFileDef(fd);
3854 if (root->
section.isFunction())
3856 AUTO_TRACE(
"member function: type='{}' scope='{}' name='{}' args='{}' relates='{}' relatesType='{}'"
3857 " file='{}' line={} bodyLine={} #tArgLists={} mGrpId={}"
3858 " spec={} proto={} docFile='{}'",
3863 bool isFriend=root->
type.
find(
"friend ")!=-1;
3873 scope=rname.
left(index);
3874 rname=rname.
mid(index+2);
3887 int memIndex=rname.
findRev(
"::");
3890 if (cd && scope+
"::"==rname.
left(scope.
length()+2))
3896 bool isMember=
FALSE;
3899 int ts=rname.
find(
'<');
3900 int te=rname.
find(
'>');
3901 if (memIndex>0 && (ts==-1 || te==-1))
3918 isMember=memIndex<ts || memIndex>te;
3958 for (
const auto &imd : *mn)
3971 fullScope.
prepend(parentScope);
3977 if (mnd) nsName = mnd->
name();
3978 if (rnd) rnsName = rnd->
name();
3986 bool sameNumTemplateArgs =
TRUE;
3987 bool matchingReturnTypes =
TRUE;
3988 bool sameRequiresClause =
TRUE;
3993 sameNumTemplateArgs =
FALSE;
3997 matchingReturnTypes =
FALSE;
4001 sameRequiresClause =
FALSE;
4007 sameNumTemplateArgs =
FALSE;
4010 bool staticsInDifferentFiles =
4017 sameNumTemplateArgs &&
4018 matchingReturnTypes &&
4019 sameRequiresClause &&
4020 !staticsInDifferentFiles
4024 if (!root->
groups.empty() && !root->
groups.front().groupname.isEmpty())
4031 found=(mnd && rnd && nsName==rnsName) ||
4032 ((mnd==
nullptr && rnd==
nullptr && mfd!=
nullptr &&
4043 AUTO_TRACE_ADD(
"combining function with prototype found={} in namespace '{}'",
found,nsName);
4145 "Illegal member name found."
4163 for (
const auto &ifmd : *fn)
4167 for (
const auto &immd : *mn)
4183 AUTO_TRACE_ADD(
"Merging related global and member '{}' isFriend={} isRelated={} isFunction={}",
4260 for (
const auto &imdec : *mn)
4268 for (
const auto &imdef : *mn)
4271 if (mdef && mdec!=mdef &&
4291 for (
const auto &imd : *mn)
4307 if (mdef && mdec)
break;
4315 mdec->getOuterScope(),mdec->getFileDef(),
const_cast<ArgumentList*
>(&mdecAl),
4322 mdec->mergeReferences(mdef);
4324 mdec->mergeReferencedBy(mdef);
4341 for (
const auto &imd : *mn)
4352 for (
const auto &irmd : *rmn)
4386 size_t i=qualifiedName.rfind(
"::");
4387 if (i!=std::string::npos)
4389 QCString scope = qualifiedName.substr(0,i);
4390 QCString name = qualifiedName.substr(i+2);
4394 for (
const auto &imd : *mn)
4420 std::map<std::string,int> templateNames;
4422 for (
const Argument &arg : templateArguments)
4424 static const reg::Ex re(R
"(\a[\w:]*)");
4427 for (; it!=
end ; ++it)
4429 const auto &match = *it;
4430 std::string n = match.str();
4431 if (n==arg.name.str())
4433 if (templateNames.find(n)==templateNames.end())
4435 templateNames.emplace(n,count);
4440 return templateNames;
4455 if (context && cd!=context)
4460 if (result==
nullptr)
4465 if (result==
nullptr)
4494 for (
auto &mi : *mni)
4504 type = typedefValue;
4523 usedClassName = typeCd->
name();
4526 int sp=usedClassName.
find(
'<');
4535 if (templateNames.empty())
4544 if (arg.name==usedName)
4548 if (usedCd==
nullptr)
4658 if (templateNames.empty())
4696 AUTO_TRACE(
"Derived from template '{}' with parameters '{}' isArtificial={}",
4697 templateClass->
name(),templSpec,isArtificial);
4700 bool existingClass = templSpec==tempArgsStr;
4701 if (existingClass)
return;
4703 bool freshInstance=
FALSE;
4720 for (
auto it=it_pair.first ; it!=it_pair.second ; ++it)
4722 const Entry *templateRoot = it->second;
4723 AUTO_TRACE_ADD(
"template root found '{}' templSpec='{}'",templateRoot->
name,templSpec);
4729 isArtificial,templArgs.get(),templateNames);
4748 int ti=ttype.
find(
'<');
4754 templateClassName,
true,
true);
4755 AUTO_TRACE_ADD(
"templateClassName={} baseClass={}",templateClassName,baseClass?baseClass->
name():
"<none>");
4774 int index=n.
find(
'<');
4786 int l =
static_cast<int>(name.
length());
4792 while (count>0 && i>=0)
4797 case '>':
if (!insideQuote) count++;
break;
4798 case '<':
if (!insideQuote) count--;
break;
4799 case '\'':
if (!insideQuote) insideQuote=c;
4800 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
4802 case '"':
if (!insideQuote) insideQuote=c;
4803 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
4826 bool explicitGlobalScope=
FALSE;
4830 explicitGlobalScope=
TRUE;
4834 bool lastParent=
FALSE;
4839 int scopeOffset=explicitGlobalScope ? 0 :
static_cast<int>(scopeName.
length());
4848 baseClassName.
prepend(scopeName.
left(scopeOffset)+
"::");
4876 || explicitGlobalScope
4880 (root->
section.isExportedInterface() ||
4881 root->
section.isIncludedService()))
4884 AUTO_TRACE_ADD(
"class relation '{}' inherited/used by '{}' found prot={} virt={} templSpec='{}'",
4885 baseClassName, root->
name, bi->
prot, bi->
virt, templSpec);
4888 int si=baseClassName.
findRev(
"::",i);
4890 if (baseClass==
nullptr &&
static_cast<size_t>(i)!=baseClassName.
length())
4895 int e=findEndOfTemplate(baseClassName,i+1);
4900 baseClassName = baseClassName.
left(i)+baseClassName.
right(baseClassName.
length()-e);
4911 else if (baseClass && !templSpec.
isEmpty())
4922 baseClass = templClass;
4930 if (!
found && si!=-1)
4940 found=baseClass!=
nullptr && baseClass!=cd;
4950 found = baseClass!=
nullptr && baseClass!=cd;
4962 found = baseClass!=
nullptr && baseClass!=cd;
4965 bool isATemplateArgument = templateNames.find(biName.
str())!=templateNames.end();
4970 AUTO_TRACE_ADD(
"Documented base class '{}' templSpec='{}'",biName,templSpec);
4988 if (baseClassTypeDef==
nullptr)
4998 if (baseClassTypeDef || cd->
isCSharp())
5014 "Detected potential recursive class relation "
5015 "between class %s and base class %s!",
5022 else if (mode==
Undocumented && (scopeOffset==0 || isATemplateArgument))
5024 AUTO_TRACE_ADD(
"New undocumented base class '{}' baseClassName='{}' templSpec='{}' isArtificial={}",
5025 biName,baseClassName,templSpec,isArtificial);
5027 if (isATemplateArgument)
5030 if (baseClass==
nullptr)
5049 if (baseClass==
nullptr)
5060 si = baseClassName.
findRev(
"::");
5076 biName=
"<"+biName.
left(biName.
length()-2)+
">";
5089 if (scope!=baseClass)
5115 "Detected potential recursive class relation "
5116 "between class %s and base class %s!",
5128 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
5133 }
while (scopeOffset>=0);
5135 if (parentNode==
nullptr)
5141 parentNode=parentNode->
parent();
5143 }
while (lastParent);
5163 bool hasExtends = !root->
extends.empty();
5164 if (hasExtends)
return TRUE;
5189 (i=bName.
find(
'<'))!=-1)
5193 bName=bName.
left(i);
5255 if (!nd->hasDocumentation())
5262 warn_undoc(nd->getDefFileName(),nd->getDefLine(),
"%s %s is not documented.",
5292 "Compound %s is not documented.",
5331 for (
const auto &tn_kv : templateNames)
5333 size_t templIndex = tn_kv.second;
5335 bool hasActArg=
FALSE;
5336 if (templIndex<templArgs->size())
5338 actArg=templArgs->at(templIndex);
5342 baseClassNames.find(actArg.
type.
str())!=baseClassNames.end() &&
5343 actualTemplateNames.find(actArg.
type.
str())==actualTemplateNames.end()
5346 actualTemplateNames.emplace(actArg.
type.
str(),
static_cast<int>(templIndex));
5381 for (
const auto &fd : *fn)
5383 fd->computeAnchors();
5396 gd->computeAnchors();
5416 for (
const auto &fd : *fn)
5418 fd->addListReferences();
5433 gd->addListReferences();
5438 QCString name = pd->getOutputFileBase();
5439 if (pd->getGroupDef())
5441 name = pd->getGroupDef()->getOutputFileBase();
5448 name,pd->title(),
QCString(),
nullptr);
5454 QCString name = dd->getOutputFileBase();
5463 name,dd->displayName(),
QCString(),
nullptr);
5492 if (md==
nullptr)
return;
5493 AUTO_TRACE(
"scope='{}' name='{}' args='{}' funcDecl='{}' mSpec={}",
5508 fullName = cd->
name();
5510 fullName = nd->
name();
5512 if (!fullName.
isEmpty()) fullName+=
"::";
5513 fullName+=md->
name();
5618 "member %s belongs to two different groups. The second "
5619 "one found here will be ignored.",
5654 return allowNoGroup;
5657 for (
const auto &g : root->
groups)
5659 if (g.groupname == gd->
name())
5682 AUTO_TRACE(
"namespace='{}' type='{}' name='{}' tempArg='{}' decl='{}'",namespaceName,type,name,tempArg,decl);
5696 for (
const auto &md : *mn)
5707 if (md->isAlias() && md->getOuterScope() &&
5714 nd = md->getNamespaceDef();
5719 if (nd && md->isEnumValue() && (enumNamePos=namespaceName.
findRev(
"::"))!=-1)
5721 QCString enumName = namespaceName.
mid(enumNamePos+2);
5722 if (namespaceName.
left(enumNamePos)==nd->
name())
5727 for (
const auto &emd : *enumMn)
5729 found = emd->isStrong() && md->getEnumScope()==emd.get();
5743 else if (nd==
nullptr && md->isEnumValue())
5748 for (
const auto &emd : *enumMn)
5750 found = emd->isStrong() && md->getEnumScope()==emd.get();
5773 if ((namespaceName.
isEmpty() && nd==
nullptr) ||
5774 (nd && nd->
name()==namespaceName) ||
5778 AUTO_TRACE_ADD(
"Try to add member '{}' to scope '{}'",md->name(),namespaceName);
5786 md->isVariable() || md->isTypedef() ||
5794 if (matching && !root->
tArgLists.empty())
5813 if (matching && md->isStatic() &&
5814 md->getDefFileName()!=root->
fileName &&
5822 if (!md->templateArguments().empty() && !root->
tArgLists.empty())
5826 if (md->templateArguments().size()!=root->
tArgLists.back().size() ||
5827 md->typeString()!=type ||
5828 md->requiresClause()!=root->
req)
5852 warnMsg+=
"\nPossible candidates:";
5853 for (
const auto &md : *mn)
5857 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
5865 if (root->
type!=
"friend class" &&
5866 root->
type!=
"friend struct" &&
5867 root->
type!=
"friend union" &&
5868 root->
type!=
"friend" &&
5874 "documented symbol '%s' was not declared or defined.",
qPrint(decl)
5886 auto srcIt = srcTempArgLists.begin();
5887 auto dstIt = dstTempArgLists.begin();
5888 while (srcIt!=srcTempArgLists.end() && dstIt!=dstTempArgLists.end())
5890 if ((*srcIt).size()!=(*dstIt).size())
return TRUE;
5902 result = !(
toClassDef(d))->templateArguments().empty() ||
5911 const std::string &src
5915 static const reg::Ex re(R
"(\a\w*)");
5920 for (; it!=
end ; ++it)
5922 const auto &match = *it;
5923 size_t i = match.position();
5924 size_t l = match.length();
5926 dst+=src.substr(p,i-p);
5927 std::string name=match.str();
5929 auto srcIt = srcTempArgLists.begin();
5930 auto dstIt = dstTempArgLists.begin();
5931 while (srcIt!=srcTempArgLists.end() && !
found)
5934 std::vector<Argument>::const_iterator tdaIt;
5935 if (dstIt!=dstTempArgLists.end())
5938 tdaIt = tdAli->
begin();
5943 for (
auto tsaIt = tsaLi.
begin(); tsaIt!=tsaLi.
end() && !
found; ++tsaIt)
5947 if (tdAli && tdaIt!=tdAli->
end())
5963 else if (tdaType.
startsWith(
"typename ")) vc=9;
5966 tdaName = tdaType.
mid(vc);
5999 auto dstIt = dst.
begin();
6004 if (dstIt == dst.
end())
6008 da.
array = dstArray;
6016 da.
array = dstArray;
6024 srcTempArgLists,dstTempArgLists,
6050 funcType,funcName,funcArgs,exceptions,
6054 mmd->setTagInfo(root->
tagInfo());
6055 mmd->setLanguage(root->
lang);
6056 mmd->setId(root->
id);
6057 mmd->makeImplementationDetail();
6058 mmd->setMemberClass(cd);
6059 mmd->setDefinition(funcDecl);
6065 mmd->setDocsForDefinition(!root->
proto);
6067 mmd->addSectionsToDefinition(root->
anchors);
6071 mmd->setMemberSpecifiers(spec);
6072 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6073 mmd->setMemberGroupId(root->
mGrpId);
6076 mmd->setRefItems(root->
sli);
6112 bool memFound=
FALSE;
6113 for (
const auto &imd : *mn)
6116 if (md==
nullptr)
continue;
6118 if (cd==
nullptr)
continue;
6135 if (!namespaceName.
isEmpty()) fullScope.
prepend(namespaceName+
"::");
6136 if (fullScope==cd->
name())
6142 for (
const auto &emd : *enumMn)
6144 memFound = emd->isStrong() && md->
getEnumScope()==emd.get();
6150 if (memFound)
break;
6155 if (memFound)
break;
6173 if (!templAl.
empty())
6175 declTemplArgs.push_back(templAl);
6183 bool substDone=
FALSE;
6190 if (declTemplArgs.size()>0 && declTemplArgs.size()==defTemplArgs.size())
6206 AUTO_TRACE_ADD(
"matching '{}'<=>'{}' className='{}' namespaceName='{}'",
6230 AUTO_TRACE_ADD(
"Comparing return types '{}'<->'{}' #args {}<->{}",
6238 else if (defTemplArgs.size()>declTemplArgs.size())
6245 bool rootIsUserDoc = root->
section.isMemberDoc();
6248 bool classOrMdIsTemplate = mdIsTemplate || classIsTemplate;
6249 bool rootIsTemplate = !root->
tArgLists.empty();
6251 if (!rootIsUserDoc &&
6252 (mdIsTemplate || rootIsTemplate) &&
6253 ((classOrMdIsTemplate && !rootIsTemplate) || (!classOrMdIsTemplate && rootIsTemplate))
6258 AUTO_TRACE_ADD(
"Comparing return types: template v.s. non-template");
6262 AUTO_TRACE_ADD(
"Match results of matchArguments2='{}' substDone='{}'",matching,substDone);
6273 if (!funcTempList.
isEmpty() &&
6293 else if (cd && cd!=tcd)
6299 if (memFound)
break;
6303 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
6306 if (count==0 && !(isFriend && funcType==
"class"))
6309 const ClassDef *ecd =
nullptr, *ucd =
nullptr;
6310 MemberDef *emd =
nullptr, *umd =
nullptr;
6312 for (
const auto &md : *mn)
6334 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': exact match",
6335 className,ccd->
name(),md->argsString());
6341 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': no match",
6342 className,ccd->
name(),md->argsString());
6347 bool strictProtoMatching =
Config_getBool(STRICT_PROTO_MATCHING);
6348 if (!strictProtoMatching)
6350 if (candidates==1 && ucd && umd)
6357 else if (candidates>1 && ecd && emd)
6368 if (noMatchCount>1) warnMsg+=
"uniquely ";
6369 warnMsg+=
"matching class member found for \n";
6373 warnMsg+=
" template ";
6382 warnMsg+=fullFuncDecl;
6384 if (candidates>0 || noMatchCount>=1)
6386 warnMsg+=
"\nPossible candidates:";
6392 for (
const auto &md : *mn)
6394 const ClassDef *cd=md->getClassDef();
6408 warnMsg+=
"template ";
6413 if (!md->typeString().isEmpty())
6415 warnMsg+=md->typeString();
6420 warnMsg+=qScope+
"::"+md->name();
6421 warnMsg+=md->argsString();
6422 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6443 AUTO_TRACE(
"funcType={} funcName={} funcArgs={} funcDecl={} spec={}",funcType,funcName,funcArgs,funcDecl,spec);
6445 for (
const auto &md : *mn)
6447 if (md->getClassDef()==cd)
6459 funcType,funcName,funcArgs,exceptions,
6465 mmd->setTagInfo(root->
tagInfo());
6466 mmd->setLanguage(root->
lang);
6467 mmd->setId(root->
id);
6468 mmd->setMemberClass(cd);
6469 mmd->setTemplateSpecialization(
TRUE);
6471 mmd->setDefinition(funcDecl);
6477 mmd->setDocsForDefinition(!root->
proto);
6479 mmd->addSectionsToDefinition(root->
anchors);
6483 mmd->setMemberSpecifiers(spec);
6484 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6485 mmd->setMemberGroupId(root->
mGrpId);
6487 mmd->setRefItems(root->
sli);
6501 bool sameClass=
false;
6506 [](
const auto &md1,
const auto &md2)
6507 { return md1->getClassDef()->name()==md2->getClassDef()->name(); });
6513 if (cd==
nullptr)
return;
6521 std::unique_ptr<ArgumentList> tArgList =
6526 funcType,funcName,funcArgs,exceptions,
6530 mmd->setTagInfo(root->
tagInfo());
6531 mmd->setLanguage(root->
lang);
6532 mmd->setId(root->
id);
6534 mmd->setMemberClass(cd);
6535 mmd->setDefinition(funcDecl);
6544 mmd->setDocsForDefinition(!root->
proto);
6546 mmd->addSectionsToDefinition(root->
anchors);
6550 mmd->setMemberSpecifiers(spec);
6551 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6552 mmd->setMemberGroupId(root->
mGrpId);
6555 mmd->setRefItems(root->
sli);
6613 AUTO_TRACE(
"root='{}' funcDecl='{}' related='{}' overload={} isFunc={} mGrpId={} #tArgList={} spec={} lang={}",
6626 bool isRelated=
false;
6627 bool isMemberOf=
false;
6628 bool isFriend=
false;
6641 spec.setInline(
true);
6646 spec.setExplicit(
true);
6651 spec.setMutable(
true);
6662 while ((sep=funcDecl.
find(
';'))!=-1)
6668 if (!funcDecl.
isEmpty() && funcDecl[0]!=
' ') funcDecl.
prepend(
" ");
6680 if (isFriend && funcDecl.
startsWith(
"class "))
6684 funcName = funcDecl;
6686 else if (isFriend && funcDecl.
startsWith(
"struct "))
6689 funcName = funcDecl;
6695 funcArgs,funcTempList,exceptions
6703 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}' funcType='{}' funcName='{}' funcArgs='{}'",
6704 scopeName,className,namespaceName,funcType,funcName,funcArgs);
6715 scopeName = relates;
6728 scopeName = joinedName;
6742 QCString joinedName = fnd->name()+
"::"+scopeName;
6745 scopeName=joinedName;
6772 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}'",scopeName,className,namespaceName);
6781 scopeName=namespaceName;
6783 else if (!relates.
isEmpty() ||
6786 scopeName=namespaceName+
"::"+className;
6790 scopeName=className;
6793 else if (!className.
isEmpty())
6795 scopeName=className;
6805 uint32_t argListIndex=0;
6810 tempScopeName=scopeName+funcSpec;
6824 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcTempList;
6828 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcArgs;
6835 funcDecl=tempScopeName+
"::"+funcName+funcTempList;
6839 funcDecl=tempScopeName+
"::"+funcName+funcArgs;
6849 funcDecl=funcType+
" "+funcName+funcTempList;
6853 funcDecl=funcType+
" "+funcName+funcArgs;
6860 funcDecl=funcName+funcTempList;
6864 funcDecl=funcName+funcArgs;
6869 if (funcType==
"template class" && !funcTempList.
isEmpty())
6872 AUTO_TRACE_ADD(
"Parse results: namespaceName='{}' className=`{}` funcType='{}' funcSpec='{}' "
6873 " funcName='{}' funcArgs='{}' funcTempList='{}' funcDecl='{}' relates='{}'"
6874 " exceptions='{}' isRelated={} isMemberOf={} isFriend={} isFunc={}",
6875 namespaceName, className, funcType, funcSpec,
6876 funcName, funcArgs, funcTempList, funcDecl, relates,
6877 exceptions, isRelated, isMemberOf, isFriend, isFunc);
6883 bool strongEnum =
false;
6887 for (
const auto &imd : *mn)
6900 namespaceName+=
"::"+className;
6904 namespaceName=className;
6912 funcName =
substitute(funcName,className+
"::",
"");
6923 if (!isRelated && !strongEnum && mn)
6931 funcArgs,funcTempList,exceptions,
6932 type,args,isFriend,spec,relates,funcDecl,overloaded,isFunc);
6944 else if (overloaded)
6946 addOverloaded(root,mn,funcType,funcName,funcArgs,funcDecl,exceptions,spec);
6950 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
6955 "Cannot determine class for function\n%s",
6961 else if (isRelated && !relates.
isEmpty())
6963 AUTO_TRACE_ADD(
"related function scopeName='{}' className='{}'",scopeName,className);
6964 if (className.
isEmpty()) className=relates;
6968 bool newMember=
TRUE;
6974 for (
const auto &imd : *mn)
7008 mn->
push_back(std::move(mdDefineTaken));
7022 for (
const auto &irmd : *mn)
7043 addMemberDocs(root,rmd_found,funcDecl,
nullptr,overloaded,spec);
7051 switch (root->
mtype)
7072 funcType,funcName,funcArgs,exceptions,
7095 mmd->setDefinitionTemplateParameterLists(root->
tArgLists);
7097 mmd->setTagInfo(root->
tagInfo());
7111 for (
const auto &irmd : *rmn)
7142 mmd->setBodyDef(fd);
7149 mmd->setMemberClass(cd);
7150 mmd->setMemberSpecifiers(spec);
7151 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7152 mmd->setDefinition(funcDecl);
7157 mmd->setDocsForDefinition(!root->
proto);
7160 mmd->addSectionsToDefinition(root->
anchors);
7161 mmd->setMemberGroupId(root->
mGrpId);
7162 mmd->setLanguage(root->
lang);
7163 mmd->setId(root->
id);
7167 mmd->setRefItems(root->
sli);
7176 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7181 "Cannot determine file/namespace for relatedalso function\n%s",
7191 "class '%s' for related function '%s' is not "
7199 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
7203 bool globMem =
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec);
7204 if (className.
isEmpty() && !globMem)
7207 "class for member '%s' cannot "
7208 "be found.",
qPrint(funcName)
7211 else if (!className.
isEmpty() && !globMem)
7214 "member '%s' of class '%s' cannot be found",
7223 "member with no name found.");
7234 AUTO_TRACE(
"root->type='{}' root->inside='{}' root->name='{}' root->args='{}' section={} root->spec={} root->mGrpId={}",
7249 type=type.
left(i+l);
7260 if (root->
section.isMemberDoc())
7286 else if (root->
section.isOverloadDoc())
7300 (root->
section.isVariable() &&
7312 if (type==
"friend class" || type==
"friend struct" ||
7313 type==
"friend union")
7319 type+
" "+root->
name,
7352 else if (root->
section.isVariableDoc())
7364 else if (root->
section.isExportedInterface() ||
7365 root->
section.isIncludedService())
7371 type +
" " + root->
name,
7384 if (root->
section.isMemberDoc() ||
7385 root->
section.isOverloadDoc() ||
7388 root->
section.isVariableDoc() ||
7390 root->
section.isIncludedService() ||
7391 root->
section.isExportedInterface()
7401 for (
const auto &e : root->
children())
7403 if (!e->section.isEnum())
7415 for (
const auto &objCImpl : root->
children())
7417 if (objCImpl->section.isObjcImpl())
7419 for (
const auto &objCMethod : objCImpl->children())
7421 if (objCMethod->section.isFunction())
7425 objCMethod->relates,
7428 objCMethod->type+
" "+objCImpl->name+
"::"+objCMethod->name+
" "+objCMethod->args,
7430 objCMethod->section=EntryType::makeEmpty();
7449 bool isGlobal =
false;
7450 bool isRelated =
false;
7451 bool isMemberOf =
false;
7519 mmd->setTagInfo(root->
tagInfo());
7520 mmd->setLanguage(root->
lang);
7521 mmd->setId(root->
id);
7522 if (!isGlobal) mmd->setMemberClass(cd);
else mmd->setFileDef(fd);
7524 mmd->setBodyDef(root->
fileDef());
7525 mmd->setMemberSpecifiers(root->
spec);
7526 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7527 mmd->setEnumBaseType(root->
args);
7530 mmd->addSectionsToDefinition(root->
anchors);
7531 mmd->setMemberGroupId(root->
mGrpId);
7535 mmd->setRefItems(root->
sli);
7549 mmd->setDefinition(name+baseType);
7553 mmd->setDefinition(nd->
name()+
"::"+name+baseType);
7557 mmd->setNamespace(nd);
7564 if (isGlobal && (nd==
nullptr || !nd->
isAnonymous()))
7566 if (!defSet) mmd->setDefinition(name+baseType);
7567 if (fd==
nullptr && root->
parent())
7573 mmd->setFileDef(fd);
7581 mmd->setDefinition(name+baseType);
7585 mmd->setDefinition(cd->
name()+
"::"+name+baseType);
7591 mmd->setDocsForDefinition(!root->
proto);
7621 bool isGlobal =
false;
7622 bool isRelated =
false;
7685 struct EnumValueInfo
7687 EnumValueInfo(
const QCString &n,std::unique_ptr<MemberDef> &&md) :
7688 name(n), member(std::move(md)) {}
7690 std::unique_ptr<MemberDef> member;
7692 std::vector< EnumValueInfo > extraMembers;
7694 for (
const auto &imd : *mn)
7701 for (
const auto &e : root->
children())
7705 if ( isJavaLike || root->
spec.isStrong())
7715 qualifiedName=
substitute(qualifiedName,
"::",
".");
7720 if (fileName.
isEmpty() && e->tagInfo())
7722 fileName = e->tagInfo()->tagName;
7726 fileName,e->startLine,e->startColumn,
7727 e->type,e->name,e->args,
QCString(),
7735 fmmd->setNamespace(mnd);
7739 fmmd->setTagInfo(e->tagInfo());
7740 fmmd->setLanguage(e->lang);
7741 fmmd->setBodySegment(e->startLine,e->bodyLine,e->endBodyLine);
7742 fmmd->setBodyDef(e->fileDef());
7744 fmmd->setDocumentation(e->doc,e->docFile,e->docLine);
7745 fmmd->setBriefDescription(e->brief,e->briefFile,e->briefLine);
7746 fmmd->addSectionsToDefinition(e->anchors);
7747 std::string init = e->initializer.str();
7748 fmmd->setInitializer(init.c_str());
7749 fmmd->setMaxInitLines(e->initLines);
7750 fmmd->setMemberGroupId(e->mGrpId);
7751 fmmd->setExplicitExternal(e->explicitExternal,fileName,e->startLine,e->startColumn);
7752 fmmd->setRefItems(e->sli);
7755 fmmd->setEnumScope(md,
TRUE);
7756 extraMembers.emplace_back(e->name,std::move(fmd));
7765 if (!e->name.isEmpty() && (fmn=emnsd->
find(e->name)))
7768 for (
const auto &ifmd : *fmn)
7799 else if (isRelated && cd)
7831 for (
auto &e : extraMembers)
7876 if (gd==
nullptr && !root->
groups.empty())
7890 for (
const auto &g : root->
groups)
7909 "Found non-existing group '%s' for the command '%s', ignoring command",
7923 if (root->
section.isEnumDoc() &&
7949 AUTO_TRACE(
"Found docs for enum with name '{}' and scope '{}' in context '{}' cd='{}', nd='{}' fd='{}'",
7963 for (
const auto &imd : *mn)
7978 else if (cd==
nullptr && mcd==
nullptr && nd!=
nullptr && mnd==nd)
7985 else if (cd==
nullptr && nd==
nullptr && mcd==
nullptr && mnd==
nullptr && fd==mfd)
7999 "Documentation for undefined enum '%s' found.",
8013 for (
const auto &mn : mnsd)
8016 for (
const auto &imd : *mn)
8021 int documentedEnumValues=0;
8025 if (fmd->isLinkableInProject()) documentedEnumValues++;
8051 for (
const auto &md : *mn)
8053 index.addClassMemberNameToIndex(md.get());
8054 if (md->getModuleDef())
8056 index.addModuleMemberNameToIndex(md.get());
8064 for (
const auto &md : *mn)
8066 if (md->getNamespaceDef())
8068 index.addNamespaceMemberNameToIndex(md.get());
8072 index.addFileMemberNameToIndex(md.get());
8074 if (md->getModuleDef())
8076 index.addModuleMemberNameToIndex(md.get());
8081 index.sortMemberIndexLists();
8090 if (cd->isLinkableInProject())
8103 if (cd->isLinkableInProject())
8116 if (nd->isLinkableInProject())
8129 for (
const auto &fd : *fn)
8145 std::string s = title.
str();
8146 static const reg::Ex re(R
"(\a[\w-]*)");
8149 for (; it!=
end ; ++it)
8151 const auto &match = *it;
8152 std::string matchStr = match.str();
8160 if (gd->isLinkableInProject())
8162 addWordsForTitle(gd.get(),gd->anchor(),gd->groupTitle());
8168 if (pd->isLinkableInProject())
8170 addWordsForTitle(pd.get(),pd->anchor(),pd->title());
8190 if (md->getClassDef())
8194 if (md->getNamespaceDef())
8205 if (md->getGroupDef()) scope = md->getGroupDef();
8206 else if (md->getClassDef()) scope = md->getClassDef();
8207 else if (md->getNamespaceDef()) scope = md->getNamespaceDef();
8208 else if (md->getFileDef()) scope = md->getFileDef();
8214 if (md->isLinkableInProject())
8216 if (!(md->isEnumerate() && md->isAnonymous()))
8221 if (md->isEnumerate())
8223 for (
const auto &fmd : md->enumFieldList())
8236 for (
const auto &md : *mn)
8238 addMemberToIndices(md.get());
8245 for (
const auto &md : *mn)
8247 addMemberToIndices(md.get());
8260 for (
const auto &imd : *mn)
8273 for (
const auto &imd : *mn)
8290 for (
const auto &imd : *mn)
8299 const auto &bmni = bmn.
find(mn->memberName());
8302 for (
const auto &ibmd : *bmni)
8367 if (cd->isLinkable())
8369 for (
const auto &bcd : cd->baseClasses())
8385 for (
const auto &ti : cd->getTemplateInstances())
8404 int i=cd->name().find(
'(');
8411 AUTO_TRACE_ADD(
"merging members of category {} into {}",cd->name(),baseClass->
name());
8426 cd->subClasses().empty() &&
8427 !cd->baseClasses().empty())
8463 else if (parseSources)
8481 for (
const auto &fd : *fn)
8489 for (
const auto &fd : *fn)
8498 clangParser->parse();
8499 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8501 for (
auto incFile : clangParser->filesInSameTU())
8503 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
8505 processedFiles.
find(incFile)==processedFiles.end())
8512 processSourceFile(ifd,*
g_outputList,clangParser.get());
8513 processedFiles.insert(incFile);
8524 for (
const auto &fd : *fn)
8526 if (processedFiles.find(fd->
absFilePath().
str())==processedFiles.end())
8531 clangParser->parse();
8532 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8545 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8548 msg(
"Generating code files using %zu threads.\n",numThreads);
8549 struct SourceContext
8552 : fd(fd_), generateSourceFile(gen_), ol(ol_) {}
8554 bool generateSourceFile;
8558 std::vector< std::future< std::shared_ptr<SourceContext> > > results;
8561 for (
const auto &fd : *fn)
8564 auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*
g_outputList);
8565 auto processFile = [ctx]()
8567 if (ctx->generateSourceFile)
8569 msg(
"Generating code for file %s...\n",
qPrint(ctx->fd->docName()));
8573 msg(
"Parsing code for file %s...\n",
qPrint(ctx->fd->docName()));
8576 ctx->fd->getAllIncludeFilesRecursively(filesInSameTu);
8577 if (ctx->generateSourceFile)
8579 ctx->fd->writeSourceHeader(ctx->ol);
8580 ctx->fd->writeSourceBody(ctx->ol,
nullptr);
8581 ctx->fd->writeSourceFooter(ctx->ol);
8586 ctx->fd->parseSource(
nullptr);
8590 results.emplace_back(threadPool.
queue(processFile));
8593 for (
auto &f : results)
8602 for (
const auto &fd : *fn)
8622 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8628 : fd(fd_), ol(ol_) {}
8633 std::vector< std::future< std::shared_ptr<DocContext> > > results;
8636 for (
const auto &fd : *fn)
8638 bool doc = fd->isLinkableInProject();
8641 auto ctx = std::make_shared<DocContext>(fd.get(),*
g_outputList);
8642 auto processFile = [ctx]() {
8643 msg(
"Generating docs for file %s...\n",
qPrint(ctx->fd->docName()));
8644 ctx->fd->writeDocumentation(ctx->ol);
8647 results.emplace_back(threadPool.
queue(processFile));
8651 for (
auto &f : results)
8660 for (
const auto &fd : *fn)
8662 bool doc = fd->isLinkableInProject();
8665 msg(
"Generating docs for file %s...\n",
qPrint(fd->docName()));
8684 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8693 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8702 const_cast<FileDef*
>(fd)->addSourceRef(nd->getStartDefLine(),nd.get(),
nullptr);
8709 for (
const auto &md : *mn)
8718 md->isLinkableInProject() &&
8724 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
8730 for (
const auto &md : *mn)
8740 md->isLinkableInProject() &&
8746 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
8763 for (
const auto &def : it->second)
8766 def.fileName,def.lineNr,def.columnNr,
8767 "#define",def.name,def.args,
QCString(),
8772 if (!def.args.isEmpty())
8776 mmd->setInitializer(def.definition);
8777 mmd->setFileDef(def.fileDef);
8778 mmd->setDefinition(
"#define "+def.name);
8783 def.fileDef->insertMember(md.get());
8785 AUTO_TRACE_ADD(
"adding macro {} with definition {}",def.name,def.definition);
8819 for (
const auto &fd : *fn)
8821 fd->sortMemberLists();
8828 gd->sortMemberLists();
8845 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8849 std::vector < std::future< void > > results;
8853 for (
const auto &def : symList)
8856 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
8858 auto processTooltip = [dm]() {
8861 results.emplace_back(threadPool.
queue(processTooltip));
8866 for (
auto &f : results)
8875 for (
const auto &def : symList)
8878 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
8925 for (
const auto &fd : *fn)
8946 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8952 : cd(cd_), ol(ol_) {}
8957 std::vector< std::future< std::shared_ptr<DocContext> > > results;
8958 for (
const auto &cd : classList)
8961 if (cd->getOuterScope()==
nullptr ||
8965 auto ctx = std::make_shared<DocContext>(cd,*
g_outputList);
8966 auto processFile = [ctx]()
8968 msg(
"Generating docs for compound %s...\n",
qPrint(ctx->cd->displayName()));
8972 if (!ctx->cd->isHidden() && !ctx->cd->isEmbeddedInOuterScope() &&
8973 ctx->cd->isLinkableInProject() && ctx->cd->templateMaster()==
nullptr)
8975 ctx->cd->writeDocumentation(ctx->ol);
8976 ctx->cd->writeMemberList(ctx->ol);
8980 ctx->cd->writeDocumentationForInnerClasses(ctx->ol);
8983 results.emplace_back(threadPool.
queue(processFile));
8986 for (
auto &f : results)
8993 for (
const auto &cd : classList)
8997 if (cd->getOuterScope()==
nullptr ||
9003 if ( !cd->isHidden() && !cd->isEmbeddedInOuterScope() &&
9004 cd->isLinkableInProject() && cd->templateMaster()==
nullptr)
9006 msg(
"Generating docs for compound %s...\n",
qPrint(cd->displayName()));
9021 for (
const auto &innerCdi : cd->
getClasses())
9029 list.push_back(innerCd);
9037 std::vector<ClassDefMutable*> classList;
9086 for (
const auto &imd : *mn)
9122 for (
const auto &fd : *fn)
9124 fd->combineUsingRelations();
9156 for (
const auto &fd : *fn)
9158 fd->addMembersToMemberGroup();
9173 gd->addMembersToMemberGroup();
9194 for (
const auto &fd : *fn)
9196 fd->distributeMemberGroupDocumentation();
9211 gd->distributeMemberGroupDocumentation();
9241 for (
const auto &fd : *fn)
9243 fd->findSectionsInDocumentation();
9258 gd->findSectionsInDocumentation();
9263 pd->findSectionsInDocumentation();
9284 elementsToRemove.push_back(ci.first);
9287 for (
const auto &k : elementsToRemove)
9298 for (
const auto &ifmd : *fn)
9312 for (
const auto &imd : *nm)
9344 elementsToRemove.push_back(ci.first);
9347 for (
const auto &k : elementsToRemove)
9356 for (
const auto &ifmd : *fn)
9369 for (
const auto &imd : *nm)
9437 mmd->setTagInfo(root->
tagInfo());
9438 mmd->setLanguage(root->
lang);
9449 for (
const auto &md : *mn)
9455 for (
const auto &imd : *mn)
9473 for (
const auto &imd : *mn)
9497 "documentation for unknown define %s found.",
9504 "found documented #define %s but ignoring it because "
9505 "ENABLE_PREPROCESSING is NO.",
9521 normalizedName =
substitute(normalizedName,
"\\",
"/");
9524 if (root->
docFile==normalizedName)
9526 int lastSlashPos=normalizedName.
findRev(
'/');
9527 if (lastSlashPos!=-1)
9529 normalizedName=normalizedName.
left(lastSlashPos);
9532 if (normalizedName.
at(normalizedName.
length()-1)!=
'/')
9534 normalizedName+=
'/';
9536 DirDef *matchingDir=
nullptr;
9540 if (dir->name().right(normalizedName.
length())==normalizedName)
9545 "\\dir command matches multiple directories.\n"
9546 " Applying the command for directory %s\n"
9547 " Ignoring the command for directory %s",
9553 matchingDir=dir.get();
9569 "directory found for command \\dir %s",
qPrint(normalizedName));
9581 if (root->
section.isPageDoc())
9588 else if (root->
section.isMainpageDoc())
9608 if (root->
section.isMainpageDoc())
9641 else if (si->
lineNr() != -1)
9643 warn(root->
fileName,root->
startLine,
"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",
9648 warn(root->
fileName,root->
startLine,
"multiple use of section label '%s' for main page, (first occurrence: %s)",
9665 else if (root->
tagInfo()==
nullptr)
9668 "found more than one \\mainpage comment block! (first occurrence: %s, line %d), Skipping current block!",
9678 if (root->
section.isMainpageDoc())
9702 term(
"page defined %s with label %s is a direct "
9703 "subpage of itself! Please remove this cyclic dependency.\n",
9727 term(
"page defined %s with label %s is a subpage "
9728 "of itself! Please remove this cyclic dependency.\n",
9755 if (si->label().left(label.
length())==label)
9757 si->setFileName(rl->listName());
9758 si->setGenerated(
TRUE);
9764 if (!si->generated())
9768 if (!si->fileName().isEmpty() &&
9775 if (si->definition())
9782 gd = (
toMemberDef(si->definition()))->getGroupDef();
9812 if (!pd->getGroupDef() && !pd->isReference())
9814 msg(
"Generating docs for page %s...\n",
qPrint(pd->name()));
9830 "Example %s was already documented. Ignoring "
9831 "documentation found here.",
9861 indentStr.
fill(
' ',indent);
9868 for (
const auto &e : root->
children())
9880 indentStr.
fill(
' ',indent);
9887 for (
const auto &e : root->
children())
9896 bool extraIndent =
false;
9903 for (
int i = 0; i < LayoutDocManager::NrParts; i++)
9910 if (lde->kind() == LayoutDocEntry::MemberDeclEnd || lde->kind() == LayoutDocEntry::MemberDefEnd) extraIndent =
false;
9912 extraIndent?
" " :
"",
qPrint(lde->entryToString()), ldes->visible());
9913 if (lde->kind() == LayoutDocEntry::MemberDeclStart || lde->kind() == LayoutDocEntry::MemberDefStart) extraIndent =
true;
9918 extraIndent?
" " :
"",
qPrint(lde->entryToString()),
qPrint(lmdecl->type.to_string()));
9923 extraIndent?
" " :
"",
qPrint(lde->entryToString()),
qPrint(lmdef->type.to_string()));
9945 si->type(),
qPrint(si->ref()));
9959 msg(
"Generating docs for example %s...\n",
qPrint(pd->name()));
9965 intf->resetCodeParserState();
9967 QCString n=pd->getOutputFileBase();
9974 if (pd->showLineNo())
9976 lineNoOptStr=
"{lineno}";
9982 (pd->briefDescription().isEmpty()?
"":pd->briefDescription()+
"\n\n")+
9983 pd->documentation()+
"\n\n\\include"+lineNoOptStr+
" "+pd->name(),
10003 if (!gd->isReference())
10015 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10021 : cdm(cdm_), ol(ol_) {}
10026 std::vector< std::future< std::shared_ptr<DocContext> > > results;
10028 for (
const auto &cd : classList)
10033 auto ctx = std::make_shared<DocContext>(cdm,*
g_outputList);
10034 auto processFile = [ctx]()
10036 if ( ( ctx->cdm->isLinkableInProject() &&
10037 ctx->cdm->templateMaster()==
nullptr
10040 && !ctx->cdm->isHidden() && !ctx->cdm->isEmbeddedInOuterScope()
10043 msg(
"Generating docs for compound %s...\n",
qPrint(ctx->cdm->displayName()));
10044 ctx->cdm->writeDocumentation(ctx->ol);
10045 ctx->cdm->writeMemberList(ctx->ol);
10047 ctx->cdm->writeDocumentationForInnerClasses(ctx->ol);
10050 results.emplace_back(threadPool.
queue(processFile));
10054 for (
auto &f : results)
10056 auto ctx = f.get();
10062 for (
const auto &cd : classList)
10067 if ( ( cd->isLinkableInProject() &&
10068 cd->templateMaster()==
nullptr
10071 && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
10074 msg(
"Generating docs for compound %s...\n",
qPrint(cd->displayName()));
10088 for (
const auto &cd : conceptList)
10093 msg(
"Generating docs for concept %s...\n",
qPrint(cd->name()));
10108 if (nd->isLinkableInProject())
10113 msg(
"Generating docs for namespace %s\n",
qPrint(nd->displayName()));
10151 QCString cmd=qhgLocation+
" -v 2>&1";
10156 err(
"could not execute %s\n",
qPrint(qhgLocation));
10160 const size_t bufSize = 1024;
10161 char inBuf[bufSize+1];
10162 size_t numRead=fread(inBuf,1,bufSize,f);
10163 inBuf[numRead] =
'\0';
10168 static const reg::Ex versionReg(R
"(Qt (\d+)\.(\d+)\.(\d+))");
10170 std::string s = inBuf;
10177 if (qtVersion>0 && (qtVersion<60000 || qtVersion >= 60205))
10186 err(
"could not execute %s\n",
qPrint(qhgLocation));
10190 std::string output;
10191 while ((numRead=fread(inBuf,1,bufSize,f))>0)
10193 inBuf[numRead] =
'\0';
10231 size_t l=dotPath.
length();
10232 for (
size_t i=0;i<l;i++)
if (dotPath.
at(i)==
'/') dotPath.
at(i)=
'\\';
10251 bool updateOnly=
FALSE)
10255 bool writeToStdout=configFile==
"-";
10260 if (!writeToStdout)
10264 msg(
"\n\nConfiguration file '%s' created.\n\n",
qPrint(configFile));
10265 msg(
"Now edit the configuration file and enter\n\n");
10266 if (configFile!=
"Doxyfile" && configFile!=
"doxyfile")
10267 msg(
" doxygen %s\n\n",
qPrint(configFile));
10269 msg(
" doxygen\n\n");
10270 msg(
"to generate the documentation for your project\n\n");
10274 msg(
"\n\nConfiguration file '%s' updated.\n\n",
qPrint(configFile));
10280 term(
"Cannot open file %s for writing\n",
qPrint(configFile));
10295 term(
"Cannot open stdout for writing\n");
10306 int eqPos = tagLine.
find(
'=');
10316 fileName = tagLine;
10322 err(
"Tag file '%s' does not exist or is not a file. Skipping it...\n",
10334 msg(
"Reading tag file '%s', location '%s'...\n",
qPrint(fileName),
qPrint(destName));
10337 msg(
"Reading tag file '%s'...\n",
qPrint(fileName));
10346 for (
const auto &sheet : latexExtraStyleSheet)
10348 std::string fileName = sheet;
10349 if (!fileName.empty())
10354 err(
"Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",
qPrint(fileName));
10356 else if (fi.
isDir())
10358 err(
"Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET is a directory, it has to be a file!\n",
qPrint(fileName));
10377 if (!htmlStyleSheet.
isEmpty())
10384 err(
"Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",
qPrint(htmlStyleSheet));
10387 else if (fi.
isDir())
10389 err(
"Style sheet '%s' specified by HTML_STYLESHEET is a directory, it has to be a file!\n",
qPrint(htmlStyleSheet));
10395 copyFile(htmlStyleSheet,destFileName);
10400 for (
const auto &sheet : htmlExtraStyleSheet)
10408 err(
"Style sheet '%s' specified by HTML_EXTRA_STYLESHEET does not exist!\n",
qPrint(fileName));
10412 err(
"Style sheet %s specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",
qPrint(fi.
fileName()));
10414 else if (fi.
isDir())
10416 err(
"Style sheet '%s' specified by HTML_EXTRA_STYLESHEET is a directory, it has to be a file!\n",
qPrint(fileName));
10435 err(
"Project logo '%s' specified by PROJECT_LOGO does not exist!\n",
qPrint(projectLogo));
10438 else if (fi.
isDir())
10440 err(
"Project logo '%s' specified by PROJECT_LOGO is a directory, it has to be a file!\n",
qPrint(projectLogo));
10446 copyFile(projectLogo,destFileName);
10460 err(
"Project icon '%s' specified by PROJECT_ICON does not exist!\n",
qPrint(projectIcon));
10463 else if (fi.
isDir())
10465 err(
"Project icon '%s' specified by PROJECT_ICON is a directory, it has to be a file!\n",
qPrint(projectIcon));
10471 copyFile(projectIcon,destFileName);
10479 for (
const auto &fileName : files)
10481 if (!fileName.empty())
10486 err(
"Extra file '%s' specified in %s does not exist!\n", fileName.c_str(),
qPrint(filesOption));
10488 else if (fi.
isDir())
10490 err(
"Extra file '%s' specified in %s is a directory, it has to be a file!\n", fileName.c_str(),
qPrint(filesOption));
10516 std::vector<FileEntry> fileEntries;
10517 for (
const auto &fd : *fn)
10519 if (!fd->isReference())
10521 fileEntries.emplace_back(fd->getPath(),fd.get());
10525 size_t size = fileEntries.size();
10529 FileDef *fd = fileEntries[0].fileDef;
10535 std::stable_sort(fileEntries.begin(),
10537 [](
const FileEntry &fe1,
const FileEntry &fe2)
10538 { return qstricmp_sort(fe1.path,fe2.path)<0; }
10543 const FileEntry &first = fileEntries[0];
10544 const FileEntry &last = fileEntries[size-1];
10545 int first_path_size =
static_cast<int>(first.path.size())-1;
10546 int last_path_size =
static_cast<int>(last.path.size())-1;
10549 for (i=0;i<first_path_size && i<last_path_size;i++)
10551 if (first.path[i]==
'/') j=i;
10552 if (first.path[i]!=last.path[i])
break;
10554 if (i==first_path_size && i<last_path_size && last.path[i]==
'/')
10559 else if (i==last_path_size && i<first_path_size && first.path[i]==
'/')
10566 for (
auto &fileEntry : fileEntries)
10568 QCString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
10569 fileEntry.fileDef->setName(
prefix+fn->fileName());
10571 fileEntry.fileDef->setDiskName(
prefix+fn->fileName());
10585 int sep = fileName.
findRev(
'/');
10586 int ei = fileName.
findRev(
'.');
10587 if (ei!=-1 && (sep==-1 || ei>sep))
10593 extension =
".no_extension";
10606 int ei = fileName.
findRev(
'.');
10613 extension =
".no_extension";
10617 std::string preBuf;
10624 for (
const auto &s : includePath)
10630 msg(
"Preprocessing %s...\n",
qPrint(fn));
10642 std::string convBuf;
10643 convBuf.reserve(preBuf.size()+1024);
10648 std::shared_ptr<Entry> fileRoot = std::make_shared<Entry>();
10652 if (newTU) clangParser->
parse();
10655 parser.
parseInput(fileName,convBuf.
data(),fileRoot,clangParser);
10656 fileRoot->setFileDef(fd);
10673 filesToProcess.insert(s);
10676 std::mutex processedFilesLock;
10678 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10679 msg(
"Processing input using %zu threads.\n",numThreads);
10681 using FutureType = std::vector< std::shared_ptr<Entry> >;
10682 std::vector< std::future< FutureType > > results;
10685 bool ambig =
false;
10691 auto processFile = [s,&filesToProcess,&processedFilesLock,&processedFiles]() {
10692 bool ambig_l =
false;
10693 std::vector< std::shared_ptr<Entry> > roots;
10697 auto fileRoot {
parseFile(*parser.get(),fd_l,s.c_str(),clangParser.get(),
true) };
10698 roots.push_back(fileRoot);
10702 for (
auto incFile : clangParser->filesInSameTU())
10704 if (filesToProcess.find(incFile)!=filesToProcess.end())
10706 bool needsToBeProcessed =
false;
10708 std::lock_guard<std::mutex> lock(processedFilesLock);
10709 needsToBeProcessed = processedFiles.find(incFile)==processedFiles.end();
10710 if (needsToBeProcessed) processedFiles.insert(incFile);
10712 if (incFile!=s && needsToBeProcessed)
10718 fileRoot =
parseFile(*parser.get(),ifd,incFile.c_str(),clangParser.get(),
false);
10719 roots.push_back(fileRoot);
10727 results.emplace_back(threadPool.
queue(processFile));
10731 for (
auto &f : results)
10736 root->moveToSubEntryAndKeep(e);
10743 if (processedFiles.find(s)==processedFiles.end())
10746 auto processFile = [s]() {
10747 bool ambig =
false;
10748 std::vector< std::shared_ptr<Entry> > roots;
10755 auto fileRoot =
parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),
true);
10756 roots.push_back(fileRoot);
10760 auto fileRoot =
parseFile(*parser.get(),fd,s.c_str(),
nullptr,
true);
10761 roots.push_back(fileRoot);
10765 results.emplace_back(threadPool.
queue(processFile));
10769 for (
auto &f : results)
10774 root->moveToSubEntryAndKeep(e);
10781 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10782 msg(
"Processing input using %zu threads.\n",numThreads);
10784 using FutureType = std::shared_ptr<Entry>;
10785 std::vector< std::future< FutureType > > results;
10789 auto processFile = [s]() {
10790 bool ambig =
false;
10793 auto fileRoot =
parseFile(*parser.get(),fd,s.c_str(),
nullptr,
true);
10797 results.emplace_back(threadPool.
queue(processFile));
10800 for (
auto &f : results)
10802 root->moveToSubEntryAndKeep(f.get());
10820 filesToProcess.insert(s);
10826 bool ambig =
false;
10833 auto fileRoot =
parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),
true);
10834 root->moveToSubEntryAndKeep(fileRoot);
10835 processedFiles.insert(s);
10839 for (
auto incFile : clangParser->filesInSameTU())
10842 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
10843 processedFiles.find(incFile)==processedFiles.end())
10849 fileRoot =
parseFile(*parser.get(),ifd,incFile.c_str(),clangParser.get(),
false);
10850 root->moveToSubEntryAndKeep(fileRoot);
10851 processedFiles.insert(incFile);
10860 if (processedFiles.find(s)==processedFiles.end())
10862 bool ambig =
false;
10868 auto fileRoot =
parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),
true);
10869 root->moveToSubEntryAndKeep(fileRoot);
10873 std::unique_ptr<OutlineParserInterface> parser {
getParserForFile(s.c_str()) };
10874 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,s.c_str(),
nullptr,
true);
10875 root->moveToSubEntryAndKeep(fileRoot);
10877 processedFiles.insert(s);
10886 bool ambig =
false;
10889 std::unique_ptr<OutlineParserInterface> parser {
getParserForFile(s.c_str()) };
10890 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,s.c_str(),
nullptr,
true);
10891 root->moveToSubEntryAndKeep(std::move(fileRoot));
10911 sepPos = result.
find(
'/',2);
10913 sepPos = result.
find(
'/',sepPos+1);
10915 sepPos = result.
find(
'/',sepPos+1);
10918 if (nonSymlinks.find(
prefix.str())==nonSymlinks.end())
10935 target+=result.
mid(sepPos);
10938 if (known.find(result.
str())!=known.end())
return std::string();
10939 known.insert(result.
str());
10952 nonSymlinks.insert(
prefix.str());
10958 while (sepPos!=-1);
10977 bool errorIfNotExist,
10984 if (paths && !dirName.empty())
10986 paths->insert(dirName);
10992 if (dirName.empty())
11012 for (
const auto &dirEntry : dir.
iterator())
11015 if (exclSet==
nullptr || exclSet->find(cfi.
absFilePath())==exclSet->end())
11023 if (errorIfNotExist)
11025 warn_uncond(
"source '%s' is not a readable file or directory... skipping.\n",cfi.
absFilePath().c_str());
11028 else if (cfi.
isFile() &&
11030 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11031 (killSet==
nullptr || killSet->find(cfi.
absFilePath())==killSet->end())
11035 std::string path=cfi.
dirPath()+
"/";
11036 std::string fullName=path+name;
11044 fn->push_back(std::move(fd));
11047 dirResultList.push_back(fullName);
11048 if (resultSet) resultSet->insert(fullName);
11049 if (killSet) killSet->insert(fullName);
11051 else if (recursive &&
11053 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11058 patList,exclPatList,&dirResultList,resultSet,errorIfNotExist,
11059 recursive,killSet,paths);
11063 if (resultList && !dirResultList.empty())
11066 std::stable_sort(dirResultList.begin(),
11067 dirResultList.end(),
11068 [](
const auto &f1,
const auto &f2) { return qstricmp_sort(f1.c_str(),f2.c_str())<0; });
11071 resultList->insert(resultList->end(), dirResultList.begin(), dirResultList.end());
11088 bool errorIfNotExist,
11102 if (exclSet==
nullptr || exclSet->find(fi.
absFilePath())==exclSet->end())
11109 if (errorIfNotExist)
11111 warn_uncond(
"source '%s' is not a readable file or directory... skipping.\n",
qPrint(s));
11116 std::string dirPath = fi.
dirPath(
true);
11118 if (paths && !dirPath.empty())
11120 paths->insert(dirPath);
11123 if (killSet==
nullptr || killSet->find(filePath)==killSet->end())
11132 fn->push_back(std::move(fd));
11135 if (resultList || resultSet)
11137 if (resultList) resultList->push_back(filePath);
11138 if (resultSet) resultSet->insert(filePath);
11144 else if (fi.
isDir())
11146 readDir(&fi,fnMap,exclSet,patList,
11147 exclPatList,resultList,resultSet,errorIfNotExist,
11148 recursive,killSet,paths);
11162 anchor=
":"+md->
anchor();
11171 t <<
"REPLACE INTO symbols (symbol_id,scope_id,name,file,line) VALUES('"
11172 << fn+anchor <<
"','"
11174 << d->
name() <<
"','"
11188 for (
const auto &def : symList)
11200 msg(
"Developer parameters:\n");
11201 msg(
" -m dump symbol map\n");
11202 msg(
" -b making messages output unbuffered\n");
11203 msg(
" -c <file> process input file as a comment block and produce HTML output\n");
11205 msg(
" -t [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout)\n");
11206 msg(
" -t_time [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout),\n"
11207 " and include time and thread information\n");
11209 msg(
" -d <level> enable a debug level, such as (multiple invocations of -d are possible):\n");
11220 QCString versionString = getFullVersion();
11225 if (!extVers.
isEmpty()) extVers+=
", ";
11226 extVers +=
"sqlite3 ";
11227 extVers += sqlite3_libversion();
11229 if (!extVers.
isEmpty()) extVers+=
", ";
11230 extVers +=
"clang support ";
11231 extVers += CLANG_VERSION_STRING;
11235 int lastComma = extVers.
findRev(
',');
11236 if (lastComma != -1) extVers = extVers.
replace(lastComma,1,
" and");
11248 msg(
"Doxygen version %s\nCopyright Dimitri van Heesch 1997-2024\n\n",
qPrint(versionString));
11249 msg(
"You can use Doxygen in a number of ways:\n\n");
11250 msg(
"1) Use Doxygen to generate a template configuration file*:\n");
11251 msg(
" %s [-s] -g [configName]\n\n",
qPrint(name));
11252 msg(
"2) Use Doxygen to update an old configuration file*:\n");
11253 msg(
" %s [-s] -u [configName]\n\n",
qPrint(name));
11254 msg(
"3) Use Doxygen to generate documentation using an existing ");
11255 msg(
"configuration file*:\n");
11256 msg(
" %s [configName]\n\n",
qPrint(name));
11257 msg(
"4) Use Doxygen to generate a template file controlling the layout of the\n");
11258 msg(
" generated documentation:\n");
11259 msg(
" %s -l [layoutFileName]\n\n",
qPrint(name));
11260 msg(
" In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.\n");
11261 msg(
" If - is used for layoutFileName Doxygen will write to standard output.\n\n");
11262 msg(
"5) Use Doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
11263 msg(
" RTF: %s -w rtf styleSheetFile\n",
qPrint(name));
11264 msg(
" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",
qPrint(name));
11265 msg(
" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",
qPrint(name));
11266 msg(
"6) Use Doxygen to generate a rtf extensions file\n");
11267 msg(
" %s -e rtf extensionsFile\n\n",
qPrint(name));
11268 msg(
" If - is used for extensionsFile Doxygen will write to standard output.\n\n");
11269 msg(
"7) Use Doxygen to compare the used configuration file with the template configuration file\n");
11270 msg(
" %s -x [configFile]\n\n",
qPrint(name));
11271 msg(
" Use Doxygen to compare the used configuration file with the template configuration file\n");
11272 msg(
" without replacing the environment variables or CMake type replacement variables\n");
11273 msg(
" %s -x_noenv [configFile]\n\n",
qPrint(name));
11274 msg(
"8) Use Doxygen to show a list of built-in emojis.\n");
11275 msg(
" %s -f emoji outputFileName\n\n",
qPrint(name));
11276 msg(
" If - is used for outputFileName Doxygen will write to standard output.\n\n");
11277 msg(
"*) If -s is specified the comments of the configuration items in the config file will be omitted.\n");
11278 msg(
" If configName is omitted 'Doxyfile' will be used as a default.\n");
11279 msg(
" If - is used for configFile Doxygen will write / read the configuration to /from standard output / input.\n\n");
11280 msg(
"If -q is used for a Doxygen documentation run, Doxygen will see this as if QUIET=YES has been set.\n\n");
11281 msg(
"-v print version string, -V print extended version information\n");
11282 msg(
"-h,-? prints usage help information\n");
11283 msg(
"%s -d prints additional usage flags for debugging purposes\n",
qPrint(name));
11290static const char *
getArg(
int argc,
char **argv,
int &optInd)
11293 if (
qstrlen(&argv[optInd][2])>0)
11294 s=&argv[optInd][2];
11295 else if (optInd+1<argc && argv[optInd+1][0]!=
'-')
11314 return []() {
return std::make_unique<T>(); };
11322 std::setlocale(LC_ALL,
"");
11323 std::setlocale(LC_CTYPE,
"C");
11324 std::setlocale(LC_NUMERIC,
"C");
11423 while (v!=0) v>>=1,r++;
11427 return std::max(0,std::min(r-16,9));
11432 QCString versionString = getFullVersion();
11435 auto writeFile = [](
const char *fileName,std::function<void(
TextStream&)> func) ->
bool
11455 bool genConfig=
false;
11456 bool shortList=
false;
11457 bool traceTiming=
false;
11459 bool updateConfig=
false;
11460 bool quiet =
false;
11461 while (optInd<argc && argv[optInd][0]==
'-' &&
11462 (isalpha(argv[optInd][1]) || argv[optInd][1]==
'?' ||
11463 argv[optInd][1]==
'-')
11466 switch(argv[optInd][1])
11476 if (optInd+1>=argc)
11478 layoutName=
"DoxygenLayout.xml";
11482 layoutName=argv[optInd+1];
11490 if (optInd+1>=argc)
11492 err(
"option \"-c\" is missing the file name to read\n");
11517 err(
"option \"-d\" has unknown debug specifier: \"%s\".\n",
qPrint(debugLabel));
11527 if (!strcmp(argv[optInd]+1,
"t_time"))
11529 traceTiming =
true;
11531 else if (!strcmp(argv[optInd]+1,
"t"))
11533 traceTiming =
false;
11537 err(
"option should be \"-t\" or \"-t_time\", found: \"%s\".\n",argv[optInd]);
11541 if (optInd+1>=argc || argv[optInd+1][0] ==
'-')
11543 traceName=
"stdout";
11547 traceName=argv[optInd+1];
11551 err(
"support for option \"-t\" has not been compiled in (use a debug build or a release build with tracing enabled).\n");
11562 err(
"option should be \"-x\" or \"-x_noenv\", found: \"%s\".\n",argv[optInd]);
11578 err(
"option \"-e\" is missing format specifier rtf.\n");
11584 if (optInd+1>=argc)
11586 err(
"option \"-e rtf\" is missing an extensions file name\n");
11594 err(
"option \"-e\" has invalid format specifier.\n");
11604 err(
"option \"-f\" is missing list specifier.\n");
11610 if (optInd+1>=argc)
11612 err(
"option \"-f emoji\" is missing an output file name\n");
11620 err(
"option \"-f\" has invalid list specifier.\n");
11630 err(
"option \"-w\" is missing format specifier rtf, html or latex\n");
11636 if (optInd+1>=argc)
11638 err(
"option \"-w rtf\" is missing a style sheet file name\n");
11644 err(
"error opening RTF style sheet file %s!\n",argv[optInd+1]);
11654 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11660 err(
"error opening or reading configuration file %s!\n",argv[optInd+4]);
11665 if (optInd+3>=argc)
11667 err(
"option \"-w html\" does not have enough arguments\n");
11684 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11689 err(
"error opening or reading configuration file %s!\n",argv[optInd+4]);
11694 if (optInd+3>=argc)
11696 err(
"option \"-w latex\" does not have enough arguments\n");
11712 err(
"Illegal format specifier \"%s\": should be one of rtf, html or latex\n",
qPrint(formatName));
11732 if (
qstrcmp(&argv[optInd][2],
"help")==0)
11734 usage(argv[0],versionString);
11737 else if (
qstrcmp(&argv[optInd][2],
"version")==0)
11743 else if ((
qstrcmp(&argv[optInd][2],
"Version")==0) ||
11744 (
qstrcmp(&argv[optInd][2],
"VERSION")==0))
11752 err(
"Unknown option \"-%s\"\n",&argv[optInd][1]);
11753 usage(argv[0],versionString);
11758 setvbuf(stdout,
nullptr,_IONBF,0);
11765 usage(argv[0],versionString);
11769 err(
"Unknown option \"-%c\"\n",argv[optInd][1]);
11770 usage(argv[0],versionString);
11781 TRACE(
"Doxygen version used: {}",getFullVersion());
11784 FileInfo configFileInfo1(
"Doxyfile"),configFileInfo2(
"doxyfile");
11787 if (configFileInfo1.exists())
11789 configName=
"Doxyfile";
11791 else if (configFileInfo2.
exists())
11793 configName=
"doxyfile";
11795 else if (genConfig)
11797 configName=
"Doxyfile";
11801 err(
"Doxyfile not found and no input file specified!\n");
11802 usage(argv[0],versionString);
11809 if (fi.
exists() ||
qstrcmp(argv[optInd],
"-")==0 || genConfig)
11811 configName=argv[optInd];
11815 err(
"configuration file %s not found!\n",argv[optInd]);
11816 usage(argv[0],versionString);
11830 err(
"could not open or read configuration file %s!\n",
qPrint(configName));
11901 for (
const auto &mapping : extMaps)
11903 QCString mapStr = mapping.c_str();
11904 int i=mapStr.
find(
'=');
11920 err(
"Failed to map file extension '%s' to unsupported language '%s'.\n"
11921 "Check the EXTENSION_MAPPING setting in the config file.\n",
11926 msg(
"Adding custom extension mapping: '%s' will be treated as language '%s'\n",
11935 if (cd==
reinterpret_cast<void *
>(-1))
11937 term(
"unsupported character conversion: '%s'->'%s': %s\n"
11938 "Check the 'INPUT_ENCODING' setting in the config file!\n",
11948 for (
const auto &mapping : fileEncod)
11950 QCString mapStr = mapping.c_str();
11951 int i=mapStr.
find(
'=');
11965 if (cd==
reinterpret_cast<void *
>(-1))
11967 term(
"unsupported character conversion: '%s'->'%s': %s\n"
11968 "Check the 'INPUT_FILE_ENCODING' setting in the config file!\n",
11982 for (
const auto &s : expandAsDefinedList)
12000 signal(SIGINT,SIG_DFL);
12002 msg(
"Cleaning up...\n");
12017 if (generateTagFile.
isEmpty())
return;
12022 err(
"cannot open tag file %s for writing\n",
12028 tagFile <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
12029 tagFile <<
"<tagfile doxygen_version=\"" << getDoxygenVersion() <<
"\"";
12030 std::string gitVersion = getGitVersion();
12031 if (!gitVersion.empty())
12033 tagFile <<
" doxygen_gitid=\"" << gitVersion <<
"\"";
12040 for (
const auto &fd : *fn)
12042 if (fd->isLinkableInProject()) fd->writeTagFile(tagFile);
12075 if (gd->isLinkableInProject()) gd->writeTagFile(tagFile);
12080 if (mod->isLinkableInProject()) mod->writeTagFile(tagFile);
12085 if (pd->isLinkableInProject()) pd->writeTagFile(tagFile);
12089 tagFile <<
"</tagfile>\n";
12097 msg(
"Exiting...\n");
12107 const char *defaultDirName)
12112 result = baseDirName + defaultDirName;
12114 else if (formatDirName[0]!=
'/' && (formatDirName.
length()==1 || formatDirName[1]!=
':'))
12116 result.
prepend(baseDirName+
"/");
12118 Dir formatDir(result.
str());
12121 term(
"Could not create output directory %s\n",
qPrint(result));
12135 g_s.begin(
"Searching for include files...\n");
12138 for (
const auto &s : includePathList)
12156 g_s.begin(
"Searching for example files...\n");
12159 for (
const auto &s : examplePathList)
12174 g_s.begin(
"Searching for images...\n");
12177 for (
const auto &s : imagePathList)
12192 g_s.begin(
"Searching for dot files...\n");
12195 for (
const auto &s : dotFileList)
12210 g_s.begin(
"Searching for msc files...\n");
12213 for (
const auto &s : mscFileList)
12228 g_s.begin(
"Searching for dia files...\n");
12231 for (
const auto &s : diaFileList)
12246 g_s.begin(
"Searching for plantuml files...\n");
12249 for (
const auto &s : plantUmlFileList)
12264 g_s.begin(
"Searching for files to exclude\n");
12266 for (
const auto &s : excludeList)
12284 g_s.begin(
"Searching INPUT for files to process...\n");
12288 for (
const auto &s : inputList)
12291 size_t l = path.
length();
12295 if (path.
at(l-1)==
'\\' || path.
at(l-1)==
'/') path=path.
left(l-1);
12315 [](
const auto &f1,
const auto &f2)
12321 if (fileName->size()>1)
12323 std::stable_sort(fileName->begin(),fileName->end(),[](
const auto &f1,
const auto &f2)
12325 return qstricmp_sort(f1->absFilePath(),f2->absFilePath())<0;
12331 warn_uncond(
"No files to be processed, please check your settings, in particular INPUT, FILE_PATTERNS, and RECURSIVE\n");
12342 if (mdfileAsMainPage.
isEmpty())
return;
12346 warn_uncond(
"Specified markdown mainpage '%s' does not exist\n",
qPrint(mdfileAsMainPage));
12349 bool ambig =
false;
12352 warn_uncond(
"Specified markdown mainpage '%s' has not been defined as input file\n",
qPrint(mdfileAsMainPage));
12371 QCString versionString = getFullVersion();
12372 msg(
"Doxygen version used: %s\n",
qPrint(versionString));
12382 if (outputDirectory.
isEmpty())
12388 Dir dir(outputDirectory.
str());
12392 if (!dir.
mkdir(outputDirectory.
str()))
12394 term(
"tag OUTPUT_DIRECTORY: Output directory '%s' does not "
12395 "exist and cannot be created\n",
qPrint(outputDirectory));
12399 msg(
"Notice: Output directory '%s' does not exist. "
12400 "I have created it for you.\n",
qPrint(outputDirectory));
12415 if (cacheSize<0) cacheSize=0;
12416 if (cacheSize>9) cacheSize=9;
12417 uint32_t lookupSize = 65536 << cacheSize;
12456 bool generateSitemap = !sitemapUrl.
isEmpty();
12457 if (generateSitemap && !sitemapUrl.
endsWith(
"/"))
12464 bool generateEclipseHelp =
Config_getBool(GENERATE_ECLIPSEHELP);
12478 if (generateDocbook)
12525 newFontPath+=curFontPath;
12541 bool defaultLayoutUsed =
FALSE;
12542 if (layoutFileName.
isEmpty())
12545 defaultLayoutUsed =
TRUE;
12547 AUTO_TRACE_ADD(
"defaultLayoutUsed={}, layoutFileName={}",defaultLayoutUsed,layoutFileName);
12552 msg(
"Parsing layout file %s...\n",
qPrint(layoutFileName));
12555 else if (!defaultLayoutUsed)
12557 warn_uncond(
"failed to open layout file '%s' for reading! Using default settings.\n",
qPrint(layoutFileName));
12567 if (generateHtml) exclPatterns.push_back(htmlOutput.
str());
12568 if (generateDocbook) exclPatterns.push_back(docbookOutput.
str());
12569 if (generateXml) exclPatterns.push_back(xmlOutput.
str());
12570 if (generateLatex) exclPatterns.push_back(latexOutput.
str());
12571 if (generateRtf) exclPatterns.push_back(rtfOutput.
str());
12572 if (generateMan) exclPatterns.push_back(manOutput.
str());
12592 if (generateDocbook)
12603 std::shared_ptr<Entry> root = std::make_shared<Entry>();
12607 msg(
"Reading and parsing tag files\n");
12609 for (
const auto &s : tagFileList)
12621 g_s.begin(
"Parsing files\n");
12661 g_s.begin(
"Building macro definition list...\n");
12665 g_s.begin(
"Building group list...\n");
12670 g_s.begin(
"Building directory list...\n");
12675 g_s.begin(
"Building namespace list...\n");
12680 g_s.begin(
"Building file list...\n");
12684 g_s.begin(
"Building class list...\n");
12688 g_s.begin(
"Building concept list...\n");
12696 g_s.begin(
"Computing nesting relations for classes...\n");
12709 g_s.begin(
"Associating documentation with classes...\n");
12713 g_s.begin(
"Associating documentation with concepts...\n");
12718 g_s.begin(
"Associating documentation with modules...\n");
12722 g_s.begin(
"Building example list...\n");
12726 g_s.begin(
"Searching for enumerations...\n");
12734 g_s.begin(
"Searching for documented typedefs...\n");
12740 g_s.begin(
"Searching for documented sequences...\n");
12744 g_s.begin(
"Searching for documented dictionaries...\n");
12749 g_s.begin(
"Searching for members imported via using declarations...\n");
12756 g_s.begin(
"Searching for included using directives...\n");
12760 g_s.begin(
"Searching for documented variables...\n");
12764 g_s.begin(
"Building interface member list...\n");
12767 g_s.begin(
"Building member list...\n");
12771 g_s.begin(
"Searching for friends...\n");
12775 g_s.begin(
"Searching for documented defines...\n");
12779 g_s.begin(
"Computing class inheritance relations...\n");
12784 g_s.begin(
"Computing class usage relations...\n");
12790 g_s.begin(
"Searching for tag less structs...\n");
12795 g_s.begin(
"Flushing cached template relations that have become invalid...\n");
12799 g_s.begin(
"Warn for undocumented namespaces...\n");
12803 g_s.begin(
"Computing class relations...\n");
12814 g_s.begin(
"Add enum values to enums...\n");
12819 g_s.begin(
"Searching for member function documentation...\n");
12831 g_s.begin(
"Creating members for template instances...\n");
12835 g_s.begin(
"Building page list...\n");
12839 g_s.begin(
"Search for main page...\n");
12844 g_s.begin(
"Computing page relations...\n");
12849 g_s.begin(
"Determining the scope of groups...\n");
12853 g_s.begin(
"Computing module relations...\n");
12855 mm.resolvePartitions();
12856 mm.resolveImports();
12857 mm.collectExportedSymbols();
12876 return i==0 ?
qstricmp_sort(c1->name(), c2->name())<0 : i<0;
12890 g_s.begin(
"Sorting lists...\n");
12911 g_s.begin(
"Determining which enums are documented\n");
12915 g_s.begin(
"Computing member relations...\n");
12920 g_s.begin(
"Building full member lists recursively...\n");
12924 g_s.begin(
"Adding members to member groups.\n");
12930 g_s.begin(
"Distributing member group documentation.\n");
12935 g_s.begin(
"Computing member references...\n");
12941 g_s.begin(
"Inheriting documentation...\n");
12949 g_s.begin(
"Generating disk names...\n");
12953 g_s.begin(
"Adding source references...\n");
12957 g_s.begin(
"Adding xrefitems...\n");
12962 g_s.begin(
"Sorting member lists...\n");
12966 g_s.begin(
"Setting anonymous enum type...\n");
12970 g_s.begin(
"Computing dependencies between directories...\n");
12974 g_s.begin(
"Generating citations page...\n");
12978 g_s.begin(
"Counting members...\n");
12982 g_s.begin(
"Counting data structures...\n");
12986 g_s.begin(
"Resolving user defined references...\n");
12990 g_s.begin(
"Finding anchors and sections in the documentation...\n");
12994 g_s.begin(
"Transferring function references...\n");
12998 g_s.begin(
"Combining using relations...\n");
13003 g_s.begin(
"Adding members to index pages...\n");
13008 g_s.begin(
"Correcting members for VHDL...\n");
13012 g_s.begin(
"Computing tooltip texts...\n");
13020 [](
const auto &g1,
const auto &g2)
13021 {
return g1->groupTitle() < g2->groupTitle(); });
13025 gd->sortSubGroups();
13069 if (generateDocbook)
13089 err(
"USE_HTAGS is YES but htags(1) failed. \n");
13091 err(
"htags(1) ended normally but failed to load the filemap. \n");
13098 g_s.begin(
"Generating style sheet...\n");
13106 g_s.begin(
"Generating search indices...\n");
13107 if (searchEngine && !serverBasedSearch && generateHtml)
13115 if (generateHtml && searchEngine)
13118 Dir searchDir(searchDirName.
str());
13119 if (!searchDir.
exists() && !searchDir.
mkdir(searchDirName.
str()))
13121 term(
"Could not create search results directory '%s' $PWD='%s'\n",
13125 if (!serverBasedSearch)
13148 if (generateDocbook)
13164 g_s.begin(
"Generating images for formulas in HTML...\n");
13171 g_s.begin(
"Generating images for formulas in RTF...\n");
13178 g_s.begin(
"Generating images for formulas in Docbook...\n");
13183 g_s.begin(
"Generating example documentation...\n");
13187 g_s.begin(
"Generating file sources...\n");
13191 g_s.begin(
"Generating file documentation...\n");
13195 g_s.begin(
"Generating page documentation...\n");
13199 g_s.begin(
"Generating group documentation...\n");
13203 g_s.begin(
"Generating class documentation...\n");
13207 g_s.begin(
"Generating concept documentation...\n");
13211 g_s.begin(
"Generating module documentation...\n");
13215 g_s.begin(
"Generating namespace documentation...\n");
13221 g_s.begin(
"Generating graph info page...\n");
13226 g_s.begin(
"Generating directory documentation...\n");
13235 g_s.begin(
"finalizing index lists...\n");
13239 g_s.begin(
"writing tag file...\n");
13245 g_s.begin(
"Generating XML output...\n");
13253 g_s.begin(
"Generating SQLITE3 output...\n");
13260 g_s.begin(
"Generating AutoGen DEF output...\n");
13266 g_s.begin(
"Generating Perl module output...\n");
13270 if (generateHtml && searchEngine && serverBasedSearch)
13272 g_s.begin(
"Generating search index\n");
13282 if (searchDataFile.
isEmpty())
13284 searchDataFile=
"searchdata.xml";
13297 g_s.begin(
"Combining RTF output...\n");
13300 err(
"An error occurred during post-processing the RTF files!\n");
13305 g_s.begin(
"Running plantuml with JAVA...\n");
13311 g_s.begin(
"Running dot...\n");
13316 if (generateHtml &&
13320 g_s.begin(
"Running html help compiler...\n");
13325 if ( generateHtml &&
13329 g_s.begin(
"Running qhelpgenerator...\n");
13336 msg(
"type lookup cache used %zu/%zu hits=%" PRIu64
" misses=%" PRIu64
"\n",
13341 msg(
"symbol lookup cache used %zu/%zu hits=%" PRIu64
" misses=%" PRIu64
"\n",
13348 int cacheParam = std::max(typeCacheParam,symbolCacheParam);
13351 msg(
"Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
13357 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
13358 if (numThreads<1) numThreads=1;
13359 msg(
"Total elapsed time: %.6f seconds\n(of which an average of %.6f seconds per thread waiting for external tools to finish)\n",
13366 msg(
"finished...\n");
13371 msg(
"finished...\n");
std::vector< ArgumentList > ArgumentLists
This class represents an function or template argument list.
RefQualifierType refQualifier() const
bool noParameters() const
bool pureSpecifier() const
void setTrailingReturnType(const QCString &s)
bool hasParameters() const
QCString trailingReturnType() const
void setPureSpecifier(bool b)
bool constSpecifier() const
void push_back(const Argument &a)
void setConstSpecifier(bool b)
void setRefQualifier(RefQualifierType t)
void setIsDeleted(bool b)
bool volatileSpecifier() const
void setNoParameters(bool b)
void setVolatileSpecifier(bool b)
static CitationManager & instance()
void clear()
clears the database
void generatePage()
Generate the citations page.
std::unique_ptr< ClangTUParser > createTUParser(const FileDef *fd) const
static ClangParser * instance()
Returns the one and only instance of the class.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
void switchToFile(const FileDef *fd)
Switches to another file within the translation unit started with start().
void parse()
Parse the file given at construction time as a translation unit This file should already be preproces...
A abstract class representing of a compound symbol.
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual void writeDocumentation(OutputList &ol) const =0
virtual void writeMemberList(OutputList &ol) const =0
virtual bool isTemplate() const =0
Returns TRUE if this class is a template.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual const MemberDef * getMemberByName(const QCString &) const =0
Returns the member with the given name.
virtual const TemplateInstanceList & getTemplateInstances() const =0
Returns a sorted dictionary with all template instances found for this template class.
virtual int isBaseClass(const ClassDef *bcd, bool followInstances, const QCString &templSpec=QCString()) const =0
Returns TRUE iff bcd is a direct or indirect base class of this class.
virtual ArgumentLists getTemplateParameterLists() const =0
Returns the template parameter lists that form the template declaration of this class.
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual bool isCSharp() const =0
Returns TRUE if this class is implemented in C#.
virtual bool isForwardDeclared() const =0
Returns TRUE if this class represents a forward declaration of a template class.
virtual bool isSubClass(ClassDef *bcd, int level=0) const =0
Returns TRUE iff bcd is a direct or indirect sub class of this class.
virtual ClassDef * insertTemplateInstance(const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) const =0
virtual void moveTo(Definition *)=0
virtual const TemplateNameMap & getTemplateBaseClassNames() const =0
virtual bool isEmbeddedInOuterScope() const =0
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual QCString qualifiedNameWithTemplateParameters(const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) const =0
virtual std::unique_ptr< ClassDef > deepCopy(const QCString &name) const =0
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
CompoundType
The various compound types.
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
virtual bool containsOverload(const MemberDef *md) const =0
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
virtual QCString requiresClause() const =0
virtual void writeTagFile(TextStream &) const =0
virtual void writeDocumentationForInnerClasses(OutputList &ol) const =0
virtual void computeAnchors()=0
virtual void addTypeConstraints()=0
virtual void overrideCollaborationGraph(bool e)=0
virtual void setClassName(const QCString &name)=0
virtual void countMembers()=0
virtual void addMembersToMemberGroup()=0
virtual void makeTemplateArgument(bool b=TRUE)=0
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames)=0
virtual void insertExplicitTemplateInstance(ClassDef *instance, const QCString &spec)=0
virtual void setMetaData(const QCString &md)=0
virtual void setFileDef(FileDef *fd)=0
virtual void addUsedClass(ClassDef *cd, const QCString &accessName, Protection prot)=0
virtual void reclassifyMember(MemberDefMutable *md, MemberType t)=0
virtual void insertBaseClass(ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString())=0
virtual void setTemplateArguments(const ArgumentList &al)=0
virtual void setTemplateMaster(const ClassDef *tm)=0
virtual void mergeCategory(ClassDef *category)=0
virtual void addQualifiers(const StringVector &qualifiers)=0
virtual void setClassSpecifier(TypeSpecifier spec)=0
virtual void addListReferences()=0
virtual void insertSubClass(ClassDef *, Protection p, Specifier s, const QCString &t=QCString())=0
virtual void insertUsedFile(const FileDef *)=0
virtual void setRequiresClause(const QCString &req)=0
virtual void setTagLessReference(const ClassDef *cd)=0
virtual void setUsedOnly(bool b)=0
virtual void sortMemberLists()=0
virtual void setProtection(Protection p)=0
virtual void setTypeConstraints(const ArgumentList &al)=0
virtual void overrideInheritanceGraph(CLASS_GRAPH_t e)=0
virtual void setAnonymousEnumType()=0
virtual void setCompoundType(CompoundType t)=0
virtual void distributeMemberGroupDocumentation()=0
virtual void findSectionsInDocumentation()=0
virtual void addUsedByClass(ClassDef *cd, const QCString &accessName, Protection prot)=0
virtual void insertMember(MemberDef *)=0
virtual void sortAllMembersList()=0
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual void mergeMembers()=0
virtual void setIsStatic(bool b)=0
virtual void setSubGrouping(bool enabled)=0
virtual void setFileDef(FileDef *fd)=0
virtual void writeTagFile(TextStream &)=0
virtual void setInitializer(const QCString &init)=0
virtual void writeDocumentation(OutputList &ol)=0
virtual void setGroupId(int id)=0
virtual void findSectionsInDocumentation()=0
virtual void setTemplateArguments(const ArgumentList &al)=0
static void print(DebugMask mask, int prio, const char *fmt,...)
static void clearFlag(const DebugMask mask)
static bool isFlagSet(const DebugMask mask)
static double elapsedTime()
static bool setFlagStr(const QCString &label)
static void setFlag(const DebugMask mask)
The common base class of all entity definitions found in the sources.
virtual QCString docFile() const =0
virtual const QCString & localName() const =0
virtual int getEndBodyLine() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual QCString getDefFileName() const =0
virtual bool isLinkable() const =0
virtual int getDefLine() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual int inbodyLine() const =0
virtual const FileDef * getBodyDef() const =0
virtual int briefLine() const =0
virtual bool hasDocumentation() const =0
virtual bool isLinkableInProject() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool isAnonymous() const =0
virtual bool isHidden() const =0
virtual const Definition * findInnerCompound(const QCString &name) const =0
virtual int getStartDefLine() const =0
virtual const GroupList & partOfGroups() const =0
virtual QCString documentation() const =0
virtual QCString qualifiedName() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual bool isArtificial() const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual int getDefColumn() const =0
virtual bool isReference() const =0
virtual QCString inbodyDocumentation() const =0
virtual QCString inbodyFile() const =0
virtual const QCString & name() const =0
virtual void mergeReferencedBy(const Definition *other)=0
virtual void setExported(bool b)=0
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setName(const QCString &name)=0
virtual void setHidden(bool b)=0
virtual void mergeReferences(const Definition *other)=0
virtual void setDocumentation(const QCString &d, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE)=0
virtual void setDefFile(const QCString &df, int defLine, int defColumn)=0
virtual void addInnerCompound(Definition *d)=0
virtual void addSectionsToDefinition(const std::vector< const SectionInfo * > &anchorList)=0
virtual void setInbodyDocumentation(const QCString &d, const QCString &docFile, int docLine)=0
virtual void setLanguage(SrcLangExt lang)=0
virtual void setOuterScope(Definition *d)=0
virtual void setArtificial(bool b)=0
virtual void setId(const QCString &name)=0
virtual void makePartOfGroup(GroupDef *gd)=0
virtual void setBodyDef(const FileDef *fd)=0
virtual void setBriefDescription(const QCString &b, const QCString &briefFile, int briefLine)=0
virtual void setReference(const QCString &r)=0
virtual void setRefItems(const RefItemVector &sli)=0
virtual void computeTooltip()=0
A model of a directory symbol.
virtual void overrideDirectoryGraph(bool e)=0
Class representing a directory in the file system.
static std::string currentDirPath()
std::string absPath() const
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
void setPath(const std::string &path)
bool remove(const std::string &path, bool acceptsAbsPath=true) const
DirIterator iterator() const
static std::string cleanDirPath(const std::string &path)
static bool setCurrent(const std::string &path)
A linked map of directories.
A class that generates docset files.
static DotManager * instance()
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static bool suppressDocWarnings
static FileNameLinkedMap * plantUmlFileNameLinkedMap
static bool parseSourcesNeeded
static StringUnorderedSet inputPaths
static std::unique_ptr< PageDef > mainPage
static bool clangAssistedParsing
static StringUnorderedSet expandAsDefinedSet
static FileNameLinkedMap * inputNameLinkedMap
static ParserManager * parserManager
static Cache< std::string, LookupInfo > * typeLookupCache
static InputFileEncodingList inputFileEncodingList
static ClassLinkedMap * classLinkedMap
static MemberNameLinkedMap * functionNameLinkedMap
static PageLinkedMap * exampleLinkedMap
static FileNameLinkedMap * dotFileNameLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * imageNameLinkedMap
static FileNameLinkedMap * mscFileNameLinkedMap
static QCString verifiedDotPath
static MemberGroupInfoMap memberGroupInfoMap
static IndexList * indexList
static StaticInitMap staticInitMap
static Cache< std::string, LookupInfo > * symbolLookupCache
static StringMap tagDestinationMap
static std::mutex countFlowKeywordsMutex
static ClassLinkedMap * hiddenClassLinkedMap
static FileNameLinkedMap * diaFileNameLinkedMap
static QCString htmlFileExtension
static QCString filterDBFileName
static PageLinkedMap * pageLinkedMap
static bool generatingXmlOutput
static std::unique_ptr< NamespaceDef > globalNamespaceDef
static DefinesPerFileList macroDefinitions
static DirLinkedMap * dirLinkedMap
static NamespaceAliasInfoMap namespaceAliasMap
static MemberNameLinkedMap * memberNameLinkedMap
static SymbolMap< Definition > * symbolMap
static StringUnorderedSet tagFileSet
static FileNameLinkedMap * includeNameLinkedMap
static FileNameLinkedMap * exampleNameLinkedMap
static SearchIndexIntf searchIndex
static DirRelationLinkedMap dirRelations
static std::mutex addExampleMutex
static ClangUsrMap * clangUsrMap
static GroupLinkedMap * groupLinkedMap
Generator for Eclipse help files.
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
void writeEmojiFile(TextStream &t)
Writes the list of supported emojis to the given file.
Represents an unstructured piece of information, about an entity found in the sources.
TextStream initializer
initial value (for variables)
VhdlSpecifier vhdlSpec
VHDL specifiers.
bool subGrouping
automatically group class members?
const std::vector< std::shared_ptr< Entry > > & children() const
GroupDocType groupDocType
QCString metaData
Slice metadata.
int docLine
line number at which the documentation was found
QCString bitfields
member's bit fields
ArgumentList typeConstr
where clause (C#) for type constraints
void markAsProcessed() const
int endBodyLine
line number where the definition ends
bool exported
is the symbol exported from a C++20 module
const TagInfo * tagInfo() const
QCString includeName
include name (3 arg of \class)
ArgumentLists tArgLists
template argument declarations
MethodTypes mtype
signal, slot, (dcop) method, or property?
@ GROUPDOC_NORMAL
defgroup
SrcLangExt lang
programming language in which this entry was found
QCString inbodyDocs
documentation inside the body of a function
int startColumn
start column of entry in the source
QCString relates
related class (doc block)
bool explicitExternal
explicitly defined as external?
std::vector< const SectionInfo * > anchors
list of anchors defined in this entry
QCString fileName
file this entry was extracted from
RelatesType relatesType
how relates is handled
QCString write
property write accessor
QCString args
member argument string
std::vector< Grouping > groups
list of groups this entry belongs to
CommandOverrides commandOverrides
store info for commands whose default can be overridden
QCString exception
throw specification
int startLine
start line of entry in the source
QCString req
C++20 requires clause.
ArgumentList argList
member arguments as a list
QCString includeFile
include file (2 arg of \class, must be unique)
int inbodyLine
line number at which the body doc was found
EntryType section
entry type (see Sections);
QCString briefFile
file in which the brief desc. was found
int bodyLine
line number of the body in the source
int mGrpId
member group id
std::vector< BaseInfo > extends
list of base classes
Specifier virt
virtualness of the entry
std::vector< std::string > qualifiers
qualifiers specified with the qualifier command
QCString doc
documentation block (partly parsed)
QCString read
property read accessor
RefItemVector sli
special lists (test/todo/bug/deprecated/..) this entry is in
QCString docFile
file in which the documentation was found
Protection protection
class protection
bool artificial
Artificially introduced item.
bool hidden
does this represent an entity that is hidden from the output
QCString brief
brief description (doc block)
int briefLine
line number at which the brief desc. was found
FileDef * fileDef() const
int initLines
define/variable initializer lines to show
QCString inbodyFile
file in which the body doc was found
TypeSpecifier spec
class/member specifiers
QCString inside
name of the class in which documents are found
Wrapper class for the Entry type.
ENTRY_TYPES bool isCompound() const
std::string to_string() const
bool isCompoundDoc() const
A class that generates a dynamic tree view side panel.
static void generateTreeViewImages()
A model of a file symbol.
virtual void addUsingDeclaration(const Definition *d)=0
virtual void removeMember(MemberDef *md)=0
virtual void insertClass(ClassDef *cd)=0
virtual void insertConcept(ConceptDef *cd)=0
virtual void overrideIncludeGraph(bool e)=0
virtual void writeSourceHeader(OutputList &ol)=0
virtual bool generateSourceFile() const =0
virtual const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const =0
virtual QCString absFilePath() const =0
virtual bool isSource() const =0
virtual void parseSource(ClangTUParser *clangParser)=0
virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const =0
virtual void setDiskName(const QCString &name)=0
virtual void writeSourceFooter(OutputList &ol)=0
virtual void writeSourceBody(OutputList &ol, ClangTUParser *clangParser)=0
virtual void addUsingDirective(NamespaceDef *nd)=0
virtual void overrideIncludedByGraph(bool e)=0
virtual const QCString & docName() const =0
virtual void insertMember(MemberDef *md)=0
virtual void insertNamespace(NamespaceDef *nd)=0
Minimal replacement for QFileInfo.
std::string readLink() const
std::string fileName() const
std::string dirPath(bool absPath=true) const
std::string absFilePath() const
Class representing all files with a certain base name.
Ordered dictionary of FileName objects.
A model of a group of symbols.
virtual QCString groupTitle() const =0
virtual void overrideGroupGraph(bool e)=0
virtual bool addClass(ClassDef *def)=0
virtual bool containsFile(const FileDef *def) const =0
virtual bool addNamespace(NamespaceDef *def)=0
virtual void setGroupScope(Definition *d)=0
virtual void addFile(FileDef *def)=0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual void setGroupTitle(const QCString &newtitle)=0
virtual bool hasGroupTitle() const =0
Generator for HTML output.
static void writeSearchPage()
static void writeFooterFile(TextStream &t)
static void writeTabData()
Additional initialization after indices have been created.
static void writeSearchData(const QCString &dir)
static void writeExternalSearchPage()
static void writeStyleSheetFile(TextStream &t)
static void writeHeaderFile(TextStream &t, const QCString &cssname)
A class that generated the HTML Help specific files.
static const QCString hhpFileName
static Index & instance()
void countDataStructures()
A list of index interfaces.
Generator for LaTeX output.
static void writeFooterFile(TextStream &t)
static void writeStyleSheetFile(TextStream &t)
static void writeHeaderFile(TextStream &t)
static std::string partToString(int k)
static LayoutDocManager & instance()
Returns a reference to this singleton.
void parse(const QCString &fileName, const char *data=nullptr)
Parses a user provided layout.
std::unique_ptr< RefList > Ptr
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
const T * find(const std::string &key) const
Find an object given the key.
Container class representing a vector of objects with keys.
const T * find(const std::string &key) const
find an object given the key.
Generator for Man page output.
A model of a class/file/namespace member symbol.
virtual QCString typeString() const =0
virtual QCString requiresClause() const =0
virtual bool isFriend() const =0
virtual bool isForeign() const =0
virtual QCString definition() const =0
virtual bool isRelated() const =0
virtual const ClassDef * getCachedTypedefVal() const =0
virtual QCString excpString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const ArgumentList & templateArguments() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isCSharpProperty() const =0
virtual bool isTypedef() const =0
virtual const MemberVector & enumFieldList() const =0
virtual void moveTo(Definition *)=0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual bool isStrongEnumValue() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual bool isFunction() const =0
virtual bool isExternal() const =0
virtual int getMemberGroupId() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual StringVector getQualifiers() const =0
virtual QCString bitfieldString() const =0
virtual bool isTypedefValCached() const =0
virtual bool isDocsForDefinition() const =0
virtual bool isDefine() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isObjCProperty() const =0
virtual Protection protection() const =0
virtual TypeSpecifier getMemberSpecifiers() const =0
virtual bool isEnumerate() const =0
virtual MemberType memberType() const =0
virtual ClassDef * relatedAlso() const =0
virtual bool isVariable() const =0
virtual bool isStrong() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual int initializerLines() const =0
virtual const MemberDef * getEnumScope() const =0
virtual bool isEnumValue() const =0
virtual bool isPrototype() const =0
virtual const QCString & initializer() const =0
virtual void setMemberClass(ClassDef *cd)=0
virtual void setProtection(Protection p)=0
virtual void setMemberGroupId(int id)=0
virtual void setDocumentedEnumValues(bool value)=0
virtual void setMemberSpecifiers(TypeSpecifier s)=0
virtual void setDefinition(const QCString &d)=0
virtual ClassDefMutable * getClassDefMutable()=0
virtual void setExplicitExternal(bool b, const QCString &df, int line, int column)=0
virtual void setAccessorType(ClassDef *cd, const QCString &t)=0
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists)=0
virtual void invalidateTypedefValCache()=0
virtual void setBitfields(const QCString &s)=0
virtual void setVhdlSpecifiers(VhdlSpecifier s)=0
virtual void setEnumScope(MemberDef *md, bool livesInsideEnum=FALSE)=0
virtual void setEnumClassScope(ClassDef *cd)=0
virtual void setMaxInitLines(int lines)=0
virtual void setInheritsDocsFrom(const MemberDef *md)=0
virtual void setRelatedAlso(ClassDef *cd)=0
virtual void setPrototype(bool p, const QCString &df, int line, int column)=0
virtual void overrideReferencesRelation(bool e)=0
virtual void makeForeign()=0
virtual void overrideReferencedByRelation(bool e)=0
virtual void setDocsForDefinition(bool b)=0
virtual void setRequiresClause(const QCString &req)=0
virtual void overrideCallGraph(bool e)=0
virtual void overrideInlineSource(bool e)=0
virtual void setArgsString(const QCString &as)=0
virtual void setInitializer(const QCString &i)=0
virtual void copyArgumentNames(const MemberDef *bmd)=0
virtual void overrideEnumValues(bool e)=0
virtual void mergeMemberSpecifiers(TypeSpecifier s)=0
virtual void addQualifiers(const StringVector &qualifiers)=0
virtual void insertEnumField(MemberDef *md)=0
virtual void moveDeclArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void overrideCallerGraph(bool e)=0
virtual void setReimplements(MemberDef *md)=0
virtual void setDeclFile(const QCString &df, int line, int column)=0
virtual void invalidateCachedArgumentTypes()=0
virtual void moveArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void makeRelated()=0
virtual void insertReimplementedBy(MemberDef *md)=0
A list of MemberDef objects as shown in documentation sections.
Ordered dictionary of MemberName objects.
MemberDef * find(const QCString &name)
static ModuleManager & instance()
void addDocs(const Entry *root)
void addConceptToModule(const Entry *root, ConceptDef *cd)
void addClassToModule(const Entry *root, ClassDef *cd)
void addMemberToModule(const Entry *root, MemberDef *md)
void writeDocumentation(OutputList &ol)
void addMembersToMemberGroup()
void findSectionsInDocumentation()
void distributeMemberGroupDocumentation()
An abstract interface of a namespace symbol.
virtual const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const =0
virtual bool isInline() const =0
virtual void insertUsedFile(FileDef *fd)=0
virtual void setMetaData(const QCString &m)=0
virtual void findSectionsInDocumentation()=0
virtual void countMembers()=0
virtual void addUsingDirective(NamespaceDef *nd)=0
virtual void insertMember(MemberDef *md)=0
virtual void addUsingDeclaration(const Definition *d)=0
virtual void distributeMemberGroupDocumentation()=0
virtual void writeTagFile(TextStream &)=0
virtual void addListReferences()=0
virtual void writeDocumentation(OutputList &ol)=0
virtual void setInline(bool isInline)=0
virtual void computeAnchors()=0
virtual void combineUsingRelations(NamespaceDefSet &visitedNamespace)=0
virtual void setFileName(const QCString &fn)=0
virtual void sortMemberLists()=0
virtual void addMembersToMemberGroup()=0
bool needsPreprocessing(const QCString &) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
void parseInput(const QCString &, const char *, const std::shared_ptr< Entry > &, ClangTUParser *) override
Parses a single input file with the goal to build an Entry tree.
void parsePrototype(const QCString &) override
Callback function called by the comment block scanner.
Abstract interface for outline parsers.
virtual bool needsPreprocessing(const QCString &extension) const =0
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
virtual void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser)=0
Parses a single input file with the goal to build an Entry tree.
Class representing a list of output generators that are written to in parallel.
A model of a page symbol.
virtual void setLocalToc(const LocalToc &tl)=0
virtual void setFileName(const QCString &name)=0
virtual void setShowLineNo(bool)=0
virtual void setPageScope(Definition *)=0
virtual const GroupDef * getGroupDef() const =0
Manages programming language parsers.
static PlantumlManager & instance()
void run()
Run plant UML tool for all images.
void processFile(const QCString &fileName, const std::string &input, std::string &output)
void addSearchDir(const QCString &dir)
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
void fill(char c, int len=-1)
Fills a string with a predefined character.
QCString & prepend(const char *s)
int toInt(bool *ok=nullptr, int base=10) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool startsWith(const char *s) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
bool endsWith(const char *s) const
char & at(size_t i)
Returns a reference to the character at index i.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
const std::string & str() const
QCString & setNum(short n)
QCString right(size_t len) const
size_t size() const
Returns the length of the string, not counting the 0-terminator.
QCString & sprintf(const char *format,...)
int findRev(char c, int index=-1, bool cs=TRUE) const
QCString & replace(size_t index, size_t len, const char *s)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
int contains(char c, bool cs=TRUE) const
bool stripPrefix(const QCString &prefix)
static const QCString qhpFileName
static QCString getQchFileName()
Generator for RTF output.
static bool preProcessFileInplace(const QCString &path, const QCString &name)
This is an API to a VERY brittle RTF preprocessor that combines nested RTF files.
static void writeStyleSheetFile(TextStream &t)
static void writeExtensionsFile(TextStream &t)
static RefListManager & instance()
Abstract proxy interface for non-javascript based search indices.
class that provide information about a section.
QCString fileName() const
SectionInfo * replace(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
Replace an existing section with a new one Return a non-owning pointer to the newly added section.
SectionInfo * add(const SectionInfo &si)
Add a new section given the data of an existing section.
static SectionManager & instance()
returns a reference to the singleton
static constexpr int Page
std::vector< stat > stats
void begin(const char *name)
std::chrono::steady_clock::time_point startTime
Class implementing a symbol map that maps symbol names to objects.
Helper class to find a class definition or check if A symbol is accessible in a given scope.
const Definition * resolveSymbol(const Definition *scope, const QCString &name, const QCString &args=QCString(), bool checkCV=false, bool insideCode=false)
Find the symbool definition matching name within the scope set.
const ClassDef * resolveClass(const Definition *scope, const QCString &name, bool maybeUnlinkable=false, bool mayBeHidden=false)
Find the class definition matching name within the scope set.
QCString getTemplateSpec() const
In case a call to resolveClass() points to a template specialization, the template part is return via...
ClassDefMutable * resolveClassMutable(const Definition *scope, const QCString &name, bool mayBeUnlinkable=false, bool mayBeHidden=false)
Wrapper around resolveClass that returns a mutable interface to the class object or a nullptr if the ...
const MemberDef * getTypedef() const
In case a call to resolveClass() resolves to a type member (e.g.
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
Class managing a pool of worker threads.
auto queue(F &&f, Args &&... args) -> std::future< decltype(f(args...))>
Queue the callable function f for the threads to execute.
Wrapper class for a number of boolean properties.
std::string to_string() const
static void correctMemberProperties(MemberDefMutable *md)
static void computeVhdlComponentRelations()
ClassDefMutable * toClassDefMutable(Definition *d)
ClassDef * getClass(const QCString &n)
std::unique_ptr< ClassDef > createClassDefAlias(const Definition *newScope, const ClassDef *cd)
std::unique_ptr< ClassDef > createClassDef(const QCString &fileName, int startLine, int startColumn, const QCString &name, ClassDef::CompoundType ct, const QCString &ref, const QCString &fName, bool isSymbol, bool isJavaEnum)
Factory method to create a new ClassDef object.
ClassDef * toClassDef(Definition *d)
std::unordered_set< const ClassDef * > ClassDefSet
std::map< std::string, int > TemplateNameMap
ClassDefMutable * getClassMutable(const QCString &key)
Class representing a regular expression.
Iterator class to iterator through matches.
Object representing the matching results.
ConceptDefMutable * toConceptDefMutable(Definition *d)
std::unique_ptr< ConceptDef > createConceptDef(const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef, const QCString &tagFile)
ConceptDefMutable * getConceptMutable(const QCString &key)
#define Config_getInt(name)
#define Config_getList(name)
#define Config_updateString(name, value)
#define Config_updateBool(name, value)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_updateList(name,...)
#define Config_getEnum(name)
std::set< std::string > StringSet
std::unordered_set< std::string > StringUnorderedSet
std::map< std::string, std::string > StringMap
std::vector< std::string > StringVector
void parseFuncDecl(const QCString &decl, const SrcLangExt lang, QCString &clName, QCString &type, QCString &name, QCString &args, QCString &funcTempList, QCString &exceptions)
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
std::unordered_map< std::string, DefineList > DefinesPerFileList
Definition * toDefinition(DefinitionMutable *dm)
DefinitionMutable * toDefinitionMutable(Definition *d)
DirIterator begin(DirIterator it) noexcept
DirIterator end(const DirIterator &) noexcept
void computeDirDependencies()
void generateDirDocs(OutputList &ol)
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void findInheritedTemplateInstances()
void printNavTree(Entry *root, int indent)
static void addClassToContext(const Entry *root)
static void makeTemplateInstanceRelation(const Entry *root, ClassDefMutable *cd)
static StringUnorderedSet g_pathsVisited(1009)
static void buildGroupList(const Entry *root)
static void insertMemberAlias(Definition *outerScope, const MemberDef *md)
static void findUsingDeclarations(const Entry *root, bool filterPythonPackages)
static void flushCachedTemplateRelations()
static bool isRecursiveBaseClass(const QCString &scope, const QCString &name)
static void copyLatexStyleSheet()
static void generateDocsForClassList(const std::vector< ClassDefMutable * > &classList)
static std::shared_ptr< Entry > parseFile(OutlineParserInterface &parser, FileDef *fd, const QCString &fn, ClangTUParser *clangParser, bool newTU)
static int findFunctionPtr(const std::string &type, SrcLangExt lang, int *pLength=nullptr)
static bool isSpecialization(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists)
static MemberDef * addVariableToClass(const Entry *root, ClassDefMutable *cd, MemberType mtype, const QCString &type, const QCString &name, const QCString &args, bool fromAnnScope, MemberDef *fromAnnMemb, Protection prot, Relationship related)
static void computeTemplateClassRelations()
static std::string resolveSymlink(const std::string &path)
void adjustConfiguration()
adjust globals that depend on configuration settings.
static void findDEV(const MemberNameLinkedMap &mnsd)
static void runQHelpGenerator()
static void addConceptToContext(const Entry *root)
static void addRelatedPage(Entry *root)
static void addIncludeFile(DefMutable *cd, FileDef *ifd, const Entry *root)
static StringVector g_inputFiles
static void createUsingMemberImportForClass(const Entry *root, ClassDefMutable *cd, const MemberDef *md, const QCString &fileName, const QCString &memName)
static void generateXRefPages()
static void findUsingDeclImports(const Entry *root)
static void copyStyleSheet()
FindBaseClassRelation_Mode
void distributeClassGroupRelations()
static void generateGroupDocs()
static void findDirDocumentation(const Entry *root)
void checkConfiguration()
check and resolve config options
QCString stripTemplateSpecifiers(const QCString &s)
static bool findClassRelation(const Entry *root, Definition *context, ClassDefMutable *cd, const BaseInfo *bi, const TemplateNameMap &templateNames, FindBaseClassRelation_Mode mode, bool isArtificial)
static void resolveTemplateInstanceInType(const Entry *root, const Definition *scope, const MemberDef *md)
static void organizeSubGroupsFiltered(const Entry *root, bool additional)
static void warnUndocumentedNamespaces()
static TemplateNameMap getTemplateArgumentsInName(const ArgumentList &templateArguments, const std::string &name)
static NamespaceDef * findUsedNamespace(const LinkedRefMap< NamespaceDef > &unl, const QCString &name)
static void buildConceptList(const Entry *root)
static void resolveClassNestingRelations()
static void generateNamespaceConceptDocs(const ConceptLinkedRefMap &conceptList)
static void findMember(const Entry *root, const QCString &relates, const QCString &type, const QCString &args, QCString funcDecl, bool overloaded, bool isFunc)
static void findClassEntries(const Entry *root)
static void processTagLessClasses(const ClassDef *rootCd, const ClassDef *cd, ClassDefMutable *tagParentCd, const QCString &prefix, int count)
Look through the members of class cd and its public members.
static void addMemberFunction(const Entry *root, MemberName *mn, const QCString &scopeName, const QCString &namespaceName, const QCString &className, const QCString &funcTyp, const QCString &funcName, const QCString &funcArgs, const QCString &funcTempList, const QCString &exceptions, const QCString &type, const QCString &args, bool isFriend, TypeSpecifier spec, const QCString &relates, const QCString &funcDecl, bool overloaded, bool isFunc)
static void vhdlCorrectMemberProperties()
static void generateExampleDocs()
static void stopDoxygen(int)
static void findTemplateInstanceRelation(const Entry *root, Definition *context, ClassDefMutable *templateClass, const QCString &templSpec, const TemplateNameMap &templateNames, bool isArtificial)
static void substituteTemplatesInArgList(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists, const ArgumentList &src, ArgumentList &dst)
static void computeMemberReferences()
static void generateConfigFile(const QCString &configFile, bool shortList, bool updateOnly=FALSE)
static void transferRelatedFunctionDocumentation()
static void addMembersToMemberGroup()
static bool tryAddEnumDocsToGroupMember(const Entry *root, const QCString &name)
static void addOverloaded(const Entry *root, MemberName *mn, const QCString &funcType, const QCString &funcName, const QCString &funcArgs, const QCString &funcDecl, const QCString &exceptions, TypeSpecifier spec)
static void findMainPageTagFiles(Entry *root)
static void distributeConceptGroups()
static void transferFunctionDocumentation()
static void setAnonymousEnumType()
static void sortMemberLists()
static void createTemplateInstanceMembers()
void transferStaticInstanceInitializers()
static void findObjCMethodDefinitions(const Entry *root)
static void dumpSymbolMap()
static void buildTypedefList(const Entry *root)
static void findGroupScope(const Entry *root)
static void generateFileDocs()
static void findDefineDocumentation(Entry *root)
static void findUsedClassesForClass(const Entry *root, Definition *context, ClassDefMutable *masterCd, ClassDefMutable *instanceCd, bool isArtificial, const ArgumentList *actualArgs=nullptr, const TemplateNameMap &templateNames=TemplateNameMap())
static void findMemberDocumentation(const Entry *root)
static void copyIcon(const QCString &outputOption)
static void addLocalObjCMethod(const Entry *root, const QCString &scopeName, const QCString &funcType, const QCString &funcName, const QCString &funcArgs, const QCString &exceptions, const QCString &funcDecl, TypeSpecifier spec)
static bool findGlobalMember(const Entry *root, const QCString &namespaceName, const QCString &type, const QCString &name, const QCString &tempArg, const QCString &, const QCString &decl, TypeSpecifier)
static void distributeMemberGroupDocumentation()
static void generateNamespaceClassDocs(const ClassLinkedRefMap &classList)
static void addEnumValuesToEnums(const Entry *root)
static void generatePageDocs()
static void resolveUserReferences()
static void compareDoxyfile(Config::CompareMode diffList)
static void addPageToContext(PageDef *pd, Entry *root)
static void buildVarList(const Entry *root)
static void buildSequenceList(const Entry *root)
static void generateFileSources()
static QCString substituteTemplatesInString(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists, const std::string &src)
static void copyLogo(const QCString &outputOption)
static void usage(const QCString &name, const QCString &versionString)
static MemberDef * addVariableToFile(const Entry *root, MemberType mtype, const QCString &scope, const QCString &type, const QCString &name, const QCString &args, bool fromAnnScope, MemberDef *fromAnnMemb)
static void generateClassDocs()
static void buildNamespaceList(const Entry *root)
static int computeIdealCacheParam(size_t v)
static void readTagFile(const std::shared_ptr< Entry > &root, const QCString &tagLine)
static void findIncludedUsingDirectives()
static void addDefineDoc(const Entry *root, MemberDefMutable *md)
static void addMemberDocs(const Entry *root, MemberDefMutable *md, const QCString &funcDecl, const ArgumentList *al, bool over_load, TypeSpecifier spec)
static void countMembers()
static void addInterfaceOrServiceToServiceOrSingleton(const Entry *root, ClassDefMutable *cd, QCString const &rname)
static void organizeSubGroups(const Entry *root)
static void applyMemberOverrideOptions(const Entry *root, MemberDefMutable *md)
static void findFriends()
static void findEnums(const Entry *root)
static void dumpSymbol(TextStream &t, Definition *d)
static void addClassAndNestedClasses(std::vector< ClassDefMutable * > &list, ClassDefMutable *cd)
static void addEnumDocs(const Entry *root, MemberDefMutable *md)
static void addListReferences()
static void exitDoxygen() noexcept
static void copyExtraFiles(const StringVector &files, const QCString &filesOption, const QCString &outputOption)
static bool isClassSection(const Entry *root)
static Definition * findScopeFromQualifiedName(NamespaceDefMutable *startScope, const QCString &n, FileDef *fileScope, const TagInfo *tagInfo)
static ClassDef * findClassWithinClassContext(Definition *context, ClassDef *cd, const QCString &name)
static void buildGroupListFiltered(const Entry *root, bool additional, bool includeExternal)
static void runHtmlHelpCompiler()
static QCString extractClassName(const Entry *root)
static void addMembersToIndex()
static bool g_dumpSymbolMap
static void version(const bool extended)
static void addGlobalFunction(const Entry *root, const QCString &rname, const QCString &sc)
static OutputList * g_outputList
static void findMainPage(Entry *root)
static ClassDef::CompoundType convertToCompoundType(EntryType section, TypeSpecifier specifier)
static void findUsingDirectives(const Entry *root)
std::unique_ptr< ArgumentList > getTemplateArgumentsFromName(const QCString &name, const ArgumentLists &tArgLists)
static bool g_successfulRun
static void addSourceReferences()
std::function< std::unique_ptr< T >() > make_parser_factory()
static void buildExampleList(Entry *root)
static void inheritDocumentation()
static void flushUnresolvedRelations()
static bool isSymbolHidden(const Definition *d)
void readConfiguration(int argc, char **argv)
static void readDir(FileInfo *fi, FileNameLinkedMap *fnMap, StringUnorderedSet *exclSet, const StringVector *patList, const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool errorIfNotExist, bool recursive, StringUnorderedSet *killSet, StringUnorderedSet *paths)
static QCString g_commentFileName
static void findDocumentedEnumValues()
static void findTagLessClasses()
static void generateDiskNames()
static void addToIndices()
static void computeClassRelations()
static void buildFunctionList(const Entry *root)
static void checkPageRelations()
static void findModuleDocumentation(const Entry *root)
static void findEnumDocumentation(const Entry *root)
static void computePageRelations(Entry *root)
static void filterMemberDocumentation(const Entry *root, const QCString &relates)
static QCString createOutputDirectory(const QCString &baseDirName, const QCString &formatDirName, const char *defaultDirName)
static bool isVarWithConstructor(const Entry *root)
static StringSet g_usingDeclarations
static void buildDictionaryList(const Entry *root)
static bool haveEqualFileNames(const Entry *root, const MemberDef *md)
void printNavLayout(LayoutNavEntry *root, int indent)
static void generateNamespaceDocs()
static void buildClassDocList(const Entry *root)
static void buildPageList(Entry *root)
static void writeTagFile()
static Definition * buildScopeFromQualifiedName(const QCString &name_, SrcLangExt lang, const TagInfo *tagInfo)
static void computeVerifiedDotPath()
static bool g_singleComment
static void findSectionsInDocumentation()
static void mergeCategories()
static const StringUnorderedSet g_compoundKeywords
static bool scopeIsTemplate(const Definition *d)
static void buildFileList(const Entry *root)
static ClassDefMutable * createTagLessInstance(const ClassDef *rootCd, const ClassDef *templ, const QCString &fieldName)
static void buildClassList(const Entry *root)
static void addMethodToClass(const Entry *root, ClassDefMutable *cd, const QCString &rtype, const QCString &rname, const QCString &rargs, bool isFriend, Protection protection, bool stat, Specifier virt, TypeSpecifier spec, const QCString &relates)
static std::unique_ptr< OutlineParserInterface > getParserForFile(const QCString &fn)
static void findUsedTemplateInstances()
static void computeTooltipTexts()
void readFileOrDirectory(const QCString &s, FileNameLinkedMap *fnMap, StringUnorderedSet *exclSet, const StringVector *patList, const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool recursive, bool errorIfNotExist, StringUnorderedSet *killSet, StringUnorderedSet *paths)
static void addVariable(const Entry *root, int isFuncPtr=-1)
static void addMemberSpecialization(const Entry *root, MemberName *mn, ClassDefMutable *cd, const QCString &funcType, const QCString &funcName, const QCString &funcArgs, const QCString &funcDecl, const QCString &exceptions, TypeSpecifier spec)
static void findBaseClassesForClass(const Entry *root, Definition *context, ClassDefMutable *masterCd, ClassDefMutable *instanceCd, FindBaseClassRelation_Mode mode, bool isArtificial, const ArgumentList *actualArgs=nullptr, const TemplateNameMap &templateNames=TemplateNameMap())
static void parseFilesSingleThreading(const std::shared_ptr< Entry > &root)
parse the list of input files
static void buildCompleteMemberLists()
static void generateConceptDocs()
static void combineUsingRelations()
static const char * getArg(int argc, char **argv, int &optInd)
static const ClassDef * findClassDefinition(FileDef *fd, NamespaceDef *nd, const QCString &scopeName)
static void checkMarkdownMainfile()
static std::unordered_map< std::string, std::vector< ClassDefMutable * > > g_usingClassMap
static void buildConceptDocList(const Entry *root)
static int findTemplateSpecializationPosition(const QCString &name)
static bool isEntryInGroupOfMember(const Entry *root, const MemberDef *md, bool allowNoGroup=false)
static void parseFilesMultiThreading(const std::shared_ptr< Entry > &root)
parse the list of input files
static void transferFunctionReferences()
static void buildDefineList()
static void buildInterfaceAndServiceList(const Entry *root)
static void computeMemberRelations()
static void buildListOfUsingDecls(const Entry *root)
static void computeMemberRelationsForBaseClass(const ClassDef *cd, const BaseClassDef *bcd)
static std::multimap< std::string, const Entry * > g_classEntries
std::vector< InputFileEncoding > InputFileEncodingList
std::unordered_map< std::string, BodyInfo > StaticInitMap
std::unordered_map< std::string, NamespaceAliasInfo > NamespaceAliasInfoMap
std::unordered_map< std::string, const Definition * > ClangUsrMap
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
FileDef * toFileDef(Definition *d)
std::unordered_set< const FileDef * > FileDefSet
static void startScope(yyscan_t yyscanner)
start scope
void addNamespaceToGroups(const Entry *root, NamespaceDef *nd)
void addGroupToGroups(const Entry *root, GroupDef *subGroup)
void addClassToGroups(const Entry *root, ClassDef *cd)
void addDirToGroups(const Entry *root, DirDef *dd)
std::unique_ptr< GroupDef > createGroupDef(const QCString &fileName, int line, const QCString &name, const QCString &title, const QCString &refFileName)
void addConceptToGroups(const Entry *root, ConceptDef *cd)
void addMemberToGroups(const Entry *root, MemberDef *md)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
void writeGraphInfo(OutputList &ol)
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
void writeIndexHierarchy(OutputList &ol)
Translator * theTranslator
void setTranslator(OUTPUT_LANGUAGE_t langName)
#define LATEX_STYLE_EXTENSION
void writeDefaultLayoutFile(const QCString &fileName)
std::unique_ptr< MemberDef > createMemberDefAlias(const Definition *newScope, const MemberDef *aliasMd)
MemberDefMutable * toMemberDefMutable(Definition *d)
void combineDeclarationAndDefinition(MemberDefMutable *mdec, MemberDefMutable *mdef)
MemberDef * toMemberDef(Definition *d)
std::unique_ptr< MemberDef > createMemberDef(const QCString &defFileName, int defLine, int defColumn, const QCString &type, const QCString &name, const QCString &args, const QCString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const QCString &metaData)
Factory method to create a new instance of a MemberDef.
std::unordered_map< int, std::unique_ptr< MemberGroupInfo > > MemberGroupInfoMap
QCString warn_line(const QCString &file, int line)
void msg(const char *fmt,...)
#define warn_undoc(file, line, fmt,...)
#define warn_uncond(fmt,...)
#define warn(file, line, fmt,...)
void postProcess(bool clearHeaderAndFooter, CompareMode compareMode=CompareMode::Full)
void checkAndCorrect(bool quiet, const bool check)
void compareDoxyfile(TextStream &t, CompareMode compareMode)
bool parse(const QCString &fileName, bool update=FALSE, CompareMode compareMode=CompareMode::Full)
void writeTemplate(TextStream &t, bool shortList, bool updateOnly=FALSE)
void correctPath(const StringVector &list)
Correct a possible wrong PATH variable.
bool isAbsolutePath(const QCString &fileName)
FILE * popen(const QCString &name, const QCString &type)
std::ofstream openOutputStream(const QCString &name, bool append=false)
double getSysElapsedTime()
QCString pathListSeparator()
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
void setenv(const QCString &variable, const QCString &value)
const char * commandExtension()
QCString getenv(const QCString &variable)
QCString trunc(const QCString &s, size_t numChars=15)
void replaceNamespaceAliases(QCString &name)
std::unique_ptr< NamespaceDef > createNamespaceDefAlias(const Definition *newScope, const NamespaceDef *nd)
Factory method to create an alias of an existing namespace.
std::unique_ptr< NamespaceDef > createNamespaceDef(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const QCString &ref, const QCString &refFile, const QCString &type, bool isPublished)
Factory method to create new NamespaceDef instance.
NamespaceDef * getResolvedNamespace(const QCString &name)
NamespaceDef * toNamespaceDef(Definition *d)
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
NamespaceDefMutable * getResolvedNamespaceMutable(const QCString &key)
std::unordered_set< const NamespaceDef * > NamespaceDefSet
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
std::unique_ptr< PageDef > createPageDef(const QCString &f, int l, const QCString &n, const QCString &d, const QCString &t)
void setPerlModDoxyfile(const QCString &qs)
Portable versions of functions that are platform dependent.
int portable_iconv_close(void *cd)
void * portable_iconv_open(const char *tocode, const char *fromcode)
int qstricmp(const char *s1, const char *s2)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
int qstricmp_sort(const char *str1, const char *str2)
const char * qPrint(const char *s)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
int qstrcmp(const char *str1, const char *str2)
std::vector< RefItem * > RefItemVector
void finalizeSearchIndexer()
static void addMemberToSearchIndex(const MemberDef *md)
void createJavaScriptSearchIndex()
void writeJavaScriptSearchIndex()
Javascript based search engine.
void addSTLSupport(std::shared_ptr< Entry > &root)
Add stub entries for the most used classes in the standard template library.
Some helper functions for std::string.
void addTerminalCharIfMissing(std::string &s, char c)
This class contains the information about the argument of a function or template.
Class that contains information about an inheritance relation.
ClassDef * classDef
Class definition that this relation inherits from.
This class stores information about an inheritance relation.
Protection prot
inheritance type
Specifier virt
virtualness
QCString name
the name of the base class
Data associated with description found in the body.
QCString groupname
name of the group
@ GROUPING_INGROUP
membership in group was defined by @ingroup
static const char * getGroupPriName(GroupPri_t priority)
GroupPri_t pri
priority of this definition
Represents of a member declaration list with configurable title and subtitle.
Represents of a member definition list with configurable title.
Represents of a piece of a documentation page without configurable parts.
Base class for the layout of a navigation item at the top of the HTML pages.
const LayoutNavEntryList & children() const
std::string navToString()
const Definition * definition
const MemberDef * typeDef
stat(const char *n, double el)
This struct is used to capture the tag file information for an Entry.
void parseTagFile(const std::shared_ptr< Entry > &root, const char *fullName)
void initTracing(const QCString &logFile, bool timing)
Protection
Protection level of members.
SrcLangExt
Language as given by extension.
Relationship
Kind of member relationship.
Specifier
Virtualness of a member.
QCString removeRedundantWhiteSpace(const QCString &s)
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
QCString normalizeNonTemplateArgumentsInString(const QCString &name, const Definition *context, const ArgumentList &formalArgs)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
bool protectionLevelVisible(Protection prot)
void addCodeOnlyMappings()
QCString substituteTemplateArgumentsInString(const QCString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
bool leftScopeMatch(const QCString &scope, const QCString &name)
QCString stripAnonymousNamespaceScope(const QCString &s)
QCString stripFromIncludePath(const QCString &path)
bool checkIfTypedef(const Definition *scope, const FileDef *fileScope, const QCString &n)
bool readInputFile(const QCString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
bool patternMatch(const FileInfo &fi, const StringVector &patList)
bool openOutputFile(const QCString &outFile, std::ofstream &f)
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString filterTitle(const QCString &title)
QCString removeAnonymousScopes(const QCString &str)
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
QCString resolveTypeDef(const Definition *context, const QCString &qualifiedName, const Definition **typedefContext)
bool checkExtension(const QCString &fName, const QCString &ext)
int computeQualifiedIndex(const QCString &name)
Return the index of the last :: in the string name that is still before the first <.
void initDefaultExtensionMapping()
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
EntryType guessSection(const QCString &name)
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
QCString projectLogoFile()
void mergeArguments(ArgumentList &srcAl, ArgumentList &dstAl, bool forceNameOverwrite)
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly, QCString *pLastScopeStripped, QCString scopeName, bool allowArtificial)
QCString getOverloadDocs()
int getPrefixIndex(const QCString &name)
bool rightScopeMatch(const QCString &scope, const QCString &name)
bool updateLanguageMapping(const QCString &extension, const QCString &language)
QCString getFileNameExtension(const QCString &fn)
QCString replaceAnonymousScopes(const QCString &s, const QCString &replacement)
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
int getScopeFragment(const QCString &s, int p, int *l)
void addHtmlExtensionIfMissing(QCString &fName)
A bunch of utility functions.