22#include <unordered_map>
118#pragma GCC diagnostic push
119#pragma GCC diagnostic ignored "-Wshadow"
121#include <clang/Basic/Version.h>
123#pragma GCC diagnostic pop
130#if !defined(_WIN32) || defined(__CYGWIN__)
199{
"template class",
"template struct",
"class",
"struct",
"union",
"interface",
"exception" };
235 stats.emplace_back(name,0);
236 startTime = std::chrono::steady_clock::now();
240 std::chrono::steady_clock::time_point endTime = std::chrono::steady_clock::now();
241 stats.back().elapsed =
static_cast<double>(std::chrono::duration_cast<
242 std::chrono::microseconds>(endTime -
startTime).count())/1000000.0;
253 msg(
"----------------------\n");
254 for (
const auto &s :
stats)
256 msg(
"Spent {:.6f} seconds in {}",s.elapsed,s.name);
319 scope+=
"::"+pd->
name();
359 ((!includeExternal && root->
tagInfo()==
nullptr) ||
360 ( includeExternal && root->
tagInfo()!=
nullptr))
363 AUTO_TRACE(
"additional={} includeExternal={}",additional,includeExternal);
379 "group {}: ignoring title \"{}\" that does not match old title \"{}\"",
398 std::unique_ptr<GroupDef>(
405 std::unique_ptr<GroupDef>(
454 scope+=
"::"+gd->
name();
506 bool save_ambig = ambig;
517 fn = fn.
left(newIndex)+
"/"+root->
name;
520 if (!fd) ambig = save_ambig;
550 "Found non-existing group '{}' for the command '{}', ignoring command",
559 text.
sprintf(
"the name '%s' supplied as "
560 "the argument in the \\file statement ",
564 text+=
"matches the following input files:\n";
567 text+=
"Please use a more specific name by "
568 "including a (larger) part of the path!";
572 text+=
"is not an input file";
580template<
class DefMutable>
594 if (!includeFile.
isEmpty() && includeFile.
at(0)==
'"')
597 includeFile=includeFile.
mid(1,includeFile.
length()-2);
599 else if (!includeFile.
isEmpty() && includeFile.
at(0)==
'<')
602 includeFile=includeFile.
mid(1,includeFile.
length()-2);
614 text.
sprintf(
"the name '%s' supplied as "
615 "the argument of the \\class, \\struct, \\union, or \\include command ",
620 text+=
"matches the following input files:\n";
623 text+=
"Please use a more specific name by "
624 "including a (larger) part of the path!";
628 text+=
"is not an input file";
632 else if (includeFile.
isEmpty() && ifd &&
646 if (iName.
at(0)==
'<') local=
FALSE;
647 else if (iName.
at(0)==
'"') local=
TRUE;
648 if (iName.
at(0)==
'"' || iName.
at(0)==
'<')
671 cd->setIncludeFile(
nullptr,iName,local,
TRUE);
684 for (
size_t i=0;i<l;i++)
688 else if (c==
')' && round>0) round--;
689 else if (c==
'<' && round==0) count++;
694 if (c==
'>' && round==0 && count>0) count--;
717 if (idx==-1)
return prevScope;
719 if (nsName.
isEmpty())
return prevScope;
720 if (!fullScope.
isEmpty()) fullScope+=
"::";
725 if (nd==
nullptr) cd =
getClass(fullScope);
726 if (nd==
nullptr && cd)
730 else if (nd==
nullptr && cd==
nullptr && fullScope.
find(
'<')==-1)
738 "[generated]",1,1,fullScope,
756 if (prevScopeMutable)
788 int p=i1+l1,l2=0,i2=0;
796 if (resultScope==
nullptr)
807 if (resultScope!=
nullptr)
break;
866 auto alIt = tArgLists.begin();
867 while ((i=name.
find(
"::",p))!=-1 && alIt!=tArgLists.end())
883 return alIt!=tArgLists.end() ?
884 std::make_unique<ArgumentList>(*alIt) :
885 std::unique_ptr<ArgumentList>();
893 if (specifier.isStruct())
895 else if (specifier.isUnion())
897 else if (specifier.isCategory())
899 else if (specifier.isInterface())
901 else if (specifier.isProtocol())
903 else if (specifier.isException())
905 else if (specifier.isService())
907 else if (specifier.isSingleton())
910 if (section.isUnionDoc())
912 else if (section.isStructDoc())
914 else if (section.isInterfaceDoc())
916 else if (section.isProtocolDoc())
918 else if (section.isCategoryDoc())
920 else if (section.isExceptionDoc())
922 else if (section.isServiceDoc())
924 else if (section.isSingletonDoc())
945 int idx=fullName.
find(
'>');
946 if (idx!=-1 && root->
lang==SrcLangExt::CSharp)
956 qualifiedName.
prepend(scName+
"::");
962 AUTO_TRACE_ADD(
"Found class with name '{}', qualifiedName '{}'", cd ? cd->
name() : root->
name, qualifiedName);
1017 AUTO_TRACE_ADD(
"New class: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1027 if (fullName.
find(
"::")!=-1)
1034 std::unique_ptr<ArgumentList> tArgList;
1036 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) &&
1037 (i=fullName.
find(
'<'))!=-1)
1042 if (i!=-1 && root->
lang==SrcLangExt::CSharp)
1051 fullName=fullName.
left(i);
1062 fullName,sec,tagName,refFileName,
TRUE,root->
spec.isEnum()) ));
1065 AUTO_TRACE_ADD(
"New class '{}' type={} #tArgLists={} tagInfo={} hidden={} artificial={}",
1098 AUTO_TRACE_ADD(
"Class {} not added, already exists as alias", fullName);
1106 if (!root->
spec.isForwardDecl())
1167 qualifiedName.
prepend(scName+
"::");
1173 AUTO_TRACE_ADD(
"Found concept with name '{}' (qualifiedName='{}')", cd ? cd->
name() : root->
name, qualifiedName);
1177 qualifiedName=cd->
name();
1191 AUTO_TRACE_ADD(
"New concept: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1192 qualifiedName,namespaceName,className,root->
brief,root->
doc);
1201 if (qualifiedName.
find(
"::")!=-1)
1213 qualifiedName,tagName,refFileName)));
1217 qualifiedName,root->
tArgLists.size(),fmt::ptr(tagInfo));
1248 AUTO_TRACE_ADD(
"Concept '{}' not added, already exists (as alias)", qualifiedName);
1269 if (root->
section.isModuleDoc())
1279 if (root->
section.isConcept())
1289 if (root->
section.isConceptDoc())
1308 if (cd!=ocd && cd->groupId()==ocd->groupId() &&
1309 !cd->partOfGroups().empty() && ocd->partOfGroups().empty())
1314 for (
const auto &gd : cd->partOfGroups())
1320 gd->addConcept(ocd.get());
1345 aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
1347 std::unique_ptr<ClassDef> aliasCd;
1350 std::vector<ClassAlias> aliases;
1354 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1360 name,icd->getFileDef(),
nullptr);
1386 aliases.emplace_back(aliasFullName,std::move(aliasCd),dm);
1397 visitedClasses.insert(icd.get());
1407 for (
auto &alias : aliases)
1412 alias.aliasContext->addInnerCompound(aliasCd);
1421 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1439 "Incomplete input: scope for class {} not found!{}",name,
1440 name.
startsWith(
"std::") ?
" Try enabling BUILTIN_STL_SUPPORT." :
""
1458 if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
1462 for (
auto &ncd : cd->getClasses())
1473 visitedClasses.insert(cd.get());
1484 fullName+=
"."+fieldName;
1527 for (
const auto &md : *ml)
1530 auto newMd =
createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
1531 md->typeString(),md->name(),md->argsString(),md->excpString(),
1532 md->protection(),md->virtualness(),md->isStatic(),Relationship::Member,
1579 for (
const auto &md : *ml)
1582 if (type.
find(
"::@")!=-1)
1588 if (type.
find(icd->name())!=-1)
1591 if (md->isAnonymous()) name =
"__unnamed" +
QCString().
setNum(pos++)+
"__";
1611 for (
const auto &pmd : *pml)
1614 if (pmdm && pmd->
name()==md->name())
1634 if (icd->name().find(
"@")==-1)
1643 candidates.push_back(cdm);
1649 std::vector<ClassDefMutable *> candidates;
1661 for (
auto &cd : candidates)
1674 (root->
section.isNamespace() ||
1675 root->
section.isNamespaceDoc() ||
1684 if (root->
section.isPackageDoc())
1747 root->
type,root->
spec.isPublished())));
1813 QCString aliasName = aliasNd->name();
1842 for (
auto &und : unl)
1846 if (usingNd!=
nullptr)
break;
1853 if (root->
section.isUsingDir())
1871 (fd==
nullptr || fd->
getLanguage()!=SrcLangExt::Java)
1885 int scopeOffset =
static_cast<int>(nsName.
length());
1896 else if ((scopeOffset=nsName.
findRev(
"::",scopeOffset-1))==-1)
1900 }
while (scopeOffset>=0 && usingNd==
nullptr);
1902 if (usingNd==
nullptr && nd)
1906 while (pnd && usingNd==
nullptr)
1923 if (usingNd==
nullptr && fd)
1995 if (root->
section.isUsingDecl() &&
2008 if (root->
section.isUsingDecl() &&
2010 (!filterPythonPackages || (root->
lang==SrcLangExt::Python && root->
fileName.
endsWith(
"__init__.py")))
2013 AUTO_TRACE(
"Found using declaration '{}' at line {} of {} inside section {}",
2043 if (nd==
nullptr) scope = fd;
2113 AUTO_TRACE(
"creating new member {} for class {}",memName,cd->
name());
2124 newMmd->setMemberClass(cd);
2142 newMmd->addSectionsToDefinition(root->
anchors);
2148 newMmd->setMemberGroupId(root->
mGrpId);
2151 newMmd->setLanguage(root->
lang);
2152 newMmd->setId(root->
id);
2161 if (root->
section.isUsingDecl() &&
2188 for (
auto &mi : *mni)
2191 if (md && md->
protection()!=Protection::Private)
2206 for (
const auto ©Cd : it->second)
2219 else if (root->
section.isUsingDecl() &&
2221 root->
lang==SrcLangExt::Cpp
2254 memName = root->
name;
2276 newMmd->setNamespace(nd);
2281 newMmd->setFileDef(fd);
2300 newMmd->addSectionsToDefinition(root->
anchors);
2306 newMmd->setMemberGroupId(root->
mGrpId);
2309 newMmd->setLanguage(root->
lang);
2310 newMmd->setId(root->
id);
2318 if (nd && aliasMd.get())
2322 if (fd && aliasMd.get())
2351 if (nd) ncdm->
moveTo(nd);
2380 aliasFullName = aliasCd->localName();
2384 aliasFullName = nd->
qualifiedName()+
"::"+aliasCd->localName();
2416 for (
const auto &fd : *fn)
2419 fd->addIncludedUsingDirectives(visitedFiles);
2441 if (lang==SrcLangExt::Java || lang==SrcLangExt::CSharp)
2446 AUTO_TRACE(
"class variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} ann={} init='{}'",
2454 if (root->
spec.isAlias())
2460 def=type+
" "+name+args;
2465 if (root->
spec.isAlias())
2467 def=
"using "+qualScope+scopeSeparator+name;
2471 def=type+
" "+qualScope+scopeSeparator+name+args;
2483 def=qualScope+scopeSeparator+name+args;
2494 for (
const auto &imd : *mn)
2506 if (root->
lang==SrcLangExt::ObjC &&
2507 root->
mtype==MethodTypes::Property &&
2531 prot,Specifier::Normal,root->
isStatic,related,
2535 mmd->setTagInfo(root->
tagInfo());
2536 mmd->setMemberClass(cd);
2540 mmd->setDefinition(def);
2542 mmd->addSectionsToDefinition(root->
anchors);
2543 mmd->setFromAnonymousScope(fromAnnScope);
2544 mmd->setFromAnonymousMember(fromAnnMemb);
2549 mmd->setMemberGroupId(root->
mGrpId);
2550 mmd->setMemberSpecifiers(root->
spec);
2551 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2552 mmd->setReadAccessor(root->
read);
2553 mmd->setWriteAccessor(root->
write);
2555 mmd->setHidden(root->
hidden);
2557 mmd->setLanguage(root->
lang);
2558 mmd->setId(root->
id);
2561 mmd->setBodyDef(root->
fileDef());
2566 mmd->setRefItems(root->
sli);
2596 AUTO_TRACE(
"global variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} init='{}'",
2608 static const reg::Ex re(R
"(\a\w*)");
2610 std::string typ = ttype.str();
2632 if (scope.
find(
'@')!=-1)
return nullptr;
2648 if (root->
spec.isAlias())
2650 def=
"using "+nd->
name()+sep+name;
2654 def=type+
" "+nd->
name()+sep+name+args;
2659 def=nd->
name()+sep+name+args;
2666 if (name.
at(0)==
'@')
2672 if (root->
spec.isAlias())
2674 def=
"using "+root->
name;
2678 def=type+
" "+name+args;
2699 for (
const auto &imd : *mn)
2713 bool isPHPArray = md->
getLanguage()==SrcLangExt::PHP &&
2716 bool staticsInDifferentFiles =
2722 !staticsInDifferentFiles
2763 mmd->setTagInfo(root->
tagInfo());
2764 mmd->setMemberSpecifiers(root->
spec);
2765 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2769 mmd->addSectionsToDefinition(root->
anchors);
2770 mmd->setFromAnonymousScope(fromAnnScope);
2771 mmd->setFromAnonymousMember(fromAnnMemb);
2774 mmd->setMemberGroupId(root->
mGrpId);
2775 mmd->setDefinition(def);
2776 mmd->setLanguage(root->
lang);
2777 mmd->setId(root->
id);
2785 mmd->setBodyDef(fd);
2790 mmd->setRefItems(root->
sli);
2793 mmd->setNamespace(nd);
2801 mmd->setFileDef(fd);
2829 if (lang == SrcLangExt::Fortran || lang == SrcLangExt::VHDL)
2834 static const reg::Ex re(R
"(\([^)]*[*&^][^)]*\))");
2836 size_t i=std::string::npos;
2840 i = match.position();
2843 if (i!=std::string::npos)
2845 size_t di = type.find(
"decltype(");
2846 if (di!=std::string::npos && di<i)
2848 i = std::string::npos;
2851 size_t bb=type.find(
'<');
2852 size_t be=type.rfind(
'>');
2853 bool templFp =
false;
2854 if (be!=std::string::npos) {
2855 size_t cc_ast = type.find(
"::*");
2856 size_t cc_amp = type.find(
"::&");
2857 templFp = (cc_ast != std::string::npos && cc_ast>be) || (cc_amp != std::string::npos && cc_amp>be);
2860 if (!type.empty() &&
2861 i!=std::string::npos &&
2862 type.find(
"operator")==std::string::npos &&
2863 (type.find(
")(")==std::string::npos || type.find(
"typedef ")!=std::string::npos) &&
2865 (!(bb<i && i<be) || templFp)
2868 if (pLength) *pLength=
static_cast<int>(l);
2871 return static_cast<int>(i);
2888 bool result =
false;
2889 bool typeIsClass =
false;
2890 bool typePtrType =
false;
2924 typePtrType = type.
find(
'*')!=-1 || type.
find(
'&')!=-1;
2927 typeIsClass = resolver.
resolveClass(ctx,type)!=
nullptr;
2929 if (!typeIsClass && (ti=type.
find(
'<'))!=-1)
2946 static const reg::Ex initChars(R
"([\d"'&*!^]+)");
2950 std::string name = a.
name.
str();
2951 if (
reg::search(name,match,initChars) && match.position()==0)
2983 std::string atype = a.
type.
str();
2984 if (
reg::search(atype,match,initChars) && match.position()==0)
2991 if (resType.empty()) resType=atype;
2992 static const reg::Ex idChars(R
"(\a\w*)");
2993 if (
reg::search(resType,match,idChars) && match.position()==0)
2995 resType=match.str();
2996 if (resType==
"int" || resType==
"long" ||
2997 resType==
"float" || resType==
"double" ||
2998 resType==
"char" || resType==
"void" ||
2999 resType==
"signed" || resType==
"unsigned" ||
3000 resType==
"const" || resType==
"volatile" )
3037 bool insideString=
FALSE;
3038 bool insideChar=
FALSE;
3040 while (e<len && brCount!=0)
3046 if (!insideString && !insideChar)
3048 if (e<len-1 && s.
at(e+1)==
'<')
3050 else if (roundCount==0)
3055 if (!insideString && !insideChar)
3057 if (e<len-1 && s.
at(e+1)==
'>')
3059 else if (roundCount==0)
3064 if (!insideString && !insideChar)
3068 if (!insideString && !insideChar)
3074 if (insideString && pc!=
'\\')
3083 if (insideChar && pc!=
'\\')
3093 return brCount==0 ?
static_cast<int>(e) : -1;
3102 AUTO_TRACE(
"VARIABLE_SEC: type='{}' name='{}' args='{}' bodyLine={} endBodyLine={} mGrpId={} relates='{}'",
3109 if (type.
isEmpty() && name.
find(
"operator")==-1 &&
3110 (name.
find(
'*')!=-1 || name.
find(
'&')!=-1))
3117 std::string sargs = args.
str();
3118 static const reg::Ex reName(R
"(\a\w*)");
3123 sargs = match.suffix().str();
3124 size_t j = sargs.find(
')');
3125 if (j!=std::string::npos) args=sargs.substr(0,j);
3135 int ai = type.
find(
'[',i);
3141 else if (type.
find(
')',i)!=-1)
3148 AUTO_TRACE_ADD(
"after correction: type='{}' name='{}' args='{}'",type,name,args);
3159 scope=name.
left(index);
3160 name=name.
mid(index+2);
3179 bool isRelated=
FALSE;
3180 bool isMemberOf=
FALSE;
3183 if (root->
lang==SrcLangExt::CSharp)
3196 for (
size_t i=0;i<name.
length()-1;i++)
3198 if (name[i]==
':' && name[i+1]==
':')
3200 p=
static_cast<int>(i);
3202 else if (name[i]==
'<')
3207 if (e!=-1) i=
static_cast<int>(e);
3213 if (type==
"friend class" || type==
"friend struct" ||
3214 type==
"friend union")
3228 Relationship::Member
3254 else if (root->
mtype==MethodTypes::Property)
3256 else if (root->
mtype==MethodTypes::Event)
3258 else if (type.
find(
"sequence<") != -1)
3260 else if (type.
find(
"dictionary<") != -1)
3266 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
3284 int si=scope.
find(
'@');
3288 bool inlineSimpleStructs =
Config_getBool(INLINE_SIMPLE_STRUCTS);
3289 Relationship relationship = isMemberOf ? Relationship::Foreign :
3290 isRelated ? Relationship::Related :
3291 Relationship::Member ;
3292 if (si!=-1 && !inlineSimpleStructs)
3296 pScope = scope.
left(std::max(si-2,0));
3298 pScope.
prepend(annScopePrefix);
3299 else if (annScopePrefix.
length()>2)
3300 pScope=annScopePrefix.
left(annScopePrefix.
length()-2);
3301 if (name.
at(0)!=
'@')
3369 scope=rname.
left(index);
3370 rname=rname.
mid(index+2);
3382 for (
auto &imd : *mn)
3384 if (!imd->isTypedef())
3393 bool notBothGrouped = root->
groups.empty() || imd->getGroupDef()==
nullptr;
3394 bool bothSameScope = (!cd && !nd) || (cd && imd->getClassDef() == cd) || (nd && imd->getNamespaceDef() == nd);
3397 if (notBothGrouped && bothSameScope && imd->typeString()==rtype)
3444 for (
const auto &e : root->
children())
3445 if (!e->section.isEnum())
3462 for (
const auto &e : root->
children())
3463 if (!e->section.isEnum())
3480 for (
const auto &e : root->
children())
3481 if (!e->section.isEnum())
3496 (root->
section.isVariable() &&
3499 (root->
section.isFunction() &&
3502 (root->
section.isFunction() &&
3511 for (
const auto &e : root->
children())
3512 if (!e->section.isEnum())
3538 mmd->setTagInfo(root->
tagInfo());
3539 mmd->setMemberClass(cd);
3541 mmd->setDocsForDefinition(
false);
3545 mmd->setMemberSpecifiers(root->
spec);
3546 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3547 mmd->setMemberGroupId(root->
mGrpId);
3549 mmd->setLanguage(root->
lang);
3550 mmd->setBodyDef(fd);
3551 mmd->setFileDef(fd);
3552 mmd->addSectionsToDefinition(root->
anchors);
3554 mmd->setDefinition(def);
3558 AUTO_TRACE(
"Interface member: fileName='{}' type='{}' name='{}' mtype='{}' prot={} virt={} state={} proto={} def='{}'",
3566 root->
spec.isOptional() ? Protection::Protected : Protection::Public, Specifier::Normal);
3576 mmd->setRefItems(root->
sli);
3585 if (root->
section.isExportedInterface() || root->
section.isIncludedService())
3587 AUTO_TRACE(
"Exported interface/included service: type='{}' scope='{}' name='{}' args='{}'"
3588 " relates='{}' relatesType='{}' file='{}' line={} bodyLine={} #tArgLists={}"
3589 " mGrpId={} spec={} proto={} docFile='{}'",
3615 "Illegal member name found.");
3621 case SrcLangExt::Unknown:
3622 case SrcLangExt::IDL:
3659 if ((fd==
nullptr || fd->
getLanguage()==SrcLangExt::Cpp) &&
3661 (i=name.
find(
'<'))!=-1 &&
3662 (j=name.
find(
'>'))!=-1 &&
3663 (j!=i+2 || name.
at(i+1)!=
'=')
3681 root->
relatesType==RelatesType::MemberOf ? Relationship::Foreign :
3682 Relationship::Related ;
3692 mmd->setTagInfo(root->
tagInfo());
3693 mmd->setMemberClass(cd);
3695 mmd->setDocsForDefinition(!root->
proto);
3699 mmd->setMemberSpecifiers(spec);
3700 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3701 mmd->setMemberGroupId(root->
mGrpId);
3703 mmd->setLanguage(root->
lang);
3704 mmd->setRequiresClause(root->
req);
3705 mmd->setId(root->
id);
3706 mmd->setBodyDef(fd);
3707 mmd->setFileDef(fd);
3708 mmd->addSectionsToDefinition(root->
anchors);
3713 if (scopeSeparator!=
"::")
3715 qualScope =
substitute(qualScope,
"::",scopeSeparator);
3717 if (lang==SrcLangExt::PHP)
3720 scopeSeparator=
"::";
3737 def=type+
" "+qualScope+scopeSeparator+name;
3741 def=qualScope+scopeSeparator+name;
3745 mmd->setDefinition(def);
3749 AUTO_TRACE(
"function member: type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
3750 type, qualScope, rname, args, root->
proto, def);
3760 mmd->setRefItems(root->
sli);
3784 mmd->setTagInfo(root->
tagInfo());
3785 mmd->setLanguage(root->
lang);
3786 mmd->setId(root->
id);
3791 mmd->setDocsForDefinition(!root->
proto);
3797 mmd->addSectionsToDefinition(root->
anchors);
3798 mmd->setMemberSpecifiers(root->
spec);
3799 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3800 mmd->setMemberGroupId(root->
mGrpId);
3801 mmd->setRequiresClause(root->
req);
3836 def=root->
type+
" "+scope+name;
3842 AUTO_TRACE(
"new non-member function type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
3844 mmd->setDefinition(def);
3848 mmd->setRefItems(root->
sli);
3852 mmd->setNamespace(nd);
3859 mmd->setFileDef(fd);
3880 if (root->
section.isFunction())
3882 AUTO_TRACE(
"member function: type='{}' scope='{}' name='{}' args='{}' relates='{}' relatesType='{}'"
3883 " file='{}' line={} bodyLine={} #tArgLists={} mGrpId={}"
3884 " spec={} proto={} docFile='{}'",
3889 bool isFriend=root->
type==
"friend" || root->
type.
find(
"friend ")!=-1;
3899 scope=rname.
left(index);
3900 rname=rname.
mid(index+2);
3909 if (root->
lang==SrcLangExt::CSharp)
3920 int memIndex=rname.
findRev(
"::");
3923 if (cd && scope+
"::"==rname.
left(scope.
length()+2))
3929 bool isMember=
FALSE;
3932 int ts=rname.
find(
'<');
3933 int te=rname.
find(
'>');
3934 if (memIndex>0 && (ts==-1 || te==-1))
3951 isMember=memIndex<ts || memIndex>te;
3991 for (
const auto &imd : *mn)
4004 fullScope.
prepend(parentScope);
4010 if (mnd) nsName = mnd->
name();
4011 if (rnd) rnsName = rnd->
name();
4019 bool sameTemplateArgs =
TRUE;
4020 bool matchingReturnTypes =
TRUE;
4021 bool sameRequiresClause =
TRUE;
4027 matchingReturnTypes =
FALSE;
4031 sameRequiresClause =
FALSE;
4037 sameTemplateArgs =
FALSE;
4040 bool staticsInDifferentFiles =
4048 matchingReturnTypes &&
4049 sameRequiresClause &&
4050 !staticsInDifferentFiles
4054 if (!root->
groups.empty() && !root->
groups.front().groupname.isEmpty())
4061 found=(mnd && rnd && nsName==rnsName) ||
4062 ((mnd==
nullptr && rnd==
nullptr && mfd!=
nullptr &&
4067 if (!found && gd && gd==md->
getGroupDef() && nsName==rnsName)
4073 AUTO_TRACE_ADD(
"combining function with prototype found={} in namespace '{}'",found,nsName);
4175 "Illegal member name found."
4193 for (
const auto &ifmd : *fn)
4197 for (
const auto &immd : *mn)
4213 AUTO_TRACE_ADD(
"Merging related global and member '{}' isFriend={} isRelated={} isFunction={}",
4290 for (
const auto &imdec : *mn)
4298 for (
const auto &imdef : *mn)
4301 if (mdef && mdec!=mdef &&
4321 for (
const auto &imd : *mn)
4337 if (mdef && mdec)
break;
4345 mdec->getOuterScope(),mdec->getFileDef(),
const_cast<ArgumentList*
>(&mdecAl),
4352 mdec->mergeReferences(mdef);
4354 mdec->mergeReferencedBy(mdef);
4371 for (
const auto &imd : *mn)
4382 for (
const auto &irmd : *rmn)
4416 size_t i=qualifiedName.rfind(
"::");
4417 if (i!=std::string::npos)
4419 QCString scope = qualifiedName.substr(0,i);
4420 QCString name = qualifiedName.substr(i+2);
4424 for (
const auto &imd : *mn)
4450 std::map<std::string,int> templateNames;
4452 for (
const Argument &arg : templateArguments)
4454 static const reg::Ex re(R
"(\a[\w:]*)");
4457 for (; it!=
end ; ++it)
4459 const auto &match = *it;
4460 std::string n = match.str();
4461 if (n==arg.name.str())
4463 if (templateNames.find(n)==templateNames.end())
4465 templateNames.emplace(n,count);
4470 return templateNames;
4485 if (context && cd!=context)
4490 if (result==
nullptr)
4495 if (result==
nullptr)
4524 for (
auto &mi : *mni)
4534 type = typedefValue;
4553 usedClassName = typeCd->
name();
4556 int sp=usedClassName.
find(
'<');
4565 if (templateNames.empty())
4569 BaseInfo bi(usedName,Protection::Public,Specifier::Normal);
4574 if (arg.name==usedName)
4578 if (usedCd==
nullptr)
4629 if (!found && !type.
isEmpty())
4688 if (templateNames.empty())
4726 AUTO_TRACE(
"Derived from template '{}' with parameters '{}' isArtificial={}",
4727 templateClass->
name(),templSpec,isArtificial);
4730 bool existingClass = templSpec==tempArgsStr;
4731 if (existingClass)
return;
4733 bool freshInstance=
FALSE;
4750 for (
auto it=it_pair.first ; it!=it_pair.second ; ++it)
4752 const Entry *templateRoot = it->second;
4753 AUTO_TRACE_ADD(
"template root found '{}' templSpec='{}'",templateRoot->
name,templSpec);
4759 isArtificial,templArgs.get(),templateNames);
4778 int ti=ttype.
find(
'<');
4784 templateClassName,
true,
true);
4785 AUTO_TRACE_ADD(
"templateClassName={} baseClass={}",templateClassName,baseClass?baseClass->
name():
"<none>");
4804 int index=n.
find(
'<');
4816 int l =
static_cast<int>(name.
length());
4822 while (count>0 && i>=0)
4827 case '>':
if (!insideQuote) count++;
break;
4828 case '<':
if (!insideQuote) count--;
break;
4829 case '\'':
if (!insideQuote) insideQuote=c;
4830 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
4832 case '"':
if (!insideQuote) insideQuote=c;
4833 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
4853 AUTO_TRACE(
"name={} base={} isArtificial={} mode={}",cd->
name(),bi->
name,isArtificial,(
int)mode);
4856 bool explicitGlobalScope=
FALSE;
4860 explicitGlobalScope=
TRUE;
4864 bool lastParent=
FALSE;
4869 int scopeOffset=explicitGlobalScope ? 0 :
static_cast<int>(scopeName.
length());
4878 baseClassName.
prepend(scopeName.
left(scopeOffset)+
"::");
4880 if (root->
lang==SrcLangExt::CSharp)
4907 || explicitGlobalScope
4910 || (root->
lang==SrcLangExt::IDL &&
4911 (root->
section.isExportedInterface() ||
4912 root->
section.isIncludedService()))
4915 AUTO_TRACE_ADD(
"class relation '{}' inherited/used by '{}' found prot={} virt={} templSpec='{}'",
4916 baseClassName, root->
name, bi->
prot, bi->
virt, templSpec);
4919 int si=baseClassName.
findRev(
"::",i);
4921 if (baseClass==
nullptr &&
static_cast<size_t>(i)!=baseClassName.
length())
4931 baseClassName = baseClassName.
left(i)+baseClassName.
right(baseClassName.
length()-e);
4942 else if (baseClass && !templSpec.
isEmpty())
4953 baseClass = templClass;
4961 if (!found && si!=-1)
4971 found=baseClass!=
nullptr && baseClass!=cd;
4981 found = baseClass!=
nullptr && baseClass!=cd;
4993 found = baseClass!=
nullptr && baseClass!=cd;
4996 bool isATemplateArgument = templateNames.find(biName.
str())!=templateNames.end();
5001 AUTO_TRACE_ADD(
"Documented base class '{}' templSpec='{}'",biName,templSpec);
5019 if (baseClassTypeDef==
nullptr)
5029 if (baseClassTypeDef)
5038 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",usedName,prot,bi->
virt,templSpec);
5046 "Detected potential recursive class relation "
5047 "between class {} and base class {}!",
5054 else if (mode==
Undocumented && (scopeOffset==0 || isATemplateArgument))
5056 AUTO_TRACE_ADD(
"New undocumented base class '{}' baseClassName='{}' templSpec='{}' isArtificial={}",
5057 biName,baseClassName,templSpec,isArtificial);
5059 if (isATemplateArgument)
5062 if (baseClass==
nullptr)
5081 if (baseClass==
nullptr)
5092 si = baseClassName.
findRev(
"::");
5108 biName=
"<"+biName.
left(biName.
length()-2)+
">";
5112 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",biName,bi->
prot,bi->
virt,templSpec);
5122 if (scope!=baseClass)
5148 "Detected potential recursive class relation "
5149 "between class {} and base class {}!",
5150 root->
name,baseClassName
5161 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
5166 }
while (scopeOffset>=0);
5168 if (parentNode==
nullptr)
5174 parentNode=parentNode->
parent();
5176 }
while (lastParent);
5196 bool hasExtends = !root->
extends.empty();
5197 if (hasExtends)
return TRUE;
5221 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) &&
5222 (i=bName.
find(
'<'))!=-1)
5226 if (root->
lang==SrcLangExt::CSharp)
5232 bName = bName.
left(i);
5264 if (i!=-1 && j!=-1 && k==-1 && root->
lang!=SrcLangExt::CSharp && root->
lang!=SrcLangExt::Java)
5297 if (!nd->hasDocumentation())
5300 nd->getLanguage() == SrcLangExt::Fortran) &&
5304 warn_undoc(nd->getDefFileName(),nd->getDefLine(),
"{} {} is not documented.",
5305 nd->getLanguage() == SrcLangExt::Fortran ?
"Module" :
"Namespace",
5369 for (
const auto &tn_kv : templateNames)
5371 size_t templIndex = tn_kv.second;
5373 bool hasActArg=
FALSE;
5374 if (templIndex<templArgs->size())
5376 actArg=templArgs->at(templIndex);
5380 baseClassNames.find(actArg.
type.
str())!=baseClassNames.end() &&
5381 actualTemplateNames.find(actArg.
type.
str())==actualTemplateNames.end()
5384 actualTemplateNames.emplace(actArg.
type.
str(),
static_cast<int>(templIndex));
5419 for (
const auto &fd : *fn)
5421 fd->computeAnchors();
5434 gd->computeAnchors();
5454 for (
const auto &fd : *fn)
5456 fd->addListReferences();
5471 gd->addListReferences();
5476 QCString name = pd->getOutputFileBase();
5477 if (pd->getGroupDef())
5479 name = pd->getGroupDef()->getOutputFileBase();
5486 name,pd->title(),
QCString(),
nullptr);
5492 QCString name = dd->getOutputFileBase();
5501 name,dd->displayName(),
QCString(),
nullptr);
5530 if (md==
nullptr)
return;
5531 AUTO_TRACE(
"scope='{}' name='{}' args='{}' funcDecl='{}' mSpec={}",
5546 fullName = cd->
name();
5548 fullName = nd->
name();
5550 if (!fullName.
isEmpty()) fullName+=
"::";
5551 fullName+=md->
name();
5655 "member {} belongs to two different groups. The second one found here will be ignored.",
5693 return allowNoGroup;
5696 for (
const auto &g : root->
groups)
5698 if (g.groupname == gd->
name())
5721 AUTO_TRACE(
"namespace='{}' type='{}' name='{}' tempArg='{}' decl='{}'",namespaceName,type,name,tempArg,decl);
5735 for (
const auto &md : *mn)
5746 if (md->isAlias() && md->getOuterScope() &&
5753 nd = md->getNamespaceDef();
5758 if (nd && md->isEnumValue() && (enumNamePos=namespaceName.
findRev(
"::"))!=-1)
5760 QCString enumName = namespaceName.
mid(enumNamePos+2);
5761 if (namespaceName.
left(enumNamePos)==nd->
name())
5766 for (
const auto &emd : *enumMn)
5768 found = emd->isStrong() && md->getEnumScope()==emd.get();
5782 else if (nd==
nullptr && md->isEnumValue())
5787 for (
const auto &emd : *enumMn)
5789 found = emd->isStrong() && md->getEnumScope()==emd.get();
5812 if ((namespaceName.
isEmpty() && nd==
nullptr) ||
5813 (nd && nd->
name()==namespaceName) ||
5817 AUTO_TRACE_ADD(
"Try to add member '{}' to scope '{}'",md->name(),namespaceName);
5825 md->isVariable() || md->isTypedef() ||
5833 if (matching && !root->
tArgLists.empty())
5852 if (matching && md->isStatic() &&
5853 md->getDefFileName()!=root->
fileName &&
5861 if (!md->templateArguments().empty() && !root->
tArgLists.empty())
5865 if (md->templateArguments().size()!=root->
tArgLists.back().size() ||
5866 md->typeString()!=type ||
5867 md->requiresClause()!=root->
req)
5883 if (!found && root->
relatesType!=RelatesType::Duplicate && root->
section.isFunction())
5887 QCString warnMsg =
"no matching file member found for \n"+fullFuncDecl;
5890 warnMsg+=
"\nPossible candidates:";
5891 for (
const auto &md : *mn)
5895 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
5903 if (root->
type!=
"friend class" &&
5904 root->
type!=
"friend struct" &&
5905 root->
type!=
"friend union" &&
5906 root->
type!=
"friend" &&
5912 "documented symbol '{}' was not declared or defined.",
qPrint(decl)
5924 auto srcIt = srcTempArgLists.begin();
5925 auto dstIt = dstTempArgLists.begin();
5926 while (srcIt!=srcTempArgLists.end() && dstIt!=dstTempArgLists.end())
5928 if ((*srcIt).size()!=(*dstIt).size())
return TRUE;
5942 result = cd->templateArguments().hasParameters() || cd->templateMaster()!=
nullptr ||
5952 const std::string &src
5956 static const reg::Ex re(R
"(\a\w*)");
5961 for (; it!=
end ; ++it)
5963 const auto &match = *it;
5964 size_t i = match.position();
5965 size_t l = match.length();
5967 dst+=src.substr(p,i-p);
5968 std::string name=match.str();
5970 auto srcIt = srcTempArgLists.begin();
5971 auto dstIt = dstTempArgLists.begin();
5972 while (srcIt!=srcTempArgLists.end() && !found)
5975 std::vector<Argument>::const_iterator tdaIt;
5976 if (dstIt!=dstTempArgLists.end())
5979 tdaIt = tdAli->
begin();
5984 for (
auto tsaIt = tsaLi.
begin(); tsaIt!=tsaLi.
end() && !found; ++tsaIt)
5988 if (tdAli && tdaIt!=tdAli->
end())
6004 else if (tdaType.
startsWith(
"typename ")) vc=9;
6007 tdaName = tdaType.
mid(vc);
6040 auto dstIt = dst.
begin();
6045 if (dstIt == dst.
end())
6049 da.
array = dstArray;
6057 da.
array = dstArray;
6065 srcTempArgLists,dstTempArgLists,
6091 funcType,funcName,funcArgs,exceptions,
6095 mmd->setTagInfo(root->
tagInfo());
6096 mmd->setLanguage(root->
lang);
6097 mmd->setId(root->
id);
6098 mmd->makeImplementationDetail();
6099 mmd->setMemberClass(cd);
6100 mmd->setDefinition(funcDecl);
6106 mmd->setDocsForDefinition(!root->
proto);
6108 mmd->addSectionsToDefinition(root->
anchors);
6112 mmd->setMemberSpecifiers(spec);
6113 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6114 mmd->setMemberGroupId(root->
mGrpId);
6117 mmd->setRefItems(root->
sli);
6153 bool memFound=
FALSE;
6154 for (
const auto &imd : *mn)
6157 if (md==
nullptr)
continue;
6159 if (cd==
nullptr)
continue;
6176 if (!namespaceName.
isEmpty()) fullScope.
prepend(namespaceName+
"::");
6177 if (fullScope==cd->
name())
6183 for (
const auto &emd : *enumMn)
6185 memFound = emd->isStrong() && md->
getEnumScope()==emd.get();
6191 if (memFound)
break;
6196 if (memFound)
break;
6214 if (!templAl.
empty())
6216 declTemplArgs.push_back(templAl);
6224 bool substDone=
FALSE;
6231 if (declTemplArgs.size()>0 && declTemplArgs.size()==defTemplArgs.size())
6247 AUTO_TRACE_ADD(
"matching '{}'<=>'{}' className='{}' namespaceName='{}'",
6271 AUTO_TRACE_ADD(
"Comparing return types '{}'<->'{}' #args {}<->{}",
6279 else if (defTemplArgs.size()>declTemplArgs.size())
6281 AUTO_TRACE_ADD(
"Different number of template arguments {} vs {}",defTemplArgs.size(),declTemplArgs.size());
6287 bool rootIsUserDoc = root->
section.isMemberDoc();
6290 bool classOrMdIsTemplate = mdIsTemplate || classIsTemplate;
6291 bool rootIsTemplate = !root->
tArgLists.empty();
6293 if (!rootIsUserDoc &&
6294 (mdIsTemplate || rootIsTemplate) &&
6295 ((classOrMdIsTemplate && !rootIsTemplate) || (!classOrMdIsTemplate && rootIsTemplate))
6300 AUTO_TRACE_ADD(
"Comparing return types: template v.s. non-template");
6304 AUTO_TRACE_ADD(
"Match results of matchArguments2='{}' substDone='{}'",matching,substDone);
6315 if (!funcTempList.
isEmpty() &&
6335 else if (cd && cd!=tcd)
6341 if (memFound)
break;
6345 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
6348 if (count==0 && !(isFriend && funcType==
"class"))
6351 const ClassDef *ecd =
nullptr, *ucd =
nullptr;
6352 MemberDef *emd =
nullptr, *umd =
nullptr;
6354 for (
const auto &md : *mn)
6376 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': exact match",
6377 className,ccd->
name(),md->argsString());
6383 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': no match",
6384 className,ccd->
name(),md->argsString());
6389 bool strictProtoMatching =
Config_getBool(STRICT_PROTO_MATCHING);
6390 if (!strictProtoMatching)
6392 if (candidates==1 && ucd && umd)
6399 else if (candidates>1 && ecd && emd)
6410 if (noMatchCount>1) warnMsg+=
"uniquely ";
6411 warnMsg+=
"matching class member found for \n";
6415 warnMsg+=
" template ";
6424 warnMsg+=fullFuncDecl;
6426 if (candidates>0 || noMatchCount>=1)
6428 warnMsg+=
"\nPossible candidates:";
6434 for (
const auto &md : *mn)
6436 const ClassDef *cd=md->getClassDef();
6450 warnMsg+=
"template ";
6455 if (!md->typeString().isEmpty())
6457 warnMsg+=md->typeString();
6462 warnMsg+=qScope+
"::"+md->name();
6463 warnMsg+=md->argsString();
6464 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6485 AUTO_TRACE(
"funcType={} funcName={} funcArgs={} funcDecl={} spec={}",funcType,funcName,funcArgs,funcDecl,spec);
6487 for (
const auto &md : *mn)
6489 if (md->getClassDef()==cd)
6501 funcType,funcName,funcArgs,exceptions,
6507 mmd->setTagInfo(root->
tagInfo());
6508 mmd->setLanguage(root->
lang);
6509 mmd->setId(root->
id);
6510 mmd->setMemberClass(cd);
6511 mmd->setTemplateSpecialization(
TRUE);
6513 mmd->setDefinition(funcDecl);
6519 mmd->setDocsForDefinition(!root->
proto);
6521 mmd->addSectionsToDefinition(root->
anchors);
6525 mmd->setMemberSpecifiers(spec);
6526 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6527 mmd->setMemberGroupId(root->
mGrpId);
6529 mmd->setRefItems(root->
sli);
6543 bool sameClass=
false;
6548 [](
const auto &md1,
const auto &md2)
6549 { return md1->getClassDef()->name()==md2->getClassDef()->name(); });
6555 if (cd==
nullptr)
return;
6563 std::unique_ptr<ArgumentList> tArgList =
6568 funcType,funcName,funcArgs,exceptions,
6572 mmd->setTagInfo(root->
tagInfo());
6573 mmd->setLanguage(root->
lang);
6574 mmd->setId(root->
id);
6576 mmd->setMemberClass(cd);
6577 mmd->setDefinition(funcDecl);
6586 mmd->setDocsForDefinition(!root->
proto);
6588 mmd->addSectionsToDefinition(root->
anchors);
6592 mmd->setMemberSpecifiers(spec);
6593 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6594 mmd->setMemberGroupId(root->
mGrpId);
6597 mmd->setRefItems(root->
sli);
6655 AUTO_TRACE(
"root='{}' funcDecl='{}' related='{}' overload={} isFunc={} mGrpId={} #tArgList={} spec={} lang={}",
6668 bool isRelated=
false;
6669 bool isMemberOf=
false;
6670 bool isFriend=
false;
6683 spec.setInline(
true);
6688 spec.setExplicit(
true);
6693 spec.setMutable(
true);
6698 spec.setThreadLocal(
true);
6709 while ((sep=funcDecl.
find(
';'))!=-1)
6715 if (!funcDecl.
isEmpty() && funcDecl[0]!=
' ') funcDecl.
prepend(
" ");
6727 if (isFriend && funcDecl.
startsWith(
"class "))
6731 funcName = funcDecl;
6733 else if (isFriend && funcDecl.
startsWith(
"struct "))
6736 funcName = funcDecl;
6742 funcArgs,funcTempList,exceptions
6750 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}' funcType='{}' funcName='{}' funcArgs='{}'",
6751 scopeName,className,namespaceName,funcType,funcName,funcArgs);
6755 isMemberOf=(root->
relatesType == RelatesType::MemberOf);
6762 scopeName = relates;
6775 scopeName = joinedName;
6789 QCString joinedName = fnd->name()+
"::"+scopeName;
6792 scopeName=joinedName;
6819 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}'",scopeName,className,namespaceName);
6828 scopeName=namespaceName;
6830 else if (!relates.
isEmpty() ||
6833 scopeName=namespaceName+
"::"+className;
6837 scopeName=className;
6840 else if (!className.
isEmpty())
6842 scopeName=className;
6852 uint32_t argListIndex=0;
6857 tempScopeName=scopeName+funcSpec;
6871 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcTempList;
6875 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcArgs;
6882 funcDecl=tempScopeName+
"::"+funcName+funcTempList;
6886 funcDecl=tempScopeName+
"::"+funcName+funcArgs;
6896 funcDecl=funcType+
" "+funcName+funcTempList;
6900 funcDecl=funcType+
" "+funcName+funcArgs;
6907 funcDecl=funcName+funcTempList;
6911 funcDecl=funcName+funcArgs;
6916 if (funcType==
"template class" && !funcTempList.
isEmpty())
6919 AUTO_TRACE_ADD(
"Parse results: namespaceName='{}' className=`{}` funcType='{}' funcSpec='{}' "
6920 " funcName='{}' funcArgs='{}' funcTempList='{}' funcDecl='{}' relates='{}'"
6921 " exceptions='{}' isRelated={} isMemberOf={} isFriend={} isFunc={}",
6922 namespaceName, className, funcType, funcSpec,
6923 funcName, funcArgs, funcTempList, funcDecl, relates,
6924 exceptions, isRelated, isMemberOf, isFriend, isFunc);
6930 bool strongEnum =
false;
6934 for (
const auto &imd : *mn)
6947 namespaceName+=
"::"+className;
6951 namespaceName=className;
6959 funcName =
substitute(funcName,className+
"::",
"");
6970 if (!isRelated && !strongEnum && mn)
6978 funcArgs,funcTempList,exceptions,
6979 type,args,isFriend,spec,relates,funcDecl,overloaded,isFunc);
6991 else if (overloaded)
6993 addOverloaded(root,mn,funcType,funcName,funcArgs,funcDecl,exceptions,spec);
6997 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7002 "Cannot determine class for function\n{}",
7008 else if (isRelated && !relates.
isEmpty())
7010 AUTO_TRACE_ADD(
"related function scopeName='{}' className='{}'",scopeName,className);
7011 if (className.
isEmpty()) className=relates;
7015 bool newMember=
TRUE;
7021 for (
const auto &imd : *mn)
7055 mn->
push_back(std::move(mdDefineTaken));
7069 for (
const auto &irmd : *mn)
7090 addMemberDocs(root,rmd_found,funcDecl,
nullptr,overloaded,spec);
7098 switch (root->
mtype)
7119 funcType,funcName,funcArgs,exceptions,
7122 isMemberOf ? Relationship::Foreign : Relationship::Related,
7142 mmd->setDefinitionTemplateParameterLists(root->
tArgLists);
7144 mmd->setTagInfo(root->
tagInfo());
7158 for (
const auto &irmd : *rmn)
7189 mmd->setBodyDef(fd);
7196 mmd->setMemberClass(cd);
7197 mmd->setMemberSpecifiers(spec);
7198 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7199 mmd->setDefinition(funcDecl);
7204 mmd->setDocsForDefinition(!root->
proto);
7207 mmd->addSectionsToDefinition(root->
anchors);
7208 mmd->setMemberGroupId(root->
mGrpId);
7209 mmd->setLanguage(root->
lang);
7210 mmd->setId(root->
id);
7214 mmd->setRefItems(root->
sli);
7215 if (root->
relatesType==RelatesType::Duplicate) mmd->setRelatedAlso(cd);
7223 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7228 "Cannot determine file/namespace for relatedalso function\n{}",
7242 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
7246 bool globMem =
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec);
7247 if (className.
isEmpty() && !globMem)
7251 else if (!className.
isEmpty() && !globMem)
7254 "member '{}' of class '{}' cannot be found",
7255 funcName,className);
7273 AUTO_TRACE(
"root->type='{}' root->inside='{}' root->name='{}' root->args='{}' section={} root->spec={} root->mGrpId={}",
7288 type=type.
left(i+l);
7299 if (root->
section.isMemberDoc())
7325 else if (root->
section.isOverloadDoc())
7339 (root->
section.isVariable() &&
7351 if (type==
"friend class" || type==
"friend struct" ||
7352 type==
"friend union")
7358 type+
" "+root->
name,
7391 else if (root->
section.isVariableDoc())
7403 else if (root->
section.isExportedInterface() ||
7404 root->
section.isIncludedService())
7410 type +
" " + root->
name,
7423 if (root->
section.isMemberDoc() ||
7424 root->
section.isOverloadDoc() ||
7427 root->
section.isVariableDoc() ||
7429 root->
section.isIncludedService() ||
7430 root->
section.isExportedInterface()
7440 for (
const auto &e : root->
children())
7442 if (!e->section.isEnum())
7454 for (
const auto &objCImpl : root->
children())
7456 if (objCImpl->section.isObjcImpl())
7458 for (
const auto &objCMethod : objCImpl->children())
7460 if (objCMethod->section.isFunction())
7464 objCMethod->relates,
7467 objCMethod->type+
" "+objCImpl->name+
"::"+objCMethod->name+
" "+objCMethod->args,
7469 objCMethod->section=EntryType::makeEmpty();
7488 bool isGlobal =
false;
7489 bool isRelated =
false;
7490 bool isMemberOf =
false;
7500 if (root->
lang==SrcLangExt::CSharp)
7523 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
7558 isMemberOf ? Relationship::Foreign : isRelated ? Relationship::Related : Relationship::Member,
7562 mmd->setTagInfo(root->
tagInfo());
7563 mmd->setLanguage(root->
lang);
7564 mmd->setId(root->
id);
7565 if (!isGlobal) mmd->setMemberClass(cd);
else mmd->setFileDef(fd);
7567 mmd->setBodyDef(root->
fileDef());
7568 mmd->setMemberSpecifiers(root->
spec);
7569 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7570 mmd->setEnumBaseType(root->
args);
7573 mmd->addSectionsToDefinition(root->
anchors);
7574 mmd->setMemberGroupId(root->
mGrpId);
7578 mmd->setRefItems(root->
sli);
7592 mmd->setDefinition(name+baseType);
7596 mmd->setDefinition(nd->
name()+
"::"+name+baseType);
7600 mmd->setNamespace(nd);
7607 if (isGlobal && (nd==
nullptr || !nd->
isAnonymous()))
7609 if (!defSet) mmd->setDefinition(name+baseType);
7610 if (fd==
nullptr && root->
parent())
7616 mmd->setFileDef(fd);
7624 mmd->setDefinition(name+baseType);
7628 mmd->setDefinition(cd->
name()+
"::"+name+baseType);
7634 mmd->setDocsForDefinition(!root->
proto);
7664 bool isGlobal =
false;
7665 bool isRelated =
false;
7675 if (root->
lang==SrcLangExt::CSharp)
7690 if (root->
lang==SrcLangExt::CSharp)
7736 struct EnumValueInfo
7738 EnumValueInfo(
const QCString &n,std::unique_ptr<MemberDef> &&md) :
7739 name(n), member(std::move(md)) {}
7741 std::unique_ptr<MemberDef> member;
7743 std::vector< EnumValueInfo > extraMembers;
7745 for (
const auto &imd : *mn)
7752 for (
const auto &e : root->
children())
7755 bool isJavaLike = sle==SrcLangExt::CSharp || sle==SrcLangExt::Java || sle==SrcLangExt::XML;
7756 if ( isJavaLike || root->
spec.isStrong())
7758 if (sle == SrcLangExt::Cpp && e->section.isDefine())
continue;
7765 i = qualifiedName.
findRev(
"::");
7766 if (i!=-1 && sle==SrcLangExt::CSharp)
7772 qualifiedName=
substitute(qualifiedName,
"::",
".");
7777 if (fileName.
isEmpty() && e->tagInfo())
7779 fileName = e->tagInfo()->tagName;
7783 fileName,e->startLine,e->startColumn,
7784 e->type,e->name,e->args,
QCString(),
7785 e->protection, Specifier::Normal,e->isStatic,Relationship::Member,
7792 fmmd->setNamespace(mnd);
7796 fmmd->setTagInfo(e->tagInfo());
7797 fmmd->setLanguage(e->lang);
7798 fmmd->setBodySegment(e->startLine,e->bodyLine,e->endBodyLine);
7799 fmmd->setBodyDef(e->fileDef());
7801 fmmd->setDocumentation(e->doc,e->docFile,e->docLine);
7802 fmmd->setBriefDescription(e->brief,e->briefFile,e->briefLine);
7803 fmmd->addSectionsToDefinition(e->anchors);
7804 fmmd->setInitializer(e->initializer.str());
7805 fmmd->setMaxInitLines(e->initLines);
7806 fmmd->setMemberGroupId(e->mGrpId);
7807 fmmd->setExplicitExternal(e->explicitExternal,fileName,e->startLine,e->startColumn);
7808 fmmd->setRefItems(e->sli);
7811 fmmd->setEnumScope(md,
TRUE);
7812 extraMembers.emplace_back(e->name,std::move(fmd));
7821 if (!e->name.isEmpty() && (fmn=emnsd->
find(e->name)))
7824 for (
const auto &ifmd : *fmn)
7855 else if (isRelated && cd)
7887 for (
auto &e : extraMembers)
7932 if (gd==
nullptr && !root->
groups.empty())
7946 for (
const auto &g : root->
groups)
7965 "Found non-existing group '{}' for the command '{}', ignoring command",
7979 if (root->
section.isEnumDoc() &&
8005 AUTO_TRACE(
"Found docs for enum with name '{}' and scope '{}' in context '{}' cd='{}', nd='{}' fd='{}'",
8019 for (
const auto &imd : *mn)
8034 else if (cd==
nullptr && mcd==
nullptr && nd!=
nullptr && mnd==nd)
8041 else if (cd==
nullptr && nd==
nullptr && mcd==
nullptr && mnd==
nullptr && fd==mfd)
8066 for (
const auto &mn : mnsd)
8069 for (
const auto &imd : *mn)
8074 int documentedEnumValues=0;
8078 if (fmd->isLinkableInProject()) documentedEnumValues++;
8104 for (
const auto &md : *mn)
8106 index.addClassMemberNameToIndex(md.get());
8107 if (md->getModuleDef())
8109 index.addModuleMemberNameToIndex(md.get());
8117 for (
const auto &md : *mn)
8119 if (md->getNamespaceDef())
8121 index.addNamespaceMemberNameToIndex(md.get());
8125 index.addFileMemberNameToIndex(md.get());
8127 if (md->getModuleDef())
8129 index.addModuleMemberNameToIndex(md.get());
8134 index.sortMemberIndexLists();
8143 if (cd->isLinkableInProject())
8156 if (cd->isLinkableInProject())
8169 if (nd->isLinkableInProject())
8182 for (
const auto &fd : *fn)
8198 std::string s = title.str();
8199 static const reg::Ex re(R
"(\a[\w-]*)");
8202 for (; it!=
end ; ++it)
8204 const auto &match = *it;
8205 std::string matchStr = match.str();
8213 if (gd->isLinkableInProject())
8215 addWordsForTitle(gd.get(),gd->anchor(),gd->groupTitle());
8221 if (pd->isLinkableInProject())
8223 addWordsForTitle(pd.get(),pd->anchor(),pd->title());
8243 if (md->getClassDef())
8247 if (md->getNamespaceDef())
8258 if (md->getGroupDef()) scope = md->getGroupDef();
8259 else if (md->getClassDef()) scope = md->getClassDef();
8260 else if (md->getNamespaceDef()) scope = md->getNamespaceDef();
8261 else if (md->getFileDef()) scope = md->getFileDef();
8267 if (md->isLinkableInProject())
8269 if (!(md->isEnumerate() && md->isAnonymous()))
8274 if (md->isEnumerate())
8276 for (
const auto &fmd : md->enumFieldList())
8289 for (
const auto &md : *mn)
8291 addMemberToIndices(md.get());
8298 for (
const auto &md : *mn)
8300 addMemberToIndices(md.get());
8313 for (
const auto &imd : *mn)
8326 for (
const auto &imd : *mn)
8343 for (
const auto &imd : *mn)
8352 const auto &bmni = bmn.
find(mn->memberName());
8355 for (
const auto &ibmd : *bmni)
8363 lang==SrcLangExt::Python ||
8364 lang==SrcLangExt::Java ||
8365 lang==SrcLangExt::PHP ||
8376 lang==SrcLangExt::Python ||
8383 if (lang==SrcLangExt::Python && md->
name().
startsWith(
"__"))
continue;
8423 if (cd->isLinkable())
8425 for (
const auto &bcd : cd->baseClasses())
8441 for (
const auto &ti : cd->getTemplateInstances())
8460 int i=cd->name().find(
'(');
8467 AUTO_TRACE_ADD(
"merging members of category {} into {}",cd->name(),baseClass->
name());
8482 cd->subClasses().empty() &&
8483 !cd->baseClasses().empty())
8514 msg(
"Generating code for file {}...\n",fd->
docName());
8519 else if (parseSources)
8521 msg(
"Parsing code for file {}...\n",fd->
docName());
8537 for (
const auto &fd : *fn)
8545 for (
const auto &fd : *fn)
8554 clangParser->parse();
8555 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8557 for (
auto incFile : clangParser->filesInSameTU())
8559 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
8561 processedFiles.
find(incFile)==processedFiles.end())
8568 processSourceFile(ifd,*
g_outputList,clangParser.get());
8569 processedFiles.insert(incFile);
8580 for (
const auto &fd : *fn)
8582 if (processedFiles.find(fd->
absFilePath().
str())==processedFiles.end())
8587 clangParser->parse();
8588 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8601 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8604 msg(
"Generating code files using {} threads.\n",numThreads);
8605 struct SourceContext
8608 : fd(fd_), generateSourceFile(gen_), ol(ol_) {}
8610 bool generateSourceFile;
8614 std::vector< std::future< std::shared_ptr<SourceContext> > > results;
8617 for (
const auto &fd : *fn)
8620 auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*
g_outputList);
8621 auto processFile = [ctx]()
8623 if (ctx->generateSourceFile)
8625 msg(
"Generating code for file {}...\n",ctx->fd->docName());
8629 msg(
"Parsing code for file {}...\n",ctx->fd->docName());
8632 ctx->fd->getAllIncludeFilesRecursively(filesInSameTu);
8633 if (ctx->generateSourceFile)
8635 ctx->fd->writeSourceHeader(ctx->ol);
8636 ctx->fd->writeSourceBody(ctx->ol,
nullptr);
8637 ctx->fd->writeSourceFooter(ctx->ol);
8642 ctx->fd->parseSource(
nullptr);
8646 results.emplace_back(threadPool.
queue(processFile));
8649 for (
auto &f : results)
8658 for (
const auto &fd : *fn)
8678 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8684 : fd(fd_), ol(ol_) {}
8689 std::vector< std::future< std::shared_ptr<DocContext> > > results;
8692 for (
const auto &fd : *fn)
8694 bool doc = fd->isLinkableInProject();
8697 auto ctx = std::make_shared<DocContext>(fd.get(),*
g_outputList);
8698 auto processFile = [ctx]() {
8699 msg(
"Generating docs for file {}...\n",ctx->fd->docName());
8700 ctx->fd->writeDocumentation(ctx->ol);
8703 results.emplace_back(threadPool.
queue(processFile));
8707 for (
auto &f : results)
8716 for (
const auto &fd : *fn)
8718 bool doc = fd->isLinkableInProject();
8721 msg(
"Generating docs for file {}...\n",fd->docName());
8740 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8749 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8758 const_cast<FileDef*
>(fd)->addSourceRef(nd->getStartDefLine(),nd.get(),
nullptr);
8765 for (
const auto &md : *mn)
8774 md->isLinkableInProject() &&
8780 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
8786 for (
const auto &md : *mn)
8796 md->isLinkableInProject() &&
8802 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
8819 for (
const auto &def : it->second)
8822 def.fileName,def.lineNr,def.columnNr,
8823 "#define",def.name,def.args,
QCString(),
8828 if (!def.args.isEmpty())
8832 mmd->setInitializer(def.definition);
8833 mmd->setFileDef(def.fileDef);
8834 mmd->setDefinition(
"#define "+def.name);
8839 const MemberList *defMl = def.fileDef->getMemberList(MemberListType::DocDefineMembers());
8848 def.fileDef->insertMember(md.get());
8850 AUTO_TRACE_ADD(
"adding macro {} with definition {}",def.name,def.definition);
8884 for (
const auto &fd : *fn)
8886 fd->sortMemberLists();
8893 gd->sortMemberLists();
8910 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8914 std::vector < std::future< void > > results;
8918 for (
const auto &def : symList)
8921 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
8923 auto processTooltip = [dm]() {
8926 results.emplace_back(threadPool.
queue(processTooltip));
8931 for (
auto &f : results)
8940 for (
const auto &def : symList)
8943 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
8990 for (
const auto &fd : *fn)
9012 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9018 : cd(cd_), ol(ol_) {}
9023 std::vector< std::future< std::shared_ptr<DocContext> > > results;
9024 for (
const auto &cd : classList)
9027 if (cd->getOuterScope()==
nullptr ||
9031 auto ctx = std::make_shared<DocContext>(cd,*
g_outputList);
9032 auto processFile = [ctx]()
9034 msg(
"Generating docs for compound {}...\n",ctx->cd->displayName());
9038 if (!ctx->cd->isHidden() && !ctx->cd->isEmbeddedInOuterScope() &&
9039 ctx->cd->isLinkableInProject() && !ctx->cd->isImplicitTemplateInstance())
9041 ctx->cd->writeDocumentation(ctx->ol);
9042 ctx->cd->writeMemberList(ctx->ol);
9046 ctx->cd->writeDocumentationForInnerClasses(ctx->ol);
9049 results.emplace_back(threadPool.
queue(processFile));
9052 for (
auto &f : results)
9059 for (
const auto &cd : classList)
9063 if (cd->getOuterScope()==
nullptr ||
9069 if ( !cd->isHidden() && !cd->isEmbeddedInOuterScope() &&
9070 cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
9072 msg(
"Generating docs for compound {}...\n",cd->displayName());
9087 for (
const auto &innerCdi : cd->
getClasses())
9092 AUTO_TRACE(
"innerCd={} isLinkable={} isImplicitTemplateInstance={} protectLevelVisible={} embeddedInOuterScope={}",
9101 list.push_back(innerCd);
9109 std::vector<ClassDefMutable*> classList;
9158 for (
const auto &imd : *mn)
9194 for (
const auto &fd : *fn)
9196 fd->combineUsingRelations();
9228 for (
const auto &fd : *fn)
9230 fd->addMembersToMemberGroup();
9245 gd->addMembersToMemberGroup();
9266 for (
const auto &fd : *fn)
9268 fd->distributeMemberGroupDocumentation();
9283 gd->distributeMemberGroupDocumentation();
9313 for (
const auto &fd : *fn)
9315 fd->findSectionsInDocumentation();
9330 gd->findSectionsInDocumentation();
9335 pd->findSectionsInDocumentation();
9340 dd->findSectionsInDocumentation();
9361 elementsToRemove.push_back(ci.first);
9364 for (
const auto &k : elementsToRemove)
9375 for (
const auto &ifmd : *fn)
9389 for (
const auto &imd : *nm)
9421 elementsToRemove.push_back(ci.first);
9424 for (
const auto &k : elementsToRemove)
9433 for (
const auto &ifmd : *fn)
9446 for (
const auto &imd : *nm)
9466 return fd->absFilePath() == root->
fileName;
9513 mmd->setTagInfo(root->
tagInfo());
9514 mmd->setLanguage(root->
lang);
9526 for (
const auto &md : *mn)
9532 for (
const auto &imd : *mn)
9550 for (
const auto &imd : *mn)
9577 warn(root->
fileName,root->
startLine,
"found documented #define {} but ignoring it because ENABLE_PREPROCESSING is NO.", root->
name);
9591 normalizedName =
substitute(normalizedName,
"\\",
"/");
9594 if (root->
docFile==normalizedName)
9596 int lastSlashPos=normalizedName.
findRev(
'/');
9597 if (lastSlashPos!=-1)
9599 normalizedName=normalizedName.
left(lastSlashPos);
9602 if (normalizedName.
at(normalizedName.
length()-1)!=
'/')
9604 normalizedName+=
'/';
9606 DirDef *matchingDir=
nullptr;
9610 if (dir->name().right(normalizedName.
length())==normalizedName)
9615 "\\dir command matches multiple directories.\n"
9616 " Applying the command for directory {}\n"
9617 " Ignoring the command for directory {}",
9618 matchingDir->
name(),dir->name()
9623 matchingDir=dir.get();
9639 warn(root->
fileName,root->
startLine,
"No matching directory found for command \\dir {}",normalizedName);
9651 if (root->
section.isPageDoc())
9658 else if (root->
section.isMainpageDoc())
9678 if (root->
section.isMainpageDoc())
9711 else if (si->
lineNr() != -1)
9713 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {}, line {})",
9718 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {})",
9735 else if (root->
tagInfo()==
nullptr)
9738 "found more than one \\mainpage comment block! (first occurrence: {}, line {}), Skipping current block!",
9748 if (root->
section.isMainpageDoc())
9772 term(
"page defined {} with label {} is a direct "
9773 "subpage of itself! Please remove this cyclic dependency.\n",
9797 term(
"page defined {} with label {} is a subpage "
9798 "of itself! Please remove this cyclic dependency.\n",
9799 warn_line(pd->docFile(),pd->docLine()),pd->name());
9825 if (si->label().left(label.
length())==label)
9827 si->setFileName(rl->listName());
9828 si->setGenerated(
TRUE);
9834 if (!si->generated())
9838 if (!si->fileName().isEmpty() &&
9845 if (si->definition())
9852 gd = (
toMemberDef(si->definition()))->getGroupDef();
9882 if (!pd->getGroupDef() && !pd->isReference())
9884 msg(
"Generating docs for page {}...\n",pd->name());
9899 warn(root->
fileName,root->
startLine,
"Example {} was already documented. Ignoring documentation found here.",root->
name);
9927 indentStr.
fill(
' ',indent);
9929 indentStr.
isEmpty()?
"":indentStr,
9934 for (
const auto &e : root->
children())
9952 si->label(),si->fileName(),si->title(),si->type().level(),si->ref());
9966 msg(
"Generating docs for example {}...\n",pd->name());
9968 if (lang != SrcLangExt::Unknown)
9972 intf->resetCodeParserState();
9974 QCString n=pd->getOutputFileBase();
9981 if (pd->showLineNo())
9983 lineNoOptStr=
"{lineno}";
9989 (pd->briefDescription().isEmpty()?
"":pd->briefDescription()+
"\n\n")+
9990 pd->documentation()+
"\n\n\\include"+lineNoOptStr+
" "+pd->name(),
9992 .setIndexWords(
true)
9993 .setExample(pd->name()));
10006 if (!gd->isReference())
10018 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10024 : cdm(cdm_), ol(ol_) {}
10029 std::vector< std::future< std::shared_ptr<DocContext> > > results;
10031 for (
const auto &cd : classList)
10036 auto ctx = std::make_shared<DocContext>(cdm,*
g_outputList);
10037 auto processFile = [ctx]()
10039 if ( ( ctx->cdm->isLinkableInProject() &&
10040 !ctx->cdm->isImplicitTemplateInstance()
10043 && !ctx->cdm->isHidden() && !ctx->cdm->isEmbeddedInOuterScope()
10046 msg(
"Generating docs for compound {}...\n",ctx->cdm->displayName());
10047 ctx->cdm->writeDocumentation(ctx->ol);
10048 ctx->cdm->writeMemberList(ctx->ol);
10050 ctx->cdm->writeDocumentationForInnerClasses(ctx->ol);
10053 results.emplace_back(threadPool.
queue(processFile));
10057 for (
auto &f : results)
10059 auto ctx = f.get();
10065 for (
const auto &cd : classList)
10070 if ( ( cd->isLinkableInProject() &&
10071 !cd->isImplicitTemplateInstance()
10074 && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
10077 msg(
"Generating docs for compound {}...\n",cd->displayName());
10091 for (
const auto &cd : conceptList)
10096 msg(
"Generating docs for concept {}...\n",cd->name());
10111 if (nd->isLinkableInProject())
10116 msg(
"Generating docs for namespace {}\n",nd->displayName());
10154 QCString cmd=qhgLocation+
" -v 2>&1";
10159 err(
"could not execute {}\n",qhgLocation);
10163 const size_t bufSize = 1024;
10164 char inBuf[bufSize+1];
10165 size_t numRead=fread(inBuf,1,bufSize,f);
10166 inBuf[numRead] =
'\0';
10171 static const reg::Ex versionReg(R
"(Qt (\d+)\.(\d+)\.(\d+))");
10173 std::string s = inBuf;
10180 if (qtVersion>0 && (qtVersion<60000 || qtVersion >= 60205))
10189 err(
"could not execute {}\n",qhgLocation);
10193 std::string output;
10194 while ((numRead=fread(inBuf,1,bufSize,f))>0)
10196 inBuf[numRead] =
'\0';
10228 warn_uncond(
"the dot tool could not be found as '{}'\n",dotPath);
10234 size_t l=dotPath.
length();
10235 for (
size_t i=0;i<l;i++)
if (dotPath.
at(i)==
'/') dotPath.
at(i)=
'\\';
10254 bool updateOnly=
FALSE)
10258 bool writeToStdout=configFile==
"-";
10263 if (!writeToStdout)
10267 msg(
"\n\nConfiguration file '{}' created.\n\n",configFile);
10268 msg(
"Now edit the configuration file and enter\n\n");
10269 if (configFile!=
"Doxyfile" && configFile!=
"doxyfile")
10270 msg(
" doxygen {}\n\n",configFile);
10272 msg(
" doxygen\n\n");
10273 msg(
"to generate the documentation for your project\n\n");
10277 msg(
"\n\nConfiguration file '{}' updated.\n\n",configFile);
10283 term(
"Cannot open file {} for writing\n",configFile);
10298 term(
"Cannot open stdout for writing\n");
10309 int eqPos = tagLine.
find(
'=');
10319 fileName = tagLine;
10325 err(
"Tag file '{}' does not exist or is not a file. Skipping it...\n",fileName);
10336 msg(
"Reading tag file '{}', location '{}'...\n",fileName,destName);
10340 msg(
"Reading tag file '{}'...\n",fileName);
10350 for (
const auto &sheet : latexExtraStyleSheet)
10352 std::string fileName = sheet;
10353 if (!fileName.empty())
10358 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",fileName);
10360 else if (fi.
isDir())
10362 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET is a directory, it has to be a file!\n", fileName);
10381 if (!htmlStyleSheet.
isEmpty())
10388 err(
"Style sheet '{}' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet);
10391 else if (fi.
isDir())
10393 err(
"Style sheet '{}' specified by HTML_STYLESHEET is a directory, it has to be a file!\n",htmlStyleSheet);
10399 copyFile(htmlStyleSheet,destFileName);
10404 for (
const auto &sheet : htmlExtraStyleSheet)
10412 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET does not exist!\n",fileName);
10416 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",fi.
fileName());
10418 else if (fi.
isDir())
10420 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is a directory, it has to be a file!\n",fileName);
10439 err(
"Project logo '{}' specified by PROJECT_LOGO does not exist!\n",projectLogo);
10442 else if (fi.
isDir())
10444 err(
"Project logo '{}' specified by PROJECT_LOGO is a directory, it has to be a file!\n",projectLogo);
10450 copyFile(projectLogo,destFileName);
10464 err(
"Project icon '{}' specified by PROJECT_ICON does not exist!\n",projectIcon);
10467 else if (fi.
isDir())
10469 err(
"Project icon '{}' specified by PROJECT_ICON is a directory, it has to be a file!\n",projectIcon);
10475 copyFile(projectIcon,destFileName);
10483 for (
const auto &fileName : files)
10485 if (!fileName.empty())
10490 err(
"Extra file '{}' specified in {} does not exist!\n", fileName,filesOption);
10492 else if (fi.
isDir())
10494 err(
"Extra file '{}' specified in {} is a directory, it has to be a file!\n", fileName,filesOption);
10520 std::vector<FileEntry> fileEntries;
10521 for (
const auto &fd : *fn)
10523 if (!fd->isReference())
10525 fileEntries.emplace_back(fd->getPath(),fd.get());
10529 size_t size = fileEntries.size();
10533 FileDef *fd = fileEntries[0].fileDef;
10539 std::stable_sort(fileEntries.begin(),
10541 [](
const FileEntry &fe1,
const FileEntry &fe2)
10542 { return qstricmp_sort(fe1.path,fe2.path)<0; }
10547 const FileEntry &first = fileEntries[0];
10548 const FileEntry &last = fileEntries[size-1];
10549 int first_path_size =
static_cast<int>(first.path.size())-1;
10550 int last_path_size =
static_cast<int>(last.path.size())-1;
10553 for (i=0;i<first_path_size && i<last_path_size;i++)
10555 if (first.path[i]==
'/') j=i;
10556 if (first.path[i]!=last.path[i])
break;
10558 if (i==first_path_size && i<last_path_size && last.path[i]==
'/')
10563 else if (i==last_path_size && i<first_path_size && first.path[i]==
'/')
10570 for (
auto &fileEntry : fileEntries)
10572 QCString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
10573 fileEntry.fileDef->setName(
prefix+fn->fileName());
10575 fileEntry.fileDef->setDiskName(
prefix+fn->fileName());
10589 int sep = fileName.
findRev(
'/');
10590 int ei = fileName.
findRev(
'.');
10591 if (ei!=-1 && (sep==-1 || ei>sep))
10597 extension =
".no_extension";
10610 int ei = fileName.
findRev(
'.');
10617 extension =
".no_extension";
10621 std::string preBuf;
10628 for (
const auto &s : includePath)
10634 msg(
"Preprocessing {}...\n",fn);
10641 msg(
"Reading {}...\n",fn);
10646 std::string convBuf;
10647 convBuf.reserve(preBuf.size()+1024);
10652 std::shared_ptr<Entry> fileRoot = std::make_shared<Entry>();
10656 if (newTU) clangParser->
parse();
10659 parser.
parseInput(fileName,convBuf.
data(),fileRoot,clangParser);
10660 fileRoot->setFileDef(fd);
10677 filesToProcess.insert(s);
10680 std::mutex processedFilesLock;
10682 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10683 msg(
"Processing input using {} threads.\n",numThreads);
10685 using FutureType = std::vector< std::shared_ptr<Entry> >;
10686 std::vector< std::future< FutureType > > results;
10689 bool ambig =
false;
10696 auto processFile = [qs,&filesToProcess,&processedFilesLock,&processedFiles]() {
10697 bool ambig_l =
false;
10698 std::vector< std::shared_ptr<Entry> > roots;
10702 auto fileRoot {
parseFile(*parser.get(),fd_l,qs,clangParser.get(),
true) };
10703 roots.push_back(fileRoot);
10707 for (
auto incFile : clangParser->filesInSameTU())
10710 if (filesToProcess.find(incFile)!=filesToProcess.end())
10712 bool needsToBeProcessed =
false;
10714 std::lock_guard<std::mutex> lock(processedFilesLock);
10715 needsToBeProcessed = processedFiles.find(incFile)==processedFiles.end();
10716 if (needsToBeProcessed) processedFiles.insert(incFile);
10718 if (qincFile!=qs && needsToBeProcessed)
10724 fileRoot =
parseFile(*parser.get(),ifd,qincFile,clangParser.get(),
false);
10725 roots.push_back(fileRoot);
10733 results.emplace_back(threadPool.
queue(processFile));
10737 for (
auto &f : results)
10742 root->moveToSubEntryAndKeep(e);
10749 if (processedFiles.find(s)==processedFiles.end())
10752 auto processFile = [s]() {
10753 bool ambig =
false;
10755 std::vector< std::shared_ptr<Entry> > roots;
10762 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
10763 roots.push_back(fileRoot);
10767 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10768 roots.push_back(fileRoot);
10772 results.emplace_back(threadPool.
queue(processFile));
10776 for (
auto &f : results)
10781 root->moveToSubEntryAndKeep(e);
10788 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10789 msg(
"Processing input using {} threads.\n",numThreads);
10791 using FutureType = std::shared_ptr<Entry>;
10792 std::vector< std::future< FutureType > > results;
10796 auto processFile = [s]() {
10797 bool ambig =
false;
10801 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10805 results.emplace_back(threadPool.
queue(processFile));
10808 for (
auto &f : results)
10810 root->moveToSubEntryAndKeep(f.get());
10828 filesToProcess.insert(s);
10834 bool ambig =
false;
10842 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
10843 root->moveToSubEntryAndKeep(fileRoot);
10844 processedFiles.insert(s);
10848 for (
auto incFile : clangParser->filesInSameTU())
10851 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
10852 processedFiles.find(incFile)==processedFiles.end())
10858 fileRoot =
parseFile(*parser.get(),ifd,incFile,clangParser.get(),
false);
10859 root->moveToSubEntryAndKeep(fileRoot);
10860 processedFiles.insert(incFile);
10869 if (processedFiles.find(s)==processedFiles.end())
10871 bool ambig =
false;
10878 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
10879 root->moveToSubEntryAndKeep(fileRoot);
10884 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10885 root->moveToSubEntryAndKeep(fileRoot);
10887 processedFiles.insert(s);
10896 bool ambig =
false;
10901 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10902 root->moveToSubEntryAndKeep(std::move(fileRoot));
10922 sepPos = result.
find(
'/',2);
10924 sepPos = result.
find(
'/',sepPos+1);
10926 sepPos = result.
find(
'/',sepPos+1);
10929 if (nonSymlinks.find(
prefix.str())==nonSymlinks.end())
10946 target+=result.
mid(sepPos);
10949 if (known.find(result.
str())!=known.end())
return std::string();
10950 known.insert(result.
str());
10963 nonSymlinks.insert(
prefix.str());
10969 while (sepPos!=-1);
10988 bool errorIfNotExist,
10995 if (paths && !dirName.empty())
10997 paths->insert(dirName);
11003 if (dirName.empty())
11018 msg(
"Searching for files in directory {}\n", fi->
absFilePath());
11023 for (
const auto &dirEntry : dir.
iterator())
11026 auto checkPatterns = [&]() ->
bool
11028 return (patList==
nullptr ||
patternMatch(cfi,*patList)) &&
11029 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11030 (killSet==
nullptr || killSet->find(cfi.
absFilePath())==killSet->end());
11033 if (exclSet==
nullptr || exclSet->find(cfi.
absFilePath())==exclSet->end())
11041 if (errorIfNotExist && checkPatterns())
11046 else if (cfi.
isFile() && checkPatterns())
11049 std::string path=cfi.
dirPath()+
"/";
11050 std::string fullName=path+name;
11057 fn = fnMap->
add(name,fullName);
11058 fn->push_back(std::move(fd));
11061 dirResultList.push_back(fullName);
11062 if (resultSet) resultSet->insert(fullName);
11063 if (killSet) killSet->insert(fullName);
11065 else if (recursive &&
11067 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11072 patList,exclPatList,&dirResultList,resultSet,errorIfNotExist,
11073 recursive,killSet,paths);
11077 if (resultList && !dirResultList.empty())
11080 std::stable_sort(dirResultList.begin(),
11081 dirResultList.end(),
11082 [](
const auto &f1,
const auto &f2) { return qstricmp_sort(f1.c_str(),f2.c_str())<0; });
11085 resultList->insert(resultList->end(), dirResultList.begin(), dirResultList.end());
11102 bool errorIfNotExist,
11116 if (exclSet==
nullptr || exclSet->find(fi.
absFilePath())==exclSet->end())
11123 if (errorIfNotExist)
11125 warn_uncond(
"source '{}' is not a readable file or directory... skipping.\n",s);
11130 std::string dirPath = fi.
dirPath(
true);
11132 if (paths && !dirPath.empty())
11134 paths->insert(dirPath);
11137 if (killSet==
nullptr || killSet->find(filePath)==killSet->end())
11146 fn->push_back(std::move(fd));
11149 if (resultList || resultSet)
11151 if (resultList) resultList->push_back(filePath);
11152 if (resultSet) resultSet->insert(filePath);
11158 else if (fi.
isDir())
11160 readDir(&fi,fnMap,exclSet,patList,
11161 exclPatList,resultList,resultSet,errorIfNotExist,
11162 recursive,killSet,paths);
11176 anchor=
":"+md->
anchor();
11185 t <<
"REPLACE INTO symbols (symbol_id,scope_id,name,file,line) VALUES('"
11186 << fn+anchor <<
"','"
11188 << d->
name() <<
"','"
11202 for (
const auto &def : symList)
11214 msg(
"Developer parameters:\n");
11215 msg(
" -m dump symbol map\n");
11216 msg(
" -b making messages output unbuffered\n");
11217 msg(
" -c <file> process input file as a comment block and produce HTML output\n");
11219 msg(
" -t [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout)\n");
11220 msg(
" -t_time [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout),\n"
11221 " and include time and thread information\n");
11223 msg(
" -d <level> enable a debug level, such as (multiple invocations of -d are possible):\n");
11234 QCString versionString = getFullVersion();
11235 msg(
"{}\n",versionString);
11239 if (!extVers.
isEmpty()) extVers+=
", ";
11240 extVers +=
"sqlite3 ";
11241 extVers += sqlite3_libversion();
11243 if (!extVers.
isEmpty()) extVers+=
", ";
11244 extVers +=
"clang support ";
11245 extVers += CLANG_VERSION_STRING;
11249 int lastComma = extVers.
findRev(
',');
11250 if (lastComma != -1) extVers = extVers.
replace(lastComma,1,
" and");
11251 msg(
" with {}.\n",extVers);
11262 msg(
"Doxygen version {0}\nCopyright Dimitri van Heesch 1997-2025\n\n"
11263 "You can use Doxygen in a number of ways:\n\n"
11264 "1) Use Doxygen to generate a template configuration file*:\n"
11265 " {1} [-s] -g [configName]\n\n"
11266 "2) Use Doxygen to update an old configuration file*:\n"
11267 " {1} [-s] -u [configName]\n\n"
11268 "3) Use Doxygen to generate documentation using an existing "
11269 "configuration file*:\n"
11270 " {1} [configName]\n\n"
11271 "4) Use Doxygen to generate a template file controlling the layout of the\n"
11272 " generated documentation:\n"
11273 " {1} -l [layoutFileName]\n\n"
11274 " In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.\n"
11275 " If - is used for layoutFileName Doxygen will write to standard output.\n\n"
11276 "5) Use Doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"
11277 " RTF: {1} -w rtf styleSheetFile\n"
11278 " HTML: {1}-w html headerFile footerFile styleSheetFile [configFile]\n"
11279 " LaTeX: {1} -w latex headerFile footerFile styleSheetFile [configFile]\n\n"
11280 "6) Use Doxygen to generate a rtf extensions file\n"
11281 " {1} -e rtf extensionsFile\n\n"
11282 " If - is used for extensionsFile Doxygen will write to standard output.\n\n"
11283 "7) Use Doxygen to compare the used configuration file with the template configuration file\n"
11284 " {1} -x [configFile]\n\n"
11285 " Use Doxygen to compare the used configuration file with the template configuration file\n"
11286 " without replacing the environment variables or CMake type replacement variables\n"
11287 " {1} -x_noenv [configFile]\n\n"
11288 "8) Use Doxygen to show a list of built-in emojis.\n"
11289 " {1} -f emoji outputFileName\n\n"
11290 " If - is used for outputFileName Doxygen will write to standard output.\n\n"
11291 "*) If -s is specified the comments of the configuration items in the config file will be omitted.\n"
11292 " If configName is omitted 'Doxyfile' will be used as a default.\n"
11293 " If - is used for configFile Doxygen will write / read the configuration to /from standard output / input.\n\n"
11294 "If -q is used for a Doxygen documentation run, Doxygen will see this as if QUIET=YES has been set.\n\n"
11295 "-v print version string, -V print extended version information\n"
11296 "-h,-? prints usage help information\n"
11297 "{1} -d prints additional usage flags for debugging purposes\n",versionString,name);
11304static const char *
getArg(
int argc,
char **argv,
int &optInd)
11307 if (
qstrlen(&argv[optInd][2])>0)
11308 s=&argv[optInd][2];
11309 else if (optInd+1<argc && argv[optInd+1][0]!=
'-')
11328 return []() {
return std::make_unique<T>(); };
11336 std::setlocale(LC_ALL,
"");
11337 std::setlocale(LC_CTYPE,
"C");
11338 std::setlocale(LC_NUMERIC,
"C");
11437 while (v!=0) v>>=1,r++;
11441 return std::max(0,std::min(r-16,9));
11446 QCString versionString = getFullVersion();
11449 auto writeFile = [](
const char *fileName,std::function<void(
TextStream&)> func) ->
bool
11469 bool genConfig=
false;
11470 bool shortList=
false;
11471 bool traceTiming=
false;
11473 bool updateConfig=
false;
11474 bool quiet =
false;
11475 while (optInd<argc && argv[optInd][0]==
'-' &&
11476 (isalpha(argv[optInd][1]) || argv[optInd][1]==
'?' ||
11477 argv[optInd][1]==
'-')
11480 switch(argv[optInd][1])
11490 if (optInd+1>=argc)
11492 layoutName=
"DoxygenLayout.xml";
11496 layoutName=argv[optInd+1];
11504 if (optInd+1>=argc)
11506 msg(
"option \"-c\" is missing the file name to read\n");
11531 msg(
"option \"-d\" has unknown debug specifier: \"{}\".\n",debugLabel);
11541 if (!strcmp(argv[optInd]+1,
"t_time"))
11543 traceTiming =
true;
11545 else if (!strcmp(argv[optInd]+1,
"t"))
11547 traceTiming =
false;
11551 err(
"option should be \"-t\" or \"-t_time\", found: \"{}\".\n",argv[optInd]);
11555 if (optInd+1>=argc || argv[optInd+1][0] ==
'-')
11557 traceName=
"stdout";
11561 traceName=argv[optInd+1];
11565 err(
"support for option \"-t\" has not been compiled in (use a debug build or a release build with tracing enabled).\n");
11576 err(
"option should be \"-x\" or \"-x_noenv\", found: \"{}\".\n",argv[optInd]);
11592 err(
"option \"-e\" is missing format specifier rtf.\n");
11598 if (optInd+1>=argc)
11600 err(
"option \"-e rtf\" is missing an extensions file name\n");
11608 err(
"option \"-e\" has invalid format specifier.\n");
11618 err(
"option \"-f\" is missing list specifier.\n");
11624 if (optInd+1>=argc)
11626 err(
"option \"-f emoji\" is missing an output file name\n");
11634 err(
"option \"-f\" has invalid list specifier.\n");
11644 err(
"option \"-w\" is missing format specifier rtf, html or latex\n");
11650 if (optInd+1>=argc)
11652 err(
"option \"-w rtf\" is missing a style sheet file name\n");
11658 err(
"error opening RTF style sheet file {}!\n",argv[optInd+1]);
11668 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11674 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
11679 if (optInd+3>=argc)
11681 err(
"option \"-w html\" does not have enough arguments\n");
11698 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11703 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
11708 if (optInd+3>=argc)
11710 err(
"option \"-w latex\" does not have enough arguments\n");
11726 err(
"Illegal format specifier \"{}\": should be one of rtf, html or latex\n",formatName);
11746 if (
qstrcmp(&argv[optInd][2],
"help")==0)
11748 usage(argv[0],versionString);
11751 else if (
qstrcmp(&argv[optInd][2],
"version")==0)
11757 else if ((
qstrcmp(&argv[optInd][2],
"Version")==0) ||
11758 (
qstrcmp(&argv[optInd][2],
"VERSION")==0))
11766 err(
"Unknown option \"-{}\"\n",&argv[optInd][1]);
11767 usage(argv[0],versionString);
11772 setvbuf(stdout,
nullptr,_IONBF,0);
11779 usage(argv[0],versionString);
11783 err(
"Unknown option \"-{:c}\"\n",argv[optInd][1]);
11784 usage(argv[0],versionString);
11795 TRACE(
"Doxygen version used: {}",getFullVersion());
11798 FileInfo configFileInfo1(
"Doxyfile"),configFileInfo2(
"doxyfile");
11801 if (configFileInfo1.exists())
11803 configName=
"Doxyfile";
11805 else if (configFileInfo2.
exists())
11807 configName=
"doxyfile";
11809 else if (genConfig)
11811 configName=
"Doxyfile";
11815 err(
"Doxyfile not found and no input file specified!\n");
11816 usage(argv[0],versionString);
11823 if (fi.
exists() ||
qstrcmp(argv[optInd],
"-")==0 || genConfig)
11825 configName=argv[optInd];
11829 err(
"configuration file {} not found!\n",argv[optInd]);
11830 usage(argv[0],versionString);
11844 err(
"could not open or read configuration file {}!\n",configName);
11915 for (
const auto &mapping : extMaps)
11918 int i=mapStr.
find(
'=');
11934 err(
"Failed to map file extension '{}' to unsupported language '{}'.\n"
11935 "Check the EXTENSION_MAPPING setting in the config file.\n",
11940 msg(
"Adding custom extension mapping: '{}' will be treated as language '{}'\n",
11949 if (cd==
reinterpret_cast<void *
>(-1))
11951 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
11952 "Check the 'INPUT_ENCODING' setting in the config file!\n",
11962 for (
const auto &mapping : fileEncod)
11965 int i=mapStr.
find(
'=');
11979 if (cd==
reinterpret_cast<void *
>(-1))
11981 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
11982 "Check the 'INPUT_FILE_ENCODING' setting in the config file!\n",
11983 encoding,strerror(errno));
11996 for (
const auto &s : expandAsDefinedList)
12014 signal(SIGINT,SIG_DFL);
12016 msg(
"Cleaning up...\n");
12031 if (generateTagFile.
isEmpty())
return;
12036 err(
"cannot open tag file {} for writing\n", generateTagFile);
12040 tagFile <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
12041 tagFile <<
"<tagfile doxygen_version=\"" << getDoxygenVersion() <<
"\"";
12042 std::string gitVersion = getGitVersion();
12043 if (!gitVersion.empty())
12045 tagFile <<
" doxygen_gitid=\"" << gitVersion <<
"\"";
12052 for (
const auto &fd : *fn)
12054 if (fd->isLinkableInProject()) fd->writeTagFile(tagFile);
12087 if (gd->isLinkableInProject()) gd->writeTagFile(tagFile);
12092 if (mod->isLinkableInProject()) mod->writeTagFile(tagFile);
12097 if (pd->isLinkableInProject()) pd->writeTagFile(tagFile);
12102 if (dd->isLinkableInProject()) dd->writeTagFile(tagFile);
12106 tagFile <<
"</tagfile>\n";
12114 msg(
"Exiting...\n");
12124 const char *defaultDirName)
12129 result = baseDirName + defaultDirName;
12131 else if (formatDirName[0]!=
'/' && (formatDirName.
length()==1 || formatDirName[1]!=
':'))
12133 result.
prepend(baseDirName+
"/");
12135 Dir formatDir(result.
str());
12138 term(
"Could not create output directory {}\n", result);
12152 g_s.begin(
"Searching for include files...\n");
12155 for (
const auto &s : includePathList)
12173 g_s.begin(
"Searching for example files...\n");
12176 for (
const auto &s : examplePathList)
12191 g_s.begin(
"Searching for images...\n");
12194 for (
const auto &s : imagePathList)
12209 g_s.begin(
"Searching for dot files...\n");
12212 for (
const auto &s : dotFileList)
12227 g_s.begin(
"Searching for msc files...\n");
12230 for (
const auto &s : mscFileList)
12245 g_s.begin(
"Searching for dia files...\n");
12248 for (
const auto &s : diaFileList)
12263 g_s.begin(
"Searching for plantuml files...\n");
12266 for (
const auto &s : plantUmlFileList)
12281 g_s.begin(
"Searching for files to exclude\n");
12283 for (
const auto &s : excludeList)
12301 g_s.begin(
"Searching INPUT for files to process...\n");
12305 for (
const auto &s : inputList)
12308 size_t l = path.
length();
12312 if (path.
at(l-1)==
'\\' || path.
at(l-1)==
'/') path=path.
left(l-1);
12332 [](
const auto &f1,
const auto &f2)
12338 if (fileName->size()>1)
12340 std::stable_sort(fileName->begin(),fileName->end(),[](
const auto &f1,
const auto &f2)
12342 return qstricmp_sort(f1->absFilePath(),f2->absFilePath())<0;
12348 warn_uncond(
"No files to be processed, please check your settings, in particular INPUT, FILE_PATTERNS, and RECURSIVE\n");
12359 if (mdfileAsMainPage.
isEmpty())
return;
12363 warn_uncond(
"Specified markdown mainpage '{}' does not exist\n",mdfileAsMainPage);
12366 bool ambig =
false;
12369 warn_uncond(
"Specified markdown mainpage '{}' has not been defined as input file\n",mdfileAsMainPage);
12388 QCString versionString = getFullVersion();
12389 msg(
"Doxygen version used: {}\n",versionString);
12399 if (outputDirectory.
isEmpty())
12405 Dir dir(outputDirectory.
str());
12409 if (!dir.
mkdir(outputDirectory.
str()))
12411 term(
"tag OUTPUT_DIRECTORY: Output directory '{}' does not "
12412 "exist and cannot be created\n",outputDirectory);
12416 msg(
"Notice: Output directory '{}' does not exist. "
12417 "I have created it for you.\n", outputDirectory);
12432 if (cacheSize<0) cacheSize=0;
12433 if (cacheSize>9) cacheSize=9;
12434 uint32_t lookupSize = 65536 << cacheSize;
12473 bool generateSitemap = !sitemapUrl.
isEmpty();
12474 if (generateSitemap && !sitemapUrl.
endsWith(
"/"))
12481 bool generateEclipseHelp =
Config_getBool(GENERATE_ECLIPSEHELP);
12495 if (generateDocbook)
12542 newFontPath+=curFontPath;
12558 bool defaultLayoutUsed =
FALSE;
12559 if (layoutFileName.
isEmpty())
12562 defaultLayoutUsed =
TRUE;
12564 AUTO_TRACE_ADD(
"defaultLayoutUsed={}, layoutFileName={}",defaultLayoutUsed,layoutFileName);
12569 msg(
"Parsing layout file {}...\n",layoutFileName);
12572 else if (!defaultLayoutUsed)
12574 warn_uncond(
"failed to open layout file '{}' for reading! Using default settings.\n",layoutFileName);
12584 if (generateHtml) exclPatterns.push_back(htmlOutput.
str());
12585 if (generateDocbook) exclPatterns.push_back(docbookOutput.
str());
12586 if (generateXml) exclPatterns.push_back(xmlOutput.
str());
12587 if (generateLatex) exclPatterns.push_back(latexOutput.
str());
12588 if (generateRtf) exclPatterns.push_back(rtfOutput.
str());
12589 if (generateMan) exclPatterns.push_back(manOutput.
str());
12609 if (generateDocbook)
12620 std::shared_ptr<Entry> root = std::make_shared<Entry>();
12624 msg(
"Reading and parsing tag files\n");
12626 for (
const auto &s : tagFileList)
12638 g_s.begin(
"Parsing files\n");
12678 g_s.begin(
"Building macro definition list...\n");
12682 g_s.begin(
"Building group list...\n");
12687 g_s.begin(
"Building directory list...\n");
12692 g_s.begin(
"Building namespace list...\n");
12697 g_s.begin(
"Building file list...\n");
12701 g_s.begin(
"Building class list...\n");
12705 g_s.begin(
"Building concept list...\n");
12713 g_s.begin(
"Computing nesting relations for classes...\n");
12726 g_s.begin(
"Associating documentation with classes...\n");
12730 g_s.begin(
"Associating documentation with concepts...\n");
12735 g_s.begin(
"Associating documentation with modules...\n");
12739 g_s.begin(
"Building example list...\n");
12743 g_s.begin(
"Searching for enumerations...\n");
12751 g_s.begin(
"Searching for documented typedefs...\n");
12757 g_s.begin(
"Searching for documented sequences...\n");
12761 g_s.begin(
"Searching for documented dictionaries...\n");
12766 g_s.begin(
"Searching for members imported via using declarations...\n");
12773 g_s.begin(
"Searching for included using directives...\n");
12777 g_s.begin(
"Searching for documented variables...\n");
12781 g_s.begin(
"Building interface member list...\n");
12784 g_s.begin(
"Building member list...\n");
12788 g_s.begin(
"Searching for friends...\n");
12792 g_s.begin(
"Searching for documented defines...\n");
12796 g_s.begin(
"Computing class inheritance relations...\n");
12801 g_s.begin(
"Computing class usage relations...\n");
12807 g_s.begin(
"Searching for tag less structs...\n");
12812 g_s.begin(
"Flushing cached template relations that have become invalid...\n");
12816 g_s.begin(
"Warn for undocumented namespaces...\n");
12820 g_s.begin(
"Computing class relations...\n");
12831 g_s.begin(
"Add enum values to enums...\n");
12836 g_s.begin(
"Searching for member function documentation...\n");
12848 g_s.begin(
"Creating members for template instances...\n");
12852 g_s.begin(
"Building page list...\n");
12856 g_s.begin(
"Search for main page...\n");
12861 g_s.begin(
"Computing page relations...\n");
12866 g_s.begin(
"Determining the scope of groups...\n");
12870 g_s.begin(
"Computing module relations...\n");
12872 mm.resolvePartitions();
12873 mm.resolveImports();
12874 mm.collectExportedSymbols();
12893 return i==0 ?
qstricmp_sort(c1->name(), c2->name())<0 : i<0;
12907 g_s.begin(
"Sorting lists...\n");
12928 g_s.begin(
"Determining which enums are documented\n");
12932 g_s.begin(
"Computing member relations...\n");
12937 g_s.begin(
"Building full member lists recursively...\n");
12941 g_s.begin(
"Adding members to member groups.\n");
12947 g_s.begin(
"Distributing member group documentation.\n");
12952 g_s.begin(
"Computing member references...\n");
12958 g_s.begin(
"Inheriting documentation...\n");
12966 g_s.begin(
"Generating disk names...\n");
12970 g_s.begin(
"Adding source references...\n");
12974 g_s.begin(
"Adding xrefitems...\n");
12979 g_s.begin(
"Sorting member lists...\n");
12983 g_s.begin(
"Setting anonymous enum type...\n");
12987 g_s.begin(
"Computing dependencies between directories...\n");
12991 g_s.begin(
"Generating citations page...\n");
12995 g_s.begin(
"Counting members...\n");
12999 g_s.begin(
"Counting data structures...\n");
13003 g_s.begin(
"Resolving user defined references...\n");
13007 g_s.begin(
"Finding anchors and sections in the documentation...\n");
13011 g_s.begin(
"Transferring function references...\n");
13015 g_s.begin(
"Combining using relations...\n");
13020 g_s.begin(
"Adding members to index pages...\n");
13025 g_s.begin(
"Correcting members for VHDL...\n");
13029 g_s.begin(
"Computing tooltip texts...\n");
13037 [](
const auto &g1,
const auto &g2)
13038 {
return g1->groupTitle() < g2->groupTitle(); });
13042 gd->sortSubGroups();
13086 if (generateDocbook)
13106 err(
"USE_HTAGS is YES but htags(1) failed. \n");
13108 err(
"htags(1) ended normally but failed to load the filemap. \n");
13115 g_s.begin(
"Generating style sheet...\n");
13123 g_s.begin(
"Generating search indices...\n");
13124 if (searchEngine && !serverBasedSearch && generateHtml)
13132 if (generateHtml && searchEngine)
13135 Dir searchDir(searchDirName.
str());
13136 if (!searchDir.
exists() && !searchDir.
mkdir(searchDirName.
str()))
13138 term(
"Could not create search results directory '{}' $PWD='{}'\n",
13142 if (!serverBasedSearch)
13164 if (generateDocbook)
13180 g_s.begin(
"Generating images for formulas in HTML...\n");
13187 g_s.begin(
"Generating images for formulas in RTF...\n");
13194 g_s.begin(
"Generating images for formulas in Docbook...\n");
13199 g_s.begin(
"Generating example documentation...\n");
13203 g_s.begin(
"Generating file sources...\n");
13207 g_s.begin(
"Generating file documentation...\n");
13211 g_s.begin(
"Generating page documentation...\n");
13215 g_s.begin(
"Generating group documentation...\n");
13219 g_s.begin(
"Generating class documentation...\n");
13223 g_s.begin(
"Generating concept documentation...\n");
13227 g_s.begin(
"Generating module documentation...\n");
13231 g_s.begin(
"Generating namespace documentation...\n");
13237 g_s.begin(
"Generating graph info page...\n");
13242 g_s.begin(
"Generating directory documentation...\n");
13251 g_s.begin(
"finalizing index lists...\n");
13255 g_s.begin(
"writing tag file...\n");
13261 g_s.begin(
"Generating XML output...\n");
13269 g_s.begin(
"Generating SQLITE3 output...\n");
13276 g_s.begin(
"Generating AutoGen DEF output...\n");
13282 g_s.begin(
"Generating Perl module output...\n");
13286 if (generateHtml && searchEngine && serverBasedSearch)
13288 g_s.begin(
"Generating search index\n");
13298 if (searchDataFile.
isEmpty())
13300 searchDataFile=
"searchdata.xml";
13313 g_s.begin(
"Combining RTF output...\n");
13316 err(
"An error occurred during post-processing the RTF files!\n");
13321 g_s.begin(
"Running plantuml with JAVA...\n");
13327 g_s.begin(
"Running dot...\n");
13332 if (generateHtml &&
13336 g_s.begin(
"Running html help compiler...\n");
13341 if ( generateHtml &&
13345 g_s.begin(
"Running qhelpgenerator...\n");
13352 msg(
"type lookup cache used {}/{} hits={} misses={}\n",
13357 msg(
"symbol lookup cache used {}/{} hits={} misses={}\n",
13364 int cacheParam = std::max(typeCacheParam,symbolCacheParam);
13367 msg(
"Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is {} at the cost of higher memory usage.\n",cacheParam);
13373 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
13374 if (numThreads<1) numThreads=1;
13375 msg(
"Total elapsed time: {:.6f} seconds\n(of which an average of {:.6f} seconds per thread waiting for external tools to finish)\n",
13382 msg(
"finished...\n");
13387 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 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 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 bool isImplicitTemplateInstance() const =0
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 ClassDef * insertTemplateInstance(const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance)=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 clearFlag(const DebugMask mask)
static bool isFlagSet(const DebugMask mask)
static void print(DebugMask mask, int prio, fmt::format_string< Args... > fmt, Args &&... args)
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.
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 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)
const T * find(const std::string &key) const
Container class representing a vector of objects with keys.
const T * find(const std::string &key) const
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 redefineCount() 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.
const MemberDef * find(const QCString &name) const
const MemberDef * findRev(const QCString &name) const
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
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
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
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())
SectionInfo * add(const SectionInfo &si)
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
const Definition * resolveSymbol(const Definition *scope, const QCString &name, const QCString &args=QCString(), bool checkCV=false, bool insideCode=false, bool onlyLinkable=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.
Class to iterate 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 int findEndOfTemplate(const QCString &s, size_t startPos)
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)
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, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
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)
#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
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)
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)
bool matchTemplateArguments(const ArgumentList &srcAl, const ArgumentList &dstAl)
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 mangleCSharpGenericName(const QCString &name)
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.