30#include <unordered_map>
123#pragma GCC diagnostic push
124#pragma GCC diagnostic ignored "-Wshadow"
126#include <clang/Basic/Version.h>
128#pragma GCC diagnostic pop
135#if !defined(_WIN32) || defined(__CYGWIN__)
203{
"template class",
"template struct",
"class",
"struct",
"record",
"union",
"interface",
"exception" };
240 stats.emplace_back(name,0);
241 startTime = std::chrono::steady_clock::now();
245 std::chrono::steady_clock::time_point endTime = std::chrono::steady_clock::now();
246 stats.back().elapsed =
static_cast<double>(std::chrono::duration_cast<
247 std::chrono::microseconds>(endTime -
startTime).count())/1000000.0;
258 msg(
"----------------------\n");
259 for (
const auto &s :
stats)
261 msg(
"Spent {:.6f} seconds in {}",s.elapsed,s.name);
326 if (!includeFile.
empty() && includeFile.
at(0)==
'"')
329 includeFile=includeFile.
mid(1,includeFile.
length()-2);
331 else if (!includeFile.
empty() && includeFile.
at(0)==
'<')
334 includeFile=includeFile.
mid(1,includeFile.
length()-2);
341 if (!includeFile.
empty() &&
346 text.
sprintf(
"the name '%s' supplied as "
347 "the argument of the \\class, \\struct, \\record, \\union, or \\headerfile command ",
352 text+=
"matches the following input files:\n";
355 text+=
"Please use a more specific name by "
356 "including a (larger) part of the path!";
360 text+=
"is not an input file";
364 else if (includeFile.
empty() && ifd &&
378 if (iName.
at(0)==
'<') local=
false;
379 else if (iName.
at(0)==
'"') local=
true;
380 if (iName.
at(0)==
'"' || iName.
at(0)==
'<')
404 def->setIncludeFile(
nullptr,iName,local,
true);
427 scope+=
"::"+pd->
name();
470 ((!includeExternal && root->
tagInfo()==
nullptr) ||
471 ( includeExternal && root->
tagInfo()!=
nullptr))
474 AUTO_TRACE(
"additional={} includeExternal={}",additional,includeExternal);
490 "group {}: ignoring title \"{}\" that does not match old title \"{}\"",
511 std::unique_ptr<GroupDef>(
518 std::unique_ptr<GroupDef>(
569 scope+=
"::"+gd->
name();
621 bool save_ambig = ambig;
625 size_t newIndex=fn.
rfind(
'/');
632 fn = fn.
left(newIndex)+
"/"+root->
name;
635 if (!fd) ambig = save_ambig;
667 "Found non-existing group '{}' for the command '{}', ignoring command",
676 text.
sprintf(
"the name '%s' supplied as "
677 "the argument in the \\file statement ",
681 text+=
"matches the following input files:\n";
684 text+=
"Please use a more specific name by "
685 "including a (larger) part of the path!";
689 text+=
"is not an input file";
703 for (
size_t i=0;i<l;i++)
707 else if (c==
')' && round>0) round--;
708 else if (c==
'<' && round==0) count++;
713 if (c==
'>' && round==0 && count>0) count--;
727 name.stripPrefix(
"::");
728 int level = name.contains(
"::");
736 if (idx==-1)
return prevScope;
737 DString nsName = name.mid(idx,l);
738 if (nsName.
empty())
return prevScope;
739 if (!fullScope.
empty()) fullScope+=
"::";
744 if (nd==
nullptr) cd =
getClass(fullScope);
745 if (nd==
nullptr && cd)
757 "[generated]",1,1,fullScope,
775 if (prevScopeMutable)
807 int p=i1+l1,l2=0,i2=0;
810 DString nestedNameSpecifier = scope.
mid(i1,l1);
815 if (resultScope==
nullptr)
826 if (resultScope!=
nullptr)
break;
885 auto alIt = tArgLists.begin();
886 while ((i=name.find(
"::",p))!=
DString::npos && alIt!=tArgLists.end())
902 return alIt!=tArgLists.end() ?
903 std::make_unique<ArgumentList>(*alIt) :
904 std::unique_ptr<ArgumentList>();
912 if (specifier.isStruct())
914 else if (specifier.isRecord())
916 else if (specifier.isUnion())
918 else if (specifier.isCategory())
920 else if (specifier.isInterface())
922 else if (specifier.isProtocol())
924 else if (specifier.isException())
926 else if (specifier.isService())
928 else if (specifier.isSingleton())
931 if (section.isUnionDoc())
933 else if (section.isStructDoc())
935 else if (section.isRecordDoc())
937 else if (section.isInterfaceDoc())
939 else if (section.isProtocolDoc())
941 else if (section.isCategoryDoc())
943 else if (section.isExceptionDoc())
945 else if (section.isServiceDoc())
947 else if (section.isSingletonDoc())
975 DString qualifiedName = fullName;
978 qualifiedName.
prepend(scName+
"::");
984 AUTO_TRACE_ADD(
"Found class with name '{}', qualifiedName '{}'", cd ? cd->
name() : root->
name, qualifiedName);
1039 AUTO_TRACE_ADD(
"New class: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1056 std::unique_ptr<ArgumentList> tArgList;
1058 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) &&
1073 fullName=fullName.
left(i);
1084 fullName,sec,tagName,refFileName,
true,root->
spec.isEnum()) ));
1087 AUTO_TRACE_ADD(
"New class '{}' type={} #tArgLists={} tagInfo={} hidden={} artificial={}",
1097 if ((root->
lang==SrcLangExt::CSharp || root->
lang==SrcLangExt::Java) && !root->
args.
empty())
1124 AUTO_TRACE_ADD(
"Class {} not added, already exists as alias", fullName);
1132 if (!root->
spec.isForwardDecl())
1194 qualifiedName.
prepend(scName+
"::");
1200 AUTO_TRACE_ADD(
"Found concept with name '{}' (qualifiedName='{}')", cd ? cd->
name() : root->
name, qualifiedName);
1204 qualifiedName=cd->
name();
1218 AUTO_TRACE_ADD(
"New concept: fullname '{}' namespace '{}' name='{}' brief='{}' docs='{}'",
1219 qualifiedName,namespaceName,className,root->
brief,root->
doc);
1240 qualifiedName,tagName,refFileName)));
1244 qualifiedName,root->
tArgLists.size(),fmt::ptr(tagInfo));
1275 for (
const auto &ce : root->
children())
1278 if (ce->section.isConceptDocPart())
1283 if (!ce->brief.empty())
1285 cd->
addDocPart(ce->brief,ce->startLine,ce->startColumn);
1288 if (!ce->doc.empty())
1290 cd->
addDocPart(ce->doc,ce->startLine,ce->startColumn);
1294 else if (ce->section.isConceptCodePart())
1296 cd->
addCodePart(ce->initializer.str(),ce->startLine,ce->startColumn);
1303 AUTO_TRACE_ADD(
"Concept '{}' not added, already exists (as alias)", qualifiedName);
1310 for (
const auto &ce : root->
children())
1312 if (ce->section.isConceptDocPart())
1332 if (root->
section.isModuleDoc())
1342 if (root->
section.isConcept())
1352 if (root->
section.isConceptDoc())
1371 if (cd!=ocd && cd->groupId()==ocd->groupId() &&
1372 !cd->partOfGroups().empty() && ocd->partOfGroups().empty())
1377 for (
const auto &gd : cd->partOfGroups())
1383 gd->addConcept(ocd.get());
1408 aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
1410 std::unique_ptr<ClassDef> aliasCd;
1413 std::vector<ClassAlias> aliases;
1417 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1423 name,icd->getFileDef(),
nullptr);
1449 aliases.emplace_back(aliasFullName,std::move(aliasCd),dm);
1460 visitedClasses.insert(icd.get());
1470 for (
auto &alias : aliases)
1475 alias.aliasContext->addInnerCompound(aliasCd);
1484 if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
1506 "Incomplete input: scope for class {} not found!{}",name,
1507 name.startsWith(
"std::") ?
" Try enabling BUILTIN_STL_SUPPORT." :
""
1526 if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
1530 for (
auto &ncd : cd->getClasses())
1541 visitedClasses.insert(cd.get());
1548template<
typename Container>
1550 const Container *cd,
1556 MemberList *eiml = cd->getMemberList(mlFilter);
1559 for (
const auto &eimd : *eiml)
1561 DString vtype = eimd->typeString();
1579 if (
Config_getEnum(TAGLESS_NAMESTYLE)==TAGLESS_NAMESTYLE_t::flat)
1591 if (!fullName.
empty()) fullName +=
".";
1592 fullName += fieldName;
1600 const char *p = n.
data()+sn;
1604 if (!isdigit(c) && c!=
'@' && c!=
':')
break;
1610 fullName = n+
"."+fieldName;
1630 if (hasNamedVariable)
1643 else if (outerScope)
1663 auto newMd =
createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
1664 md->typeString(),md->name(),md->argsString(),md->excpString(),
1665 md->protection(),md->virtualness(),md->isStatic(),Relationship::Member,
1674 imd->
setId(md->id());
1689 static auto memberListPairs = std::array<std::pair<MemberListType,MemberListType>,3>{{
1690 { MemberListType::PubAttribs(), MemberListType::PubTypes() },
1691 { MemberListType::ProAttribs(), MemberListType::ProTypes() },
1692 { MemberListType::PriAttribs(), MemberListType::PriTypes() }
1694 for (
auto [attribs,types] : memberListPairs)
1699 for (
const auto &md : *ml)
1703 if (!hasNamedVariable && root)
1756 for (
const auto &md : *ml)
1764 if (md->isEnumerate() && md->name().startsWith(
"@"))
1766 for (
const auto &emd : md->enumFieldList())
1785template<
typename Container,
typename TagContainer>
1787 const Container *def,
1788 const TagContainer *tagParent,
1793template<
typename Container,
typename TagContainer>
1795 const Container *def,
1796 const TagContainer *tagParent,
1801 AUTO_TRACE(
"count={} name={}\n",count,def->name());
1804 MemberList *ml = def->getMemberList(varFilter);
1809 std::vector<MemberDef *> members;
1810 for (
const auto &md : *ml)
1812 members.push_back(md);
1814 for (
const auto &md : members)
1820 MemberList *pml = tagParent->getMemberList(varFilter);
1823 for (
const auto &pmd : *pml)
1825 if (pmd->name()==md->name())
1836 bool hasNamedVariable = pmdm==
nullptr || !pmdm->
isAnonymous();
1838 DString type = md->typeString();
1844 std::vector<const ClassDef *> candidates;
1845 for (
const auto &icd : def->getClasses())
1847 candidates.push_back(icd);
1849 for (
const auto &icd : candidates)
1855 if (md->isAnonymous()) name =
"__unnamed" +
DString().
setNum(pos++)+
"__";
1861 processTagLessClasses(ncd,icd,ncd,MemberListType::PubAttribs(),MemberListType::PubTypes(),name,count+1);
1879 ml = def->getMemberList(typeFilter);
1882 for (
const auto &md : *ml)
1900template<
typename Container,
typename TagContainer>
1902 const Container *def,
1903 const TagContainer *tagParent,
1908 if (varFilter==MemberListType::PubAttribs())
1920template<
typename Container>
1923 for (
const auto &icd : cd->getClasses())
1927 if (!icd->isAlias() && icd->name().find(
'@')==
DString::npos)
1933 candidates.insert(cd);
1938 std::set<const Definition *> candidates;
1941 if (cd->isAlias())
continue;
1949 const FileDef *fd = cd->getFileDef();
1964 for (
const auto &d : candidates)
1970 processTagLessClasses(nd,nd,nd,MemberListType::DecVarMembers(),MemberListType::DecEnumMembers(),
"",0);
1975 processTagLessClasses(fd,fd,fd,MemberListType::DecVarMembers(),MemberListType::DecEnumMembers(),
"",0);
1992 (root->
section.isNamespace() ||
1993 root->
section.isNamespaceDoc() ||
2002 if (root->
section.isPackageDoc())
2008 if (!fullName.
empty())
2067 root->
type,root->
spec.isPublished())));
2135 DString aliasName = aliasNd->name();
2164 for (
auto &und : unl)
2166 DString uScope=und->name()+
"::";
2168 if (usingNd!=
nullptr)
break;
2175 if (root->
section.isUsingDir())
2179 if (name.endsWith(
"::"))
2181 name=name.left(name.length()-2);
2193 (fd==
nullptr || fd->
getLanguage()!=SrcLangExt::Java)
2197 if (!nsName.
empty())
2207 int scopeOffset =
static_cast<int>(nsName.
length());
2220 size_t o = nsName.
rfind(
"::",scopeOffset-1);
2223 }
while (scopeOffset>=0 && usingNd==
nullptr);
2225 if (usingNd==
nullptr && nd)
2229 while (pnd && usingNd==
nullptr)
2246 if (usingNd==
nullptr && fd)
2319 if (root->
section.isUsingDecl() &&
2332 if (root->
section.isUsingDecl() &&
2334 (!filterPythonPackages || (root->
lang==SrcLangExt::Python && root->
fileName.
endsWith(
"__init__.py")))
2337 AUTO_TRACE(
"Found using declaration '{}' at line {} of {} inside section {}",
2351 if (!scName.
empty())
2367 if (nd==
nullptr) scope = fd;
2437 AUTO_TRACE(
"creating new member {} for class {}",memName,cd->
name());
2448 newMmd->setMemberClass(cd);
2466 newMmd->addSectionsToDefinition(root->
anchors);
2472 newMmd->setMemberGroupId(root->
mGrpId);
2475 newMmd->setLanguage(root->
lang);
2476 newMmd->setId(root->
id);
2485 if (root->
section.isUsingDecl() &&
2512 for (
auto &mi : *mni)
2515 if (md && md->
protection()!=Protection::Private)
2530 for (
const auto ©Cd : it->second)
2543 else if (root->
section.isUsingDecl() &&
2545 root->
lang==SrcLangExt::Cpp
2578 memName = root->
name;
2600 newMmd->setNamespace(nd);
2605 newMmd->setFileDef(fd);
2624 newMmd->addSectionsToDefinition(root->
anchors);
2630 newMmd->setMemberGroupId(root->
mGrpId);
2633 newMmd->setLanguage(root->
lang);
2634 newMmd->setId(root->
id);
2642 if (nd && aliasMd.get())
2646 if (fd && aliasMd.get())
2675 if (nd) ncdm->
moveTo(nd);
2704 aliasFullName = aliasCd->localName();
2708 aliasFullName = nd->
qualifiedName()+
"::"+aliasCd->localName();
2740 for (
const auto &fd : *fn)
2743 fd->addIncludedUsingDirectives(visitedFiles);
2763 if (lang==SrcLangExt::Java || lang==SrcLangExt::CSharp)
2768 AUTO_TRACE(
"class variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} init='{}'",
2774 if (related!=Relationship::Member || mtype==MemberType::Friend ||
Config_getBool(HIDE_SCOPE_NAMES))
2776 if (root->
spec.isAlias())
2778 if (lang==SrcLangExt::Python)
2780 def=
"type "+name+args;
2789 def=type+
" "+name+args;
2794 if (root->
spec.isAlias())
2796 if (lang==SrcLangExt::Python)
2798 def=
"type "+qualScope+scopeSeparator+name+args;
2802 def=
"using "+qualScope+scopeSeparator+name;
2807 def=type+
" "+qualScope+scopeSeparator+name+args;
2819 def=qualScope+scopeSeparator+name+args;
2830 for (
const auto &imd : *mn)
2842 if (root->
lang==SrcLangExt::ObjC &&
2843 root->
mtype==MethodTypes::Property &&
2867 prot,Specifier::Normal,root->
isStatic,related,
2871 mmd->setTagInfo(root->
tagInfo());
2872 mmd->setMemberClass(cd);
2876 mmd->setDefinition(def);
2878 mmd->addSectionsToDefinition(root->
anchors);
2882 mmd->setMemberGroupId(root->
mGrpId);
2883 mmd->setMemberSpecifiers(root->
spec);
2884 mmd->setVhdlSpecifiers(root->
vhdlSpec);
2885 mmd->setReadAccessor(root->
read);
2886 mmd->setWriteAccessor(root->
write);
2888 mmd->setHidden(root->
hidden);
2890 mmd->setLanguage(root->
lang);
2891 mmd->setId(root->
id);
2894 mmd->setBodyDef(root->
fileDef());
2900 mmd->setRefItems(root->
sli);
2901 mmd->setRequirementReferences(root->
rqli);
2906 if (mtype==MemberType::Typedef)
2929 AUTO_TRACE(
"global variable: file='{}' type='{}' scope='{}' name='{}' args='{}' prot={} mtype={} lang={} init='{}'",
2935 if (mtype==MemberType::Typedef &&
Config_getBool(TYPEDEF_HIDES_STRUCT))
2941 static const reg::Ex re(R
"(\a\w*)");
2943 const std::string &typ = ttype.
str();
2946 DString typeValue = match.str();
2981 if (root->
spec.isAlias())
2983 if (lang==SrcLangExt::Python)
2985 def=
"type "+nd->
name()+sep+name+args;
2989 def=
"using "+nd->
name()+sep+name;
2994 def=type+
" "+nd->
name()+sep+name+args;
2999 def=nd->
name()+sep+name+args;
3006 if (name.at(0)==
'@')
3012 if (root->
spec.isAlias())
3014 if (root->
lang==SrcLangExt::Python)
3016 def=
"type "+root->
name+args;
3020 def=
"using "+root->
name;
3025 def=type+
" "+name+args;
3046 for (
const auto &imd : *mn)
3060 bool isPHPArray = md->
getLanguage()==SrcLangExt::PHP &&
3063 bool staticsInDifferentFiles =
3069 !staticsInDifferentFiles
3111 mmd->setTagInfo(root->
tagInfo());
3112 mmd->setMemberSpecifiers(root->
spec);
3113 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3117 mmd->addSectionsToDefinition(root->
anchors);
3120 mmd->setMemberGroupId(root->
mGrpId);
3121 mmd->setDefinition(def);
3122 mmd->setLanguage(root->
lang);
3123 mmd->setId(root->
id);
3131 mmd->setBodyDef(fd);
3137 mmd->setRefItems(root->
sli);
3138 mmd->setRequirementReferences(root->
rqli);
3141 mmd->setNamespace(nd);
3149 mmd->setFileDef(fd);
3155 if (mtype==MemberType::Typedef)
3177 if (lang == SrcLangExt::Fortran || lang == SrcLangExt::VHDL)
3182 static const reg::Ex re(R
"(\([^)]*[*&^][^)]*\))");
3184 size_t i=std::string::npos;
3188 i = match.position();
3191 if (i!=std::string::npos)
3193 size_t di = type.find(
"decltype(");
3194 if (di!=std::string::npos && di<i)
3196 i = std::string::npos;
3199 size_t bb=type.find(
'<');
3200 size_t be=type.rfind(
'>');
3201 bool templFp =
false;
3202 if (be!=std::string::npos) {
3203 size_t cc_ast = type.find(
"::*");
3204 size_t cc_amp = type.find(
"::&");
3205 templFp = (cc_ast != std::string::npos && cc_ast>be) || (cc_amp != std::string::npos && cc_amp>be);
3208 if (!type.empty() &&
3209 i!=std::string::npos &&
3210 type.find(
"operator")==std::string::npos &&
3211 (type.find(
")(")==std::string::npos || type.find(
"typedef ")!=std::string::npos) &&
3213 (!((bb!=std::string::npos && bb<i) && (be!=std::string::npos && i<be)) || templFp)
3216 if (pLength) *pLength=
static_cast<int>(l);
3219 return static_cast<int>(i);
3236 bool result =
false;
3237 bool typeIsClass =
false;
3238 bool typePtrType =
false;
3275 typeIsClass = resolver.
resolveClass(ctx,type)!=
nullptr;
3293 static const reg::Ex initChars(R
"([\d"'&*!^]+)");
3297 std::string name = a.
name.
str();
3298 if (
reg::search(name,match,initChars) && match.position()==0)
3330 std::string atype = a.
type.
str();
3331 if (
reg::search(atype,match,initChars) && match.position()==0)
3338 if (resType.empty()) resType=atype;
3339 static const reg::Ex idChars(R
"(\a\w*)");
3340 if (
reg::search(resType,match,idChars) && match.position()==0)
3342 resType=match.str();
3343 if (resType==
"int" || resType==
"long" ||
3344 resType==
"float" || resType==
"double" ||
3345 resType==
"char" || resType==
"void" ||
3346 resType==
"signed" || resType==
"unsigned" ||
3347 resType==
"const" || resType==
"volatile" )
3384 bool insideString=
false;
3385 bool insideChar=
false;
3387 while (e<len && brCount!=0)
3393 if (!insideString && !insideChar)
3395 if (e<len-1 && s.
at(e+1)==
'<')
3397 else if (roundCount==0)
3402 if (!insideString && !insideChar)
3404 if (e<len-1 && s.
at(e+1)==
'>')
3406 else if (roundCount==0)
3411 if (!insideString && !insideChar)
3415 if (!insideString && !insideChar)
3421 if (insideString && pc!=
'\\')
3430 if (insideChar && pc!=
'\\')
3440 return brCount==0 ?
static_cast<int>(e) : -1;
3449 AUTO_TRACE(
"VARIABLE_SEC: type='{}' name='{}' args='{}' bodyLine={} endBodyLine={} mGrpId={} relates='{}'",
3464 std::string sargs = args.
str();
3465 static const reg::Ex reName(R
"(\a\w*)");
3470 sargs = match.suffix().str();
3471 size_t j = sargs.find(
')');
3472 if (j!=std::string::npos) args=sargs.
substr(0,j);
3483 size_t ai = type.
find(
'[',ii);
3496 AUTO_TRACE_ADD(
"after correction: type='{}' name='{}' args='{}'",type,name,args);
3509 bool variableTemplateSpecialization = index!=-1 && !root->
tArgLists.empty() &&
3511 getClass(name.left(index))==
nullptr;
3512 if (qualifiedGroupMember || variableTemplateSpecialization)
3515 if (variableTemplateSpecialization)
3525 scope=name.left(index);
3526 name=name.mid(index+2);
3534 if (!scopeName.
empty())
3546 bool isRelated=
false;
3547 bool isMemberOf=
false;
3550 if (root->
lang==SrcLangExt::CSharp)
3563 for (
size_t i=0;i<name.length()-1;i++)
3565 if (name[i]==
':' && name[i+1]==
':')
3567 p=
static_cast<int>(i);
3569 else if (name[i]==
'<')
3574 if (e!=-1) i=
static_cast<int>(e);
3592 Relationship::Member
3613 mtype=MemberType::EnumValue;
3615 mtype=MemberType::Typedef;
3616 else if (type_s.
startsWith(
"friend ") || type_s==
"friend")
3617 mtype=MemberType::Friend;
3618 else if (root->
mtype==MethodTypes::Property)
3619 mtype=MemberType::Property;
3620 else if (root->
mtype==MethodTypes::Event)
3621 mtype=MemberType::Event;
3623 mtype=sliceOpt ? MemberType::Sequence : MemberType::Typedef;
3625 mtype=sliceOpt ? MemberType::Dictionary : MemberType::Typedef;
3630 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
3641 Relationship relationship = isMemberOf ? Relationship::Foreign :
3642 isRelated ? Relationship::Related :
3643 Relationship::Member ;
3656 else if (!name.empty())
3682 scope=rname.
left(index);
3683 rname=rname.
mid(index+2);
3695 for (
auto &imd : *mn)
3697 if (!imd->isTypedef())
3706 bool notBothGrouped = root->
groups.empty() || imd->getGroupDef()==
nullptr;
3707 bool bothSameScope = (!cd && !nd) || (cd && imd->getClassDef() == cd) || (nd && imd->getNamespaceDef() == nd);
3710 if (notBothGrouped && bothSameScope && imd->typeString()==rtype)
3758 for (
const auto &e : root->
children())
3759 if (!e->section.isEnum())
3776 for (
const auto &e : root->
children())
3777 if (!e->section.isEnum())
3794 for (
const auto &e : root->
children())
3795 if (!e->section.isEnum())
3810 (root->
section.isVariable() &&
3813 (root->
section.isFunction() &&
3816 (root->
section.isFunction() &&
3825 for (
const auto &e : root->
children())
3826 if (!e->section.isEnum())
3841 enum MemberType type = root->
section.isExportedInterface() ? MemberType::Interface : MemberType::Service;
3852 mmd->setTagInfo(root->
tagInfo());
3853 mmd->setMemberClass(cd);
3855 mmd->setDocsForDefinition(
false);
3859 mmd->setMemberSpecifiers(root->
spec);
3860 mmd->setVhdlSpecifiers(root->
vhdlSpec);
3861 mmd->setMemberGroupId(root->
mGrpId);
3863 mmd->setLanguage(root->
lang);
3864 mmd->setBodyDef(fd);
3865 mmd->setFileDef(fd);
3866 mmd->addSectionsToDefinition(root->
anchors);
3868 mmd->setDefinition(def);
3873 AUTO_TRACE(
"Interface member: fileName='{}' type='{}' name='{}' mtype='{}' prot={} virt={} state={} proto={} def='{}'",
3881 root->
spec.isOptional() ? Protection::Protected : Protection::Public, Specifier::Normal);
3891 mmd->setRefItems(root->
sli);
3892 mmd->setRequirementReferences(root->
rqli);
3901 if (root->
section.isExportedInterface() || root->
section.isIncludedService())
3903 AUTO_TRACE(
"Exported interface/included service: type='{}' scope='{}' name='{}' args='{}'"
3904 " relates='{}' relatesType='{}' file='{}' line={} bodyLine={} #tArgLists={}"
3905 " mGrpId={} spec={} proto={} docFile='{}'",
3928 else if (rname.
empty())
3931 "Illegal member name found.");
3937 case SrcLangExt::Unknown:
3938 case SrcLangExt::IDL:
3964 name.stripPrefix(
"::");
3967 if (isFriend) mtype=MemberType::Friend;
3968 else if (root->
mtype==MethodTypes::Signal) mtype=MemberType::Signal;
3969 else if (root->
mtype==MethodTypes::Slot) mtype=MemberType::Slot;
3970 else if (root->
mtype==MethodTypes::DCOP) mtype=MemberType::DCOP;
3975 if ((fd==
nullptr || fd->
getLanguage()==SrcLangExt::Cpp) &&
3976 !name.startsWith(
"operator ") &&
3979 (j!=i+2 || name.at(i+1)!=
'=')
3997 root->
relatesType==RelatesType::MemberOf ? Relationship::Foreign :
3998 Relationship::Related ;
4008 mmd->setTagInfo(root->
tagInfo());
4009 mmd->setMemberClass(cd);
4011 mmd->setDocsForDefinition(!root->
proto);
4015 mmd->setMemberSpecifiers(spec);
4016 mmd->setVhdlSpecifiers(root->
vhdlSpec);
4017 mmd->setMemberGroupId(root->
mGrpId);
4019 mmd->setLanguage(root->
lang);
4020 mmd->setRequiresClause(root->
req);
4021 mmd->setId(root->
id);
4022 mmd->setBodyDef(fd);
4023 mmd->setFileDef(fd);
4024 mmd->addSectionsToDefinition(root->
anchors);
4030 if (scopeSeparator!=
"::")
4032 qualScope =
substitute(qualScope,
"::",scopeSeparator);
4034 if (lang==SrcLangExt::PHP)
4037 scopeSeparator=
"::";
4054 def=type+
" "+qualScope+scopeSeparator+name;
4058 def=qualScope+scopeSeparator+name;
4062 mmd->setDefinition(def);
4066 AUTO_TRACE(
"function member: type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
4067 type, qualScope, rname, args, root->
proto, def);
4077 mmd->setRefItems(root->
sli);
4078 mmd->setRequirementReferences(root->
rqli);
4098 MemberType::Function,
4102 mmd->setTagInfo(root->
tagInfo());
4103 mmd->setLanguage(root->
lang);
4104 mmd->setId(root->
id);
4109 mmd->setDocsForDefinition(!root->
proto);
4115 mmd->addSectionsToDefinition(root->
anchors);
4116 mmd->setMemberSpecifiers(root->
spec);
4117 mmd->setVhdlSpecifiers(root->
vhdlSpec);
4118 mmd->setMemberGroupId(root->
mGrpId);
4119 mmd->setRequiresClause(root->
req);
4130 if (!nscope.
empty())
4155 def=root->
type+
" "+scope+name;
4161 AUTO_TRACE(
"new non-member function type='{}' scope='{}' name='{}' args='{}' proto={} def='{}'",
4163 mmd->setDefinition(def);
4167 mmd->setRefItems(root->
sli);
4168 mmd->setRequirementReferences(root->
rqli);
4172 mmd->setNamespace(nd);
4179 mmd->setFileDef(fd);
4200 if (root->
section.isFunction())
4202 AUTO_TRACE(
"member function: type='{}' scope='{}' name='{}' args='{}' relates='{}' relatesType='{}'"
4203 " file='{}' line={} bodyLine={} #tArgLists={} mGrpId={}"
4204 " spec={} proto={} docFile='{}'",
4219 scope=rname.
left(index);
4220 rname=rname.
mid(index+2);
4229 if (root->
lang==SrcLangExt::CSharp)
4240 size_t memIndex=rname.
rfind(
"::");
4243 if (cd && scope+
"::"==rname.
left(scope.
length()+2))
4249 bool isMember=
false;
4252 size_t ts=rname.
find(
'<');
4253 size_t te=rname.
find(
'>');
4271 isMember=memIndex<ts || memIndex>te;
4311 for (
const auto &imd : *mn)
4324 fullScope.
prepend(parentScope);
4330 if (mnd) nsName = mnd->
name();
4331 if (rnd) rnsName = rnd->
name();
4339 bool sameTemplateArgs =
true;
4340 bool matchingReturnTypes =
true;
4341 bool sameRequiresClause =
true;
4347 matchingReturnTypes =
false;
4351 sameRequiresClause =
false;
4357 sameTemplateArgs =
false;
4360 bool staticsInDifferentFiles =
4363 if (sameTemplateArgs &&
4364 matchingReturnTypes &&
4365 sameRequiresClause &&
4366 !staticsInDifferentFiles &&
4373 if (!root->
groups.empty() && !root->
groups.front().groupname.empty())
4380 found=(mnd && rnd && nsName==rnsName) ||
4381 ((mnd==
nullptr && rnd==
nullptr && mfd!=
nullptr &&
4386 if (!found && gd && gd==md->
getGroupDef() && nsName==rnsName)
4392 AUTO_TRACE_ADD(
"combining function with prototype found={} in namespace '{}'",found,nsName);
4491 else if (rname.
empty())
4494 "Illegal member name found."
4512 for (
const auto &ifmd : *fn)
4516 for (
const auto &immd : *mn)
4532 AUTO_TRACE_ADD(
"Merging related global and member '{}' isFriend={} isRelated={} isFunction={}",
4609 for (
const auto &imdec : *mn)
4617 for (
const auto &imdef : *mn)
4620 if (mdef && mdec!=mdef &&
4640 for (
const auto &imd : *mn)
4656 if (mdef && mdec)
break;
4664 mdec->getOuterScope(),mdec->getFileDef(),mdec->typeString(),
const_cast<ArgumentList*
>(&mdecAl),
4671 mdec->mergeReferences(mdef);
4673 mdec->mergeReferencedBy(mdef);
4690 for (
const auto &imd : *mn)
4701 for (
const auto &irmd : *rmn)
4735 size_t i=qualifiedName.rfind(
"::");
4736 if (i!=std::string::npos)
4739 DString name = qualifiedName.substr(i+2);
4743 for (
const auto &imd : *mn)
4769 std::map<std::string,int> templateNames;
4771 for (
const Argument &arg : templateArguments)
4773 static const reg::Ex re(R
"(\a[\w:]*)");
4776 for (; it!=
end ; ++it)
4778 const auto &match = *it;
4779 std::string n = match.str();
4780 if (n==arg.name.str())
4782 if (templateNames.find(n)==templateNames.end())
4784 templateNames.emplace(n,count);
4789 return templateNames;
4804 if (context && cd!=context)
4809 if (result==
nullptr)
4814 if (result==
nullptr)
4843 for (
auto &mi : *mni)
4851 if (!typedefValue.
empty())
4853 type = typedefValue;
4872 usedClassName = typeCd->
name();
4882 if (templateNames.empty())
4886 BaseInfo bi(usedName,Protection::Public,Specifier::Normal);
4891 if (arg.name==usedName)
4895 if (usedCd==
nullptr)
4946 if (!found && !type.
empty())
5005 if (templateNames.empty())
5021 bool b =
Config_getBool(HIDE_UNDOC_RELATIONS) ? true : isArtificial;
5043 AUTO_TRACE(
"Derived from template '{}' with parameters '{}' isArtificial={}",
5044 templateClass->
name(),templSpec,isArtificial);
5047 bool existingClass = templSpec==tempArgsStr;
5048 if (existingClass)
return;
5050 bool freshInstance=
false;
5067 for (
auto it=it_pair.first ; it!=it_pair.second ; ++it)
5069 const Entry *templateRoot = it->second;
5070 AUTO_TRACE_ADD(
"template root found '{}' templSpec='{}'",templateRoot->
name,templSpec);
5076 isArtificial,templArgs.get(),templateNames);
5100 templateClassName,
true,
true);
5101 AUTO_TRACE_ADD(
"templateClassName={} baseClass={}",templateClassName,baseClass?baseClass->
name():
"<none>");
5130 if (name.empty())
return 0;
5131 int l =
static_cast<int>(name.length());
5137 while (count>0 && i>=0)
5142 case '>':
if (!insideQuote) count++;
break;
5143 case '<':
if (!insideQuote) count--;
break;
5144 case '\'':
if (!insideQuote) insideQuote=c;
5145 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
5147 case '"':
if (!insideQuote) insideQuote=c;
5148 else if (insideQuote==c && (i<0 || name[i]!=
'\\')) insideQuote=0;
5168 AUTO_TRACE(
"name={} base={} isArtificial={} mode={}",cd->
name(),bi->
name,isArtificial,(
int)mode);
5171 bool explicitGlobalScope=
false;
5174 biName=biName.
mid(2);
5175 explicitGlobalScope=
true;
5179 bool lastParent=
false;
5184 int scopeOffset=explicitGlobalScope ? 0 :
static_cast<int>(scopeName.
length());
5193 baseClassName.
prepend(scopeName.
left(scopeOffset)+
"::");
5195 if (root->
lang==SrcLangExt::CSharp)
5222 || explicitGlobalScope
5225 || (root->
lang==SrcLangExt::IDL &&
5226 (root->
section.isExportedInterface() ||
5227 root->
section.isIncludedService()))
5230 AUTO_TRACE_ADD(
"class relation '{}' inherited/used by '{}' found prot={} virt={} templSpec='{}'",
5231 baseClassName, root->
name, bi->
prot, bi->
virt, templSpec);
5234 size_t si=baseClassName.
rfind(
"::",i);
5236 if (baseClass==
nullptr &&
static_cast<size_t>(i)!=baseClassName.
length())
5246 baseClassName = baseClassName.
left(i)+baseClassName.
mid(e);
5257 else if (baseClass && !templSpec.
empty())
5268 baseClass = templClass;
5286 found=baseClass!=
nullptr && baseClass!=cd;
5296 found = baseClass!=
nullptr && baseClass!=cd;
5308 found = baseClass!=
nullptr && baseClass!=cd;
5311 bool isATemplateArgument = templateNames.find(biName.
str())!=templateNames.end();
5316 AUTO_TRACE_ADD(
"Documented base class '{}' templSpec='{}'",biName,templSpec);
5334 if (baseClassTypeDef==
nullptr)
5344 if (baseClassTypeDef)
5353 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",usedName,prot,bi->
virt,templSpec);
5361 "Detected potential recursive class relation "
5362 "between class {} and base class {}!",
5369 else if (mode==
Undocumented && (scopeOffset==0 || isATemplateArgument))
5371 AUTO_TRACE_ADD(
"New undocumented base class '{}' baseClassName='{}' templSpec='{}' isArtificial={}",
5372 biName,baseClassName,templSpec,isArtificial);
5374 if (isATemplateArgument)
5377 if (baseClass==
nullptr)
5396 if (baseClass==
nullptr)
5407 si = baseClassName.
rfind(
"::");
5423 biName=
"<"+biName.
left(biName.
length()-2)+
">";
5427 AUTO_TRACE_ADD(
"insertBaseClass name={} prot={} virt={} templSpec={}",biName,bi->
prot,bi->
virt,templSpec);
5437 if (scope!=baseClass)
5463 "Detected potential recursive class relation "
5464 "between class {} and base class {}!",
5465 root->
name,baseClassName
5478 size_t o = scopeName.
rfind(
"::",scopeOffset-1);
5482 }
while (scopeOffset>=0);
5484 if (parentNode==
nullptr)
5490 parentNode=parentNode->
parent();
5492 }
while (lastParent);
5512 bool hasExtends = !root->
extends.empty();
5513 if (hasExtends)
return true;
5540 if (root->
lang==SrcLangExt::CSharp)
5546 bName = bName.
left(i);
5611 if (!nd->hasDocumentation())
5614 nd->getLanguage() == SrcLangExt::Fortran) &&
5618 warn_undoc(nd->getDefFileName(),nd->getDefLine(),
"{} {} is not documented.",
5619 nd->getLanguage() == SrcLangExt::Fortran ?
"Module" :
"Namespace",
5669 DString templSpec = ti.templSpec;
5683 for (
const auto &tn_kv : templateNames)
5685 size_t templIndex = tn_kv.second;
5687 bool hasActArg=
false;
5688 if (templIndex<templArgs->size())
5690 actArg=templArgs->at(templIndex);
5694 baseClassNames.find(actArg.
type.
str())!=baseClassNames.end() &&
5695 actualTemplateNames.find(actArg.
type.
str())==actualTemplateNames.end()
5698 actualTemplateNames.emplace(actArg.
type.
str(),
static_cast<int>(templIndex));
5733 for (
const auto &fd : *fn)
5735 fd->computeAnchors();
5748 gd->computeAnchors();
5755template<
typename Func>
5778 for (
const auto &fd : *fn)
5851 if (md==
nullptr)
return;
5852 AUTO_TRACE(
"scope='{}' name='{}' args='{}' funcDecl='{}' mSpec={}",
5867 fullName = cd->
name();
5869 fullName = nd->
name();
5871 if (!fullName.
empty()) fullName+=
"::";
5872 fullName+=md->
name();
5978 "member {} belongs to two different groups. The second one found here will be ignored.",
6016 return allowNoGroup;
6019 for (
const auto &g : root->
groups)
6021 if (g.groupname == gd->
name())
6044 AUTO_TRACE(
"namespace='{}' type='{}' name='{}' tempArg='{}' decl='{}'",namespaceName,type,name,tempArg,decl);
6046 if (n.
empty())
return false;
6058 for (
const auto &md : *mn)
6069 if (md->isAlias() && md->getOuterScope() &&
6076 nd = md->getNamespaceDef();
6080 size_t enumNamePos=0;
6081 if (nd && md->isEnumValue() && (enumNamePos=namespaceName.
rfind(
"::"))!=
DString::npos)
6083 DString enumName = namespaceName.
mid(enumNamePos+2);
6084 if (namespaceName.
left(enumNamePos)==nd->
name())
6089 for (
const auto &emd : *enumMn)
6091 found = emd->isStrong() && md->getEnumScope()==emd.get();
6105 else if (nd==
nullptr && md->isEnumValue())
6110 for (
const auto &emd : *enumMn)
6112 found = emd->isStrong() && md->getEnumScope()==emd.get();
6135 if ((namespaceName.
empty() && nd==
nullptr) ||
6136 (nd && nd->
name()==namespaceName) ||
6140 AUTO_TRACE_ADD(
"Try to add member '{}' to scope '{}'",md->name(),namespaceName);
6148 md->isVariable() || md->isTypedef() ||
6149 matchArguments2(md->getOuterScope(),md->getFileDef(),md->typeString(),&mdAl,
6156 if (matching && !root->
tArgLists.empty())
6175 if (matching && md->isStatic() &&
6176 md->getDefFileName()!=root->
fileName &&
6184 if (!md->templateArguments().empty() && !root->
tArgLists.empty())
6189 if (md->templateArguments().size()!=root->
tArgLists.back().size() ||
6190 md->typeString()!=type ||
6191 md->requiresClause()!=root->
req)
6207 if (!found && root->
relatesType!=RelatesType::Duplicate && root->
section.isFunction())
6211 DString warnMsg =
"no matching file member found for \n"+fullFuncDecl;
6214 warnMsg+=
"\nPossible candidates:";
6215 for (
const auto &md : *mn)
6219 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6227 if (root->
type!=
"friend class" &&
6228 root->
type!=
"friend struct" &&
6229 root->
type!=
"friend union" &&
6230 root->
type!=
"friend" &&
6236 "documented symbol '{}' was not declared or defined.",
qPrint(decl)
6248 auto srcIt = srcTempArgLists.begin();
6249 auto dstIt = dstTempArgLists.begin();
6250 while (srcIt!=srcTempArgLists.end() && dstIt!=dstTempArgLists.end())
6252 if ((*srcIt).size()!=(*dstIt).size())
return true;
6266 result = cd->templateArguments().hasParameters() || cd->templateMaster()!=
nullptr ||
6276 const std::string &src
6280 static const reg::Ex re(R
"(\a\w*)");
6285 for (; it!=
end ; ++it)
6287 const auto &match = *it;
6288 size_t i = match.position();
6289 size_t l = match.length();
6291 dst+=src.substr(p,i-p);
6292 std::string name=match.str();
6294 auto srcIt = srcTempArgLists.begin();
6295 auto dstIt = dstTempArgLists.begin();
6296 while (srcIt!=srcTempArgLists.end() && !found)
6299 std::vector<Argument>::const_iterator tdaIt;
6300 if (dstIt!=dstTempArgLists.end())
6303 tdaIt = tdAli->
begin();
6308 for (
auto tsaIt = tsaLi.
begin(); tsaIt!=tsaLi.
end() && !found; ++tsaIt)
6312 if (tdAli && tdaIt!=tdAli->
end())
6328 else if (tdaType.
startsWith(
"typename ")) vc=9;
6331 tdaName = tdaType.
mid(vc);
6333 if (!tdaName.
empty())
6364 auto dstIt = dst.
begin();
6369 if (dstIt == dst.
end())
6373 da.
array = dstArray;
6381 da.
array = dstArray;
6389 srcTempArgLists,dstTempArgLists,
6415 funcType,funcName,funcArgs,exceptions,
6419 mmd->setTagInfo(root->
tagInfo());
6420 mmd->setLanguage(root->
lang);
6421 mmd->setId(root->
id);
6422 mmd->makeImplementationDetail();
6423 mmd->setMemberClass(cd);
6424 mmd->setDefinition(funcDecl);
6430 mmd->setDocsForDefinition(!root->
proto);
6432 mmd->addSectionsToDefinition(root->
anchors);
6436 mmd->setMemberSpecifiers(spec);
6437 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6438 mmd->setMemberGroupId(root->
mGrpId);
6441 mmd->setRefItems(root->
sli);
6442 mmd->setRequirementReferences(root->
rqli);
6479 bool memFound=
false;
6480 for (
const auto &imd : *mn)
6483 if (md==
nullptr)
continue;
6485 if (cd==
nullptr)
continue;
6497 size_t enumNamePos=0;
6500 DString enumName = className.
mid(enumNamePos+2);
6502 if (!namespaceName.
empty()) fullScope.
prepend(namespaceName+
"::");
6503 if (fullScope==cd->
name())
6509 for (
const auto &emd : *enumMn)
6511 memFound = emd->isStrong() && md->
getEnumScope()==emd.get();
6517 if (memFound)
break;
6522 if (memFound)
break;
6540 if (!templAl.
empty())
6542 declTemplArgs.push_back(templAl);
6550 bool substDone=
false;
6557 if (declTemplArgs.size()>0 && declTemplArgs.size()==defTemplArgs.size())
6580 AUTO_TRACE_ADD(
"matching '{}'<=>'{}' className='{}' namespaceName='{}' result={}",
6601 if (!namespaceName.
empty())
6618 AUTO_TRACE_ADD(
"Comparing return types '{}'<->'{}' #args {}<->{}",
6626 else if (defTemplArgs.size()>declTemplArgs.size())
6628 AUTO_TRACE_ADD(
"Different number of template arguments {} vs {}",defTemplArgs.size(),declTemplArgs.size());
6634 bool rootIsUserDoc = root->
section.isMemberDoc();
6637 bool classOrMdIsTemplate = mdIsTemplate || classIsTemplate;
6638 bool rootIsTemplate = !root->
tArgLists.empty();
6640 if (!rootIsUserDoc &&
6641 (mdIsTemplate || rootIsTemplate) &&
6642 ((classOrMdIsTemplate && !rootIsTemplate) || (!classOrMdIsTemplate && rootIsTemplate))
6647 AUTO_TRACE_ADD(
"Comparing return types: template v.s. non-template");
6651 AUTO_TRACE_ADD(
"Match results of matchArguments2='{}' substDone='{}'",matching,substDone);
6662 if (!funcTempList.
empty() &&
6682 else if (cd && cd!=tcd)
6688 if (memFound)
break;
6692 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
6695 if (count==0 && !(isFriend && funcType==
"class"))
6698 const ClassDef *ecd =
nullptr, *ucd =
nullptr;
6699 MemberDef *emd =
nullptr, *umd =
nullptr;
6701 for (
const auto &md : *mn)
6723 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': exact match",
6724 className,ccd->
name(),md->argsString());
6730 AUTO_TRACE_ADD(
"new candidate className='{}' scope='{}' args='{}': no match",
6731 className,ccd->
name(),md->argsString());
6736 bool strictProtoMatching =
Config_getBool(STRICT_PROTO_MATCHING);
6737 if (!strictProtoMatching)
6739 if (candidates==1 && ucd && umd)
6746 else if (candidates>1 && ecd && emd)
6757 if (noMatchCount>1) warnMsg+=
"uniquely ";
6758 warnMsg+=
"matching class member found for \n";
6762 warnMsg+=
" template ";
6767 DString fullFuncDecl=funcDecl;
6771 warnMsg+=fullFuncDecl;
6773 if (candidates>0 || noMatchCount>=1)
6775 warnMsg+=
"\nPossible candidates:";
6781 for (
const auto &md : *mn)
6783 const ClassDef *cd=md->getClassDef();
6797 warnMsg+=
"template ";
6802 if (!md->typeString().empty())
6804 warnMsg+=md->typeString();
6808 if (!qScope.
empty())
6809 warnMsg+=qScope+
"::"+md->name();
6810 warnMsg+=md->argsString();
6811 warnMsg+=
"' " +
warn_line(md->getDefFileName(),md->getDefLine());
6832 AUTO_TRACE(
"funcType={} funcName={} funcArgs={} funcDecl={} spec={}",funcType,funcName,funcArgs,funcDecl,spec);
6834 for (
const auto &md : *mn)
6836 if (md->getClassDef()==cd)
6848 funcType,funcName,funcArgs,exceptions,
6854 mmd->setTagInfo(root->
tagInfo());
6855 mmd->setLanguage(root->
lang);
6856 mmd->setId(root->
id);
6857 mmd->setMemberClass(cd);
6858 mmd->setTemplateSpecialization(
true);
6860 mmd->setDefinition(funcDecl);
6866 mmd->setDocsForDefinition(!root->
proto);
6868 mmd->addSectionsToDefinition(root->
anchors);
6872 mmd->setMemberSpecifiers(spec);
6873 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6874 mmd->setMemberGroupId(root->
mGrpId);
6876 mmd->setRefItems(root->
sli);
6877 mmd->setRequirementReferences(root->
rqli);
6892 bool sameClass=
false;
6897 [](
const auto &md1,
const auto &md2)
6898 { return md1->getClassDef()->name()==md2->getClassDef()->name(); });
6904 if (cd==
nullptr)
return;
6907 if (root->
mtype==MethodTypes::Signal) mtype=MemberType::Signal;
6908 else if (root->
mtype==MethodTypes::Slot) mtype=MemberType::Slot;
6909 else if (root->
mtype==MethodTypes::DCOP) mtype=MemberType::DCOP;
6912 std::unique_ptr<ArgumentList> tArgList =
6917 funcType,funcName,funcArgs,exceptions,
6921 mmd->setTagInfo(root->
tagInfo());
6922 mmd->setLanguage(root->
lang);
6923 mmd->setId(root->
id);
6925 mmd->setMemberClass(cd);
6926 mmd->setDefinition(funcDecl);
6935 mmd->setDocsForDefinition(!root->
proto);
6937 mmd->addSectionsToDefinition(root->
anchors);
6941 mmd->setMemberSpecifiers(spec);
6942 mmd->setVhdlSpecifiers(root->
vhdlSpec);
6943 mmd->setMemberGroupId(root->
mGrpId);
6946 mmd->setRefItems(root->
sli);
6947 mmd->setRequirementReferences(root->
rqli);
7006 AUTO_TRACE(
"root='{}' funcDecl='{}' related='{}' overload={} isFunc={} mGrpId={} #tArgList={} spec={} lang={}",
7019 bool isRelated=
false;
7020 bool isMemberOf=
false;
7021 bool isFriend=
false;
7034 spec.setInline(
true);
7039 spec.setExplicit(
true);
7044 spec.setMutable(
true);
7049 spec.setThreadLocal(
true);
7066 if (!funcDecl.
empty() && funcDecl[0]!=
' ') funcDecl.
prepend(
" ");
7078 if (isFriend && funcDecl.
startsWith(
"class "))
7081 funcDecl=funcDecl.
mid(6);
7082 funcName = funcDecl;
7084 else if (isFriend && funcDecl.
startsWith(
"struct "))
7086 funcDecl=funcDecl.
mid(7);
7087 funcName = funcDecl;
7089 else if (isFriend && funcDecl.
startsWith(
"record "))
7091 funcDecl=funcDecl.
mid(7);
7092 funcName = funcDecl;
7098 funcArgs,funcTempList,exceptions
7106 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}' funcType='{}' funcName='{}' funcArgs='{}'",
7107 scopeName,className,namespaceName,funcType,funcName,funcArgs);
7108 if (!relates.
empty())
7111 isMemberOf=(root->
relatesType == RelatesType::MemberOf);
7118 scopeName = relates;
7128 if (!scopeName.
empty() &&
7131 scopeName = joinedName;
7145 DString joinedName = fnd->name()+
"::"+scopeName;
7148 scopeName=joinedName;
7175 AUTO_TRACE_ADD(
"scopeName='{}' className='{}' namespaceName='{}'",scopeName,className,namespaceName);
7180 if (!namespaceName.
empty())
7182 if (className.
empty())
7184 scopeName=namespaceName;
7186 else if (!relates.
empty() ||
7189 scopeName=namespaceName+
"::"+className;
7193 scopeName=className;
7196 else if (!className.
empty())
7198 scopeName=className;
7202 DString tempScopeName=scopeName;
7206 if (funcSpec.
empty())
7208 uint32_t argListIndex=0;
7213 tempScopeName=scopeName+funcSpec;
7221 if (!scopeName.
empty() && !isRelated && !isFriend && !
Config_getBool(HIDE_SCOPE_NAMES) && root->
lang!=SrcLangExt::Python)
7223 if (!funcType.
empty())
7227 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcTempList;
7231 funcDecl=funcType+
" "+tempScopeName+
"::"+funcName+funcArgs;
7238 funcDecl=tempScopeName+
"::"+funcName+funcTempList;
7242 funcDecl=tempScopeName+
"::"+funcName+funcArgs;
7248 if (!funcType.
empty())
7252 funcDecl=funcType+
" "+funcName+funcTempList;
7256 funcDecl=funcType+
" "+funcName+funcArgs;
7263 funcDecl=funcName+funcTempList;
7267 funcDecl=funcName+funcArgs;
7272 if (funcType==
"template class" && !funcTempList.
empty())
7275 AUTO_TRACE_ADD(
"Parse results: namespaceName='{}' className=`{}` funcType='{}' funcSpec='{}' "
7276 " funcName='{}' funcArgs='{}' funcTempList='{}' funcDecl='{}' relates='{}'"
7277 " exceptions='{}' isRelated={} isMemberOf={} isFriend={} isFunc={}",
7278 namespaceName, className, funcType, funcSpec,
7279 funcName, funcArgs, funcTempList, funcDecl, relates,
7280 exceptions, isRelated, isMemberOf, isFriend, isFunc);
7282 if (!funcName.
empty())
7286 bool strongEnum =
false;
7290 for (
const auto &imd : *mn)
7301 if (!namespaceName.
empty())
7303 namespaceName+=
"::"+className;
7307 namespaceName=className;
7315 funcName =
substitute(funcName,className+
"::",
"");
7318 if (!funcTempList.
empty())
7326 if (!isRelated && !strongEnum && mn)
7329 if (!className.
empty())
7331 if (funcSpec.
empty())
7334 funcArgs,funcTempList,exceptions,
7335 type,args,isFriend,spec,relates,funcDecl,overloaded,isFunc);
7347 else if (overloaded)
7349 addOverloaded(root,mn,funcType,funcName,funcArgs,funcDecl,exceptions,spec);
7353 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7355 DString fullFuncDecl=funcDecl;
7358 "Cannot determine class for function\n{}",
7364 else if (isRelated && !relates.
empty())
7366 AUTO_TRACE_ADD(
"related function scopeName='{}' className='{}'",scopeName,className);
7367 if (className.
empty()) className=relates;
7371 bool newMember=
true;
7377 for (
const auto &imd : *mn)
7411 mn->
push_back(std::move(mdDefineTaken));
7425 for (
const auto &irmd : *mn)
7446 addMemberDocs(root,rmd_found,funcDecl,
nullptr,overloaded,spec);
7454 switch (root->
mtype)
7456 case MethodTypes::Method: mtype = MemberType::Function;
break;
7457 case MethodTypes::Signal: mtype = MemberType::Signal;
break;
7458 case MethodTypes::Slot: mtype = MemberType::Slot;
break;
7459 case MethodTypes::DCOP: mtype = MemberType::DCOP;
break;
7460 case MethodTypes::Property: mtype = MemberType::Property;
break;
7461 case MethodTypes::Event: mtype = MemberType::Event;
break;
7475 funcType,funcName,funcArgs,exceptions,
7478 isMemberOf ? Relationship::Foreign : Relationship::Related,
7498 mmd->setDefinitionTemplateParameterLists(root->
tArgLists);
7500 mmd->setTagInfo(root->
tagInfo());
7515 for (
const auto &irmd : *rmn)
7546 mmd->setBodyDef(fd);
7553 mmd->setMemberClass(cd);
7554 mmd->setMemberSpecifiers(spec);
7555 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7556 mmd->setDefinition(funcDecl);
7561 mmd->setDocsForDefinition(!root->
proto);
7564 mmd->addSectionsToDefinition(root->
anchors);
7565 mmd->setMemberGroupId(root->
mGrpId);
7566 mmd->setLanguage(root->
lang);
7567 mmd->setId(root->
id);
7571 mmd->setRefItems(root->
sli);
7572 mmd->setRequirementReferences(root->
rqli);
7573 if (root->
relatesType==RelatesType::Duplicate) mmd->setRelatedAlso(cd);
7581 if (!
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
7583 DString fullFuncDecl=funcDecl;
7586 "Cannot determine file/namespace for relatedalso function\n{}",
7600 addLocalObjCMethod(root,scopeName,funcType,funcName,funcArgs,exceptions,funcDecl,spec);
7604 bool globMem =
findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec);
7605 if (className.
empty() && !globMem)
7609 else if (!className.
empty() && !globMem)
7612 "member '{}' of class '{}' cannot be found",
7613 funcName,className);
7631 AUTO_TRACE(
"root->type='{}' root->inside='{}' root->name='{}' root->args='{}' section={} root->spec={} root->mGrpId={}",
7646 type=type.
left(i+l);
7657 if (root->
section.isMemberDoc())
7683 else if (root->
section.isOverloadDoc())
7697 (root->
section.isVariable() &&
7715 type+
" "+root->
name,
7719 else if (!type.
empty())
7748 else if (root->
section.isVariableDoc())
7760 else if (root->
section.isExportedInterface() ||
7761 root->
section.isIncludedService())
7767 type +
" " + root->
name,
7780 if (root->
section.isMemberDoc() ||
7781 root->
section.isOverloadDoc() ||
7784 root->
section.isVariableDoc() ||
7786 root->
section.isIncludedService() ||
7787 root->
section.isExportedInterface()
7797 for (
const auto &e : root->
children())
7799 if (!e->section.isEnum())
7811 for (
const auto &objCImpl : root->
children())
7813 if (objCImpl->section.isObjcImpl())
7815 for (
const auto &objCMethod : objCImpl->children())
7817 if (objCMethod->section.isFunction())
7821 objCMethod->relates,
7824 objCMethod->type+
" "+objCImpl->name+
"::"+objCMethod->name+
" "+objCMethod->args,
7826 objCMethod->section=EntryType::makeEmpty();
7845 bool isGlobal =
false;
7846 bool isRelated =
false;
7847 bool isMemberOf =
false;
7856 if (root->
lang==SrcLangExt::CSharp)
7879 isMemberOf=(root->
relatesType==RelatesType::MemberOf);
7887 if (cd && !name.empty())
7914 isMemberOf ? Relationship::Foreign : isRelated ? Relationship::Related : Relationship::Member,
7915 MemberType::Enumeration,
7918 mmd->setTagInfo(root->
tagInfo());
7919 mmd->setLanguage(root->
lang);
7920 mmd->setId(root->
id);
7921 if (!isGlobal) mmd->setMemberClass(cd);
else mmd->setFileDef(fd);
7923 mmd->setBodyDef(root->
fileDef());
7924 mmd->setMemberSpecifiers(root->
spec);
7925 mmd->setVhdlSpecifiers(root->
vhdlSpec);
7926 mmd->setEnumBaseType(root->
args);
7929 mmd->addSectionsToDefinition(root->
anchors);
7930 mmd->setMemberGroupId(root->
mGrpId);
7934 mmd->setRefItems(root->
sli);
7935 mmd->setRequirementReferences(root->
rqli);
7941 if (!baseType.
empty())
7950 mmd->setDefinition(name+baseType);
7954 mmd->setDefinition(nd->
name()+
"::"+name+baseType);
7958 mmd->setNamespace(nd);
7965 if (isGlobal && (nd==
nullptr || !nd->
isAnonymous()))
7967 if (!defSet) mmd->setDefinition(name+baseType);
7968 if (fd==
nullptr && root->
parent())
7974 mmd->setFileDef(fd);
7982 mmd->setDefinition(name+baseType);
7986 mmd->setDefinition(cd->
name()+
"::"+name+baseType);
7992 mmd->setDocsForDefinition(!root->
proto);
8022 bool isGlobal =
false;
8023 bool isRelated =
false;
8032 if (root->
lang==SrcLangExt::CSharp)
8047 if (root->
lang==SrcLangExt::CSharp)
8066 if (cd && !name.empty())
8093 struct EnumValueInfo
8095 EnumValueInfo(
const DString &n,std::unique_ptr<MemberDef> &&md) :
8096 name(n), member(std::move(md)) {}
8098 std::unique_ptr<MemberDef> member;
8100 std::vector< EnumValueInfo > extraMembers;
8102 for (
const auto &imd : *mn)
8109 for (
const auto &e : root->
children())
8112 bool isJavaLike = sle==SrcLangExt::CSharp || sle==SrcLangExt::Java || sle==SrcLangExt::XML;
8113 if ( isJavaLike || root->
spec.isStrong())
8115 if (sle == SrcLangExt::Cpp && e->section.isDefine())
continue;
8122 if (
size_t i = qualifiedName.
rfind(
"::"); i!=
DString::npos && sle==SrcLangExt::CSharp)
8128 qualifiedName=
substitute(qualifiedName,
"::",
".");
8132 DString fileName = e->fileName;
8133 if (fileName.
empty() && e->tagInfo())
8135 fileName = e->tagInfo()->tagName;
8139 fileName,e->startLine,e->startColumn,
8140 e->type,e->name,e->args,
DString(),
8141 e->protection, Specifier::Normal,e->isStatic,Relationship::Member,
8148 fmmd->setNamespace(mnd);
8152 fmmd->setTagInfo(e->tagInfo());
8153 fmmd->setLanguage(e->lang);
8154 fmmd->setBodySegment(e->startLine,e->bodyLine,e->endBodyLine);
8155 fmmd->setBodyDef(e->fileDef());
8157 fmmd->setDocumentation(e->doc,e->docFile,e->docLine);
8158 fmmd->setBriefDescription(e->brief,e->briefFile,e->briefLine);
8159 fmmd->addSectionsToDefinition(e->anchors);
8160 fmmd->setInitializer(e->initializer.str());
8161 fmmd->setMaxInitLines(e->initLines);
8162 fmmd->setMemberGroupId(e->mGrpId);
8163 fmmd->setExplicitExternal(e->explicitExternal,fileName,e->startLine,e->startColumn);
8164 fmmd->setRefItems(e->sli);
8165 fmmd->setRequirementReferences(e->rqli);
8168 fmmd->setEnumScope(md,
true);
8169 extraMembers.emplace_back(e->name,std::move(fmd));
8178 if (!e->name.empty() && (fmn=emnsd->
find(e->name)))
8181 for (
const auto &ifmd : *fmn)
8212 else if (isRelated && cd)
8244 for (
auto &e : extraMembers)
8290 if (gd==
nullptr && !root->
groups.empty())
8304 for (
const auto &g : root->
groups)
8323 "Found non-existing group '{}' for the command '{}', ignoring command",
8337 if (root->
section.isEnumDoc() &&
8362 AUTO_TRACE(
"Found docs for enum with name '{}' and scope '{}' in context '{}' cd='{}', nd='{}' fd='{}'",
8376 for (
const auto &imd : *mn)
8391 else if (cd==
nullptr && mcd==
nullptr && nd!=
nullptr && mnd==nd)
8398 else if (cd==
nullptr && nd==
nullptr && mcd==
nullptr && mnd==
nullptr && fd==mfd)
8423 for (
const auto &mn : mnsd)
8426 for (
const auto &imd : *mn)
8431 int documentedEnumValues=0;
8435 if (fmd->isLinkableInProject()) documentedEnumValues++;
8461 for (
const auto &md : *mn)
8463 index.addClassMemberNameToIndex(md.get());
8464 if (md->getModuleDef())
8466 index.addModuleMemberNameToIndex(md.get());
8474 for (
const auto &md : *mn)
8476 if (md->getNamespaceDef())
8478 index.addNamespaceMemberNameToIndex(md.get());
8482 index.addFileMemberNameToIndex(md.get());
8484 if (md->getModuleDef())
8486 index.addModuleMemberNameToIndex(md.get());
8491 index.sortMemberIndexLists();
8500 if (cd->isLinkableInProject())
8513 if (cd->isLinkableInProject())
8526 if (nd->isLinkableInProject())
8539 for (
const auto &fd : *fn)
8555 std::string s = title.str();
8556 static const reg::Ex re(R
"(\a[\w-]*)");
8559 for (; it!=
end ; ++it)
8561 const auto &match = *it;
8562 std::string matchStr = match.str();
8570 if (gd->isLinkableInProject())
8572 addWordsForTitle(gd.get(),gd->anchor(),gd->groupTitle());
8578 if (pd->isLinkableInProject())
8580 addWordsForTitle(pd.get(),pd->anchor(),pd->title());
8589 auto addMemberToSearchIndex = [](
const MemberDef *md)
8595 DString qn=md->qualifiedName();
8600 if (md->getClassDef())
8604 if (md->getNamespaceDef())
8615 if (md->getGroupDef()) scope = md->getGroupDef();
8616 else if (md->getClassDef()) scope = md->getClassDef();
8617 else if (md->getNamespaceDef()) scope = md->getNamespaceDef();
8618 else if (md->getFileDef()) scope = md->getFileDef();
8622 auto addMemberToIndices = [addMemberToSearchIndex,getScope](
const MemberDef *md)
8624 if (md->isLinkableInProject())
8626 if (!(md->isEnumerate() && md->isAnonymous()))
8629 addMemberToSearchIndex(md);
8631 if (md->isEnumerate())
8633 for (
const auto &fmd : md->enumFieldList())
8636 addMemberToSearchIndex(fmd);
8646 for (
const auto &md : *mn)
8648 addMemberToIndices(md.get());
8655 for (
const auto &md : *mn)
8657 addMemberToIndices(md.get());
8670 for (
const auto &imd : *mn)
8683 for (
const auto &imd : *mn)
8700 for (
const auto &imd : *mn)
8709 const auto &bmni = bmn.
find(mn->memberName());
8712 for (
const auto &ibmd : *bmni)
8720 lang==SrcLangExt::Python ||
8721 lang==SrcLangExt::Java ||
8722 lang==SrcLangExt::PHP ||
8731 bool instantiateBaseMember = actualArgs &&
8732 (memberClass==baseClass || memberClass==baseTemplate) &&
8734 bool useDerivedScope =
false;
8737 if (instantiateBaseMember)
8739 instantiatedBmdAl = bmdAl;
8740 for (
Argument &arg : instantiatedBmdAl)
8744 useDerivedScope = useDerivedScope || substitutedType!=arg.type;
8745 arg.type = substitutedType;
8748 instantiatedBmdAl.trailingReturnType(),baseTemplate->
templateArguments(),actualArgs);
8749 useDerivedScope = useDerivedScope ||
8750 substitutedTrailingReturnType!=instantiatedBmdAl.trailingReturnType();
8751 instantiatedBmdAl.setTrailingReturnType(substitutedTrailingReturnType);
8754 useDerivedScope = useDerivedScope || substitutedType!=instantiatedBmdType;
8755 instantiatedBmdType = substitutedType;
8762 lang==SrcLangExt::Python ||
8765 instantiatedBmdType,instantiateBaseMember ? &instantiatedBmdAl : &bmdAl,
8771 if (lang==SrcLangExt::Python && md->
name().
startsWith(
"__"))
continue;
8798 DString templSpec = bbcd.templSpecifiers;
8819 if (cd->isLinkable())
8821 for (
const auto &bcd : cd->baseClasses())
8838 for (
const auto &ti : cd->getTemplateInstances())
8863 AUTO_TRACE_ADD(
"merging members of category {} into {}",cd->name(),baseClass->
name());
8878 cd->subClasses().empty() &&
8879 !cd->baseClasses().empty())
8910 msg(
"Generating code for file {}...\n",fd->
docName());
8915 else if (parseSources)
8917 msg(
"Parsing code for file {}...\n",fd->
docName());
8933 for (
const auto &fd : *fn)
8941 for (
const auto &fd : *fn)
8950 clangParser->parse();
8951 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8953 for (
auto incFile : clangParser->filesInSameTU())
8955 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
8957 processedFiles.
find(incFile)==processedFiles.end())
8964 processSourceFile(ifd,*
g_outputList,clangParser.get());
8965 processedFiles.insert(incFile);
8976 for (
const auto &fd : *fn)
8978 if (processedFiles.find(fd->
absFilePath().
str())==processedFiles.end())
8983 clangParser->parse();
8984 processSourceFile(fd.get(),*
g_outputList,clangParser.get());
8997 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9000 msg(
"Generating code files using {} threads.\n",numThreads);
9001 struct SourceContext
9004 : fd(fd_), generateSourceFile(gen_), ol(ol_) {}
9006 bool generateSourceFile;
9010 std::vector< std::future< std::shared_ptr<SourceContext> > > results;
9013 for (
const auto &fd : *fn)
9016 auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*
g_outputList);
9017 auto processFile = [ctx]()
9019 if (ctx->generateSourceFile)
9021 msg(
"Generating code for file {}...\n",ctx->fd->docName());
9025 msg(
"Parsing code for file {}...\n",ctx->fd->docName());
9028 ctx->fd->getAllIncludeFilesRecursively(filesInSameTu);
9029 if (ctx->generateSourceFile)
9031 ctx->fd->writeSourceHeader(ctx->ol);
9032 ctx->fd->writeSourceBody(ctx->ol,
nullptr);
9033 ctx->fd->writeSourceFooter(ctx->ol);
9038 ctx->fd->parseSource(
nullptr);
9042 results.emplace_back(threadPool.
queue(processFile));
9045 for (
auto &f : results)
9054 for (
const auto &fd : *fn)
9074 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9080 : fd(fd_), ol(ol_) {}
9085 std::vector< std::future< std::shared_ptr<DocContext> > > results;
9088 for (
const auto &fd : *fn)
9090 bool doc = fd->isLinkableInProject();
9093 auto ctx = std::make_shared<DocContext>(fd.get(),*
g_outputList);
9094 auto processFile = [ctx]() {
9095 msg(
"Generating docs for file {}...\n",ctx->fd->docName());
9096 ctx->fd->writeDocumentation(ctx->ol);
9099 results.emplace_back(threadPool.
queue(processFile));
9103 for (
auto &f : results)
9112 for (
const auto &fd : *fn)
9114 bool doc = fd->isLinkableInProject();
9117 msg(
"Generating docs for file {}...\n",fd->docName());
9136 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
9145 const_cast<FileDef*
>(fd)->addSourceRef(cd->getStartDefLine(),cd.get(),
nullptr);
9154 const_cast<FileDef*
>(fd)->addSourceRef(nd->getStartDefLine(),nd.get(),
nullptr);
9161 for (
const auto &md : *mn)
9170 md->isLinkableInProject() &&
9176 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
9182 for (
const auto &md : *mn)
9192 md->isLinkableInProject() &&
9198 const_cast<FileDef*
>(fd)->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
9215 for (
const auto &def : it->second)
9218 def.fileName,def.lineNr,def.columnNr,
9219 "#define",def.name,def.args,
DString(),
9220 Protection::Public,Specifier::Normal,
false,Relationship::Member,MemberType::Define,
9224 if (!def.args.empty())
9228 mmd->setInitializer(def.definition);
9229 mmd->setFileDef(def.fileDef);
9230 mmd->setDefinition(
"#define "+def.name);
9235 const MemberList *defMl = def.fileDef->getMemberList(MemberListType::DocDefineMembers());
9244 def.fileDef->insertMember(md.get());
9246 AUTO_TRACE_ADD(
"adding macro {} with definition {}",def.name,def.definition);
9280 for (
const auto &fd : *fn)
9282 fd->sortMemberLists();
9289 gd->sortMemberLists();
9306 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9310 std::vector < std::future< void > > results;
9314 for (
const auto &def : symList)
9317 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
9319 auto processTooltip = [dm]() {
9322 results.emplace_back(threadPool.
queue(processTooltip));
9327 for (
auto &f : results)
9336 for (
const auto &def : symList)
9339 if (dm && !
isSymbolHidden(def) && !def->isArtificial() && def->isLinkableInProject())
9386 for (
const auto &fd : *fn)
9408 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
9414 : cd(cd_), ol(ol_) {}
9419 std::vector< std::future< std::shared_ptr<DocContext> > > results;
9420 for (
const auto &cd : classList)
9423 if (cd->getOuterScope()==
nullptr ||
9427 auto ctx = std::make_shared<DocContext>(cd,*
g_outputList);
9428 auto processFile = [ctx]()
9430 msg(
"Generating docs for compound {}...\n",ctx->cd->displayName());
9434 if (!ctx->cd->isHidden() && !ctx->cd->isEmbeddedInOuterScope() &&
9435 ctx->cd->isLinkableInProject() && !ctx->cd->isImplicitTemplateInstance())
9437 ctx->cd->writeDocumentation(ctx->ol);
9438 ctx->cd->writeMemberList(ctx->ol);
9442 ctx->cd->writeDocumentationForInnerClasses(ctx->ol);
9445 results.emplace_back(threadPool.
queue(processFile));
9448 for (
auto &f : results)
9455 for (
const auto &cd : classList)
9459 if (cd->getOuterScope()==
nullptr ||
9465 if ( !cd->isHidden() && !cd->isEmbeddedInOuterScope() &&
9466 cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
9468 msg(
"Generating docs for compound {}...\n",cd->displayName());
9483 for (
const auto &innerCdi : cd->
getClasses())
9488 AUTO_TRACE(
"innerCd={} isLinkable={} isImplicitTemplateInstance={} protectLevelVisible={} embeddedInOuterScope={}",
9497 list.push_back(innerCd);
9505 std::vector<ClassDefMutable*> classList;
9554 for (
const auto &imd : *mn)
9590 for (
const auto &fd : *fn)
9592 fd->combineUsingRelations();
9624 for (
const auto &fd : *fn)
9626 fd->addMembersToMemberGroup();
9641 gd->addMembersToMemberGroup();
9662 for (
const auto &fd : *fn)
9664 fd->distributeMemberGroupDocumentation();
9679 gd->distributeMemberGroupDocumentation();
9709 for (
const auto &fd : *fn)
9711 fd->findSectionsInDocumentation();
9726 gd->findSectionsInDocumentation();
9731 pd->findSectionsInDocumentation();
9736 dd->findSectionsInDocumentation();
9759 for (
const auto &ifmd : *fn)
9773 for (
const auto &imd : *nm)
9804 for (
const auto &imd : *nm)
9824 return fd->absFilePath() == root->
fileName;
9869 Protection::Public,Specifier::Normal,
false,Relationship::Member,MemberType::Define,
9872 mmd->setTagInfo(root->
tagInfo());
9873 mmd->setLanguage(root->
lang);
9885 for (
const auto &md : *mn)
9887 if (md->memberType()==MemberType::Define) count++;
9891 for (
const auto &imd : *mn)
9894 if (md && md->
memberType()==MemberType::Define)
9909 for (
const auto &imd : *mn)
9912 if (md && md->
memberType()==MemberType::Define)
9936 warn(root->
fileName,root->
startLine,
"found documented #define {} but ignoring it because ENABLE_PREPROCESSING is NO.", root->
name);
9950 normalizedName =
substitute(normalizedName,
"\\",
"/");
9953 if (root->
docFile==normalizedName)
9957 normalizedName=normalizedName.
left(lastSlashPos);
9960 if (normalizedName.
at(normalizedName.
length()-1)!=
'/')
9962 normalizedName+=
'/';
9964 DirDef *matchingDir=
nullptr;
9968 if (dir->name().right(normalizedName.
length())==normalizedName)
9973 "\\dir command matches multiple directories.\n"
9974 " Applying the command for directory {}\n"
9975 " Ignoring the command for directory {}",
9976 matchingDir->
name(),dir->name()
9981 matchingDir=dir.get();
9998 warn(root->
fileName,root->
startLine,
"No matching directory found for command \\dir {}",normalizedName);
10007 if (root->
section.isRequirementDoc())
10019 if (root->
section.isPageDoc())
10026 else if (root->
section.isMainpageDoc())
10046 if (root->
section.isMainpageDoc())
10079 else if (si->
lineNr() != -1)
10081 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {}, line {})",
10086 warn(root->
fileName,root->
startLine,
"multiple use of section label '{}' for main page, (first occurrence: {})",
10103 else if (root->
tagInfo()==
nullptr)
10106 "found more than one \\mainpage comment block! (first occurrence: {}, line {}), Skipping current block!",
10116 if (root->
section.isMainpageDoc())
10140 term(
"page defined {} with label {} is a direct "
10141 "subpage of itself! Please remove this cyclic dependency.\n",
10165 term(
"page defined {} with label {} is a subpage "
10166 "of itself! Please remove this cyclic dependency.\n",
10167 warn_line(pd->docFile(),pd->docLine()),pd->name());
10192 DString label=
"_"+rl->listName();
10193 if (si->label().left(label.
length())==label)
10195 si->setFileName(rl->listName());
10196 si->setGenerated(
true);
10202 if (!si->generated())
10206 if (!si->fileName().empty() &&
10213 if (si->definition())
10220 gd = (
toMemberDef(si->definition()))->getGroupDef();
10250 if (!pd->getGroupDef() && !pd->isReference())
10252 msg(
"Generating docs for page {}...\n",pd->name());
10267 warn(root->
fileName,root->
startLine,
"Example {} was already documented. Ignoring documentation found here.",root->
name);
10295 indentStr.
fill(
' ',indent);
10297 indentStr.
empty()?
"":indentStr,
10302 for (
const auto &e : root->
children())
10320 si->label(),si->fileName(),si->title(),si->type().level(),si->ref());
10334 msg(
"Generating docs for example {}...\n",pd->name());
10336 if (lang != SrcLangExt::Unknown)
10340 intf->resetCodeParserState();
10342 DString n=pd->getOutputFileBase();
10349 if (pd->showLineNo())
10351 lineNoOptStr=
"{lineno}";
10357 (pd->briefDescription().empty()?
"":pd->briefDescription()+
"\n\n")+
10358 pd->documentation()+
"\n\n\\include"+lineNoOptStr+
" "+pd->name(),
10360 .setIndexWords(
true)
10361 .setExample(pd->name()));
10374 if (!gd->isReference())
10386 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
10392 : cdm(cdm_), ol(ol_) {}
10397 std::vector< std::future< std::shared_ptr<DocContext> > > results;
10399 for (
const auto &cd : classList)
10404 auto ctx = std::make_shared<DocContext>(cdm,*
g_outputList);
10405 auto processFile = [ctx]()
10407 if ( ( ctx->cdm->isLinkableInProject() &&
10408 !ctx->cdm->isImplicitTemplateInstance()
10411 && !ctx->cdm->isHidden() && !ctx->cdm->isEmbeddedInOuterScope()
10414 msg(
"Generating docs for compound {}...\n",ctx->cdm->displayName());
10415 ctx->cdm->writeDocumentation(ctx->ol);
10416 ctx->cdm->writeMemberList(ctx->ol);
10418 ctx->cdm->writeDocumentationForInnerClasses(ctx->ol);
10421 results.emplace_back(threadPool.
queue(processFile));
10425 for (
auto &f : results)
10427 auto ctx = f.get();
10433 for (
const auto &cd : classList)
10438 if ( ( cd->isLinkableInProject() &&
10439 !cd->isImplicitTemplateInstance()
10442 && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
10445 msg(
"Generating docs for compound {}...\n",cd->displayName());
10459 for (
const auto &cd : conceptList)
10464 msg(
"Generating docs for concept {}...\n",cd->name());
10479 if (nd->isLinkableInProject())
10484 msg(
"Generating docs for namespace {}\n",nd->displayName());
10523 DString cmd=qhgLocation+
" -v 2>&1";
10528 err(
"could not execute {}\n",qhgLocation);
10532 const size_t bufSize = 1024;
10533 char inBuf[bufSize+1];
10534 size_t numRead=fread(inBuf,1,bufSize,f);
10535 inBuf[numRead] =
'\0';
10540 static const reg::Ex versionReg(R
"(Qt (\d+)\.(\d+)\.(\d+))");
10542 std::string s = inBuf;
10549 if (qtVersion>0 && (qtVersion<60000 || qtVersion >= 60205))
10558 err(
"could not execute {}\n",qhgLocation);
10562 std::string output;
10563 while ((numRead=fread(inBuf,1,bufSize,f))>0)
10565 inBuf[numRead] =
'\0';
10588 if (!dotPath.
empty())
10597 warn_uncond(
"the dot tool could not be found as '{}'\n",dotPath);
10603 dotPath = fi.
dirPath() +
"/" + dotPath;
10607 size_t l=dotPath.
length();
10608 for (
size_t i=0;i<l;i++)
if (dotPath.
at(i)==
'/') dotPath.
at(i)=
'\\';
10627 bool updateOnly=
false)
10631 bool writeToStdout=configFile==
"-";
10636 if (!writeToStdout)
10640 msg(
"\n\nConfiguration file '{}' created.\n\n",configFile);
10641 msg(
"Now edit the configuration file and enter\n\n");
10642 if (configFile!=
"Doxyfile" && configFile!=
"doxyfile")
10643 msg(
" doxygen {}\n\n",configFile);
10645 msg(
" doxygen\n\n");
10646 msg(
"to generate the documentation for your project\n\n");
10650 msg(
"\n\nConfiguration file '{}' updated.\n\n",configFile);
10656 term(
"Cannot open file {} for writing\n",configFile);
10671 term(
"Cannot open stdout for writing\n");
10686 if (fileName.
empty() || destName.
empty())
return;
10691 fileName = tagLine;
10697 err(
"Tag file '{}' does not exist or is not a file. Skipping it...\n",fileName);
10705 if (!destName.
empty())
10708 msg(
"Reading tag file '{}', location '{}'...\n",fileName,destName);
10712 msg(
"Reading tag file '{}'...\n",fileName);
10722 for (
const auto &sheet : latexExtraStyleSheet)
10724 std::string fileName = sheet;
10725 if (!fileName.empty())
10730 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",fileName);
10732 else if (fi.
isDir())
10734 err(
"Style sheet '{}' specified by LATEX_EXTRA_STYLESHEET is a directory, it has to be a file!\n", fileName);
10753 if (!htmlStyleSheet.
empty())
10760 err(
"Style sheet '{}' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet);
10763 else if (fi.
isDir())
10765 err(
"Style sheet '{}' specified by HTML_STYLESHEET is a directory, it has to be a file!\n",htmlStyleSheet);
10771 copyFile(htmlStyleSheet,destFileName);
10776 for (
const auto &sheet : htmlExtraStyleSheet)
10784 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET does not exist!\n",fileName);
10788 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",fi.
fileName());
10790 else if (fi.
isDir())
10792 err(
"Style sheet '{}' specified by HTML_EXTRA_STYLESHEET is a directory, it has to be a file!\n",fileName);
10806 if (!projectLogo.
empty())
10811 err(
"Project logo '{}' specified by PROJECT_LOGO does not exist!\n",projectLogo);
10814 else if (fi.
isDir())
10816 err(
"Project logo '{}' specified by PROJECT_LOGO is a directory, it has to be a file!\n",projectLogo);
10822 copyFile(projectLogo,destFileName);
10831 if (!projectIcon.
empty())
10836 err(
"Project icon '{}' specified by PROJECT_ICON does not exist!\n",projectIcon);
10839 else if (fi.
isDir())
10841 err(
"Project icon '{}' specified by PROJECT_ICON is a directory, it has to be a file!\n",projectIcon);
10847 copyFile(projectIcon,destFileName);
10855 for (
const auto &fileName : files)
10857 if (!fileName.empty())
10862 err(
"Extra file '{}' specified in {} does not exist!\n", fileName,filesOption);
10864 else if (fi.
isDir())
10866 err(
"Extra file '{}' specified in {} is a directory, it has to be a file!\n", fileName,filesOption);
10886 FileEntry(
const DString &p,
FileDef *fd) : path(p), fileDef(fd) {}
10892 std::vector<FileEntry> fileEntries;
10893 for (
const auto &fd : *fn)
10895 if (!fd->isReference())
10897 fileEntries.emplace_back(fd->getPath(),fd.get());
10901 size_t size = fileEntries.size();
10905 FileDef *fd = fileEntries[0].fileDef;
10911 std::stable_sort(fileEntries.begin(),
10913 [](
const FileEntry &fe1,
const FileEntry &fe2)
10914 { return dstricmp_sort(fe1.path,fe2.path)<0; }
10919 const FileEntry &first = fileEntries[0];
10920 const FileEntry &last = fileEntries[size-1];
10921 int first_path_size =
static_cast<int>(first.path.size())-1;
10922 int last_path_size =
static_cast<int>(last.path.size())-1;
10925 for (i=0;i<first_path_size && i<last_path_size;i++)
10927 if (first.path[i]==
'/') j=i;
10928 if (first.path[i]!=last.path[i])
break;
10930 if (i==first_path_size && i<last_path_size && last.path[i]==
'/')
10935 else if (i==last_path_size && i<first_path_size && first.path[i]==
'/')
10942 for (
auto &fileEntry : fileEntries)
10944 DString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
10945 fileEntry.fileDef->setName(
prefix+fn->fileName());
10947 fileEntry.fileDef->setDiskName(
prefix+fn->fileName());
10961 size_t sep = fileName.
rfind(
'/');
10962 size_t ei = fileName.
rfind(
'.');
10965 extension=fileName.
mid(ei);
10969 extension =
".no_extension";
10984 extension=fileName.
mid(ei);
10988 extension =
".no_extension";
10992 std::string preBuf;
10999 for (
const auto &s : includePath)
11005 msg(
"Preprocessing {}...\n",fn);
11012 msg(
"Reading {}...\n",fn);
11017 std::string convBuf;
11018 convBuf.reserve(preBuf.size()+1024);
11023 std::shared_ptr<Entry> fileRoot = std::make_shared<Entry>();
11027 if (newTU) clangParser->
parse();
11030 parser.
parseInput(fileName,convBuf.
data(),fileRoot,clangParser);
11031 fileRoot->setFileDef(fd);
11048 filesToProcess.insert(s);
11051 std::mutex processedFilesLock;
11053 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
11054 msg(
"Processing input using {} threads.\n",numThreads);
11056 using FutureType = std::vector< std::shared_ptr<Entry> >;
11057 std::vector< std::future< FutureType > > results;
11060 bool ambig =
false;
11067 auto processFile = [qs,&filesToProcess,&processedFilesLock,&processedFiles]() {
11068 bool ambig_l =
false;
11069 std::vector< std::shared_ptr<Entry> > roots;
11073 auto fileRoot {
parseFile(*parser.get(),fd_l,qs,clangParser.get(),
true) };
11074 roots.push_back(fileRoot);
11078 for (
auto incFile : clangParser->filesInSameTU())
11081 if (filesToProcess.find(incFile)!=filesToProcess.end())
11083 bool needsToBeProcessed =
false;
11085 std::lock_guard<std::mutex> lock(processedFilesLock);
11086 needsToBeProcessed = processedFiles.find(incFile)==processedFiles.end();
11087 if (needsToBeProcessed) processedFiles.insert(incFile);
11089 if (qincFile!=qs && needsToBeProcessed)
11095 fileRoot =
parseFile(*parser.get(),ifd,qincFile,clangParser.get(),
false);
11096 roots.push_back(fileRoot);
11104 results.emplace_back(threadPool.
queue(processFile));
11108 for (
auto &f : results)
11113 root->moveToSubEntryAndKeep(e);
11120 if (processedFiles.find(s)==processedFiles.end())
11123 auto processFile = [s]() {
11124 bool ambig =
false;
11126 std::vector< std::shared_ptr<Entry> > roots;
11133 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
11134 roots.push_back(fileRoot);
11138 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11139 roots.push_back(fileRoot);
11143 results.emplace_back(threadPool.
queue(processFile));
11147 for (
auto &f : results)
11152 root->moveToSubEntryAndKeep(e);
11159 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
11160 msg(
"Processing input using {} threads.\n",numThreads);
11162 using FutureType = std::shared_ptr<Entry>;
11163 std::vector< std::future< FutureType > > results;
11167 auto processFile = [s]() {
11168 bool ambig =
false;
11172 auto fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11176 results.emplace_back(threadPool.
queue(processFile));
11179 for (
auto &f : results)
11181 root->moveToSubEntryAndKeep(f.get());
11199 filesToProcess.insert(s);
11205 bool ambig =
false;
11213 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
11214 root->moveToSubEntryAndKeep(fileRoot);
11215 processedFiles.insert(s);
11219 for (
auto incFile : clangParser->filesInSameTU())
11222 if (filesToProcess.find(incFile)!=filesToProcess.end() &&
11223 processedFiles.find(incFile)==processedFiles.end())
11229 fileRoot =
parseFile(*parser.get(),ifd,incFile,clangParser.get(),
false);
11230 root->moveToSubEntryAndKeep(fileRoot);
11231 processedFiles.insert(incFile);
11240 if (processedFiles.find(s)==processedFiles.end())
11242 bool ambig =
false;
11249 auto fileRoot =
parseFile(*parser.get(),fd,qs,clangParser.get(),
true);
11250 root->moveToSubEntryAndKeep(fileRoot);
11255 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11256 root->moveToSubEntryAndKeep(fileRoot);
11258 processedFiles.insert(s);
11267 bool ambig =
false;
11272 std::shared_ptr<Entry> fileRoot =
parseFile(*parser.get(),fd,qs,
nullptr,
true);
11273 root->moveToSubEntryAndKeep(std::move(fileRoot));
11293 sepPos = result.
find(
'/',2);
11295 sepPos = result.
find(
'/',sepPos+1);
11297 sepPos = result.
find(
'/',sepPos+1);
11300 if (nonSymlinks.find(
prefix.str())==nonSymlinks.end())
11317 target+=result.
mid(sepPos);
11320 if (known.find(result.
str())!=known.end())
return std::string();
11321 known.insert(result.
str());
11334 nonSymlinks.insert(
prefix.str());
11359 bool errorIfNotExist,
11366 if (paths && !dirName.empty())
11368 paths->insert(dirName);
11374 if (dirName.empty())
11389 msg(
"Searching for files in directory {}\n", fi->
absFilePath());
11400 for (
const auto &dirEntry : dir.
iterator())
11402 entries.push_back(dirEntry.path());
11404 std::sort(entries.begin(),entries.end());
11406 for (
const auto &entryPath : entries)
11409 auto checkPatterns = [&]() ->
bool
11411 return (patList==
nullptr || cfi.
match(*patList,caseSenseNames)) &&
11412 (exclPatList==
nullptr || !cfi.
match(*exclPatList,caseSenseNames)) &&
11413 (killSet==
nullptr || killSet->find(cfi.
absFilePath())==killSet->end());
11416 if (exclSet==
nullptr || exclSet->find(cfi.
absFilePath())==exclSet->end())
11424 if (errorIfNotExist && checkPatterns())
11429 else if (cfi.
isFile() && checkPatterns())
11432 std::string path=cfi.
dirPath()+
"/";
11433 std::string fullName=path+name;
11440 fn = fnMap->
add(name);
11441 fn->push_back(std::move(fd));
11444 dirResultList.push_back(fullName);
11445 if (resultSet) resultSet->insert(fullName);
11446 if (killSet) killSet->insert(fullName);
11448 else if (recursive &&
11450 (exclPatList==
nullptr || !cfi.
match(*exclPatList,caseSenseNames)) &&
11455 patList,exclPatList,&dirResultList,resultSet,errorIfNotExist,
11456 recursive,killSet,paths);
11460 if (resultList && !dirResultList.empty())
11463 std::stable_sort(dirResultList.begin(),
11464 dirResultList.end(),
11465 [](
const auto &f1,
const auto &f2) { return dstricmp_sort(f1.c_str(),f2.c_str())<0; });
11468 resultList->insert(resultList->end(), dirResultList.begin(), dirResultList.end());
11485 bool errorIfNotExist,
11492 if (s.
empty())
return;
11499 if (exclSet==
nullptr || exclSet->find(fi.
absFilePath())==exclSet->end())
11506 if (errorIfNotExist)
11508 warn_uncond(
"source '{}' is not a readable file or directory... skipping.\n",s);
11513 std::string dirPath = fi.
dirPath(
true);
11515 if (paths && !dirPath.empty())
11517 paths->insert(dirPath);
11520 if (killSet==
nullptr || killSet->find(filePath)==killSet->end())
11529 fn->push_back(std::move(fd));
11532 if (resultList || resultSet)
11534 if (resultList) resultList->push_back(filePath);
11535 if (resultSet) resultSet->insert(filePath);
11541 else if (fi.
isDir())
11543 readDir(&fi,fnMap,exclSet,patList,
11544 exclPatList,resultList,resultSet,errorIfNotExist,
11545 recursive,killSet,paths);
11559 anchor=
":"+md->
anchor();
11568 t <<
"REPLACE INTO symbols (symbol_id,scope_id,name,file,line) VALUES('"
11569 << fn+anchor <<
"','"
11571 << d->
name() <<
"','"
11585 for (
const auto &def : symList)
11597 msg(
"Developer parameters:\n");
11598 msg(
" -m dump symbol map\n");
11599 msg(
" -b making messages output unbuffered\n");
11600 msg(
" -c <file> process input file as a comment block and produce HTML output\n");
11602 msg(
" -t [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout)\n");
11603 msg(
" -t_time [<file|stdout|stderr>] trace debug info to file, stdout, or stderr (default file stdout),\n"
11604 " and include time and thread information\n");
11606 msg(
" -d <level> enable a debug level, such as (multiple invocations of -d are possible):\n");
11617 DString versionString = getFullVersion();
11618 msg(
"{}\n",versionString);
11622 if (!extVers.
empty()) extVers+=
", ";
11623 extVers +=
"sqlite3 ";
11624 extVers += sqlite3_libversion();
11626 if (!extVers.
empty()) extVers+=
", ";
11627 extVers +=
"clang support ";
11628 extVers += CLANG_VERSION_STRING;
11630 if (!extVers.
empty())
11634 extVers = extVers.
replace(lastComma,1,
" and");
11636 msg(
" with {}.\n",extVers);
11647 msg(
"Doxygen version {0}\nCopyright Dimitri van Heesch 1997-2025\n\n"
11648 "You can use Doxygen in a number of ways:\n\n"
11649 "1) Use Doxygen to generate a template configuration file*:\n"
11650 " {1} [-s] -g [configName]\n\n"
11651 "2) Use Doxygen to update an old configuration file*:\n"
11652 " {1} [-s] -u [configName]\n\n"
11653 "3) Use Doxygen to generate documentation using an existing "
11654 "configuration file*:\n"
11655 " {1} [configName]\n\n"
11656 "4) Use Doxygen to generate a template file controlling the layout of the\n"
11657 " generated documentation:\n"
11658 " {1} -l [layoutFileName]\n\n"
11659 " In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.\n"
11660 " If - is used for layoutFileName Doxygen will write to standard output.\n\n"
11661 "5) Use Doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"
11662 " RTF: {1} -w rtf styleSheetFile\n"
11663 " HTML: {1} -w html headerFile footerFile styleSheetFile [configFile]\n"
11664 " LaTeX: {1} -w latex headerFile footerFile styleSheetFile [configFile]\n\n"
11665 "6) Use Doxygen to generate a rtf extensions file\n"
11666 " {1} -e rtf extensionsFile\n\n"
11667 " If - is used for extensionsFile Doxygen will write to standard output.\n\n"
11668 "7) Use Doxygen to compare the used configuration file with the template configuration file\n"
11669 " {1} -x [configFile]\n\n"
11670 " Use Doxygen to compare the used configuration file with the template configuration file\n"
11671 " without replacing the environment variables or CMake type replacement variables\n"
11672 " {1} -x_noenv [configFile]\n\n"
11673 "8) Use Doxygen to show a list of built-in emojis.\n"
11674 " {1} -f emoji outputFileName\n\n"
11675 " If - is used for outputFileName Doxygen will write to standard output.\n\n"
11676 "*) If -s is specified the comments of the configuration items in the config file will be omitted.\n"
11677 " If configName is omitted 'Doxyfile' will be used as a default.\n"
11678 " If - is used for configFile Doxygen will write / read the configuration to /from standard output / input.\n\n"
11679 "If -q is used for a Doxygen documentation run, Doxygen will see this as if QUIET=YES has been set.\n\n"
11680 "-v print version string, -V print extended version information\n"
11681 "-h,-? prints usage help information\n"
11682 "{1} -d prints additional usage flags for debugging purposes\n",versionString,name);
11689static const char *
getArg(
int argc,
char **argv,
int &optInd)
11692 if (
dstrlen(&argv[optInd][2])>0)
11693 s=&argv[optInd][2];
11694 else if (optInd+1<argc && argv[optInd+1][0]!=
'-')
11713 return []() {
return std::make_unique<T>(); };
11721 std::setlocale(LC_ALL,
"");
11722 std::setlocale(LC_CTYPE,
"C");
11723 std::setlocale(LC_NUMERIC,
"C");
11821 DString versionString = getFullVersion();
11824 auto writeFile = [](
const char *fileName,std::function<void(
TextStream&)> func) ->
bool
11844 bool genConfig=
false;
11845 bool shortList=
false;
11846 bool traceTiming=
false;
11848 bool updateConfig=
false;
11849 bool quiet =
false;
11850 while (optInd<argc && argv[optInd][0]==
'-' &&
11851 (isalpha(argv[optInd][1]) || argv[optInd][1]==
'?' ||
11852 argv[optInd][1]==
'-')
11855 switch(argv[optInd][1])
11865 if (optInd+1>=argc)
11867 layoutName=
"DoxygenLayout.xml";
11871 layoutName=argv[optInd+1];
11879 if (optInd+1>=argc)
11881 msg(
"option \"-c\" is missing the file name to read\n");
11897 if (debugLabel.
empty())
11906 msg(
"option \"-d\" has unknown debug specifier: \"{}\".\n",debugLabel);
11916 if (!strcmp(argv[optInd]+1,
"t_time"))
11918 traceTiming =
true;
11920 else if (!strcmp(argv[optInd]+1,
"t"))
11922 traceTiming =
false;
11926 err(
"option should be \"-t\" or \"-t_time\", found: \"{}\".\n",argv[optInd]);
11930 if (optInd+1>=argc || argv[optInd+1][0] ==
'-')
11932 traceName=
"stdout";
11936 traceName=argv[optInd+1];
11940 err(
"support for option \"-t\" has not been compiled in (use a debug build or a release build with tracing enabled).\n");
11951 err(
"option should be \"-x\" or \"-x_noenv\", found: \"{}\".\n",argv[optInd]);
11965 if (formatName.
empty())
11967 err(
"option \"-e\" is missing format specifier rtf.\n");
11973 if (optInd+1>=argc)
11975 err(
"option \"-e rtf\" is missing an extensions file name\n");
11983 err(
"option \"-e\" has invalid format specifier.\n");
11991 if (listName.
empty())
11993 err(
"option \"-f\" is missing list specifier.\n");
11999 if (optInd+1>=argc)
12001 err(
"option \"-f emoji\" is missing an output file name\n");
12009 err(
"option \"-f\" has invalid list specifier.\n");
12017 if (formatName.
empty())
12019 err(
"option \"-w\" is missing format specifier rtf, html or latex\n");
12025 if (optInd+1>=argc)
12027 err(
"option \"-w rtf\" is missing a style sheet file name\n");
12033 err(
"error opening RTF style sheet file {}!\n",argv[optInd+1]);
12043 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
12049 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
12054 if (optInd+3>=argc)
12056 err(
"option \"-w html\" does not have enough arguments\n");
12073 if (optInd+4<argc ||
FileInfo(
"Doxyfile").exists() ||
FileInfo(
"doxyfile").exists())
12078 err(
"error opening or reading configuration file {}!\n",argv[optInd+4]);
12083 if (optInd+3>=argc)
12085 err(
"option \"-w latex\" does not have enough arguments\n");
12101 err(
"Illegal format specifier \"{}\": should be one of rtf, html or latex\n",formatName);
12121 if (
dstrcmp(&argv[optInd][2],
"help")==0)
12123 usage(argv[0],versionString);
12126 else if (
dstrcmp(&argv[optInd][2],
"version")==0)
12132 else if ((
dstrcmp(&argv[optInd][2],
"Version")==0) ||
12133 (
dstrcmp(&argv[optInd][2],
"VERSION")==0))
12141 err(
"Unknown option \"-{}\"\n",&argv[optInd][1]);
12142 usage(argv[0],versionString);
12147 setvbuf(stdout,
nullptr,_IONBF,0);
12154 usage(argv[0],versionString);
12158 err(
"Unknown option \"-{:c}\"\n",argv[optInd][1]);
12159 usage(argv[0],versionString);
12170 TRACE(
"Doxygen version used: {}",getFullVersion());
12173 FileInfo configFileInfo1(
"Doxyfile"),configFileInfo2(
"doxyfile");
12176 if (configFileInfo1.exists())
12178 configName=
"Doxyfile";
12180 else if (configFileInfo2.
exists())
12182 configName=
"doxyfile";
12184 else if (genConfig)
12186 configName=
"Doxyfile";
12190 err(
"Doxyfile not found and no input file specified!\n");
12191 usage(argv[0],versionString);
12198 if (fi.
exists() ||
dstrcmp(argv[optInd],
"-")==0 || genConfig)
12200 configName=argv[optInd];
12204 err(
"configuration file {} not found!\n",argv[optInd]);
12205 usage(argv[0],versionString);
12219 err(
"could not open or read configuration file {}!\n",configName);
12291 for (
const auto &mapping : extMaps)
12309 err(
"Failed to map file extension '{}' to unsupported language '{}'.\n"
12310 "Check the EXTENSION_MAPPING setting in the config file.\n",
12315 msg(
"Adding custom extension mapping: '{}' will be treated as language '{}'\n",
12324 if (cd==
reinterpret_cast<void *
>(-1))
12326 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
12327 "Check the 'INPUT_ENCODING' setting in the config file!\n",
12337 for (
const auto &mapping : fileEncod)
12353 if (cd==
reinterpret_cast<void *
>(-1))
12355 term(
"unsupported character conversion: '{}'->'UTF-8': {}\n"
12356 "Check the 'INPUT_FILE_ENCODING' setting in the config file!\n",
12357 encoding,strerror(errno));
12370 for (
const auto &s : expandAsDefinedList)
12388 signal(SIGINT,SIG_DFL);
12390 msg(
"Cleaning up...\n");
12405 if (generateTagFile.
empty())
return;
12410 err(
"cannot open tag file {} for writing\n", generateTagFile);
12414 tagFile <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
12415 tagFile <<
"<tagfile doxygen_version=\"" << getDoxygenVersion() <<
"\"";
12416 std::string gitVersion = getGitVersion();
12417 if (!gitVersion.empty())
12419 tagFile <<
" doxygen_gitid=\"" << gitVersion <<
"\"";
12426 for (
const auto &fd : *fn)
12428 if (fd->isLinkableInProject()) fd->writeTagFile(tagFile);
12461 if (gd->isLinkableInProject()) gd->writeTagFile(tagFile);
12466 if (mod->isLinkableInProject()) mod->writeTagFile(tagFile);
12471 if (pd->isLinkableInProject()) pd->writeTagFile(tagFile);
12478 if (dd->isLinkableInProject()) dd->writeTagFile(tagFile);
12482 tagFile <<
"</tagfile>\n";
12490 msg(
"Exiting...\n");
12499 const DString &formatDirName,
12500 const char *defaultDirName)
12502 DString result = formatDirName;
12503 if (result.
empty())
12505 result = baseDirName + defaultDirName;
12507 else if (formatDirName[0]!=
'/' && (formatDirName.
length()==1 || formatDirName[1]!=
':'))
12509 result.
prepend(baseDirName+
"/");
12511 Dir formatDir(result.
str());
12514 term(
"Could not create output directory {}\n", result);
12528 g_s.
begin(
"Searching for include files...\n");
12531 for (
const auto &s : includePathList)
12549 g_s.
begin(
"Searching for example files...\n");
12552 for (
const auto &s : examplePathList)
12568 g_s.
begin(
"Searching for images...\n");
12571 for (
const auto &s : imagePathList)
12586 g_s.
begin(
"Searching for dot files...\n");
12589 for (
const auto &s : dotFileList)
12604 g_s.
begin(
"Searching for msc files...\n");
12607 for (
const auto &s : mscFileList)
12622 g_s.
begin(
"Searching for dia files...\n");
12625 for (
const auto &s : diaFileList)
12640 g_s.
begin(
"Searching for plantuml files...\n");
12643 for (
const auto &s : plantUmlFileList)
12658 g_s.
begin(
"Searching for mermaid files...\n");
12661 for (
const auto &s : mermaidFileList)
12676 g_s.
begin(
"Searching for files to exclude\n");
12678 for (
const auto &s : excludeList)
12697 g_s.
begin(
"Searching INPUT for files to process...\n");
12701 for (
const auto &s : inputList)
12704 size_t l = path.
length();
12708 if (path.
at(l-1)==
'\\' || path.
at(l-1)==
'/') path=path.
left(l-1);
12729 if (fileName->size()>1)
12731 std::stable_sort(fileName->begin(),fileName->end(),[](
const auto &f1,
const auto &f2)
12733 return dstricmp_sort(f1->absFilePath(),f2->absFilePath())<0;
12739 [](
const auto &f1,
const auto &f2)
12741 return dstricmp_sort(f1->front()->absFilePath(),f2->front()->absFilePath())<0;
12745 warn_uncond(
"No files to be processed, please check your settings, in particular INPUT, FILE_PATTERNS, and RECURSIVE\n");
12756 if (mdfileAsMainPage.
empty())
return;
12760 warn_uncond(
"Specified markdown mainpage '{}' does not exist\n",mdfileAsMainPage);
12763 bool ambig =
false;
12766 warn_uncond(
"Specified markdown mainpage '{}' has not been defined as input file\n",mdfileAsMainPage);
12785 DString versionString = getFullVersion();
12786 msg(
"Doxygen version used: {}\n",versionString);
12796 if (outputDirectory.
empty())
12802 Dir dir(outputDirectory.
str());
12806 if (!dir.
mkdir(outputDirectory.
str()))
12808 term(
"tag OUTPUT_DIRECTORY: Output directory '{}' does not "
12809 "exist and cannot be created\n",outputDirectory);
12813 msg(
"Notice: Output directory '{}' does not exist. "
12814 "I have created it for you.\n", outputDirectory);
12862 bool generateSitemap = !sitemapUrl.
empty();
12863 if (generateSitemap && !sitemapUrl.
endsWith(
"/"))
12870 bool generateEclipseHelp =
Config_getBool(GENERATE_ECLIPSEHELP);
12884 if (generateDocbook)
12924 if (curFontPath.
empty())
12928 if (!curFontPath.
empty())
12931 newFontPath+=curFontPath;
12947 bool defaultLayoutUsed =
false;
12948 if (layoutFileName.
empty())
12951 defaultLayoutUsed =
true;
12953 AUTO_TRACE_ADD(
"defaultLayoutUsed={}, layoutFileName={}",defaultLayoutUsed,layoutFileName);
12958 msg(
"Parsing layout file {}...\n",layoutFileName);
12961 else if (!defaultLayoutUsed)
12963 warn_uncond(
"failed to open layout file '{}' for reading! Using default settings.\n",layoutFileName);
12973 if (generateHtml) exclPatterns.push_back(htmlOutput.
str());
12974 if (generateDocbook) exclPatterns.push_back(docbookOutput.
str());
12975 if (generateXml) exclPatterns.push_back(xmlOutput.
str());
12976 if (generateLatex) exclPatterns.push_back(latexOutput.
str());
12977 if (generateRtf) exclPatterns.push_back(rtfOutput.
str());
12978 if (generateMan) exclPatterns.push_back(manOutput.
str());
12998 if (generateDocbook)
13009 std::shared_ptr<Entry> root = std::make_shared<Entry>();
13013 msg(
"Reading and parsing tag files\n");
13015 for (
const auto &s : tagFileList)
13067 g_s.
begin(
"Building macro definition list...\n");
13071 g_s.
begin(
"Building group list...\n");
13076 g_s.
begin(
"Building directory list...\n");
13081 g_s.
begin(
"Building namespace list...\n");
13086 g_s.
begin(
"Building file list...\n");
13090 g_s.
begin(
"Building class list...\n");
13094 g_s.
begin(
"Building concept list...\n");
13102 g_s.
begin(
"Computing nesting relations for classes...\n");
13115 g_s.
begin(
"Associating documentation with classes...\n");
13119 g_s.
begin(
"Associating documentation with concepts...\n");
13124 g_s.
begin(
"Associating documentation with modules...\n");
13128 g_s.
begin(
"Building example list...\n");
13132 g_s.
begin(
"Searching for enumerations...\n");
13140 g_s.
begin(
"Searching for documented typedefs...\n");
13146 g_s.
begin(
"Searching for documented sequences...\n");
13150 g_s.
begin(
"Searching for documented dictionaries...\n");
13155 g_s.
begin(
"Searching for members imported via using declarations...\n");
13162 g_s.
begin(
"Searching for included using directives...\n");
13166 g_s.
begin(
"Searching for documented variables...\n");
13170 g_s.
begin(
"Building interface member list...\n");
13173 g_s.
begin(
"Building member list...\n");
13177 g_s.
begin(
"Searching for friends...\n");
13181 g_s.
begin(
"Searching for documented defines...\n");
13185 g_s.
begin(
"Computing class inheritance relations...\n");
13190 g_s.
begin(
"Computing class usage relations...\n");
13194 g_s.
begin(
"Flushing cached template relations that have become invalid...\n");
13198 g_s.
begin(
"Warn for undocumented namespaces...\n");
13202 g_s.
begin(
"Computing class relations...\n");
13213 g_s.
begin(
"Add enum values to enums...\n");
13218 g_s.
begin(
"Searching for member function documentation...\n");
13230 g_s.
begin(
"Creating members for template instances...\n");
13234 g_s.
begin(
"Searching for tag less structs...\n");
13238 g_s.
begin(
"Building page list...\n");
13242 g_s.
begin(
"Building requirements list...\n");
13246 g_s.
begin(
"Search for main page...\n");
13251 g_s.
begin(
"Computing page relations...\n");
13256 g_s.
begin(
"Determining the scope of groups...\n");
13260 g_s.
begin(
"Computing module relations...\n");
13262 mm.resolvePartitions();
13263 mm.resolveImports();
13264 mm.collectExportedSymbols();
13283 return i==0 ?
dstricmp_sort(c1->name(), c2->name())<0 : i<0;
13318 g_s.
begin(
"Determining which enums are documented\n");
13322 g_s.
begin(
"Computing member relations...\n");
13327 g_s.
begin(
"Building full member lists recursively...\n");
13331 g_s.
begin(
"Adding members to member groups.\n");
13337 g_s.
begin(
"Distributing member group documentation.\n");
13342 g_s.
begin(
"Computing member references...\n");
13348 g_s.
begin(
"Inheriting documentation...\n");
13356 g_s.
begin(
"Generating disk names...\n");
13360 g_s.
begin(
"Adding source references...\n");
13364 g_s.
begin(
"Adding xrefitems...\n");
13369 g_s.
begin(
"Adding requirements...\n");
13374 g_s.
begin(
"Sorting member lists...\n");
13378 g_s.
begin(
"Setting anonymous enum type...\n");
13382 g_s.
begin(
"Computing dependencies between directories...\n");
13386 g_s.
begin(
"Generating citations page...\n");
13390 g_s.
begin(
"Counting data structures...\n");
13394 g_s.
begin(
"Resolving user defined references...\n");
13398 g_s.
begin(
"Finding anchors and sections in the documentation...\n");
13402 g_s.
begin(
"Transferring function references...\n");
13406 g_s.
begin(
"Combining using relations...\n");
13411 g_s.
begin(
"Adding members to index pages...\n");
13416 g_s.
begin(
"Correcting members for VHDL...\n");
13420 g_s.
begin(
"Computing tooltip texts...\n");
13428 [](
const auto &g1,
const auto &g2)
13429 {
return g1->groupTitle() < g2->groupTitle(); });
13433 gd->sortSubGroups();
13477 if (generateDocbook)
13497 err(
"USE_HTAGS is YES but htags(1) failed. \n");
13499 err(
"htags(1) ended normally but failed to load the filemap. \n");
13506 g_s.
begin(
"Generating style sheet...\n");
13514 g_s.
begin(
"Generating search indices...\n");
13515 if (searchEngine && !serverBasedSearch && generateHtml)
13523 if (generateHtml && searchEngine)
13526 Dir searchDir(searchDirName.
str());
13527 if (!searchDir.
exists() && !searchDir.
mkdir(searchDirName.
str()))
13529 term(
"Could not create search results directory '{}' $PWD='{}'\n",
13533 if (!serverBasedSearch)
13555 if (generateDocbook)
13571 g_s.
begin(
"Generating images for formulas in HTML...\n");
13578 g_s.
begin(
"Generating images for formulas in RTF...\n");
13585 g_s.
begin(
"Generating images for formulas in Docbook...\n");
13590 g_s.
begin(
"Generating example documentation...\n");
13594 g_s.
begin(
"Generating file sources...\n");
13598 g_s.
begin(
"Counting members...\n");
13604 g_s.
begin(
"Generating file documentation...\n");
13608 g_s.
begin(
"Generating page documentation...\n");
13612 g_s.
begin(
"Generating group documentation...\n");
13616 g_s.
begin(
"Generating class documentation...\n");
13620 g_s.
begin(
"Generating concept documentation...\n");
13624 g_s.
begin(
"Generating module documentation...\n");
13628 g_s.
begin(
"Generating namespace documentation...\n");
13634 g_s.
begin(
"Generating graph info page...\n");
13639 g_s.
begin(
"Generating directory documentation...\n");
13648 g_s.
begin(
"finalizing index lists...\n");
13652 g_s.
begin(
"writing tag file...\n");
13658 g_s.
begin(
"Generating XML output...\n");
13666 g_s.
begin(
"Generating SQLITE3 output...\n");
13673 g_s.
begin(
"Generating AutoGen DEF output...\n");
13679 g_s.
begin(
"Generating Perl module output...\n");
13683 if (generateHtml && searchEngine && serverBasedSearch)
13685 g_s.
begin(
"Generating search index\n");
13695 if (searchDataFile.
empty())
13697 searchDataFile=
"searchdata.xml";
13710 g_s.
begin(
"Combining RTF output...\n");
13713 err(
"An error occurred during post-processing the RTF files!\n");
13720 g_s.
begin(
"Running plantuml with JAVA...\n");
13727 g_s.
begin(
"Running mermaid (mmdc)...\n");
13739 if (generateHtml &&
13743 g_s.
begin(
"Running html help compiler...\n");
13748 if ( generateHtml &&
13752 g_s.
begin(
"Running qhelpgenerator...\n");
13765 std::size_t numThreads =
static_cast<std::size_t
>(
Config_getInt(NUM_PROC_THREADS));
13766 if (numThreads<1) numThreads=1;
13767 msg(
"Total elapsed time: {:.6f} seconds\n(of which an average of {:.6f} seconds per thread waiting for external tools to finish)\n",
13774 msg(
"finished...\n");
13779 msg(
"finished...\n");
This class contains the information about the argument of a function or template.
This class represents an function or template argument list.
RefQualifierType refQualifier() const
bool noParameters() const
bool pureSpecifier() const
bool hasParameters() const
DString trailingReturnType() const
void setPureSpecifier(bool b)
bool constSpecifier() const
void setTrailingReturnType(const DString &s)
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 DString requiresClause() const =0
virtual const MemberDef * getMemberByName(const DString &) const =0
Returns the member with the given name.
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
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 int isBaseClass(const ClassDef *bcd, bool followInstances, const DString &templSpec=DString()) const =0
Returns true iff bcd is a direct or indirect base class of this class.
virtual const TemplateInstanceList & getTemplateInstances() const =0
Returns a sorted dictionary with all template instances found for this template 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 DString compoundTypeString() const =0
Returns the type of compound as a string.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual std::unique_ptr< ClassDef > deepCopy(const DString &name) const =0
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 DString qualifiedNameWithTemplateParameters(const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) 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 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 file in which this compound's definition can be found.
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 addUsedClass(ClassDef *cd, const DString &accessName, Protection prot)=0
virtual void insertExplicitTemplateInstance(ClassDef *instance, const DString &spec)=0
virtual void countMembers()=0
virtual void addMembersToMemberGroup()=0
virtual void setPrimaryConstructorParams(const ArgumentList &list)=0
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames)=0
virtual ClassDef * insertTemplateInstance(const DString &fileName, int startLine, size_t startColumn, const DString &templSpec, bool &freshInstance)=0
virtual void setClassName(const DString &name)=0
virtual void setFileDef(FileDef *fd)=0
virtual void reclassifyMember(MemberDefMutable *md, MemberType t)=0
virtual void setTemplateArguments(const ArgumentList &al)=0
virtual void setTemplateMaster(const ClassDef *tm)=0
virtual void makeTemplateArgument(bool b=true)=0
virtual void mergeCategory(ClassDef *category)=0
virtual void addQualifiers(const StringVector &qualifiers)=0
virtual void setClassSpecifier(TypeSpecifier spec)=0
virtual void insertUsedFile(const FileDef *)=0
virtual void setTaglessParent(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 setMetaData(const DString &md)=0
virtual void findSectionsInDocumentation()=0
virtual void insertMember(MemberDef *)=0
virtual void sortAllMembersList()=0
virtual void mergeMembers()=0
virtual void setIsStatic(bool b)=0
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const DString &templSpec)=0
virtual void insertSubClass(ClassDef *, Protection p, Specifier s, const DString &t=DString())=0
virtual void addUsedByClass(ClassDef *cd, const DString &accessName, Protection prot)=0
virtual void setSubGrouping(bool enabled)=0
virtual void setRequiresClause(const DString &req)=0
virtual void insertBaseClass(ClassDef *, const DString &name, Protection p, Specifier s, const DString &t=DString())=0
virtual void setHasNamedVariable(bool b)=0
virtual void addDocPart(const DString &doc, int lineNr, size_t colNr)=0
virtual void addCodePart(const DString &code, int lineNr, size_t colNr)=0
virtual void setFileDef(FileDef *fd)=0
virtual void writeTagFile(TextStream &)=0
virtual void writeDocumentation(OutputList &ol)=0
virtual void setGroupId(int id)=0
virtual void setInitializer(const DString &init)=0
virtual void findSectionsInDocumentation()=0
virtual void setTemplateArguments(const ArgumentList &al)=0
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString & setNum(short n)
void resize(size_t newlen)
size_t rfind(char c, size_t pos=npos) const
DString fill(char c, size_t len)
Fills a string with a predefined character.
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
DString & replace(size_t index, size_t len, const char *s)
DString substr(size_t pos=0, size_t count=npos) const
Returns a substring of length count starting at pos.
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
bool findAndRemoveWord(const char *word)
removes occurrences of whole word from this string, while keeping internal spaces and reducing multip...
DString right(size_t len) const
size_t size() const
Returns the length of the string, not counting the 0-terminator.
DString & prepend(const char *s)
size_t find(char c, size_t pos=0) const
DString & sprintf(const char *format,...)
int toInt(bool *ok=nullptr, int base=10) const
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
const std::string & str() const
bool stripPrefix(const DString &prefix)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
bool endsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
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 DString &label)
static void setFlag(const DebugMask mask)
The common base class of all entity definitions found in the sources.
virtual DString briefDescription(bool abbreviate=false) const =0
virtual DString inbodyFile() const =0
virtual int getEndBodyLine() const =0
virtual DString briefFile() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual DString getDefFileName() const =0
virtual DString documentation() const =0
virtual bool isLinkable() const =0
virtual DString inbodyDocumentation() const =0
virtual int getDefLine() const =0
virtual DefType definitionType() const =0
virtual const DString & name() const =0
virtual const DString & localName() 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 size_t getDefColumn() const =0
virtual bool isAnonymous() const =0
virtual DString displayName(bool includeScope=true) const =0
virtual DString qualifiedName() const =0
virtual bool isHidden() const =0
virtual DString anchor() const =0
virtual int getStartDefLine() const =0
virtual const GroupList & partOfGroups() const =0
virtual bool isArtificial() const =0
virtual Definition * getOuterScope() const =0
virtual DString docFile() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual const Definition * findInnerCompound(const DString &name) const =0
virtual DString getOutputFileBase() const =0
virtual void mergeReferencedBy(const Definition *other)=0
virtual void setName(const DString &name)=0
virtual void setExported(bool b)=0
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setHidden(bool b)=0
virtual void setReference(const DString &r)=0
virtual void mergeReferences(const Definition *other)=0
virtual void setInbodyDocumentation(const DString &d, const DString &docFile, int docLine)=0
virtual void setDocumentation(const DString &d, const DString &docFile, int docLine, bool stripWhiteSpace=true)=0
virtual void addInnerCompound(Definition *d)=0
virtual void setDefFile(const DString &df, int defLine, size_t defColumn)=0
virtual void addSectionsToDefinition(const std::vector< const SectionInfo * > &anchorList)=0
virtual void setLanguage(SrcLangExt lang)=0
virtual void setOuterScope(Definition *d)=0
virtual void setArtificial(bool b)=0
virtual void setBriefDescription(const DString &b, const DString &briefFile, int briefLine)=0
virtual void makePartOfGroup(GroupDef *gd)=0
virtual void setBodyDef(const FileDef *fd)=0
virtual void setRequirementReferences(const RequirementRefs &rqli)=0
virtual void setId(const DString &name)=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 DString filterDBFileName
static ParserManager * parserManager
static InputFileEncodingList inputFileEncodingList
static DString verifiedDotPath
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 MemberGroupInfoMap memberGroupInfoMap
static IndexList * indexList
static StaticInitMap staticInitMap
static StringMap tagDestinationMap
static std::mutex countFlowKeywordsMutex
static ClassLinkedMap * hiddenClassLinkedMap
static FileNameLinkedMap * diaFileNameLinkedMap
static PageLinkedMap * pageLinkedMap
static bool generatingXmlOutput
static std::unique_ptr< NamespaceDef > globalNamespaceDef
static DString htmlFileExtension
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
int docLine
line number at which the documentation was found
DString includeName
include name (3 arg of \class)
DString bitfields
member's bit fields
ArgumentList typeConstr
where clause (C#) for type constraints
void markAsProcessed() const
int endBodyLine
line number where the definition ends
DString write
property write accessor
bool exported
is the symbol exported from a C++20 module
const TagInfo * tagInfo() const
DString includeFile
include file (2 arg of \class, must be unique)
DString fileName
file this entry was extracted from
ArgumentLists tArgLists
template argument declarations
DString docFile
file in which the documentation was found
MethodTypes mtype
signal, slot, (dcop) method, or property?
@ GROUPDOC_NORMAL
defgroup
DString args
member argument string
SrcLangExt lang
programming language in which this entry was found
DString inside
name of the class in which documents are found
DString doc
documentation block (partly parsed)
DString req
C++20 requires clause.
bool explicitExternal
explicitly defined as external?
DString brief
brief description (doc block)
std::vector< const SectionInfo * > anchors
list of anchors defined in this entry
RelatesType relatesType
how relates is handled
std::vector< Grouping > groups
list of groups this entry belongs to
CommandOverrides commandOverrides
store info for commands whose default can be overridden
int startLine
start line of entry in the source
size_t startColumn
start column of entry in the source
ArgumentList argList
member arguments as a list
int inbodyLine
line number at which the body doc was found
EntryType section
entry type (see Sections);
int bodyLine
line number of the body in the source
DString exception
throw specification
DString relates
related class (doc block)
int mGrpId
member group id
std::vector< BaseInfo > extends
list of base classes
DString inbodyFile
file in which the body doc was found
Specifier virt
virtualness of the entry
DString metaData
Slice metadata.
std::vector< std::string > qualifiers
qualifiers specified with the qualifier command
RefItemVector sli
special lists (test/todo/bug/deprecated/..) this entry is in
Protection protection
class protection
bool artificial
Artificially introduced item.
bool hidden
does this represent an entity that is hidden from the output
DString inbodyDocs
documentation inside the body of a function
int briefLine
line number at which the brief desc. was found
FileDef * fileDef() const
int initLines
define/variable initializer lines to show
TypeSpecifier spec
class/member specifiers
DString briefFile
file in which the brief desc. was found
DString read
property read accessor
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
static EntryType guessSection(const DString &name)
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 setDiskName(const DString &name)=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 DString absFilePath() const =0
virtual const DString & docName() const =0
virtual const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const =0
virtual bool isSource() const =0
virtual void parseSource(ClangTUParser *clangParser)=0
virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const =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 void insertMember(MemberDef *md)=0
virtual void insertNamespace(NamespaceDef *nd)=0
Minimal replacement for QFileInfo.
std::string readLink() const
bool match(const PatternList &patList, bool caseSenseNames, PatternElem *elem=nullptr, PatternGet getter=[](const std::string &s){ return s;}) const
Match the file name against a list of patterns.
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.
DString showFileDefMatches(const DString &n) const
Returns a list of file definitions in fnMap that match the file name n.
FileDef * findFileDef(const DString &n, bool &ambig) const
Returns the file definition in fnMap that matches the file name n.
A model of a group of symbols.
virtual DString 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 void setGroupTitle(const DString &newtitle)=0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual bool hasGroupTitle() const =0
Generator for HTML output.
static void writeSearchData(const DString &dir)
static void writeSearchPage()
static void writeHeaderFile(TextStream &t, const DString &cssname)
static void writeFooterFile(TextStream &t)
static void writeTabData()
Additional initialization after indices have been created.
static void writeExternalSearchPage()
static void writeStyleSheetFile(TextStream &t)
A class that generated the HTML Help specific files.
static const DString hhpFileName
static Index & instance()
void countDataStructures()
A list of index interfaces.
void addIndexItem(const Definition *context, const MemberDef *md, const DString §ionAnchor=DString(), const DString &title=DString())
void addIndex(As &&... args)
Add an index generator to the list, using a syntax similar to std::make_unique<T>().
void addImageFile(const DString &name)
Generator for LaTeX output.
static void writeFooterFile(TextStream &t)
static void writeStyleSheetFile(TextStream &t)
static void writeHeaderFile(TextStream &t)
void parse(const DString &fileName, const char *data=nullptr)
Parses a user provided layout.
static LayoutDocManager & instance()
Returns a reference to this singleton.
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 DString requiresClause() const =0
virtual bool isFriend() const =0
virtual DString argsString() const =0
virtual bool isForeign() const =0
virtual bool isRelated() const =0
virtual DString definition() const =0
virtual const ClassDef * getCachedTypedefVal() const =0
virtual const ClassDef * getClassDef() const =0
virtual DString excpString() const =0
virtual const ArgumentList & templateArguments() const =0
virtual const DString & initializer() 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 DString bitfieldString() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual StringVector getQualifiers() 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 DString typeString() 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 void setRequiresClause(const DString &req)=0
virtual void setClassDefOfAnonymousType(const ClassDef *cd)=0
virtual void setMemberClass(ClassDef *cd)=0
virtual void setProtection(Protection p)=0
virtual void setDefinition(const DString &d)=0
virtual void setMemberGroupId(int id)=0
virtual void setDocumentedEnumValues(bool value)=0
virtual void setMemberSpecifiers(TypeSpecifier s)=0
virtual ClassDefMutable * getClassDefMutable()=0
virtual void setArgsString(const DString &as)=0
virtual void setEnumScope(MemberDef *md, bool livesInsideEnum=false)=0
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists)=0
virtual void invalidateTypedefValCache()=0
virtual void setVhdlSpecifiers(VhdlSpecifier s)=0
virtual void setEnumClassScope(ClassDef *cd)=0
virtual void setInitializer(const DString &i)=0
virtual void setMaxInitLines(int lines)=0
virtual void setInheritsDocsFrom(const MemberDef *md)=0
virtual void setFileDef(FileDef *fd)=0
virtual void setPrototype(bool p, const DString &df, int line, size_t column)=0
virtual void setRelatedAlso(ClassDef *cd)=0
virtual void setAnonymousMemberForDeclaration(const MemberDef *md)=0
virtual void overrideReferencesRelation(bool e)=0
virtual void setAnonymousMemberForDetails(const MemberDef *md)=0
virtual void makeForeign()=0
virtual void overrideReferencedByRelation(bool e)=0
virtual void setDocsForDefinition(bool b)=0
virtual void overrideCallGraph(bool e)=0
virtual void overrideInlineSource(bool e)=0
virtual void setBitfields(const DString &s)=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 setExplicitExternal(bool b, const DString &df, int line, size_t column)=0
virtual void insertEnumField(MemberDef *md)=0
virtual void moveDeclArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void setDeclFile(const DString &df, int line, size_t column)=0
virtual void setAnonymousEnumType(const MemberDef *md)=0
virtual void overrideCallerGraph(bool e)=0
virtual void setReimplements(MemberDef *md)=0
virtual void invalidateCachedArgumentTypes()=0
virtual void setNamespace(NamespaceDef *nd)=0
virtual void moveArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void makeRelated()=0
virtual void insertReimplementedBy(MemberDef *md)=0
virtual void setAnchor()=0
A list of MemberDef objects as shown in documentation sections.
Wrapper class for the MemberListType type.
Ordered dictionary of MemberName objects.
MemberName::Ptr take(const DString &key, const MemberDef *value)
const MemberDef * findRev(const DString &name) const
const MemberDef * find(const DString &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 findSectionsInDocumentation()=0
virtual void countMembers()=0
virtual void addUsingDirective(NamespaceDef *nd)=0
virtual void setFileName(const DString &fn)=0
virtual void insertMember(MemberDef *md)=0
virtual void setMetaData(const DString &m)=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 sortMemberLists()=0
virtual void addMembersToMemberGroup()=0
void parseInput(const DString &, 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 DString &) override
Callback function called by the comment block scanner.
bool needsPreprocessing(const DString &) const override
Returns true if the language identified by extension needs the C preprocessor to be run before feed t...
Abstract interface for outline parsers.
virtual bool needsPreprocessing(const DString &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 DString &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.
void disable(OutputType o)
void enable(OutputType o)
void docify(const DString &s)
void writeStyleInfo(int part)
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
A model of a page symbol.
virtual void setLocalToc(const LocalToc &tl)=0
virtual void setFileName(const DString &name)=0
virtual void setShowLineNo(bool)=0
virtual void setPageScope(Definition *)=0
virtual const GroupDef * getGroupDef() const =0
Manages programming language parsers.
std::unique_ptr< CodeParserInterface > getCodeParser(const DString &extension)
Gets the interface to the parser associated with a given extension.
void registerParser(const DString &name, const OutlineParserFactory &outlineParserFactory, const CodeParserFactory &codeParserFactory)
Registers an additional parser.
std::unique_ptr< OutlineParserInterface > getOutlineParser(const DString &extension)
Gets the interface to the parser associated with a given extension.
static PlantumlManager & instance()
void run()
Run plant UML tool for all images.
void processFile(const DString &fileName, const std::string &input, std::string &output)
void addSearchDir(const DString &dir)
static DString getQchFileName()
static const DString qhpFileName
Generator for RTF output.
static bool preProcessFileInplace(const DString &path, const DString &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.
void addWord(const DString &word, bool hiPriority)
void setCurrentDoc(const Definition *ctx, const DString &anchor, bool isSourceFile)
void write(const DString &file)
class that provide information about a section.
SectionInfo * replace(const DString &label, const DString &fileName, int lineNr, const DString &title, SectionType type, int level, const DString &ref=DString())
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)
ClassDefMutable * resolveClassMutable(const Definition *scope, const DString &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 ClassDef * resolveClass(const Definition *scope, const DString &name, bool maybeUnlinkable=false, bool mayBeHidden=false)
Find the class definition matching name within the scope set.
const Definition * resolveSymbol(const Definition *scope, const DString &name, const DString &args=DString(), bool checkCV=false, bool insideCode=false, bool onlyLinkable=false)
Find the symbool definition matching name within the scope set.
DString getTemplateSpec() const
In case a call to resolveClass() points to a template specialization, the template part is return via...
const MemberDef * getTypedef() const
In case a call to resolveClass() resolves to a type member (e.g. an enum) this method will return it.
This struct is used to capture the tag file information for an Entry.
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.
virtual DString trOverloadText()=0
virtual DString trPage(bool first_capital, bool singular)=0
virtual DString trMainPage()=0
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 DString &n)
std::unique_ptr< ClassDef > createClassDefAlias(const Definition *newScope, const ClassDef *cd)
std::unique_ptr< ClassDef > createClassDef(const DString &fileName, int startLine, size_t startColumn, const DString &name, ClassDef::CompoundType ct, const DString &ref, const DString &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 DString &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 DString &fileName, int startLine, size_t startColumn, const DString &name, const DString &tagRef, const DString &tagFile)
ConceptDefMutable * getConceptMutable(const DString &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 DString &decl, const SrcLangExt lang, DString &clName, DString &type, DString &name, DString &args, DString &funcTempList, DString &exceptions)
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const DString &argsString, DString *extraTypeChars=nullptr)
std::unordered_map< std::string, DefineList > DefinesPerFileList
Definition * toDefinition(DefinitionMutable *dm)
DefinitionMutable * toDefinitionMutable(Definition *d)
DirIterator begin(DirIterator it) noexcept
DirIterator end(const DirIterator &) noexcept
void computeDirDependencies()
void generateDirDocs(OutputList &ol)
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
static void findInheritedTemplateInstances()
void printNavTree(Entry *root, int indent)
static void addClassToContext(const Entry *root)
static void makeTemplateInstanceRelation(const Entry *root, ClassDefMutable *cd)
static StringUnorderedSet g_pathsVisited(1009)
static void buildGroupList(const Entry *root)
static void insertMemberAlias(Definition *outerScope, const MemberDef *md)
static void findUsingDeclarations(const Entry *root, bool filterPythonPackages)
static void flushCachedTemplateRelations()
static void copyLatexStyleSheet()
static void generateDocsForClassList(const std::vector< ClassDefMutable * > &classList)
static int findFunctionPtr(const std::string &type, SrcLangExt lang, int *pLength=nullptr)
static bool isSpecialization(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists)
static void computeTemplateClassRelations()
static std::string resolveSymlink(const std::string &path)
void adjustConfiguration()
adjust globals that depend on configuration settings.
static void findDEV(const MemberNameLinkedMap &mnsd)
static void runQHelpGenerator()
static void addConceptToContext(const Entry *root)
static void addRelatedPage(Entry *root)
static StringVector g_inputFiles
static void generateXRefPages()
static Definition * buildScopeFromQualifiedName(const DString &name_, SrcLangExt lang, const TagInfo *tagInfo)
static void findUsingDeclImports(const Entry *root)
static void copyStyleSheet()
static void addIncludeFile(Def *def, FileDef *ifd, const Entry *root)
FindBaseClassRelation_Mode
void distributeClassGroupRelations()
static void generateGroupDocs()
static void findDirDocumentation(const Entry *root)
void checkConfiguration()
check and resolve config options
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 void buildConceptList(const Entry *root)
static void addMemberSpecialization(const Entry *root, MemberName *mn, ClassDefMutable *cd, const DString &funcType, const DString &funcName, const DString &funcArgs, const DString &funcDecl, const DString &exceptions, TypeSpecifier spec)
static void resolveClassNestingRelations()
static void generateNamespaceConceptDocs(const ConceptLinkedRefMap &conceptList)
static MemberDef * addVariableToFile(const Entry *root, MemberType mtype, const DString &scope, const DString &type, const DString &name, const DString &args)
static void findClassEntries(const Entry *root)
static void vhdlCorrectMemberProperties()
static void addMemberFunction(const Entry *root, MemberName *mn, const DString &scopeName, const DString &namespaceName, const DString &className, const DString &funcTyp, const DString &funcName, const DString &funcArgs, const DString &funcTempList, const DString &exceptions, const DString &type, const DString &args, bool isFriend, TypeSpecifier spec, const DString &relates, const DString &funcDecl, bool overloaded, bool isFunc)
static void generateExampleDocs()
static void stopDoxygen(int)
static void substituteTemplatesInArgList(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists, const ArgumentList &src, ArgumentList &dst)
static void copyLogo(const DString &outputOption, bool toIndex)
static void computeMemberReferences()
static void transferRelatedFunctionDocumentation()
static void addMembersToMemberGroup()
static void findMainPageTagFiles(Entry *root)
static void addLocalObjCMethod(const Entry *root, const DString &scopeName, const DString &funcType, const DString &funcName, const DString &funcArgs, const DString &exceptions, const DString &funcDecl, TypeSpecifier spec)
static void distributeConceptGroups()
static NamespaceDef * findUsedNamespace(const LinkedRefMap< NamespaceDef > &unl, const DString &name)
static void transferFunctionDocumentation()
static void setAnonymousEnumType()
static void sortMemberLists()
static void findMember(const Entry *root, const DString &relates, const DString &type, const DString &args, DString funcDecl, bool overloaded, bool isFunc)
static void createTemplateInstanceMembers()
void transferStaticInstanceInitializers()
static void findObjCMethodDefinitions(const Entry *root)
static void addMemberDocs(const Entry *root, MemberDefMutable *md, const DString &funcDecl, const ArgumentList *al, bool over_load, TypeSpecifier spec)
static void dumpSymbolMap()
static void buildTypedefList(const Entry *root)
static void findGroupScope(const Entry *root)
static void generateFileDocs()
static int findEndOfTemplate(const DString &s, size_t startPos)
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 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 std::shared_ptr< Entry > parseFile(OutlineParserInterface &parser, FileDef *fd, const DString &fn, ClangTUParser *clangParser, bool newTU)
static void buildVarList(const Entry *root)
static void copyIcon(const DString &outputOption, bool toIndex)
static void buildSequenceList(const Entry *root)
static void generateFileSources()
static void copyExtraFiles(StringVector files, const DString &filesOption, const DString &outputOption, bool toIndex)
static void generateClassDocs()
static int findTemplateSpecializationPosition(const DString &name)
static void buildNamespaceList(const Entry *root)
static void findIncludedUsingDirectives()
static void addDefineDoc(const Entry *root, MemberDefMutable *md)
static void countMembers()
static ClassDef * findClassWithinClassContext(Definition *context, ClassDef *cd, const DString &name)
static void organizeSubGroups(const Entry *root)
static void applyMemberOverrideOptions(const Entry *root, MemberDefMutable *md)
static void addOverloaded(const Entry *root, MemberName *mn, const DString &funcType, const DString &funcName, const DString &funcArgs, const DString &funcDecl, const DString &exceptions, TypeSpecifier spec)
static void findFriends()
static void findEnums(const Entry *root)
static void generateConfigFile(const DString &configFile, bool shortList, bool updateOnly=false)
static DString g_commentFileName
static void dumpSymbol(TextStream &t, Definition *d)
static void addClassAndNestedClasses(std::vector< ClassDefMutable * > &list, ClassDefMutable *cd)
static ClassDefMutable * createTagLessInstance(const Definition *root, const ClassDef *templ, const DString &fieldName, bool hasNamedVariable)
static void addEnumDocs(const Entry *root, MemberDefMutable *md)
static void addListReferences()
static void exitDoxygen() noexcept
static bool findGlobalMember(const Entry *root, const DString &namespaceName, const DString &type, const DString &name, const DString &tempArg, const DString &, const DString &decl, TypeSpecifier)
static bool isClassSection(const Entry *root)
static void processTagLessClasses(const Definition *root, const Container *def, const TagContainer *tagParent, MemberListType varFilter, MemberListType typeFilter, const DString &prefix, int count)
Look through the members of class cd and its public members.
static void buildGroupListFiltered(const Entry *root, bool additional, bool includeExternal)
static void runHtmlHelpCompiler()
static void addMembersToIndex()
static bool g_dumpSymbolMap
static void version(const bool extended)
static OutputList * g_outputList
static DString extractClassName(const Entry *root)
static void findMainPage(Entry *root)
static ClassDef::CompoundType convertToCompoundType(EntryType section, TypeSpecifier specifier)
DString stripTemplateSpecifiers(const DString &s)
static void findUsingDirectives(const Entry *root)
static void addInterfaceOrServiceToServiceOrSingleton(const Entry *root, ClassDefMutable *cd, DString const &rname)
static bool g_successfulRun
static bool tryAddEnumDocsToGroupMember(const Entry *root, const DString &name)
static void addSourceReferences()
static void associateVariableWithAnonymousEnumType(const MemberDef *md, const Container *cd, const MemberDef *enumTypeMember, MemberListType mlFilter)
static void createUsingMemberImportForClass(const Entry *root, ClassDefMutable *cd, const MemberDef *md, const DString &fileName, const DString &memName)
static DString substituteTemplatesInString(const ArgumentLists &srcTempArgLists, const ArgumentLists &dstTempArgLists, const std::string &src)
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 void findTemplateInstanceRelation(const Entry *root, Definition *context, ClassDefMutable *templateClass, const DString &templSpec, const TemplateNameMap &templateNames, bool isArtificial)
static void findDocumentedEnumValues()
static void findTagLessClasses()
static void generateDiskNames()
static void addToIndices()
static void computeClassRelations()
static void buildFunctionList(const Entry *root)
static void checkPageRelations()
static void addGlobalFunction(const Entry *root, const DString &rname, const DString &sc)
static void findModuleDocumentation(const Entry *root)
static MemberDef * addVariableToClass(const Entry *root, ClassDefMutable *cd, MemberType mtype, const DString &type, const DString &name, const DString &args, Protection prot, Relationship related)
static void readTagFile(const std::shared_ptr< Entry > &root, const DString &tagLine)
static void findEnumDocumentation(const Entry *root)
static void computePageRelations(Entry *root)
static void processTagLessClassesForList(const Definition *root, const Container *def, const TagContainer *tagParent, MemberListType varFilter, MemberListType typeFilter, const DString &prefix, int count)
static void addMethodToClass(const Entry *root, ClassDefMutable *cd, const DString &rtype, const DString &rname, const DString &rargs, bool isFriend, Protection protection, bool stat, Specifier virt, TypeSpecifier spec, const DString &relates)
static bool isVarWithConstructor(const Entry *root)
static StringSet g_usingDeclarations
static void buildDictionaryList(const Entry *root)
static bool haveEqualFileNames(const Entry *root, const MemberDef *md)
void readFileOrDirectory(const DString &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 generateNamespaceDocs()
static void computeMemberRelationsForBaseClass(const ClassDef *cd, const BaseClassDef *bcd, const ArgumentList *actualArgs)
static void buildClassDocList(const Entry *root)
static void buildPageList(Entry *root)
static void writeTagFile()
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 usage(const DString &name, const DString &versionString)
static void findUsedTemplateInstances()
static void computeTooltipTexts()
static void addVariable(const Entry *root, int isFuncPtr=-1)
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 const ClassDef * findClassDefinition(FileDef *fd, NamespaceDef *nd, const DString &scopeName)
static void filterMemberDocumentation(const Entry *root, const DString &relates)
static void generateConceptDocs()
static bool isRecursiveBaseClass(const DString &scope, const DString &name)
static std::unique_ptr< OutlineParserInterface > getParserForFile(const DString &fn)
static void combineUsingRelations()
static const char * getArg(int argc, char **argv, int &optInd)
std::unique_ptr< ArgumentList > getTemplateArgumentsFromName(const DString &name, const ArgumentLists &tArgLists)
static void checkMarkdownMainfile()
static std::unordered_map< std::string, std::vector< ClassDefMutable * > > g_usingClassMap
static void buildConceptDocList(const Entry *root)
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 DString createOutputDirectory(const DString &baseDirName, const DString &formatDirName, const char *defaultDirName)
static void transferFunctionReferences()
static void buildDefineList()
static void buildInterfaceAndServiceList(const Entry *root)
static Definition * findScopeFromQualifiedName(NamespaceDefMutable *startScope, const DString &n, FileDef *fileScope, const TagInfo *tagInfo)
static void computeMemberRelations()
static void buildListOfUsingDecls(const Entry *root)
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
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
int dstricmp(const char *s1, const char *s2)
uint32_t dstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
int dstricmp_sort(const char *str1, const char *str2)
int dstrcmp(const char *str1, const char *str2)
const char * qPrint(const char *s)
FileDef * toFileDef(Definition *d)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &dn)
std::unordered_set< const FileDef * > FileDefSet
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 DString &fileName, int line, const DString &name, const DString &title, const DString &refFileName)
void addConceptToGroups(const Entry *root, ConceptDef *cd)
void addMemberToGroups(const Entry *root, MemberDef *md)
void writeGraphInfo(OutputList &ol)
void endTitle(OutputList &ol, const DString &fileName, const DString &name)
void writeIndexHierarchy(OutputList &ol)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &navPath)
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
void startFile(OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
Translator * theTranslator
void setTranslator(OUTPUT_LANGUAGE_t langName)
#define LATEX_STYLE_EXTENSION
void writeDefaultLayoutFile(const DString &fileName)
std::unique_ptr< MemberDef > createMemberDef(const DString &defFileName, int defLine, size_t defColumn, const DString &type, const DString &name, const DString &args, const DString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const DString &metaData)
Factory method to create a new instance of a MemberDef.
std::unique_ptr< MemberDef > createMemberDefAlias(const Definition *newScope, const MemberDef *aliasMd)
MemberDefMutable * toMemberDefMutable(Definition *d)
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
void combineDeclarationAndDefinition(MemberDefMutable *mdec, MemberDefMutable *mdef)
MemberDef * toMemberDef(Definition *d)
std::unordered_map< int, std::unique_ptr< MemberGroupInfo > > MemberGroupInfoMap
DString warn_line(const DString &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)
void writeTemplate(TextStream &t, bool shortList, bool updateOnly=false)
bool parse(const DString &fileName, bool update=false, CompareMode compareMode=CompareMode::Full)
void correctPath(const StringVector &list)
Correct a possible wrong PATH variable.
FILE * popen(const DString &name, const DString &type)
double getSysElapsedTime()
void setenv(const DString &variable, const DString &value)
int system(const DString &command, const DString &args, bool commandHasConsole=true)
DString getenv(const DString &variable)
bool isAbsolutePath(const DString &fileName)
DString pathListSeparator()
std::ofstream openOutputStream(const DString &name, bool append=false)
const char * commandExtension()
DString trunc(const DString &s, size_t numChars=15)
std::unique_ptr< NamespaceDef > createNamespaceDef(const DString &defFileName, int defLine, size_t defColumn, const DString &name, const DString &ref, const DString &refFile, const DString &type, bool isPublished)
Factory method to create new NamespaceDef instance.
std::unique_ptr< NamespaceDef > createNamespaceDefAlias(const Definition *newScope, const NamespaceDef *nd)
Factory method to create an alias of an existing namespace.
void replaceNamespaceAliases(DString &name)
NamespaceDef * getResolvedNamespace(const DString &name)
NamespaceDef * toNamespaceDef(Definition *d)
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
NamespaceDefMutable * getResolvedNamespaceMutable(const DString &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 DString &f, int l, const DString &n, const DString &d, const DString &t)
void setPerlModDoxyfile(const DString &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)
void addRefItem(const RefItemVector &sli, const DString &key, const DString &prefix, const DString &name, const DString &title, const DString &args, const Definition *scope)
void finalizeSearchIndexer()
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)
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
DString name
the name of the base class
Data associated with description found in the body.
Helper class to pass options when calling OutputList::generateDoc().
DString 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)
void parseTagFile(const std::shared_ptr< Entry > &root, const char *fullName)
void initTracing(const DString &logFile, bool timing)
bool isTypeAClassFriend(const DString &type)
bool readInputFile(const DString &fileName, std::string &contents, const ReadInputFileOptions &options)
read a file name fileName and optionally filter and transcode it
bool useCaseSenseNames()
Returns true if the names of the symbols can be case sensitive.
DString substituteTemplateArgumentsInString(const DString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
bool protectionLevelVisible(Protection prot)
DString stripFromIncludePath(const DString &path)
DString mergeScopes(const DString &leftScope, const DString &rightScope)
DString filterTitle(const DString &title)
bool matchTemplateArguments(const ArgumentList &srcAl, const ArgumentList &dstAl)
void addCodeOnlyMappings()
bool rightScopeMatch(const DString &scope, const DString &name)
bool checkIfTypedef(const Definition *scope, const FileDef *fileScope, const DString &n)
DString replaceAnonymousScopes(const DString &s, const DString &replacement)
void cleanupInlineGraphs()
int computeQualifiedIndex(const DString &name)
Return the index of the last :: in the string name that is still before the first <.
DString removeRedundantWhiteSpace(const DString &s)
bool checkExtension(const DString &fName, const DString &ext)
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
bool leftScopeMatch(const DString &scope, const DString &name)
DString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
DString getFileNameExtension(const DString &fn)
DString resolveTypeDef(const Definition *context, const DString &qualifiedName, const Definition **typedefContext)
DString normalizeNonTemplateArgumentsInString(const DString &name, const Definition *context, const ArgumentList &formalArgs)
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const DString &srcReturnType, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const DString &dstReturnType, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
void initDefaultExtensionMapping()
void addHtmlExtensionIfMissing(DString &fName)
DString fileToString(const DString &name, bool filter, bool isSourceCode)
void extractNamespaceName(const DString &scopeName, DString &className, DString &namespaceName, bool allowEmptyClass)
DString stripTemplateSpecifiersFromScope(const DString &fullName, bool parentOnly, DString *pLastScopeStripped, DString scopeName, bool allowArtificial)
DString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
DString projectLogoFile()
bool copyFile(const DString &src, const DString &dest)
Copies the contents of file with name src to the newly created file with name dest.
int getPrefixIndex(const DString &name)
DString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
bool updateLanguageMapping(const DString &extension, const DString &language)
DString mangleCSharpGenericName(const DString &name)
void mergeArguments(ArgumentList &srcAl, ArgumentList &dstAl, bool forceNameOverwrite)
int getScopeFragment(const DString &s, int p, int *l)
int extractClassNameFromType(const DString &type, int &pos, DString &name, DString &templSpec, SrcLangExt lang)
DString removeAnonymousScopes(const DString &str)
bool openOutputFile(const DString &outFile, std::ofstream &f)
DString stripAnonymousNamespaceScope(const DString &s)
A bunch of utility functions.