22#include <unordered_map>
120#pragma GCC diagnostic push
121#pragma GCC diagnostic ignored "-Wshadow"
123#include <clang/Basic/Version.h>
125#pragma GCC diagnostic pop
132#if !defined(_WIN32) || defined(__CYGWIN__)
200{
"template class",
"template struct",
"class",
"struct",
"union",
"interface",
"exception" };
237 stats.emplace_back(name,0);
238 startTime = std::chrono::steady_clock::now();
242 std::chrono::steady_clock::time_point endTime = std::chrono::steady_clock::now();
243 stats.back().elapsed =
static_cast<double>(std::chrono::duration_cast<
244 std::chrono::microseconds>(endTime -
startTime).count())/1000000.0;
255 msg(
"----------------------\n");
256 for (
const auto &s :
stats)
258 msg(
"Spent {:.6f} seconds in {}",s.elapsed,s.name);
321 scope+=
"::"+pd->
name();
364 ((!includeExternal && root->
tagInfo()==
nullptr) ||
365 ( includeExternal && root->
tagInfo()!=
nullptr))
368 AUTO_TRACE(
"additional={} includeExternal={}",additional,includeExternal);
384 "group {}: ignoring title \"{}\" that does not match old title \"{}\"",
404 std::unique_ptr<GroupDef>(
411 std::unique_ptr<GroupDef>(
461 scope+=
"::"+gd->
name();
513 bool save_ambig = ambig;
524 fn = fn.
left(newIndex)+
"/"+root->
name;
527 if (!fd) ambig = save_ambig;
558 "Found non-existing group '{}' for the command '{}', ignoring command",
567 text.
sprintf(
"the name '%s' supplied as "
568 "the argument in the \\file statement ",
572 text+=
"matches the following input files:\n";
575 text+=
"Please use a more specific name by "
576 "including a (larger) part of the path!";
580 text+=
"is not an input file";
588template<
class DefMutable>
602 if (!includeFile.
isEmpty() && includeFile.
at(0)==
'"')
605 includeFile=includeFile.
mid(1,includeFile.
length()-2);
607 else if (!includeFile.
isEmpty() && includeFile.
at(0)==
'<')
610 includeFile=includeFile.
mid(1,includeFile.
length()-2);
622 text.
sprintf(
"the name '%s' supplied as "
623 "the argument of the \\class, \\struct, \\union, or \\include command ",
628 text+=
"matches the following input files:\n";
631 text+=
"Please use a more specific name by "
632 "including a (larger) part of the path!";
636 text+=
"is not an input file";
640 else if (includeFile.
isEmpty() && ifd &&
654 if (iName.
at(0)==
'<') local=
FALSE;
655 else if (iName.
at(0)==
'"') local=
TRUE;
656 if (iName.
at(0)==
'"' || iName.
at(0)==
'<')
679 cd->setIncludeFile(
nullptr,iName,local,
TRUE);
692 for (
size_t i=0;i<l;i++)
696 else if (c==
')' && round>0) round--;
697 else if (c==
'<' && round==0) count++;
702 if (c==
'>' && round==0 && count>0) count--;
725 if (idx==-1)
return prevScope;
727 if (nsName.
isEmpty())
return prevScope;
728 if (!fullScope.
isEmpty()) fullScope+=
"::";
733 if (nd==
nullptr) cd =
getClass(fullScope);
734 if (nd==
nullptr && cd)
738 else if (nd==
nullptr && cd==
nullptr && fullScope.
find(
'<')==-1)
746 "[generated]",1,1,fullScope,
764 if (prevScopeMutable)
796 int p=i1+l1,l2=0,i2=0;
804 if (resultScope==
nullptr)
815 if (resultScope!=
nullptr)
break;
874 auto alIt = tArgLists.begin();
875 while ((i=name.
find(
"::",p))!=-1 && alIt!=tArgLists.end())
891 return alIt!=tArgLists.end() ?
892 std::make_unique<ArgumentList>(*alIt) :
893 std::unique_ptr<ArgumentList>();
901 if (specifier.isStruct())
903 else if (specifier.isUnion())
905 else if (specifier.isCategory())
907 else if (specifier.isInterface())
909 else if (specifier.isProtocol())
911 else if (specifier.isException())
913 else if (specifier.isService())
915 else if (specifier.isSingleton())
918 if (section.isUnionDoc())
920 else if (section.isStructDoc())
922 else if (section.isInterfaceDoc())
924 else if (section.isProtocolDoc())
926 else if (section.isCategoryDoc())
928 else if (section.isExceptionDoc())
930 else if (section.isServiceDoc())
932 else if (section.isSingletonDoc())
953 int idx=fullName.
find(
'>');
954 if (idx!=-1 && root->
lang==SrcLangExt::CSharp)
964 qualifiedName.
prepend(scName+
"::");
970 AUTO_TRACE_ADD(
"Found class with name '{}', qualifiedName '{}'", cd ? cd->
name() : root->
name, qualifiedName);
1025 AUTO_TRACE_ADD(
"New class: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1035 if (fullName.
find(
"::")!=-1)
1042 std::unique_ptr<ArgumentList> tArgList;
1044 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) &&
1045 (i=fullName.
find(
'<'))!=-1)
1050 if (i!=-1 && root->
lang==SrcLangExt::CSharp)
1059 fullName=fullName.
left(i);
1070 fullName,sec,tagName,refFileName,
TRUE,root->
spec.isEnum()) ));
1073 AUTO_TRACE_ADD(
"New class '{}' type={} #tArgLists={} tagInfo={} hidden={} artificial={}",
1110 AUTO_TRACE_ADD(
"Class {} not added, already exists as alias", fullName);
1118 if (!root->
spec.isForwardDecl())
1180 qualifiedName.
prepend(scName+
"::");
1186 AUTO_TRACE_ADD(
"Found concept with name '{}' (qualifiedName='{}')", cd ? cd->
name() : root->
name, qualifiedName);
1190 qualifiedName=cd->
name();
1204 AUTO_TRACE_ADD(
"New concept: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1205 qualifiedName,namespaceName,className,root->
brief,root->
doc);
1214 if (qualifiedName.
find(
"::")!=-1)
1226 qualifiedName,tagName,refFileName)));
1230 qualifiedName,root->
tArgLists.size(),fmt::ptr(tagInfo));
1261 for (
const auto &ce : root->
children())
1264 if (ce->section.isConceptDocPart())
1269 if (!ce->brief.isEmpty())
1271 cd->
addDocPart(ce->brief,ce->startLine,ce->startColumn);
1274 if (!ce->doc.isEmpty())
1276 cd->
addDocPart(ce->doc,ce->startLine,ce->startColumn);
1280 else if (ce->section.isConceptCodePart())
1282 cd->
addCodePart(ce->initializer.str(),ce->startLine,ce->startColumn);
1289 AUTO_TRACE_ADD(
"Concept '{}' not added, already exists (as alias)", qualifiedName);
1296 for (
const auto &ce : root->
children())
1298 if (ce->section.isConceptDocPart())
1318 if (root->
section.isModuleDoc())
1328 if (root->
section.isConcept())
1338 if (root->
section.isConceptDoc())
1357 if (cd!=ocd && cd->groupId()==ocd->groupId() &&
1358 !cd->partOfGroups().empty() && ocd->partOfGroups().empty())
1363 for (
const auto &gd : cd->partOfGroups())
1369 gd->addConcept(ocd.get());
1394 aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
1396 std::unique_ptr<ClassDef> aliasCd;
1399 std::vector<ClassAlias> aliases;
1403 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1409 name,icd->getFileDef(),
nullptr);
1435 aliases.emplace_back(aliasFullName,std::move(aliasCd),dm);
1446 visitedClasses.insert(icd.get());
1456 for (
auto &alias : aliases)
1461 alias.aliasContext->addInnerCompound(aliasCd);
1470 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1488 "Incomplete input: scope for class {} not found!{}",name,
1489 name.
startsWith(
"std::") ?
" Try enabling BUILTIN_STL_SUPPORT." :
""
1507 if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
1511 for (
auto &ncd : cd->getClasses())
1522 visitedClasses.insert(cd.get());
1529template<
typename Container>
1531 const Container *cd,
1537 MemberList *eiml = cd->getMemberList(mlFilter);
1540 for (
const auto &eimd : *eiml)
1542 QCString vtype = eimd->typeString();
1561 int sn = n.
find(
'@');
1564 const char *p = n.
data()+sn;
1568 if (!isdigit(c) && c!=
'@' && c!=
':')
break;
1574 QCString fullName = n+
"."+fieldName;
1603 else if (outerScope)
1618 auto newMd =
createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
1619 md->typeString(),md->name(),md->argsString(),md->excpString(),
1620 md->protection(),md->virtualness(),md->isStatic(),Relationship::Member,
1630 imd->
setId(md->id());
1651 for (
const auto &md : *ml)
1660 for (
const auto &md : *ml)
1664 if (md->isEnumerate() && md->name().startsWith(
"@"))
1666 for (
const auto &emd : md->enumFieldList())
1689template<
typename Container,
typename TagContainer>
1691 const Container *cd,
1692 const TagContainer *tagParent,
1697 AUTO_TRACE(
"count={} name={}\n",count,cd->name());
1700 MemberList *ml = cd->getMemberList(varFilter);
1704 for (
const auto &md : *ml)
1709 (type.
find(
"::@")!=-1 || type.
find(
" @")!=-1))
1711 std::vector<const ClassDef *> candidates;
1712 for (
const auto &icd : cd->getClasses())
1714 candidates.push_back(icd);
1716 for (
const auto &icd : candidates)
1719 if (type.
find(icd->name())!=-1)
1722 if (md->isAnonymous()) name =
"__unnamed" +
QCString().
setNum(pos++)+
"__";
1728 processTagLessClasses(ncd,icd,ncd,MemberListType::PubAttribs(),MemberListType::PubTypes(),name,count+1);
1733 MemberList *pml = tagParent->getMemberList(varFilter);
1736 for (
const auto &pmd : *pml)
1739 if (pmdm && pmd->
name()==md->name())
1756 ml = cd->getMemberList(typeFilter);
1759 for (
const auto &md : *ml)
1768template<
typename Container>
1771 for (
const auto &icd : cd->getClasses())
1773 if (icd->name().find(
"@")==-1)
1779 candidates.insert(cd);
1784 std::set<const Definition *> candidates;
1794 const FileDef *fd = cd->getFileDef();
1809 for (
const auto &d : candidates)
1815 processTagLessClasses(nd,nd,nd,MemberListType::DecVarMembers(),MemberListType::DecEnumMembers(),
"",0);
1820 processTagLessClasses(fd,fd,fd,MemberListType::DecVarMembers(),MemberListType::DecEnumMembers(),
"",0);
1837 (root->
section.isNamespace() ||
1838 root->
section.isNamespaceDoc() ||
1847 if (root->
section.isPackageDoc())
1911 root->
type,root->
spec.isPublished())));
1978 QCString aliasName = aliasNd->name();
2007 for (
auto &und : unl)
2011 if (usingNd!=
nullptr)
break;
2018 if (root->
section.isUsingDir())
2036 (fd==
nullptr || fd->
getLanguage()!=SrcLangExt::Java)
2050 int scopeOffset =
static_cast<int>(nsName.
length());
2061 else if ((scopeOffset=nsName.
findRev(
"::",scopeOffset-1))==-1)
2065 }
while (scopeOffset>=0 && usingNd==
nullptr);
2067 if (usingNd==
nullptr && nd)
2071 while (pnd && usingNd==
nullptr)
2088 if (usingNd==
nullptr && fd)
2161 if (root->
section.isUsingDecl() &&
2174 if (root->
section.isUsingDecl() &&
2176 (!filterPythonPackages || (root->
lang==SrcLangExt::Python && root->
fileName.
endsWith(
"__init__.py")))
2179 AUTO_TRACE(
"Found using declaration '{}' at line {} of {} inside section {}",
2209 if (nd==
nullptr) scope = fd;
2279 AUTO_TRACE(
"creating new member {} for class {}",memName,cd->
name());
2290 newMmd->setMemberClass(cd);
2308 newMmd->addSectionsToDefinition(root->
anchors);
2314 newMmd->setMemberGroupId(root->
mGrpId);
2317 newMmd->setLanguage(root->
lang);
2318 newMmd->setId(root->
id);
2327 if (root->
section.isUsingDecl() &&
2354 for (
auto &mi : *mni)
2357 if (md && md->
protection()!=Protection::Private)
2372 for (
const auto ©Cd : it->second)
2385 else if (root->
section.isUsingDecl() &&
2387 root->
lang==SrcLangExt::Cpp
2420 memName = root->
name;
2442 newMmd->setNamespace(nd);
2447 newMmd->setFileDef(fd);
2466 newMmd->addSectionsToDefinition(root->
anchors);
2472 newMmd->setMemberGroupId(root->
mGrpId);
2475 newMmd->setLanguage(root->
lang);
2476 newMmd->setId(root->
id);
2484 if (nd && aliasMd.get())
2488 if (fd && aliasMd.get())
2517 if (nd) ncdm->
moveTo(nd);
2546 aliasFullName = aliasCd->localName();
2550 aliasFullName = nd->
qualifiedName()+
"::"+aliasCd->localName();
2582 for (
const auto &fd : *fn)
2585 fd->addIncludedUsingDirectives(visitedFiles);
2607 if (lang==SrcLangExt::Java || lang==SrcLangExt::CSharp)
2612 AUTO_TRACE(
"class variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} ann={} init='{}'",
2618 if (related!=Relationship::Member || mtype==MemberType::Friend ||
Config_getBool(HIDE_SCOPE_NAMES))
2620 if (root->
spec.isAlias())
2622 if (lang==SrcLangExt::Python)
2624 def=
"type "+name+args;
2633 def=type+
" "+name+args;
2638 if (root->
spec.isAlias())
2640 if (lang==SrcLangExt::Python)
2642 def=
"type "+qualScope+scopeSeparator+name+args;
2646 def=
"using "+qualScope+scopeSeparator+name;
2651 def=type+
" "+qualScope+scopeSeparator+name+args;
2663 def=qualScope+scopeSeparator+name+args;
2674 for (
const auto &imd : *mn)
2686 if (root->
lang==SrcLangExt::ObjC &&
2687 root->
mtype==MethodTypes::Property &&
2711 prot,Specifier::Normal,root->
isStatic,related,
2715 mmd->setTagInfo(root->
tagInfo());
2716 mmd->setMemberClass(cd);
2720 mmd->setDefinition(def);
2722 mmd->addSectionsToDefinition(root->
anchors);
2723 mmd->setFromAnonymousScope(fromAnnScope);
2724 mmd->setFromAnonymousMember(fromAnnMemb);
2737 mmd->setMemberGroupId(root->
mGrpId);
2738 mmd->setMemberSpecifiers(root->
spec);
2739 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2740 mmd->setReadAccessor(root->
read);
2741 mmd->setWriteAccessor(root->
write);
2743 mmd->setHidden(root->
hidden);
2745 mmd->setLanguage(root->
lang);
2746 mmd->setId(root->
id);
2749 mmd->setBodyDef(root->
fileDef());
2754 mmd->setRefItems(root->
sli);
2755 mmd->setRequirementReferences(root->
rqli);
2760 if (mtype==MemberType::Typedef)
2785 AUTO_TRACE(
"global variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} init='{}'",
2791 if (mtype==MemberType::Typedef &&
Config_getBool(TYPEDEF_HIDES_STRUCT))
2797 static const reg::Ex re(R
"(\a\w*)");
2799 const std::string &typ = ttype.
str();
2821 if (scope.
find(
'@')!=-1)
return nullptr;
2837 if (root->
spec.isAlias())
2839 if (lang==SrcLangExt::Python)
2841 def=
"type "+nd->
name()+sep+name+args;
2845 def=
"using "+nd->
name()+sep+name;
2850 def=type+
" "+nd->
name()+sep+name+args;
2855 def=nd->
name()+sep+name+args;
2862 if (name.
at(0)==
'@')
2868 if (root->
spec.isAlias())
2870 if (root->
lang==SrcLangExt::Python)
2872 def=
"type "+root->
name+args;
2876 def=
"using "+root->
name;
2881 def=type+
" "+name+args;
2902 for (
const auto &imd : *mn)
2916 bool isPHPArray = md->
getLanguage()==SrcLangExt::PHP &&
2919 bool staticsInDifferentFiles =
2925 !staticsInDifferentFiles
2967 mmd->setTagInfo(root->
tagInfo());
2968 mmd->setMemberSpecifiers(root->
spec);
2969 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2973 mmd->addSectionsToDefinition(root->
anchors);
2974 mmd->setFromAnonymousScope(fromAnnScope);
2975 mmd->setFromAnonymousMember(fromAnnMemb);
2986 mmd->setMemberGroupId(root->
mGrpId);
2987 mmd->setDefinition(def);
2988 mmd->setLanguage(root->
lang);
2989 mmd->setId(root->
id);
2997 mmd->setBodyDef(fd);
3002 mmd->setRefItems(root->
sli);
3003 mmd->setRequirementReferences(root->
rqli);
3006 mmd->setNamespace(nd);
3014 mmd->setFileDef(fd);
3020 if (mtype==MemberType::Typedef)
3042 if (lang == SrcLangExt::Fortran || lang == SrcLangExt::VHDL)
3047 static const reg::Ex re(R
"(\([^)]*[*&^][^)]*\))");
3049 size_t i=std::string::npos;
3053 i = match.position();
3056 if (i!=std::string::npos)
3058 size_t di = type.find(
"decltype(");
3059 if (di!=std::string::npos && di<i)
3061 i = std::string::npos;
3064 size_t bb=type.find(
'<');
3065 size_t be=type.rfind(
'>');
3066 bool templFp =
false;
3067 if (be!=std::string::npos) {
3068 size_t cc_ast = type.find(
"::*");
3069 size_t cc_amp = type.find(
"::&");
3070 templFp = (cc_ast != std::string::npos && cc_ast>be) || (cc_amp != std::string::npos && cc_amp>be);
3073 if (!type.empty() &&
3074 i!=std::string::npos &&
3075 type.find(
"operator")==std::string::npos &&
3076 (type.find(
")(")==std::string::npos || type.find(
"typedef ")!=std::string::npos) &&
3078 (!(bb<i && i<be) || templFp)
3081 if (pLength) *pLength=
static_cast<int>(l);
3084 return static_cast<int>(i);
3101 bool result =
false;
3102 bool typeIsClass =
false;
3103 bool typePtrType =
false;
3137 typePtrType = type.
find(
'*')!=-1 || type.
find(
'&')!=-1;
3140 typeIsClass = resolver.
resolveClass(ctx,type)!=
nullptr;
3142 if (!typeIsClass && (ti=type.
find(
'<'))!=-1)
3159 static const reg::Ex initChars(R
"([\d"'&*!^]+)");
3163 std::string name = a.
name.
str();
3164 if (
reg::search(name,match,initChars) && match.position()==0)
3196 std::string atype = a.
type.
str();
3197 if (
reg::search(atype,match,initChars) && match.position()==0)
3204 if (resType.empty()) resType=atype;
3205 static const reg::Ex idChars(R
"(\a\w*)");
3206 if (
reg::search(resType,match,idChars) && match.position()==0)
3208 resType=match.str();
3209 if (resType==
"int" || resType==
"long" ||
3210 resType==
"float" || resType==
"double" ||
3211 resType==
"char" || resType==
"void" ||
3212 resType==
"signed" || resType==
"unsigned" ||
3213 resType==
"const" || resType==
"volatile" )
3250 bool insideString=
FALSE;
3251 bool insideChar=
FALSE;
3253 while (e<len && brCount!=0)
3259 if (!insideString && !insideChar)
3261 if (e<len-1 && s.
at(e+1)==
'<')
3263 else if (roundCount==0)
3268 if (!insideString && !insideChar)
3270 if (e<len-1 && s.
at(e+1)==
'>')
3272 else if (roundCount==0)
3277 if (!insideString && !insideChar)
3281 if (!insideString && !insideChar)
3287 if (insideString && pc!=
'\\')
3296 if (insideChar && pc!=
'\\')
3306 return brCount==0 ?
static_cast<int>(e) : -1;
3315 AUTO_TRACE(
"VARIABLE_SEC: type='{}' name='{}' args='{}' bodyLine={} endBodyLine={} mGrpId={} relates='{}'",
3322 if (type.
isEmpty() && name.
find(
"operator")==-1 &&
3323 (name.
find(
'*')!=-1 || name.
find(
'&')!=-1))
3330 std::string sargs = args.
str();
3331 static const reg::Ex reName(R
"(\a\w*)");
3336 sargs = match.suffix().str();
3337 size_t j = sargs.find(
')');
3338 if (j!=std::string::npos) args=sargs.substr(0,j);
3348 int ai = type.
find(
'[',i);
3354 else if (type.
find(
')',i)!=-1)
3361 AUTO_TRACE_ADD(
"after correction: type='{}' name='{}' args='{}'",type,name,args);
3372 scope=name.
left(index);
3373 name=name.
mid(index+2);
3393 bool isRelated=
FALSE;
3394 bool isMemberOf=
FALSE;
3397 if (root->
lang==SrcLangExt::CSharp)
3410 for (
size_t i=0;i<name.
length()-1;i++)
3412 if (name[i]==
':' && name[i+1]==
':')
3414 p=
static_cast<int>(i);
3416 else if (name[i]==
'<')
3421 if (e!=-1) i=
static_cast<int>(e);
3427 if (type==
"friend class" || type==
"friend struct" ||
3428 type==
"friend union")
3442 Relationship::Member
3463 mtype=MemberType::EnumValue;
3465 mtype=MemberType::Typedef;
3467 mtype=MemberType::Friend;
3468 else if (root->
mtype==MethodTypes::Property)
3469 mtype=MemberType::Property;
3470 else if (root->
mtype==MethodTypes::Event)
3471 mtype=MemberType::Event;
3472 else if (type.
find(
"sequence<") != -1)
3473 mtype=sliceOpt ? MemberType::Sequence : MemberType::Typedef;
3474 else if (type.
find(
"dictionary<") != -1)
3475 mtype=sliceOpt ? MemberType::Dictionary : MemberType::Typedef;
3480 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
3498 Relationship relationship = isMemberOf ? Relationship::Foreign :
3499 isRelated ? Relationship::Related :
3500 Relationship::Member ;
3540 scope=rname.
left(index);
3541 rname=rname.
mid(index+2);
3553 for (
auto &imd : *mn)
3555 if (!imd->isTypedef())
3564 bool notBothGrouped = root->
groups.empty() || imd->getGroupDef()==
nullptr;
3565 bool bothSameScope = (!cd && !nd) || (cd && imd->getClassDef() == cd) || (nd && imd->getNamespaceDef() == nd);
3568 if (notBothGrouped && bothSameScope && imd->typeString()==rtype)
3616 for (
const auto &e : root->
children())
3617 if (!e->section.isEnum())
3634 for (
const auto &e : root->
children())
3635 if (!e->section.isEnum())
3652 for (
const auto &e : root->
children())
3653 if (!e->section.isEnum())
3668 (root->
section.isVariable() &&
3671 (root->
section.isFunction() &&
3674 (root->
section.isFunction() &&
3683 for (
const auto &e : root->
children())
3684 if (!e->section.isEnum())
3699 enum MemberType type = root->
section.isExportedInterface() ? MemberType::Interface : MemberType::Service;
3710 mmd->setTagInfo(root->
tagInfo());
3711 mmd->setMemberClass(cd);
3713 mmd->setDocsForDefinition(
false);
3717 mmd->setMemberSpecifiers(root->
spec);
3718 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3719 mmd->setMemberGroupId(root->
mGrpId);
3721 mmd->setLanguage(root->
lang);
3722 mmd->setBodyDef(fd);
3723 mmd->setFileDef(fd);
3724 mmd->addSectionsToDefinition(root->
anchors);
3726 mmd->setDefinition(def);
3730 AUTO_TRACE(
"Interface member: fileName='{}' type='{}' name='{}' mtype='{}' prot={} virt={} state={} proto={} def='{}'",
3738 root->
spec.isOptional() ? Protection::Protected : Protection::Public, Specifier::Normal);
3748 mmd->setRefItems(root->
sli);
3749 mmd->setRequirementReferences(root->
rqli);
3758 if (root->
section.isExportedInterface() || root->
section.isIncludedService())
3760 AUTO_TRACE(
"Exported interface/included service: type='{}' scope='{}' name='{}' args='{}'"
3761 " relates='{}' relatesType='{}' file='{}' line={} bodyLine={} #tArgLists={}"
3762 " mGrpId={} spec={} proto={} docFile='{}'",
3788 "Illegal member name found.");
3794 case SrcLangExt::Unknown:
3795 case SrcLangExt::IDL:
3824 if (isFriend) mtype=MemberType::Friend;
3825 else if (root->
mtype==MethodTypes::Signal) mtype=MemberType::Signal;
3826 else if (root->
mtype==MethodTypes::Slot) mtype=MemberType::Slot;
3827 else if (root->
mtype==MethodTypes::DCOP) mtype=MemberType::DCOP;
3832 if ((fd==
nullptr || fd->
getLanguage()==SrcLangExt::Cpp) &&
3834 (i=name.
find(
'<'))!=-1 &&
3835 (j=name.
find(
'>'))!=-1 &&
3836 (j!=i+2 || name.
at(i+1)!=
'=')
3854 root->
relatesType==RelatesType::MemberOf ? Relationship::Foreign :
3855 Relationship::Related ;
3865 mmd->setTagInfo(root->
tagInfo());
3866 mmd->setMemberClass(cd);
3868 mmd->setDocsForDefinition(!root->
proto);
3872 mmd->setMemberSpecifiers(spec);
3873 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3874 mmd->setMemberGroupId(root->
mGrpId);
3876 mmd->setLanguage(root->
lang);
3877 mmd->setRequiresClause(root->
req);
3878 mmd->setId(root->
id);
3879 mmd->setBodyDef(fd);
3880 mmd->setFileDef(fd);
3881 mmd->addSectionsToDefinition(root->
anchors);
3886 if (scopeSeparator!=
"::")
3888 qualScope =
substitute(qualScope,
"::",scopeSeparator);
3890 if (lang==SrcLangExt::PHP)
3893 scopeSeparator=
"::";
3910 def=type+
" "+qualScope+scopeSeparator+name;
3914 def=qualScope+scopeSeparator+name;
3918 mmd->setDefinition(def);
3922 AUTO_TRACE(
"function member: type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
3923 type, qualScope, rname, args, root->
proto, def);
3933 mmd->setRefItems(root->
sli);
3934 mmd->setRequirementReferences(root->
rqli);
3954 MemberType::Function,
3958 mmd->setTagInfo(root->
tagInfo());
3959 mmd->setLanguage(root->
lang);
3960 mmd->setId(root->
id);
3965 mmd->setDocsForDefinition(!root->
proto);
3971 mmd->addSectionsToDefinition(root->
anchors);
3972 mmd->setMemberSpecifiers(root->
spec);
3973 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3974 mmd->setMemberGroupId(root->
mGrpId);
3975 mmd->setRequiresClause(root->
req);
4010 def=root->
type+
" "+scope+name;
4016 AUTO_TRACE(
"new non-member function type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
4018 mmd->setDefinition(def);
4022 mmd->setRefItems(root->
sli);
4023 mmd->setRequirementReferences(root->
rqli);
4027 mmd->setNamespace(nd);
4034 mmd->setFileDef(fd);
4055 if (root->
section.isFunction())
4057 AUTO_TRACE(
"member function: type='{}' scope='{}' name='{}' args='{}' relates='{}' relatesType='{}'"
4058 " file='{}' line={} bodyLine={} #tArgLists={} mGrpId={}"
4059 " spec={} proto={} docFile='{}'",
4064 bool isFriend=root->
type==
"friend" || root->
type.
find(
"friend ")!=-1;
4074 scope=rname.
left(index);
4075 rname=rname.
mid(index+2);
4084 if (root->
lang==SrcLangExt::CSharp)
4095 int memIndex=rname.
findRev(
"::");
4098 if (cd && scope+
"::"==rname.
left(scope.
length()+2))
4104 bool isMember=
FALSE;
4107 int ts=rname.
find(
'<');
4108 int te=rname.
find(
'>');
4109 if (memIndex>0 && (ts==-1 || te==-1))
4126 isMember=memIndex<ts || memIndex>te;
4166 for (
const auto &imd : *mn)
4179 fullScope.
prepend(parentScope);
4185 if (mnd) nsName = mnd->
name();
4186 if (rnd) rnsName = rnd->
name();
4194 bool sameTemplateArgs =
TRUE;
4195 bool matchingReturnTypes =
TRUE;
4196 bool sameRequiresClause =
TRUE;
4202 matchingReturnTypes =
FALSE;
4206 sameRequiresClause =
FALSE;
4212 sameTemplateArgs =
FALSE;
4215 bool staticsInDifferentFiles =
4218 if (sameTemplateArgs &&
4219 matchingReturnTypes &&
4220 sameRequiresClause &&
4221 !staticsInDifferentFiles &&
4228 if (!root->
groups.empty() && !root->
groups.front().groupname.isEmpty())
4235 found=(mnd && rnd && nsName==rnsName) ||
4236 ((mnd==
nullptr && rnd==
nullptr && mfd!=
nullptr &&
4241 if (!found && gd && gd==md->
getGroupDef() && nsName==rnsName)
4247 AUTO_TRACE_ADD(
"combining function with prototype found={} in namespace '{}'",found,nsName);
4349 "Illegal member name found."
4367 for (
const auto &ifmd : *fn)
4371 for (
const auto &immd : *mn)
4387 AUTO_TRACE_ADD(
"Merging related global and member '{}' isFriend={} isRelated={} isFunction={}",
4464 for (
const auto &imdec : *mn)
4472 for (
const auto &imdef : *mn)
4475 if (mdef && mdec!=mdef &&
4495 for (
const auto &imd : *mn)
4511 if (mdef && mdec)
break;
4519 mdec->getOuterScope(),mdec->getFileDef(),mdec->typeString(),
const_cast<ArgumentList*
>(&mdecAl),
4526 mdec->mergeReferences(mdef);
4528 mdec->mergeReferencedBy(mdef);
4545 for (
const auto &imd : *mn)
4556 for (
const auto &irmd : *rmn)
4590 size_t i=qualifiedName.rfind(
"::");
4591 if (i!=std::string::npos)
4593 QCString scope = qualifiedName.substr(0,i);
4594 QCString name = qualifiedName.substr(i+2);
4598 for (
const auto &imd : *mn)
4624 std::map<std::string,int> templateNames;
4626 for (
const Argument &arg : templateArguments)
4628 static const reg::Ex re(R
"(\a[\w:]*)");
4631 for (; it!=
end ; ++it)
4633 const auto &match = *it;
4634 std::string n = match.str();
4635 if (n==arg.name.str())
4637 if (templateNames.find(n)==templateNames.end())
4639 templateNames.emplace(n,count);
4644 return templateNames;
4659 if (context && cd!=context)
4664 if (result==
nullptr)
4669 if (result==
nullptr)
4698 for (
auto &mi : *mni)
4708 type = typedefValue;
4727 usedClassName = typeCd->
name();
4737 if (templateNames.empty())
4741 BaseInfo bi(usedName,Protection::Public,Specifier::Normal);
4746 if (arg.name==usedName)
4750 if (usedCd==
nullptr)
4801 if (!found && !type.
isEmpty())
4860 if (templateNames.empty())
4898 AUTO_TRACE(
"Derived from template '{}' with parameters '{}' isArtificial={}",
4899 templateClass->
name(),templSpec,isArtificial);
4902 bool existingClass = templSpec==tempArgsStr;
4903 if (existingClass)
return;
4905 bool freshInstance=
FALSE;
4922 for (
auto it=it_pair.first ; it!=it_pair.second ; ++it)
4924 const Entry *templateRoot = it->second;
4925 AUTO_TRACE_ADD(
"template root found '{}' templSpec='{}'",templateRoot->
name,templSpec);
4931 isArtificial,templArgs.get(),templateNames);
4950 int ti=ttype.
find(
'<');
4956 templateClassName,
true,
true);
4957 AUTO_TRACE_ADD(
"templateClassName={} baseClass={}",templateClassName,baseClass?baseClass->
name():
"<none>");
4976 int index=n.
find(
'<');
4988 int l =
static_cast<int>(name.
length());
4994 while (count>0 && i>=0)
4999 case '>':
if (!insideQuote) count++;
break;
5000 case '<':
if (!insideQuote) count--;
break;
5001 case '\'':
if (!insideQuote) insideQuote=c;
5002 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
5004 case '"':
if (!insideQuote) insideQuote=c;
5005 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
5025 AUTO_TRACE(
"name={} base={} isArtificial={} mode={}",cd->
name(),bi->
name,isArtificial,(
int)mode);
5028 bool explicitGlobalScope=
FALSE;
5032 explicitGlobalScope=
TRUE;
5036 bool lastParent=
FALSE;
5041 int scopeOffset=explicitGlobalScope ? 0 :
static_cast<int>(scopeName.
length());
5050 baseClassName.
prepend(scopeName.
left(scopeOffset)+
"::");
5052 if (root->
lang==SrcLangExt::CSharp)
5079 || explicitGlobalScope
5082 || (root->
lang==SrcLangExt::IDL &&
5083 (root->
section.isExportedInterface() ||
5084 root->
section.isIncludedService()))
5087 AUTO_TRACE_ADD(
"class relation '{}' inherited/used by '{}' found prot={} virt={} templSpec='{}'",
5088 baseClassName, root->
name, bi->
prot, bi->
virt, templSpec);
5091 int si=baseClassName.
findRev(
"::",i);
5093 if (baseClass==
nullptr &&
static_cast<size_t>(i)!=baseClassName.
length())
5103 baseClassName = baseClassName.
left(i)+baseClassName.
right(baseClassName.
length()-e);
5114 else if (baseClass && !templSpec.
isEmpty())
5125 baseClass = templClass;
5133 if (!found && si!=-1)
5143 found=baseClass!=
nullptr && baseClass!=cd;
5153 found = baseClass!=
nullptr && baseClass!=cd;
5165 found = baseClass!=
nullptr && baseClass!=cd;
5168 bool isATemplateArgument = templateNames.find(biName.
str())!=templateNames.end();
5173 AUTO_TRACE_ADD(
"Documented base class '{}' templSpec='{}'",biName,templSpec);
5191 if (baseClassTypeDef==
nullptr)
5201 if (baseClassTypeDef)
5210 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",usedName,prot,bi->
virt,templSpec);
5218 "Detected potential recursive class relation "
5219 "between class {} and base class {}!",
5226 else if (mode==
Undocumented && (scopeOffset==0 || isATemplateArgument))
5228 AUTO_TRACE_ADD(
"New undocumented base class '{}' baseClassName='{}' templSpec='{}' isArtificial={}",
5229 biName,baseClassName,templSpec,isArtificial);
5231 if (isATemplateArgument)
5234 if (baseClass==
nullptr)
5253 if (baseClass==
nullptr)
5264 si = baseClassName.
findRev(
"::");
5280 biName=
"<"+biName.
left(biName.
length()-2)+
">";
5284 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",biName,bi->
prot,bi->
virt,templSpec);
5294 if (scope!=baseClass)
5320 "Detected potential recursive class relation "
5321 "between class {} and base class {}!",
5322 root->
name,baseClassName
5333 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
5338 }
while (scopeOffset>=0);
5340 if (parentNode==
nullptr)
5346 parentNode=parentNode->
parent();
5348 }
while (lastParent);
5368 bool hasExtends = !root->
extends.empty();
5369 if (hasExtends)
return TRUE;
5393 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) &&
5394 (i=bName.
find(
'<'))!=-1)
5398 if (root->
lang==SrcLangExt::CSharp)
5404 bName = bName.
left(i);
5436 if (i!=-1 && j!=-1 && k==-1 && root->
lang!=SrcLangExt::CSharp && root->
lang!=SrcLangExt::Java)
5469 if (!nd->hasDocumentation())
5472 nd->getLanguage() == SrcLangExt::Fortran) &&
5476 warn_undoc(nd->getDefFileName(),nd->getDefLine(),
"{} {} is not documented.",
5477 nd->getLanguage() == SrcLangExt::Fortran ?
"Module" :
"Namespace",
5541 for (
const auto &tn_kv : templateNames)
5543 size_t templIndex = tn_kv.second;
5545 bool hasActArg=
FALSE;
5546 if (templIndex<templArgs->size())
5548 actArg=templArgs->at(templIndex);
5552 baseClassNames.find(actArg.
type.
str())!=baseClassNames.end() &&
5553 actualTemplateNames.find(actArg.
type.
str())==actualTemplateNames.end()
5556 actualTemplateNames.emplace(actArg.
type.
str(),
static_cast<int>(templIndex));
5591 for (
const auto &fd : *fn)
5593 fd->computeAnchors();
5606 gd->computeAnchors();
5613template<
typename Func>
5636 for (
const auto &fd : *fn)
5709 if (md==
nullptr)
return;
5710 AUTO_TRACE(
"scope='{}' name='{}' args='{}' funcDecl='{}' mSpec={}",
5725 fullName = cd->
name();
5727 fullName = nd->
name();
5729 if (!fullName.
isEmpty()) fullName+=
"::";
5730 fullName+=md->
name();
5835 "member {} belongs to two different groups. The second one found here will be ignored.",
5873 return allowNoGroup;
5876 for (
const auto &g : root->
groups)
5878 if (g.groupname == gd->
name())
5901 AUTO_TRACE(
"namespace='{}' type='{}' name='{}' tempArg='{}' decl='{}'",namespaceName,type,name,tempArg,decl);
5915 for (
const auto &md : *mn)
5926 if (md->isAlias() && md->getOuterScope() &&
5933 nd = md->getNamespaceDef();
5938 if (nd && md->isEnumValue() && (enumNamePos=namespaceName.
findRev(
"::"))!=-1)
5940 QCString enumName = namespaceName.
mid(enumNamePos+2);
5941 if (namespaceName.
left(enumNamePos)==nd->
name())
5946 for (
const auto &emd : *enumMn)
5948 found = emd->isStrong() && md->getEnumScope()==emd.get();
5962 else if (nd==
nullptr && md->isEnumValue())
5967 for (
const auto &emd : *enumMn)
5969 found = emd->isStrong() && md->getEnumScope()==emd.get();
5992 if ((namespaceName.
isEmpty() && nd==
nullptr) ||
5993 (nd && nd->
name()==namespaceName) ||
5997 AUTO_TRACE_ADD(
"Try to add member '{}' to scope '{}'",md->name(),namespaceName);
6005 md->isVariable() || md->isTypedef() ||
6006 matchArguments2(md->getOuterScope(),md->getFileDef(),md->typeString(),&mdAl,
6013 if (matching && !root->
tArgLists.empty())
6032 if (matching && md->isStatic() &&
6033 md->getDefFileName()!=root->
fileName &&
6041 if (!md->templateArguments().empty() && !root->
tArgLists.empty())
6046 if (md->templateArguments().size()!=root->
tArgLists.back().size() ||
6047 md->typeString()!=type ||
6048 md->requiresClause()!=root->
req)
6064 if (!found && root->
relatesType!=RelatesType::Duplicate && root->
section.isFunction())
6068 QCString warnMsg =
"no matching file member found for \n"+fullFuncDecl;
6071 warnMsg+=
"\nPossible candidates:";
6072 for (
const auto &md : *mn)
6076 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6084 if (root->
type!=
"friend class" &&
6085 root->
type!=
"friend struct" &&
6086 root->
type!=
"friend union" &&
6087 root->
type!=
"friend" &&
6093 "documented symbol '{}' was not declared or defined.",
qPrint(decl)
6105 auto srcIt = srcTempArgLists.begin();
6106 auto dstIt = dstTempArgLists.begin();
6107 while (srcIt!=srcTempArgLists.end() && dstIt!=dstTempArgLists.end())
6109 if ((*srcIt).size()!=(*dstIt).size())
return TRUE;
6123 result = cd->templateArguments().hasParameters() || cd->templateMaster()!=
nullptr ||
6133 const std::string &src
6137 static const reg::Ex re(R
"(\a\w*)");
6142 for (; it!=
end ; ++it)
6144 const auto &match = *it;
6145 size_t i = match.position();
6146 size_t l = match.length();
6148 dst+=src.substr(p,i-p);
6149 std::string name=match.str();
6151 auto srcIt = srcTempArgLists.begin();
6152 auto dstIt = dstTempArgLists.begin();
6153 while (srcIt!=srcTempArgLists.end() && !found)
6156 std::vector<Argument>::const_iterator tdaIt;
6157 if (dstIt!=dstTempArgLists.end())
6160 tdaIt = tdAli->
begin();
6165 for (
auto tsaIt = tsaLi.
begin(); tsaIt!=tsaLi.
end() && !found; ++tsaIt)
6169 if (tdAli && tdaIt!=tdAli->
end())
6185 else if (tdaType.
startsWith(
"typename ")) vc=9;
6188 tdaName = tdaType.
mid(vc);
6221 auto dstIt = dst.
begin();
6226 if (dstIt == dst.
end())
6230 da.
array = dstArray;
6238 da.
array = dstArray;
6246 srcTempArgLists,dstTempArgLists,
6272 funcType,funcName,funcArgs,exceptions,
6276 mmd->setTagInfo(root->
tagInfo());
6277 mmd->setLanguage(root->
lang);
6278 mmd->setId(root->
id);
6279 mmd->makeImplementationDetail();
6280 mmd->setMemberClass(cd);
6281 mmd->setDefinition(funcDecl);
6287 mmd->setDocsForDefinition(!root->
proto);
6289 mmd->addSectionsToDefinition(root->
anchors);
6293 mmd->setMemberSpecifiers(spec);
6294 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6295 mmd->setMemberGroupId(root->
mGrpId);
6298 mmd->setRefItems(root->
sli);
6299 mmd->setRequirementReferences(root->
rqli);
6335 bool memFound=
FALSE;
6336 for (
const auto &imd : *mn)
6339 if (md==
nullptr)
continue;
6341 if (cd==
nullptr)
continue;
6358 if (!namespaceName.
isEmpty()) fullScope.
prepend(namespaceName+
"::");
6359 if (fullScope==cd->
name())
6365 for (
const auto &emd : *enumMn)
6367 memFound = emd->isStrong() && md->
getEnumScope()==emd.get();
6373 if (memFound)
break;
6378 if (memFound)
break;
6396 if (!templAl.
empty())
6398 declTemplArgs.push_back(templAl);
6406 bool substDone=
false;
6413 if (declTemplArgs.size()>0 && declTemplArgs.size()==defTemplArgs.size())
6436 AUTO_TRACE_ADD(
"matching '{}'<=>'{}' className='{}' namespaceName='{}' result={}",
6465 AUTO_TRACE_ADD(
"Comparing return types '{}'<->'{}' #args {}<->{}",
6473 else if (defTemplArgs.size()>declTemplArgs.size())
6475 AUTO_TRACE_ADD(
"Different number of template arguments {} vs {}",defTemplArgs.size(),declTemplArgs.size());
6481 bool rootIsUserDoc = root->
section.isMemberDoc();
6484 bool classOrMdIsTemplate = mdIsTemplate || classIsTemplate;
6485 bool rootIsTemplate = !root->
tArgLists.empty();
6487 if (!rootIsUserDoc &&
6488 (mdIsTemplate || rootIsTemplate) &&
6489 ((classOrMdIsTemplate && !rootIsTemplate) || (!classOrMdIsTemplate && rootIsTemplate))
6494 AUTO_TRACE_ADD(
"Comparing return types: template v.s. non-template");
6498 AUTO_TRACE_ADD(
"Match results of matchArguments2='{}' substDone='{}'",matching,substDone);
6509 if (!funcTempList.
isEmpty() &&
6529 else if (cd && cd!=tcd)
6535 if (memFound)
break;
6539 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
6542 if (count==0 && !(isFriend && funcType==
"class"))
6545 const ClassDef *ecd =
nullptr, *ucd =
nullptr;
6546 MemberDef *emd =
nullptr, *umd =
nullptr;
6548 for (
const auto &md : *mn)
6570 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': exact match",
6571 className,ccd->
name(),md->argsString());
6577 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': no match",
6578 className,ccd->
name(),md->argsString());
6583 bool strictProtoMatching =
Config_getBool(STRICT_PROTO_MATCHING);
6584 if (!strictProtoMatching)
6586 if (candidates==1 && ucd && umd)
6593 else if (candidates>1 && ecd && emd)
6604 if (noMatchCount>1) warnMsg+=
"uniquely ";
6605 warnMsg+=
"matching class member found for \n";
6609 warnMsg+=
" template ";
6618 warnMsg+=fullFuncDecl;
6620 if (candidates>0 || noMatchCount>=1)
6622 warnMsg+=
"\nPossible candidates:";
6628 for (
const auto &md : *mn)
6630 const ClassDef *cd=md->getClassDef();
6644 warnMsg+=
"template ";
6649 if (!md->typeString().isEmpty())
6651 warnMsg+=md->typeString();
6656 warnMsg+=qScope+
"::"+md->name();
6657 warnMsg+=md->argsString();
6658 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6679 AUTO_TRACE(
"funcType={} funcName={} funcArgs={} funcDecl={} spec={}",funcType,funcName,funcArgs,funcDecl,spec);
6681 for (
const auto &md : *mn)
6683 if (md->getClassDef()==cd)
6695 funcType,funcName,funcArgs,exceptions,
6701 mmd->setTagInfo(root->
tagInfo());
6702 mmd->setLanguage(root->
lang);
6703 mmd->setId(root->
id);
6704 mmd->setMemberClass(cd);
6705 mmd->setTemplateSpecialization(
TRUE);
6707 mmd->setDefinition(funcDecl);
6713 mmd->setDocsForDefinition(!root->
proto);
6715 mmd->addSectionsToDefinition(root->
anchors);
6719 mmd->setMemberSpecifiers(spec);
6720 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6721 mmd->setMemberGroupId(root->
mGrpId);
6723 mmd->setRefItems(root->
sli);
6724 mmd->setRequirementReferences(root->
rqli);
6738 bool sameClass=
false;
6743 [](
const auto &md1,
const auto &md2)
6744 { return md1->getClassDef()->name()==md2->getClassDef()->name(); });
6750 if (cd==
nullptr)
return;
6753 if (root->
mtype==MethodTypes::Signal) mtype=MemberType::Signal;
6754 else if (root->
mtype==MethodTypes::Slot) mtype=MemberType::Slot;
6755 else if (root->
mtype==MethodTypes::DCOP) mtype=MemberType::DCOP;
6758 std::unique_ptr<ArgumentList> tArgList =
6763 funcType,funcName,funcArgs,exceptions,
6767 mmd->setTagInfo(root->
tagInfo());
6768 mmd->setLanguage(root->
lang);
6769 mmd->setId(root->
id);
6771 mmd->setMemberClass(cd);
6772 mmd->setDefinition(funcDecl);
6781 mmd->setDocsForDefinition(!root->
proto);
6783 mmd->addSectionsToDefinition(root->
anchors);
6787 mmd->setMemberSpecifiers(spec);
6788 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6789 mmd->setMemberGroupId(root->
mGrpId);
6792 mmd->setRefItems(root->
sli);
6793 mmd->setRequirementReferences(root->
rqli);
6851 AUTO_TRACE(
"root='{}' funcDecl='{}' related='{}' overload={} isFunc={} mGrpId={} #tArgList={} spec={} lang={}",
6864 bool isRelated=
false;
6865 bool isMemberOf=
false;
6866 bool isFriend=
false;
6879 spec.setInline(
true);
6884 spec.setExplicit(
true);
6889 spec.setMutable(
true);
6894 spec.setThreadLocal(
true);
6905 while ((sep=funcDecl.
find(
';'))!=-1)
6911 if (!funcDecl.
isEmpty() && funcDecl[0]!=
' ') funcDecl.
prepend(
" ");
6923 if (isFriend && funcDecl.
startsWith(
"class "))
6927 funcName = funcDecl;
6929 else if (isFriend && funcDecl.
startsWith(
"struct "))
6932 funcName = funcDecl;
6938 funcArgs,funcTempList,exceptions
6946 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}' funcType='{}' funcName='{}' funcArgs='{}'",
6947 scopeName,className,namespaceName,funcType,funcName,funcArgs);
6951 isMemberOf=(root->
relatesType == RelatesType::MemberOf);
6958 scopeName = relates;
6971 scopeName = joinedName;
6985 QCString joinedName = fnd->name()+
"::"+scopeName;
6988 scopeName=joinedName;
7015 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}'",scopeName,className,namespaceName);
7024 scopeName=namespaceName;
7026 else if (!relates.
isEmpty() ||
7029 scopeName=namespaceName+
"::"+className;
7033 scopeName=className;
7036 else if (!className.
isEmpty())
7038 scopeName=className;
7048 uint32_t argListIndex=0;
7053 tempScopeName=scopeName+funcSpec;
7061 if (!scopeName.
isEmpty() && !isRelated && !isFriend && !
Config_getBool(HIDE_SCOPE_NAMES) && root->
lang!=SrcLangExt::Python)
7067 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcTempList;
7071 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcArgs;
7078 funcDecl=tempScopeName+
"::"+funcName+funcTempList;
7082 funcDecl=tempScopeName+
"::"+funcName+funcArgs;
7092 funcDecl=funcType+
" "+funcName+funcTempList;
7096 funcDecl=funcType+
" "+funcName+funcArgs;
7103 funcDecl=funcName+funcTempList;
7107 funcDecl=funcName+funcArgs;
7112 if (funcType==
"template class" && !funcTempList.
isEmpty())
7115 AUTO_TRACE_ADD(
"Parse results: namespaceName='{}' className=`{}` funcType='{}' funcSpec='{}' "
7116 " funcName='{}' funcArgs='{}' funcTempList='{}' funcDecl='{}' relates='{}'"
7117 " exceptions='{}' isRelated={} isMemberOf={} isFriend={} isFunc={}",
7118 namespaceName, className, funcType, funcSpec,
7119 funcName, funcArgs, funcTempList, funcDecl, relates,
7120 exceptions, isRelated, isMemberOf, isFriend, isFunc);
7126 bool strongEnum =
false;
7130 for (
const auto &imd : *mn)
7143 namespaceName+=
"::"+className;
7147 namespaceName=className;
7155 funcName =
substitute(funcName,className+
"::",
"");
7166 if (!isRelated && !strongEnum && mn)
7174 funcArgs,funcTempList,exceptions,
7175 type,args,isFriend,spec,relates,funcDecl,overloaded,isFunc);
7187 else if (overloaded)
7189 addOverloaded(root,mn,funcType,funcName,funcArgs,funcDecl,exceptions,spec);
7193 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7198 "Cannot determine class for function\n{}",
7204 else if (isRelated && !relates.
isEmpty())
7206 AUTO_TRACE_ADD(
"related function scopeName='{}' className='{}'",scopeName,className);
7207 if (className.
isEmpty()) className=relates;
7211 bool newMember=
TRUE;
7217 for (
const auto &imd : *mn)
7251 mn->
push_back(std::move(mdDefineTaken));
7265 for (
const auto &irmd : *mn)
7286 addMemberDocs(root,rmd_found,funcDecl,
nullptr,overloaded,spec);
7294 switch (root->
mtype)
7296 case MethodTypes::Method: mtype = MemberType::Function;
break;
7297 case MethodTypes::Signal: mtype = MemberType::Signal;
break;
7298 case MethodTypes::Slot: mtype = MemberType::Slot;
break;
7299 case MethodTypes::DCOP: mtype = MemberType::DCOP;
break;
7300 case MethodTypes::Property: mtype = MemberType::Property;
break;
7301 case MethodTypes::Event: mtype = MemberType::Event;
break;
7315 funcType,funcName,funcArgs,exceptions,
7318 isMemberOf ? Relationship::Foreign : Relationship::Related,
7338 mmd->setDefinitionTemplateParameterLists(root->
tArgLists);
7340 mmd->setTagInfo(root->
tagInfo());
7354 for (
const auto &irmd : *rmn)
7385 mmd->setBodyDef(fd);
7392 mmd->setMemberClass(cd);
7393 mmd->setMemberSpecifiers(spec);
7394 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7395 mmd->setDefinition(funcDecl);
7400 mmd->setDocsForDefinition(!root->
proto);
7403 mmd->addSectionsToDefinition(root->
anchors);
7404 mmd->setMemberGroupId(root->
mGrpId);
7405 mmd->setLanguage(root->
lang);
7406 mmd->setId(root->
id);
7410 mmd->setRefItems(root->
sli);
7411 mmd->setRequirementReferences(root->
rqli);
7412 if (root->
relatesType==RelatesType::Duplicate) mmd->setRelatedAlso(cd);
7420 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7425 "Cannot determine file/namespace for relatedalso function\n{}",
7439 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
7443 bool globMem =
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec);
7444 if (className.
isEmpty() && !globMem)
7448 else if (!className.
isEmpty() && !globMem)
7451 "member '{}' of class '{}' cannot be found",
7452 funcName,className);
7470 AUTO_TRACE(
"root->type='{}' root->inside='{}' root->name='{}' root->args='{}' section={} root->spec={} root->mGrpId={}",
7485 type=type.
left(i+l);
7496 if (root->
section.isMemberDoc())
7522 else if (root->
section.isOverloadDoc())
7536 (root->
section.isVariable() &&
7548 if (type==
"friend class" || type==
"friend struct" ||
7549 type==
"friend union")
7555 type+
" "+root->
name,
7588 else if (root->
section.isVariableDoc())
7600 else if (root->
section.isExportedInterface() ||
7601 root->
section.isIncludedService())
7607 type +
" " + root->
name,
7620 if (root->
section.isMemberDoc() ||
7621 root->
section.isOverloadDoc() ||
7624 root->
section.isVariableDoc() ||
7626 root->
section.isIncludedService() ||
7627 root->
section.isExportedInterface()
7637 for (
const auto &e : root->
children())
7639 if (!e->section.isEnum())
7651 for (
const auto &objCImpl : root->
children())
7653 if (objCImpl->section.isObjcImpl())
7655 for (
const auto &objCMethod : objCImpl->children())
7657 if (objCMethod->section.isFunction())
7661 objCMethod->relates,
7664 objCMethod->type+
" "+objCImpl->name+
"::"+objCMethod->name+
" "+objCMethod->args,
7666 objCMethod->section=EntryType::makeEmpty();
7685 bool isGlobal =
false;
7686 bool isRelated =
false;
7687 bool isMemberOf =
false;
7697 if (root->
lang==SrcLangExt::CSharp)
7720 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
7755 isMemberOf ? Relationship::Foreign : isRelated ? Relationship::Related : Relationship::Member,
7756 MemberType::Enumeration,
7759 mmd->setTagInfo(root->
tagInfo());
7760 mmd->setLanguage(root->
lang);
7761 mmd->setId(root->
id);
7762 if (!isGlobal) mmd->setMemberClass(cd);
else mmd->setFileDef(fd);
7764 mmd->setBodyDef(root->
fileDef());
7765 mmd->setMemberSpecifiers(root->
spec);
7766 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7767 mmd->setEnumBaseType(root->
args);
7770 mmd->addSectionsToDefinition(root->
anchors);
7771 mmd->setMemberGroupId(root->
mGrpId);
7775 mmd->setRefItems(root->
sli);
7776 mmd->setRequirementReferences(root->
rqli);
7790 mmd->setDefinition(name+baseType);
7794 mmd->setDefinition(nd->
name()+
"::"+name+baseType);
7798 mmd->setNamespace(nd);
7805 if (isGlobal && (nd==
nullptr || !nd->
isAnonymous()))
7807 if (!defSet) mmd->setDefinition(name+baseType);
7808 if (fd==
nullptr && root->
parent())
7814 mmd->setFileDef(fd);
7822 mmd->setDefinition(name+baseType);
7826 mmd->setDefinition(cd->
name()+
"::"+name+baseType);
7832 mmd->setDocsForDefinition(!root->
proto);
7862 bool isGlobal =
false;
7863 bool isRelated =
false;
7873 if (root->
lang==SrcLangExt::CSharp)
7888 if (root->
lang==SrcLangExt::CSharp)
7934 struct EnumValueInfo
7936 EnumValueInfo(
const QCString &n,std::unique_ptr<MemberDef> &&md) :
7937 name(n), member(std::move(md)) {}
7939 std::unique_ptr<MemberDef> member;
7941 std::vector< EnumValueInfo > extraMembers;
7943 for (
const auto &imd : *mn)
7950 for (
const auto &e : root->
children())
7953 bool isJavaLike = sle==SrcLangExt::CSharp || sle==SrcLangExt::Java || sle==SrcLangExt::XML;
7954 if ( isJavaLike || root->
spec.isStrong())
7956 if (sle == SrcLangExt::Cpp && e->section.isDefine())
continue;
7963 i = qualifiedName.
findRev(
"::");
7964 if (i!=-1 && sle==SrcLangExt::CSharp)
7970 qualifiedName=
substitute(qualifiedName,
"::",
".");
7975 if (fileName.
isEmpty() && e->tagInfo())
7977 fileName = e->tagInfo()->tagName;
7981 fileName,e->startLine,e->startColumn,
7982 e->type,e->name,e->args,
QCString(),
7983 e->protection, Specifier::Normal,e->isStatic,Relationship::Member,
7990 fmmd->setNamespace(mnd);
7994 fmmd->setTagInfo(e->tagInfo());
7995 fmmd->setLanguage(e->lang);
7996 fmmd->setBodySegment(e->startLine,e->bodyLine,e->endBodyLine);
7997 fmmd->setBodyDef(e->fileDef());
7999 fmmd->setDocumentation(e->doc,e->docFile,e->docLine);
8000 fmmd->setBriefDescription(e->brief,e->briefFile,e->briefLine);
8001 fmmd->addSectionsToDefinition(e->anchors);
8002 fmmd->setInitializer(e->initializer.str());
8003 fmmd->setMaxInitLines(e->initLines);
8004 fmmd->setMemberGroupId(e->mGrpId);
8005 fmmd->setExplicitExternal(e->explicitExternal,fileName,e->startLine,e->startColumn);
8006 fmmd->setRefItems(e->sli);
8007 fmmd->setRequirementReferences(e->rqli);
8010 fmmd->setEnumScope(md,
TRUE);
8011 extraMembers.emplace_back(e->name,std::move(fmd));
8020 if (!e->name.isEmpty() && (fmn=emnsd->
find(e->name)))
8023 for (
const auto &ifmd : *fmn)
8054 else if (isRelated && cd)
8086 for (
auto &e : extraMembers)
8132 if (gd==
nullptr && !root->
groups.empty())
8146 for (
const auto &g : root->
groups)
8165 "Found non-existing group '{}' for the command '{}', ignoring command",
8179 if (root->
section.isEnumDoc() &&
8205 AUTO_TRACE(
"Found docs for enum with name '{}' and scope '{}' in context '{}' cd='{}', nd='{}' fd='{}'",
8219 for (
const auto &imd : *mn)
8234 else if (cd==
nullptr && mcd==
nullptr && nd!=
nullptr && mnd==nd)
8241 else if (cd==
nullptr && nd==
nullptr && mcd==
nullptr && mnd==
nullptr && fd==mfd)
8266 for (
const auto &mn : mnsd)
8269 for (
const auto &imd : *mn)
8274 int documentedEnumValues=0;
8278 if (fmd->isLinkableInProject()) documentedEnumValues++;
8304 for (
const auto &md : *mn)
8306 index.addClassMemberNameToIndex(md.get());
8307 if (md->getModuleDef())
8309 index.addModuleMemberNameToIndex(md.get());
8317 for (
const auto &md : *mn)
8319 if (md->getNamespaceDef())
8321 index.addNamespaceMemberNameToIndex(md.get());
8325 index.addFileMemberNameToIndex(md.get());
8327 if (md->getModuleDef())
8329 index.addModuleMemberNameToIndex(md.get());
8334 index.sortMemberIndexLists();
8343 if (cd->isLinkableInProject())
8356 if (cd->isLinkableInProject())
8369 if (nd->isLinkableInProject())
8382 for (
const auto &fd : *fn)
8398 std::string s = title.str();
8399 static const reg::Ex re(R
"(\a[\w-]*)");
8402 for (; it!=
end ; ++it)
8404 const auto &match = *it;
8405 std::string matchStr = match.str();
8413 if (gd->isLinkableInProject())
8415 addWordsForTitle(gd.get(),gd->anchor(),gd->groupTitle());
8421 if (pd->isLinkableInProject())
8423 addWordsForTitle(pd.get(),pd->anchor(),pd->title());
8443 if (md->getClassDef())
8447 if (md->getNamespaceDef())
8458 if (md->getGroupDef()) scope = md->getGroupDef();
8459 else if (md->getClassDef()) scope = md->getClassDef();
8460 else if (md->getNamespaceDef()) scope = md->getNamespaceDef();
8461 else if (md->getFileDef()) scope = md->getFileDef();
8467 if (md->isLinkableInProject())
8469 if (!(md->isEnumerate() && md->isAnonymous()))
8474 if (md->isEnumerate())
8476 for (
const auto &fmd : md->enumFieldList())
8489 for (
const auto &md : *mn)
8491 addMemberToIndices(md.get());
8498 for (
const auto &md : *mn)
8500 addMemberToIndices(md.get());
8513 for (
const auto &imd : *mn)
8526 for (
const auto &imd : *mn)
8543 for (
const auto &imd : *mn)
8552 const auto &bmni = bmn.
find(mn->memberName());
8555 for (
const auto &ibmd : *bmni)
8563 lang==SrcLangExt::Python ||
8564 lang==SrcLangExt::Java ||
8565 lang==SrcLangExt::PHP ||
8576 lang==SrcLangExt::Python ||
8583 if (lang==SrcLangExt::Python && md->
name().
startsWith(
"__"))
continue;
8623 if (cd->isLinkable())
8625 for (
const auto &bcd : cd->baseClasses())
8641 for (
const auto &ti : cd->getTemplateInstances())
8660 int i=cd->name().find(
'(');
8667 AUTO_TRACE_ADD(
"merging members of category {} into {}",cd->name(),baseClass->
name());
8682 cd->subClasses().empty() &&
8683 !cd->baseClasses().empty())
8714 msg(
"Generating code for file {}...\n",fd->
docName());
8719 else if (parseSources)
8721 msg(
"Parsing code for file {}...\n",fd->
docName());
8737 for (
const auto &fd : *fn)
8745 for (
const auto &fd : *fn)
8754 clangParser->parse();
8755 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8757 for (
auto incFile : clangParser->filesInSameTU())
8759 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
8761 processedFiles.
find(incFile)==processedFiles.end())
8768 processSourceFile(ifd,*
g_outputList,clangParser.get());
8769 processedFiles.insert(incFile);
8780 for (
const auto &fd : *fn)
8782 if (processedFiles.find(fd->
absFilePath().
str())==processedFiles.end())
8787 clangParser->parse();
8788 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8801 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8804 msg(
"Generating code files using {} threads.\n",numThreads);
8805 struct SourceContext
8808 : fd(fd_), generateSourceFile(gen_), ol(ol_) {}
8810 bool generateSourceFile;
8814 std::vector< std::future< std::shared_ptr<SourceContext> > > results;
8817 for (
const auto &fd : *fn)
8820 auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*
g_outputList);
8821 auto processFile = [ctx]()
8823 if (ctx->generateSourceFile)
8825 msg(
"Generating code for file {}...\n",ctx->fd->docName());
8829 msg(
"Parsing code for file {}...\n",ctx->fd->docName());
8832 ctx->fd->getAllIncludeFilesRecursively(filesInSameTu);
8833 if (ctx->generateSourceFile)
8835 ctx->fd->writeSourceHeader(ctx->ol);
8836 ctx->fd->writeSourceBody(ctx->ol,
nullptr);
8837 ctx->fd->writeSourceFooter(ctx->ol);
8842 ctx->fd->parseSource(
nullptr);
8846 results.emplace_back(threadPool.
queue(processFile));
8849 for (
auto &f : results)
8858 for (
const auto &fd : *fn)
8878 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
8884 : fd(fd_), ol(ol_) {}
8889 std::vector< std::future< std::shared_ptr<DocContext> > > results;
8892 for (
const auto &fd : *fn)
8894 bool doc = fd->isLinkableInProject();
8897 auto ctx = std::make_shared<DocContext>(fd.get(),*
g_outputList);
8898 auto processFile = [ctx]() {
8899 msg(
"Generating docs for file {}...\n",ctx->fd->docName());
8900 ctx->fd->writeDocumentation(ctx->ol);
8903 results.emplace_back(threadPool.
queue(processFile));
8907 for (
auto &f : results)
8916 for (
const auto &fd : *fn)
8918 bool doc = fd->isLinkableInProject();
8921 msg(
"Generating docs for file {}...\n",fd->docName());
8940 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8949 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
8958 const_cast<FileDef*
>(fd)->addSourceRef(nd->getStartDefLine(),nd.get(),
nullptr);
8965 for (
const auto &md : *mn)
8974 md->isLinkableInProject() &&
8980 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
8986 for (
const auto &md : *mn)
8996 md->isLinkableInProject() &&
9002 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
9019 for (
const auto &def : it->second)
9022 def.fileName,def.lineNr,def.columnNr,
9023 "#define",def.name,def.args,
QCString(),
9024 Protection::Public,Specifier::Normal,
FALSE,Relationship::Member,MemberType::Define,
9028 if (!def.args.isEmpty())
9032 mmd->setInitializer(def.definition);
9033 mmd->setFileDef(def.fileDef);
9034 mmd->setDefinition(
"#define "+def.name);
9039 const MemberList *defMl = def.fileDef->getMemberList(MemberListType::DocDefineMembers());
9048 def.fileDef->insertMember(md.get());
9050 AUTO_TRACE_ADD(
"adding macro {} with definition {}",def.name,def.definition);
9084 for (
const auto &fd : *fn)
9086 fd->sortMemberLists();
9093 gd->sortMemberLists();
9110 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9114 std::vector < std::future< void > > results;
9118 for (
const auto &def : symList)
9121 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
9123 auto processTooltip = [dm]() {
9126 results.emplace_back(threadPool.
queue(processTooltip));
9131 for (
auto &f : results)
9140 for (
const auto &def : symList)
9143 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
9190 for (
const auto &fd : *fn)
9212 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9218 : cd(cd_), ol(ol_) {}
9223 std::vector< std::future< std::shared_ptr<DocContext> > > results;
9224 for (
const auto &cd : classList)
9227 if (cd->getOuterScope()==
nullptr ||
9231 auto ctx = std::make_shared<DocContext>(cd,*
g_outputList);
9232 auto processFile = [ctx]()
9234 msg(
"Generating docs for compound {}...\n",ctx->cd->displayName());
9238 if (!ctx->cd->isHidden() && !ctx->cd->isEmbeddedInOuterScope() &&
9239 ctx->cd->isLinkableInProject() && !ctx->cd->isImplicitTemplateInstance())
9241 ctx->cd->writeDocumentation(ctx->ol);
9242 ctx->cd->writeMemberList(ctx->ol);
9246 ctx->cd->writeDocumentationForInnerClasses(ctx->ol);
9249 results.emplace_back(threadPool.
queue(processFile));
9252 for (
auto &f : results)
9259 for (
const auto &cd : classList)
9263 if (cd->getOuterScope()==
nullptr ||
9269 if ( !cd->isHidden() && !cd->isEmbeddedInOuterScope() &&
9270 cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
9272 msg(
"Generating docs for compound {}...\n",cd->displayName());
9287 for (
const auto &innerCdi : cd->
getClasses())
9292 AUTO_TRACE(
"innerCd={} isLinkable={} isImplicitTemplateInstance={} protectLevelVisible={} embeddedInOuterScope={}",
9301 list.push_back(innerCd);
9309 std::vector<ClassDefMutable*> classList;
9358 for (
const auto &imd : *mn)
9394 for (
const auto &fd : *fn)
9396 fd->combineUsingRelations();
9428 for (
const auto &fd : *fn)
9430 fd->addMembersToMemberGroup();
9445 gd->addMembersToMemberGroup();
9466 for (
const auto &fd : *fn)
9468 fd->distributeMemberGroupDocumentation();
9483 gd->distributeMemberGroupDocumentation();
9513 for (
const auto &fd : *fn)
9515 fd->findSectionsInDocumentation();
9530 gd->findSectionsInDocumentation();
9535 pd->findSectionsInDocumentation();
9540 dd->findSectionsInDocumentation();
9563 for (
const auto &ifmd : *fn)
9577 for (
const auto &imd : *nm)
9608 for (
const auto &imd : *nm)
9628 return fd->absFilePath() == root->
fileName;
9673 Protection::Public,Specifier::Normal,
FALSE,Relationship::Member,MemberType::Define,
9676 mmd->setTagInfo(root->
tagInfo());
9677 mmd->setLanguage(root->
lang);
9689 for (
const auto &md : *mn)
9691 if (md->memberType()==MemberType::Define) count++;
9695 for (
const auto &imd : *mn)
9698 if (md && md->
memberType()==MemberType::Define)
9713 for (
const auto &imd : *mn)
9716 if (md && md->
memberType()==MemberType::Define)
9740 warn(root->
fileName,root->
startLine,
"found documented #define {} but ignoring it because ENABLE_PREPROCESSING is NO.", root->
name);
9754 normalizedName =
substitute(normalizedName,
"\\",
"/");
9757 if (root->
docFile==normalizedName)
9759 int lastSlashPos=normalizedName.
findRev(
'/');
9760 if (lastSlashPos!=-1)
9762 normalizedName=normalizedName.
left(lastSlashPos);
9765 if (normalizedName.
at(normalizedName.
length()-1)!=
'/')
9767 normalizedName+=
'/';
9769 DirDef *matchingDir=
nullptr;
9773 if (dir->name().right(normalizedName.
length())==normalizedName)
9778 "\\dir command matches multiple directories.\n"
9779 " Applying the command for directory {}\n"
9780 " Ignoring the command for directory {}",
9781 matchingDir->
name(),dir->name()
9786 matchingDir=dir.get();
9803 warn(root->
fileName,root->
startLine,
"No matching directory found for command \\dir {}",normalizedName);
9812 if (root->
section.isRequirementDoc())
9824 if (root->
section.isPageDoc())
9831 else if (root->
section.isMainpageDoc())
9851 if (root->
section.isMainpageDoc())
9884 else if (si->
lineNr() != -1)
9886 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {}, line {})",
9891 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {})",
9908 else if (root->
tagInfo()==
nullptr)
9911 "found more than one \\mainpage comment block! (first occurrence: {}, line {}), Skipping current block!",
9921 if (root->
section.isMainpageDoc())
9945 term(
"page defined {} with label {} is a direct "
9946 "subpage of itself! Please remove this cyclic dependency.\n",
9970 term(
"page defined {} with label {} is a subpage "
9971 "of itself! Please remove this cyclic dependency.\n",
9972 warn_line(pd->docFile(),pd->docLine()),pd->name());
9998 if (si->label().left(label.
length())==label)
10000 si->setFileName(rl->listName());
10001 si->setGenerated(
TRUE);
10007 if (!si->generated())
10011 if (!si->fileName().isEmpty() &&
10018 if (si->definition())
10025 gd = (
toMemberDef(si->definition()))->getGroupDef();
10055 if (!pd->getGroupDef() && !pd->isReference())
10057 msg(
"Generating docs for page {}...\n",pd->name());
10072 warn(root->
fileName,root->
startLine,
"Example {} was already documented. Ignoring documentation found here.",root->
name);
10100 indentStr.
fill(
' ',indent);
10102 indentStr.
isEmpty()?
"":indentStr,
10107 for (
const auto &e : root->
children())
10125 si->label(),si->fileName(),si->title(),si->type().level(),si->ref());
10139 msg(
"Generating docs for example {}...\n",pd->name());
10141 if (lang != SrcLangExt::Unknown)
10145 intf->resetCodeParserState();
10147 QCString n=pd->getOutputFileBase();
10154 if (pd->showLineNo())
10156 lineNoOptStr=
"{lineno}";
10162 (pd->briefDescription().isEmpty()?
"":pd->briefDescription()+
"\n\n")+
10163 pd->documentation()+
"\n\n\\include"+lineNoOptStr+
" "+pd->name(),
10165 .setIndexWords(
true)
10166 .setExample(pd->name()));
10179 if (!gd->isReference())
10191 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10197 : cdm(cdm_), ol(ol_) {}
10202 std::vector< std::future< std::shared_ptr<DocContext> > > results;
10204 for (
const auto &cd : classList)
10209 auto ctx = std::make_shared<DocContext>(cdm,*
g_outputList);
10210 auto processFile = [ctx]()
10212 if ( ( ctx->cdm->isLinkableInProject() &&
10213 !ctx->cdm->isImplicitTemplateInstance()
10216 && !ctx->cdm->isHidden() && !ctx->cdm->isEmbeddedInOuterScope()
10219 msg(
"Generating docs for compound {}...\n",ctx->cdm->displayName());
10220 ctx->cdm->writeDocumentation(ctx->ol);
10221 ctx->cdm->writeMemberList(ctx->ol);
10223 ctx->cdm->writeDocumentationForInnerClasses(ctx->ol);
10226 results.emplace_back(threadPool.
queue(processFile));
10230 for (
auto &f : results)
10232 auto ctx = f.get();
10238 for (
const auto &cd : classList)
10243 if ( ( cd->isLinkableInProject() &&
10244 !cd->isImplicitTemplateInstance()
10247 && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
10250 msg(
"Generating docs for compound {}...\n",cd->displayName());
10264 for (
const auto &cd : conceptList)
10269 msg(
"Generating docs for concept {}...\n",cd->name());
10284 if (nd->isLinkableInProject())
10289 msg(
"Generating docs for namespace {}\n",nd->displayName());
10327 QCString cmd=qhgLocation+
" -v 2>&1";
10332 err(
"could not execute {}\n",qhgLocation);
10336 const size_t bufSize = 1024;
10337 char inBuf[bufSize+1];
10338 size_t numRead=fread(inBuf,1,bufSize,f);
10339 inBuf[numRead] =
'\0';
10344 static const reg::Ex versionReg(R
"(Qt (\d+)\.(\d+)\.(\d+))");
10346 std::string s = inBuf;
10353 if (qtVersion>0 && (qtVersion<60000 || qtVersion >= 60205))
10362 err(
"could not execute {}\n",qhgLocation);
10366 std::string output;
10367 while ((numRead=fread(inBuf,1,bufSize,f))>0)
10369 inBuf[numRead] =
'\0';
10401 warn_uncond(
"the dot tool could not be found as '{}'\n",dotPath);
10407 size_t l=dotPath.
length();
10408 for (
size_t i=0;i<l;i++)
if (dotPath.
at(i)==
'/') dotPath.
at(i)=
'\\';
10427 bool updateOnly=
FALSE)
10431 bool writeToStdout=configFile==
"-";
10436 if (!writeToStdout)
10440 msg(
"\n\nConfiguration file '{}' created.\n\n",configFile);
10441 msg(
"Now edit the configuration file and enter\n\n");
10442 if (configFile!=
"Doxyfile" && configFile!=
"doxyfile")
10443 msg(
" doxygen {}\n\n",configFile);
10445 msg(
" doxygen\n\n");
10446 msg(
"to generate the documentation for your project\n\n");
10450 msg(
"\n\nConfiguration file '{}' updated.\n\n",configFile);
10456 term(
"Cannot open file {} for writing\n",configFile);
10471 term(
"Cannot open stdout for writing\n");
10482 int eqPos = tagLine.
find(
'=');
10492 fileName = tagLine;
10498 err(
"Tag file '{}' does not exist or is not a file. Skipping it...\n",fileName);
10509 msg(
"Reading tag file '{}', location '{}'...\n",fileName,destName);
10513 msg(
"Reading tag file '{}'...\n",fileName);
10523 for (
const auto &sheet : latexExtraStyleSheet)
10525 std::string fileName = sheet;
10526 if (!fileName.empty())
10531 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",fileName);
10533 else if (fi.
isDir())
10535 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET is a directory, it has to be a file!\n", fileName);
10554 if (!htmlStyleSheet.
isEmpty())
10561 err(
"Style sheet '{}' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet);
10564 else if (fi.
isDir())
10566 err(
"Style sheet '{}' specified by HTML_STYLESHEET is a directory, it has to be a file!\n",htmlStyleSheet);
10572 copyFile(htmlStyleSheet,destFileName);
10577 for (
const auto &sheet : htmlExtraStyleSheet)
10585 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET does not exist!\n",fileName);
10589 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",fi.
fileName());
10591 else if (fi.
isDir())
10593 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is a directory, it has to be a file!\n",fileName);
10612 err(
"Project logo '{}' specified by PROJECT_LOGO does not exist!\n",projectLogo);
10615 else if (fi.
isDir())
10617 err(
"Project logo '{}' specified by PROJECT_LOGO is a directory, it has to be a file!\n",projectLogo);
10623 copyFile(projectLogo,destFileName);
10637 err(
"Project icon '{}' specified by PROJECT_ICON does not exist!\n",projectIcon);
10640 else if (fi.
isDir())
10642 err(
"Project icon '{}' specified by PROJECT_ICON is a directory, it has to be a file!\n",projectIcon);
10648 copyFile(projectIcon,destFileName);
10656 for (
const auto &fileName : files)
10658 if (!fileName.empty())
10663 err(
"Extra file '{}' specified in {} does not exist!\n", fileName,filesOption);
10665 else if (fi.
isDir())
10667 err(
"Extra file '{}' specified in {} is a directory, it has to be a file!\n", fileName,filesOption);
10693 std::vector<FileEntry> fileEntries;
10694 for (
const auto &fd : *fn)
10696 if (!fd->isReference())
10698 fileEntries.emplace_back(fd->getPath(),fd.get());
10702 size_t size = fileEntries.size();
10706 FileDef *fd = fileEntries[0].fileDef;
10712 std::stable_sort(fileEntries.begin(),
10714 [](
const FileEntry &fe1,
const FileEntry &fe2)
10715 { return qstricmp_sort(fe1.path,fe2.path)<0; }
10720 const FileEntry &first = fileEntries[0];
10721 const FileEntry &last = fileEntries[size-1];
10722 int first_path_size =
static_cast<int>(first.path.size())-1;
10723 int last_path_size =
static_cast<int>(last.path.size())-1;
10726 for (i=0;i<first_path_size && i<last_path_size;i++)
10728 if (first.path[i]==
'/') j=i;
10729 if (first.path[i]!=last.path[i])
break;
10731 if (i==first_path_size && i<last_path_size && last.path[i]==
'/')
10736 else if (i==last_path_size && i<first_path_size && first.path[i]==
'/')
10743 for (
auto &fileEntry : fileEntries)
10745 QCString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
10746 fileEntry.fileDef->setName(
prefix+fn->fileName());
10748 fileEntry.fileDef->setDiskName(
prefix+fn->fileName());
10762 int sep = fileName.
findRev(
'/');
10763 int ei = fileName.
findRev(
'.');
10764 if (ei!=-1 && (sep==-1 || ei>sep))
10770 extension =
".no_extension";
10783 int ei = fileName.
findRev(
'.');
10790 extension =
".no_extension";
10794 std::string preBuf;
10801 for (
const auto &s : includePath)
10807 msg(
"Preprocessing {}...\n",fn);
10814 msg(
"Reading {}...\n",fn);
10819 std::string convBuf;
10820 convBuf.reserve(preBuf.size()+1024);
10825 std::shared_ptr<Entry> fileRoot = std::make_shared<Entry>();
10829 if (newTU) clangParser->
parse();
10832 parser.
parseInput(fileName,convBuf.
data(),fileRoot,clangParser);
10833 fileRoot->setFileDef(fd);
10850 filesToProcess.insert(s);
10853 std::mutex processedFilesLock;
10855 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10856 msg(
"Processing input using {} threads.\n",numThreads);
10858 using FutureType = std::vector< std::shared_ptr<Entry> >;
10859 std::vector< std::future< FutureType > > results;
10862 bool ambig =
false;
10869 auto processFile = [qs,&filesToProcess,&processedFilesLock,&processedFiles]() {
10870 bool ambig_l =
false;
10871 std::vector< std::shared_ptr<Entry> > roots;
10875 auto fileRoot {
parseFile(*parser.get(),fd_l,qs,clangParser.get(),
true) };
10876 roots.push_back(fileRoot);
10880 for (
auto incFile : clangParser->filesInSameTU())
10883 if (filesToProcess.find(incFile)!=filesToProcess.end())
10885 bool needsToBeProcessed =
false;
10887 std::lock_guard<std::mutex> lock(processedFilesLock);
10888 needsToBeProcessed = processedFiles.find(incFile)==processedFiles.end();
10889 if (needsToBeProcessed) processedFiles.insert(incFile);
10891 if (qincFile!=qs && needsToBeProcessed)
10897 fileRoot =
parseFile(*parser.get(),ifd,qincFile,clangParser.get(),
false);
10898 roots.push_back(fileRoot);
10906 results.emplace_back(threadPool.
queue(processFile));
10910 for (
auto &f : results)
10915 root->moveToSubEntryAndKeep(e);
10922 if (processedFiles.find(s)==processedFiles.end())
10925 auto processFile = [s]() {
10926 bool ambig =
false;
10928 std::vector< std::shared_ptr<Entry> > roots;
10935 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
10936 roots.push_back(fileRoot);
10940 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10941 roots.push_back(fileRoot);
10945 results.emplace_back(threadPool.
queue(processFile));
10949 for (
auto &f : results)
10954 root->moveToSubEntryAndKeep(e);
10961 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10962 msg(
"Processing input using {} threads.\n",numThreads);
10964 using FutureType = std::shared_ptr<Entry>;
10965 std::vector< std::future< FutureType > > results;
10969 auto processFile = [s]() {
10970 bool ambig =
false;
10974 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
10978 results.emplace_back(threadPool.
queue(processFile));
10981 for (
auto &f : results)
10983 root->moveToSubEntryAndKeep(f.get());
11001 filesToProcess.insert(s);
11007 bool ambig =
false;
11015 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
11016 root->moveToSubEntryAndKeep(fileRoot);
11017 processedFiles.insert(s);
11021 for (
auto incFile : clangParser->filesInSameTU())
11024 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
11025 processedFiles.find(incFile)==processedFiles.end())
11031 fileRoot =
parseFile(*parser.get(),ifd,incFile,clangParser.get(),
false);
11032 root->moveToSubEntryAndKeep(fileRoot);
11033 processedFiles.insert(incFile);
11042 if (processedFiles.find(s)==processedFiles.end())
11044 bool ambig =
false;
11051 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
11052 root->moveToSubEntryAndKeep(fileRoot);
11057 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11058 root->moveToSubEntryAndKeep(fileRoot);
11060 processedFiles.insert(s);
11069 bool ambig =
false;
11074 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11075 root->moveToSubEntryAndKeep(std::move(fileRoot));
11095 sepPos = result.
find(
'/',2);
11097 sepPos = result.
find(
'/',sepPos+1);
11099 sepPos = result.
find(
'/',sepPos+1);
11102 if (nonSymlinks.find(
prefix.str())==nonSymlinks.end())
11119 target+=result.
mid(sepPos);
11122 if (known.find(result.
str())!=known.end())
return std::string();
11123 known.insert(result.
str());
11136 nonSymlinks.insert(
prefix.str());
11142 while (sepPos!=-1);
11161 bool errorIfNotExist,
11168 if (paths && !dirName.empty())
11170 paths->insert(dirName);
11176 if (dirName.empty())
11191 msg(
"Searching for files in directory {}\n", fi->
absFilePath());
11196 for (
const auto &dirEntry : dir.
iterator())
11199 auto checkPatterns = [&]() ->
bool
11201 return (patList==
nullptr ||
patternMatch(cfi,*patList)) &&
11202 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11203 (killSet==
nullptr || killSet->find(cfi.
absFilePath())==killSet->end());
11206 if (exclSet==
nullptr || exclSet->find(cfi.
absFilePath())==exclSet->end())
11214 if (errorIfNotExist && checkPatterns())
11219 else if (cfi.
isFile() && checkPatterns())
11222 std::string path=cfi.
dirPath()+
"/";
11223 std::string fullName=path+name;
11230 fn = fnMap->
add(name);
11231 fn->push_back(std::move(fd));
11234 dirResultList.push_back(fullName);
11235 if (resultSet) resultSet->insert(fullName);
11236 if (killSet) killSet->insert(fullName);
11238 else if (recursive &&
11240 (exclPatList==
nullptr || !
patternMatch(cfi,*exclPatList)) &&
11245 patList,exclPatList,&dirResultList,resultSet,errorIfNotExist,
11246 recursive,killSet,paths);
11250 if (resultList && !dirResultList.empty())
11253 std::stable_sort(dirResultList.begin(),
11254 dirResultList.end(),
11255 [](
const auto &f1,
const auto &f2) { return qstricmp_sort(f1.c_str(),f2.c_str())<0; });
11258 resultList->insert(resultList->end(), dirResultList.begin(), dirResultList.end());
11275 bool errorIfNotExist,
11289 if (exclSet==
nullptr || exclSet->find(fi.
absFilePath())==exclSet->end())
11296 if (errorIfNotExist)
11298 warn_uncond(
"source '{}' is not a readable file or directory... skipping.\n",s);
11303 std::string dirPath = fi.
dirPath(
true);
11305 if (paths && !dirPath.empty())
11307 paths->insert(dirPath);
11310 if (killSet==
nullptr || killSet->find(filePath)==killSet->end())
11319 fn->push_back(std::move(fd));
11322 if (resultList || resultSet)
11324 if (resultList) resultList->push_back(filePath);
11325 if (resultSet) resultSet->insert(filePath);
11331 else if (fi.
isDir())
11333 readDir(&fi,fnMap,exclSet,patList,
11334 exclPatList,resultList,resultSet,errorIfNotExist,
11335 recursive,killSet,paths);
11349 anchor=
":"+md->
anchor();
11358 t <<
"REPLACE INTO symbols (symbol_id,scope_id,name,file,line) VALUES('"
11359 << fn+anchor <<
"','"
11361 << d->
name() <<
"','"
11375 for (
const auto &def : symList)
11387 msg(
"Developer parameters:\n");
11388 msg(
" -m dump symbol map\n");
11389 msg(
" -b making messages output unbuffered\n");
11390 msg(
" -c <file> process input file as a comment block and produce HTML output\n");
11392 msg(
" -t [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout)\n");
11393 msg(
" -t_time [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout),\n"
11394 " and include time and thread information\n");
11396 msg(
" -d <level> enable a debug level, such as (multiple invocations of -d are possible):\n");
11407 QCString versionString = getFullVersion();
11408 msg(
"{}\n",versionString);
11412 if (!extVers.
isEmpty()) extVers+=
", ";
11413 extVers +=
"sqlite3 ";
11414 extVers += sqlite3_libversion();
11416 if (!extVers.
isEmpty()) extVers+=
", ";
11417 extVers +=
"clang support ";
11418 extVers += CLANG_VERSION_STRING;
11422 int lastComma = extVers.
findRev(
',');
11423 if (lastComma != -1) extVers = extVers.
replace(lastComma,1,
" and");
11424 msg(
" with {}.\n",extVers);
11435 msg(
"Doxygen version {0}\nCopyright Dimitri van Heesch 1997-2025\n\n"
11436 "You can use Doxygen in a number of ways:\n\n"
11437 "1) Use Doxygen to generate a template configuration file*:\n"
11438 " {1} [-s] -g [configName]\n\n"
11439 "2) Use Doxygen to update an old configuration file*:\n"
11440 " {1} [-s] -u [configName]\n\n"
11441 "3) Use Doxygen to generate documentation using an existing "
11442 "configuration file*:\n"
11443 " {1} [configName]\n\n"
11444 "4) Use Doxygen to generate a template file controlling the layout of the\n"
11445 " generated documentation:\n"
11446 " {1} -l [layoutFileName]\n\n"
11447 " In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.\n"
11448 " If - is used for layoutFileName Doxygen will write to standard output.\n\n"
11449 "5) Use Doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"
11450 " RTF: {1} -w rtf styleSheetFile\n"
11451 " HTML: {1} -w html headerFile footerFile styleSheetFile [configFile]\n"
11452 " LaTeX: {1} -w latex headerFile footerFile styleSheetFile [configFile]\n\n"
11453 "6) Use Doxygen to generate a rtf extensions file\n"
11454 " {1} -e rtf extensionsFile\n\n"
11455 " If - is used for extensionsFile Doxygen will write to standard output.\n\n"
11456 "7) Use Doxygen to compare the used configuration file with the template configuration file\n"
11457 " {1} -x [configFile]\n\n"
11458 " Use Doxygen to compare the used configuration file with the template configuration file\n"
11459 " without replacing the environment variables or CMake type replacement variables\n"
11460 " {1} -x_noenv [configFile]\n\n"
11461 "8) Use Doxygen to show a list of built-in emojis.\n"
11462 " {1} -f emoji outputFileName\n\n"
11463 " If - is used for outputFileName Doxygen will write to standard output.\n\n"
11464 "*) If -s is specified the comments of the configuration items in the config file will be omitted.\n"
11465 " If configName is omitted 'Doxyfile' will be used as a default.\n"
11466 " If - is used for configFile Doxygen will write / read the configuration to /from standard output / input.\n\n"
11467 "If -q is used for a Doxygen documentation run, Doxygen will see this as if QUIET=YES has been set.\n\n"
11468 "-v print version string, -V print extended version information\n"
11469 "-h,-? prints usage help information\n"
11470 "{1} -d prints additional usage flags for debugging purposes\n",versionString,name);
11477static const char *
getArg(
int argc,
char **argv,
int &optInd)
11480 if (
qstrlen(&argv[optInd][2])>0)
11481 s=&argv[optInd][2];
11482 else if (optInd+1<argc && argv[optInd+1][0]!=
'-')
11501 return []() {
return std::make_unique<T>(); };
11509 std::setlocale(LC_ALL,
"");
11510 std::setlocale(LC_CTYPE,
"C");
11511 std::setlocale(LC_NUMERIC,
"C");
11609 QCString versionString = getFullVersion();
11612 auto writeFile = [](
const char *fileName,std::function<void(
TextStream&)> func) ->
bool
11632 bool genConfig=
false;
11633 bool shortList=
false;
11634 bool traceTiming=
false;
11636 bool updateConfig=
false;
11637 bool quiet =
false;
11638 while (optInd<argc && argv[optInd][0]==
'-' &&
11639 (isalpha(argv[optInd][1]) || argv[optInd][1]==
'?' ||
11640 argv[optInd][1]==
'-')
11643 switch(argv[optInd][1])
11653 if (optInd+1>=argc)
11655 layoutName=
"DoxygenLayout.xml";
11659 layoutName=argv[optInd+1];
11667 if (optInd+1>=argc)
11669 msg(
"option \"-c\" is missing the file name to read\n");
11694 msg(
"option \"-d\" has unknown debug specifier: \"{}\".\n",debugLabel);
11704 if (!strcmp(argv[optInd]+1,
"t_time"))
11706 traceTiming =
true;
11708 else if (!strcmp(argv[optInd]+1,
"t"))
11710 traceTiming =
false;
11714 err(
"option should be \"-t\" or \"-t_time\", found: \"{}\".\n",argv[optInd]);
11718 if (optInd+1>=argc || argv[optInd+1][0] ==
'-')
11720 traceName=
"stdout";
11724 traceName=argv[optInd+1];
11728 err(
"support for option \"-t\" has not been compiled in (use a debug build or a release build with tracing enabled).\n");
11739 err(
"option should be \"-x\" or \"-x_noenv\", found: \"{}\".\n",argv[optInd]);
11755 err(
"option \"-e\" is missing format specifier rtf.\n");
11761 if (optInd+1>=argc)
11763 err(
"option \"-e rtf\" is missing an extensions file name\n");
11771 err(
"option \"-e\" has invalid format specifier.\n");
11781 err(
"option \"-f\" is missing list specifier.\n");
11787 if (optInd+1>=argc)
11789 err(
"option \"-f emoji\" is missing an output file name\n");
11797 err(
"option \"-f\" has invalid list specifier.\n");
11807 err(
"option \"-w\" is missing format specifier rtf, html or latex\n");
11813 if (optInd+1>=argc)
11815 err(
"option \"-w rtf\" is missing a style sheet file name\n");
11821 err(
"error opening RTF style sheet file {}!\n",argv[optInd+1]);
11831 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11837 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
11842 if (optInd+3>=argc)
11844 err(
"option \"-w html\" does not have enough arguments\n");
11861 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
11866 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
11871 if (optInd+3>=argc)
11873 err(
"option \"-w latex\" does not have enough arguments\n");
11889 err(
"Illegal format specifier \"{}\": should be one of rtf, html or latex\n",formatName);
11909 if (
qstrcmp(&argv[optInd][2],
"help")==0)
11911 usage(argv[0],versionString);
11914 else if (
qstrcmp(&argv[optInd][2],
"version")==0)
11920 else if ((
qstrcmp(&argv[optInd][2],
"Version")==0) ||
11921 (
qstrcmp(&argv[optInd][2],
"VERSION")==0))
11929 err(
"Unknown option \"-{}\"\n",&argv[optInd][1]);
11930 usage(argv[0],versionString);
11935 setvbuf(stdout,
nullptr,_IONBF,0);
11942 usage(argv[0],versionString);
11946 err(
"Unknown option \"-{:c}\"\n",argv[optInd][1]);
11947 usage(argv[0],versionString);
11958 TRACE(
"Doxygen version used: {}",getFullVersion());
11961 FileInfo configFileInfo1(
"Doxyfile"),configFileInfo2(
"doxyfile");
11964 if (configFileInfo1.exists())
11966 configName=
"Doxyfile";
11968 else if (configFileInfo2.
exists())
11970 configName=
"doxyfile";
11972 else if (genConfig)
11974 configName=
"Doxyfile";
11978 err(
"Doxyfile not found and no input file specified!\n");
11979 usage(argv[0],versionString);
11986 if (fi.
exists() ||
qstrcmp(argv[optInd],
"-")==0 || genConfig)
11988 configName=argv[optInd];
11992 err(
"configuration file {} not found!\n",argv[optInd]);
11993 usage(argv[0],versionString);
12007 err(
"could not open or read configuration file {}!\n",configName);
12079 for (
const auto &mapping : extMaps)
12082 int i=mapStr.
find(
'=');
12098 err(
"Failed to map file extension '{}' to unsupported language '{}'.\n"
12099 "Check the EXTENSION_MAPPING setting in the config file.\n",
12104 msg(
"Adding custom extension mapping: '{}' will be treated as language '{}'\n",
12113 if (cd==
reinterpret_cast<void *
>(-1))
12115 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
12116 "Check the 'INPUT_ENCODING' setting in the config file!\n",
12126 for (
const auto &mapping : fileEncod)
12129 int i=mapStr.
find(
'=');
12143 if (cd==
reinterpret_cast<void *
>(-1))
12145 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
12146 "Check the 'INPUT_FILE_ENCODING' setting in the config file!\n",
12147 encoding,strerror(errno));
12160 for (
const auto &s : expandAsDefinedList)
12178 signal(SIGINT,SIG_DFL);
12180 msg(
"Cleaning up...\n");
12195 if (generateTagFile.
isEmpty())
return;
12200 err(
"cannot open tag file {} for writing\n", generateTagFile);
12204 tagFile <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
12205 tagFile <<
"<tagfile doxygen_version=\"" << getDoxygenVersion() <<
"\"";
12206 std::string gitVersion = getGitVersion();
12207 if (!gitVersion.empty())
12209 tagFile <<
" doxygen_gitid=\"" << gitVersion <<
"\"";
12216 for (
const auto &fd : *fn)
12218 if (fd->isLinkableInProject()) fd->writeTagFile(tagFile);
12251 if (gd->isLinkableInProject()) gd->writeTagFile(tagFile);
12256 if (mod->isLinkableInProject()) mod->writeTagFile(tagFile);
12261 if (pd->isLinkableInProject()) pd->writeTagFile(tagFile);
12268 if (dd->isLinkableInProject()) dd->writeTagFile(tagFile);
12272 tagFile <<
"</tagfile>\n";
12280 msg(
"Exiting...\n");
12290 const char *defaultDirName)
12295 result = baseDirName + defaultDirName;
12297 else if (formatDirName[0]!=
'/' && (formatDirName.
length()==1 || formatDirName[1]!=
':'))
12299 result.
prepend(baseDirName+
"/");
12301 Dir formatDir(result.
str());
12304 term(
"Could not create output directory {}\n", result);
12318 g_s.begin(
"Searching for include files...\n");
12321 for (
const auto &s : includePathList)
12339 g_s.begin(
"Searching for example files...\n");
12342 for (
const auto &s : examplePathList)
12357 g_s.begin(
"Searching for images...\n");
12360 for (
const auto &s : imagePathList)
12375 g_s.begin(
"Searching for dot files...\n");
12378 for (
const auto &s : dotFileList)
12393 g_s.begin(
"Searching for msc files...\n");
12396 for (
const auto &s : mscFileList)
12411 g_s.begin(
"Searching for dia files...\n");
12414 for (
const auto &s : diaFileList)
12429 g_s.begin(
"Searching for plantuml files...\n");
12432 for (
const auto &s : plantUmlFileList)
12447 g_s.begin(
"Searching for mermaid files...\n");
12450 for (
const auto &s : mermaidFileList)
12465 g_s.begin(
"Searching for files to exclude\n");
12467 for (
const auto &s : excludeList)
12485 g_s.begin(
"Searching INPUT for files to process...\n");
12489 for (
const auto &s : inputList)
12492 size_t l = path.
length();
12496 if (path.
at(l-1)==
'\\' || path.
at(l-1)==
'/') path=path.
left(l-1);
12516 if (fileName->size()>1)
12518 std::stable_sort(fileName->begin(),fileName->end(),[](
const auto &f1,
const auto &f2)
12520 return qstricmp_sort(f1->absFilePath(),f2->absFilePath())<0;
12526 [](
const auto &f1,
const auto &f2)
12528 return qstricmp_sort(f1->front()->absFilePath(),f2->front()->absFilePath())<0;
12532 warn_uncond(
"No files to be processed, please check your settings, in particular INPUT, FILE_PATTERNS, and RECURSIVE\n");
12543 if (mdfileAsMainPage.
isEmpty())
return;
12547 warn_uncond(
"Specified markdown mainpage '{}' does not exist\n",mdfileAsMainPage);
12550 bool ambig =
false;
12553 warn_uncond(
"Specified markdown mainpage '{}' has not been defined as input file\n",mdfileAsMainPage);
12572 QCString versionString = getFullVersion();
12573 msg(
"Doxygen version used: {}\n",versionString);
12583 if (outputDirectory.
isEmpty())
12589 Dir dir(outputDirectory.
str());
12593 if (!dir.
mkdir(outputDirectory.
str()))
12595 term(
"tag OUTPUT_DIRECTORY: Output directory '{}' does not "
12596 "exist and cannot be created\n",outputDirectory);
12600 msg(
"Notice: Output directory '{}' does not exist. "
12601 "I have created it for you.\n", outputDirectory);
12649 bool generateSitemap = !sitemapUrl.
isEmpty();
12650 if (generateSitemap && !sitemapUrl.
endsWith(
"/"))
12657 bool generateEclipseHelp =
Config_getBool(GENERATE_ECLIPSEHELP);
12671 if (generateDocbook)
12718 newFontPath+=curFontPath;
12734 bool defaultLayoutUsed =
FALSE;
12735 if (layoutFileName.
isEmpty())
12738 defaultLayoutUsed =
TRUE;
12740 AUTO_TRACE_ADD(
"defaultLayoutUsed={}, layoutFileName={}",defaultLayoutUsed,layoutFileName);
12745 msg(
"Parsing layout file {}...\n",layoutFileName);
12748 else if (!defaultLayoutUsed)
12750 warn_uncond(
"failed to open layout file '{}' for reading! Using default settings.\n",layoutFileName);
12760 if (generateHtml) exclPatterns.push_back(htmlOutput.
str());
12761 if (generateDocbook) exclPatterns.push_back(docbookOutput.
str());
12762 if (generateXml) exclPatterns.push_back(xmlOutput.
str());
12763 if (generateLatex) exclPatterns.push_back(latexOutput.
str());
12764 if (generateRtf) exclPatterns.push_back(rtfOutput.
str());
12765 if (generateMan) exclPatterns.push_back(manOutput.
str());
12785 if (generateDocbook)
12796 std::shared_ptr<Entry> root = std::make_shared<Entry>();
12800 msg(
"Reading and parsing tag files\n");
12802 for (
const auto &s : tagFileList)
12814 g_s.begin(
"Parsing files\n");
12854 g_s.begin(
"Building macro definition list...\n");
12858 g_s.begin(
"Building group list...\n");
12863 g_s.begin(
"Building directory list...\n");
12868 g_s.begin(
"Building namespace list...\n");
12873 g_s.begin(
"Building file list...\n");
12877 g_s.begin(
"Building class list...\n");
12881 g_s.begin(
"Building concept list...\n");
12889 g_s.begin(
"Computing nesting relations for classes...\n");
12902 g_s.begin(
"Associating documentation with classes...\n");
12906 g_s.begin(
"Associating documentation with concepts...\n");
12911 g_s.begin(
"Associating documentation with modules...\n");
12915 g_s.begin(
"Building example list...\n");
12919 g_s.begin(
"Searching for enumerations...\n");
12927 g_s.begin(
"Searching for documented typedefs...\n");
12933 g_s.begin(
"Searching for documented sequences...\n");
12937 g_s.begin(
"Searching for documented dictionaries...\n");
12942 g_s.begin(
"Searching for members imported via using declarations...\n");
12949 g_s.begin(
"Searching for included using directives...\n");
12953 g_s.begin(
"Searching for documented variables...\n");
12957 g_s.begin(
"Building interface member list...\n");
12960 g_s.begin(
"Building member list...\n");
12964 g_s.begin(
"Searching for friends...\n");
12968 g_s.begin(
"Searching for documented defines...\n");
12972 g_s.begin(
"Computing class inheritance relations...\n");
12977 g_s.begin(
"Computing class usage relations...\n");
12981 g_s.begin(
"Flushing cached template relations that have become invalid...\n");
12985 g_s.begin(
"Warn for undocumented namespaces...\n");
12989 g_s.begin(
"Computing class relations...\n");
13000 g_s.begin(
"Add enum values to enums...\n");
13005 g_s.begin(
"Searching for member function documentation...\n");
13017 g_s.begin(
"Creating members for template instances...\n");
13021 g_s.begin(
"Searching for tag less structs...\n");
13025 g_s.begin(
"Building page list...\n");
13029 g_s.begin(
"Building requirements list...\n");
13033 g_s.begin(
"Search for main page...\n");
13038 g_s.begin(
"Computing page relations...\n");
13043 g_s.begin(
"Determining the scope of groups...\n");
13047 g_s.begin(
"Computing module relations...\n");
13049 mm.resolvePartitions();
13050 mm.resolveImports();
13051 mm.collectExportedSymbols();
13070 return i==0 ?
qstricmp_sort(c1->name(), c2->name())<0 : i<0;
13084 g_s.begin(
"Sorting lists...\n");
13105 g_s.begin(
"Determining which enums are documented\n");
13109 g_s.begin(
"Computing member relations...\n");
13114 g_s.begin(
"Building full member lists recursively...\n");
13118 g_s.begin(
"Adding members to member groups.\n");
13124 g_s.begin(
"Distributing member group documentation.\n");
13129 g_s.begin(
"Computing member references...\n");
13135 g_s.begin(
"Inheriting documentation...\n");
13143 g_s.begin(
"Generating disk names...\n");
13147 g_s.begin(
"Adding source references...\n");
13151 g_s.begin(
"Adding xrefitems...\n");
13156 g_s.begin(
"Adding requirements...\n");
13161 g_s.begin(
"Sorting member lists...\n");
13165 g_s.begin(
"Setting anonymous enum type...\n");
13169 g_s.begin(
"Computing dependencies between directories...\n");
13173 g_s.begin(
"Generating citations page...\n");
13177 g_s.begin(
"Counting data structures...\n");
13181 g_s.begin(
"Resolving user defined references...\n");
13185 g_s.begin(
"Finding anchors and sections in the documentation...\n");
13189 g_s.begin(
"Transferring function references...\n");
13193 g_s.begin(
"Combining using relations...\n");
13198 g_s.begin(
"Adding members to index pages...\n");
13203 g_s.begin(
"Correcting members for VHDL...\n");
13207 g_s.begin(
"Computing tooltip texts...\n");
13215 [](
const auto &g1,
const auto &g2)
13216 {
return g1->groupTitle() < g2->groupTitle(); });
13220 gd->sortSubGroups();
13264 if (generateDocbook)
13284 err(
"USE_HTAGS is YES but htags(1) failed. \n");
13286 err(
"htags(1) ended normally but failed to load the filemap. \n");
13293 g_s.begin(
"Generating style sheet...\n");
13301 g_s.begin(
"Generating search indices...\n");
13302 if (searchEngine && !serverBasedSearch && generateHtml)
13310 if (generateHtml && searchEngine)
13313 Dir searchDir(searchDirName.
str());
13314 if (!searchDir.
exists() && !searchDir.
mkdir(searchDirName.
str()))
13316 term(
"Could not create search results directory '{}' $PWD='{}'\n",
13320 if (!serverBasedSearch)
13342 if (generateDocbook)
13358 g_s.begin(
"Generating images for formulas in HTML...\n");
13365 g_s.begin(
"Generating images for formulas in RTF...\n");
13372 g_s.begin(
"Generating images for formulas in Docbook...\n");
13377 g_s.begin(
"Generating example documentation...\n");
13381 g_s.begin(
"Generating file sources...\n");
13385 g_s.begin(
"Counting members...\n");
13391 g_s.begin(
"Generating file documentation...\n");
13395 g_s.begin(
"Generating page documentation...\n");
13399 g_s.begin(
"Generating group documentation...\n");
13403 g_s.begin(
"Generating class documentation...\n");
13407 g_s.begin(
"Generating concept documentation...\n");
13411 g_s.begin(
"Generating module documentation...\n");
13415 g_s.begin(
"Generating namespace documentation...\n");
13421 g_s.begin(
"Generating graph info page...\n");
13426 g_s.begin(
"Generating directory documentation...\n");
13435 g_s.begin(
"finalizing index lists...\n");
13439 g_s.begin(
"writing tag file...\n");
13445 g_s.begin(
"Generating XML output...\n");
13453 g_s.begin(
"Generating SQLITE3 output...\n");
13460 g_s.begin(
"Generating AutoGen DEF output...\n");
13466 g_s.begin(
"Generating Perl module output...\n");
13470 if (generateHtml && searchEngine && serverBasedSearch)
13472 g_s.begin(
"Generating search index\n");
13482 if (searchDataFile.
isEmpty())
13484 searchDataFile=
"searchdata.xml";
13497 g_s.begin(
"Combining RTF output...\n");
13500 err(
"An error occurred during post-processing the RTF files!\n");
13507 g_s.begin(
"Running plantuml with JAVA...\n");
13514 g_s.begin(
"Running mermaid (mmdc)...\n");
13521 g_s.begin(
"Running dot...\n");
13526 if (generateHtml &&
13530 g_s.begin(
"Running html help compiler...\n");
13535 if ( generateHtml &&
13539 g_s.begin(
"Running qhelpgenerator...\n");
13552 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
13553 if (numThreads<1) numThreads=1;
13554 msg(
"Total elapsed time: {:.6f} seconds\n(of which an average of {:.6f} seconds per thread waiting for external tools to finish)\n",
13561 msg(
"finished...\n");
13566 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. class/struct/union/...
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 setPrimaryConstructorParams(const ArgumentList &list)=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 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 addCodePart(const QCString &code, int lineNr, int colNr)=0
virtual void setFileDef(FileDef *fd)=0
virtual void writeTagFile(TextStream &)=0
virtual void setInitializer(const QCString &init)=0
virtual void addDocPart(const QCString &doc, int lineNr, int colNr)=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 setRequirementReferences(const RequirementRefs &rqli)=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 InputFileEncodingList inputFileEncodingList
static ClassLinkedMap * classLinkedMap
static MemberNameLinkedMap * functionNameLinkedMap
static PageLinkedMap * exampleLinkedMap
static FileNameLinkedMap * dotFileNameLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * imageNameLinkedMap
static FileNameLinkedMap * mscFileNameLinkedMap
static FileNameLinkedMap * mermaidFileNameLinkedMap
static QCString verifiedDotPath
static MemberGroupInfoMap memberGroupInfoMap
static IndexList * indexList
static StaticInitMap staticInitMap
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?
RequirementRefs rqli
references to requirements
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.
constexpr bool isCompoundDoc() const noexcept
constexpr bool isFile() const noexcept
constexpr bool isDoc() const noexcept
ENTRY_TYPES constexpr bool isCompound() const noexcept
std::string to_string() const
constexpr bool isScope() const noexcept
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 setClassDefOfAnonymousType(const ClassDef *cd)=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 void setToAnonymousMember(MemberDef *m)=0
virtual ClassDefMutable * getClassDefMutable()=0
virtual void setExplicitExternal(bool b, const QCString &df, int line, int column)=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 setAnonymousEnumType(const MemberDef *md)=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.
Wrapper class for the MemberListType type.
Ordered dictionary of MemberName objects.
const MemberDef * find(const QCString &name) const
const MemberDef * findRev(const QCString &name) const
void run()
Run mmdc tool for all collected diagrams.
static MermaidManager & instance()
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 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()
static RequirementManager & instance()
void writeTagFile(TextStream &tagFile)
void addRequirement(Entry *e)
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
static void showCacheUsage()
Show usage of the type lookup cache.
static void clearTypeLookupCache(ClearScope scope)
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. an enum) this method will return it.
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 ClassDefMutable * createTagLessInstance(const Definition *root, const ClassDef *templ, const QCString &fieldName)
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 copyExtraFiles(const StringVector &files, const QCString &filesOption, const QCString &outputOption, bool toIndex)
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 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 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 buildRequirementsList(Entry *root)
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 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 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 processTagLessClasses(const Definition *root, const Container *cd, const TagContainer *tagParent, MemberListType varFilter, MemberListType typeFilter, const QCString &prefix, int count)
Look through the members of class cd and its public members.
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 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 copyLogo(const QCString &outputOption, bool toIndex)
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()
static void associateVariableWithAnonymousEnumType(const MemberDef *md, const Container *cd, const MemberDef *enumTypeMember, MemberListType mlFilter)
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 copyIcon(const QCString &outputOption, bool toIndex)
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 addRequirementReferences()
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 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 applyToAllDefinitions(Func func)
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)
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
static constexpr const char * getGroupPriName(GroupPri_t priority) noexcept
@ GROUPING_INGROUP
membership in group was defined by @ingroup
GroupPri_t pri
priority of this definition
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)
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const QCString &srcReturnType, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const QCString &dstReturnType, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
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 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()
void cleanupInlineGraph()
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.