57#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
58#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
60constexpr auto alphaSepar =
"<div class=\"alphasepar\"></div>";
64static void countFiles(
int &htmlFiles,
int &files);
146 return p->classIndexLetterUsed[
static_cast<int>(e)];
151 return p->fileIndexLetterUsed[
static_cast<int>(e)];
156 return p->namespaceIndexLetterUsed[
static_cast<int>(e)];
161 return p->moduleIndexLetterUsed[
static_cast<int>(e)];
166 p->documentedClassMembers[i]=0;
167 p->classIndexLetterUsed[i].clear();
172 p->documentedFileMembers[i]=0;
173 p->fileIndexLetterUsed[i].clear();
178 p->documentedNamespaceMembers[i]=0;
179 p->namespaceIndexLetterUsed[i].clear();
184 p->documentedModuleMembers[i]=0;
185 p->moduleIndexLetterUsed[i].clear();
190 auto it = map.find(letter);
193 it->second.push_back(md);
197 map.emplace(letter,std::vector<const MemberDef*>({md}));
203 p->documentedClassMembers[i]++;
209 p->documentedFileMembers[i]++;
215 p->documentedNamespaceMembers[i]++;
221 p->documentedModuleMembers[i]++;
230 for (
auto &[name,list] : map)
232 std::stable_sort(list.begin(),list.end(),
242 int result = dstricmp_sort(md1->name(),md2->name());
245 result = dstricmp_sort(md1->qualifiedName(),md2->qualifiedName());
252 for (
auto &idx : p->classIndexLetterUsed)
254 sortMemberIndexList(idx);
256 for (
auto &idx : p->fileIndexLetterUsed)
258 sortMemberIndexList(idx);
260 for (
auto &idx : p->namespaceIndexLetterUsed)
262 sortMemberIndexList(idx);
264 for (
auto &idx : p->moduleIndexLetterUsed)
266 sortMemberIndexList(idx);
359 ol.
writeString(
" <div id=\"navrow4\" class=\"tabs3\">\n");
363 ol.
writeString(
" <div id=\"navrow3\" class=\"tabs2\">\n");
375 bool hl,
bool ,
bool &first)
413 const DString &altSidebarName,
int hierarchyLevel,
const DString &allMembersFile)
418 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
419 ol.
startFile(name,isSource,manName,title,hierarchyLevel);
421 if (!disableIndex && !quickLinksAfterSplitbar)
425 if (!additionalIndices)
430 if (quickLinksAfterSplitbar)
446 if (generateTreeView)
463 if (generateTreeview)
473 endFile(ol,generateTreeview,
true,navPath);
482 bool isDir = md->
isEnumerate() && std::any_of(enumList.
begin(),enumList.
end(),[](
const auto &emd) { return emd->hasDocumentation(); });
485 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
506 for (
const auto &emd : enumList)
508 if (emd->hasDocumentation())
511 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
513 emd->qualifiedName() : emd->name();
514 if (emd->getOuterScope()==def ||
519 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),
false,lAddToIndex && emd->getGroupDef()==
nullptr);
539 bool addToIndex=
true,
bool preventSeparateIndex=
false,
544 for (
const auto &cd : def->getClasses())
546 if (cd->isLinkable()) numClasses++;
551 for (
const auto &cd : *concepts)
553 if (cd->isLinkable()) numConcepts++;
556 bool hasMembers = !def->getMemberLists().
empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
558 def->getReference(),def->getOutputFileBase(),anchor,
559 hasMembers && !preventSeparateIndex,
564 if (hasMembers || numClasses>0 || numConcepts>0)
569 auto kind = lde->kind();
570 if (kind==LayoutDocEntry::MemberDef)
578 for (
const auto &md : *ml)
580 if (md->visibleInIndex())
588 else if (kind==LayoutDocEntry::NamespaceClasses ||
589 kind==LayoutDocEntry::FileClasses ||
590 kind==LayoutDocEntry::ClassNestedClasses ||
591 kind==LayoutDocEntry::ModuleClasses
594 for (
const auto &cd : def->getClasses())
596 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==
Definition::TypeGroup))
600 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
601 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
602 preventSeparateIndex || cd->isEmbeddedInOuterScope());
606 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
608 for (
const auto &cd : *concepts)
610 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==
Definition::TypeGroup))
613 cd->getReference(),cd->getOutputFileBase(),
DString(),
632 if (bcl.empty())
return;
634 for (
const auto &bcd : bcl)
661 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
676 .setAutolinkSupport(
false));
717 visitedClasses.insert(cd);
750 for (
const auto &fd : dd->
getFiles())
752 bool genSourceFile =
false;
753 if (fd->visibleInIndex(genSourceFile))
763 for(
const auto &subdd : dd->
subDirs())
779 "maximum nesting level exceeded for directory {}: "
780 "check for possible recursive directory relation!",dd->
name());
789 bool tocExpand =
true;
790 bool isDir = !dd->
subDirs().empty() ||
816 .setAutolinkSupport(
false));
829 for(
const auto &subdd : dd->
subDirs())
839 for (
const auto &fd : dd->
getFiles())
846 bool genSourceFile =
false;
847 if (fd->visibleInIndex(genSourceFile))
851 else if (genSourceFile)
859 for (
const auto &fd : dd->
getFiles())
862 bool doc = fd->visibleInIndex(src);
867 reference = fd->getReference();
868 outputBase = fd->getOutputFileBase();
881 .setAutolinkSupport(
false));
884 if (ftv && (src || doc))
888 reference,outputBase,
897 if (tocExpand && addToIndex)
902 for (
const auto &fd : dd->
getFiles())
905 bool doc = fd->visibleInIndex(src);
909 !fd->isLinkableViaGroup(),
false,&fd->getConcepts());
915 fd->getSourceFileBase(),
DString(),
false,
true, fd);
951 for (
const auto &fd : *fn)
953 if (fd->getDirDef()==
nullptr)
956 bool doc = fd->visibleInIndex(src);
960 reference = fd->getReference();
961 outputBase = fd->getOutputFileBase();
966 reference, outputBase,
DString(),
967 false,
false,fd.get());
978 false, fd->displayName(),
DString(),
979 fd->getSourceFileBase(),
DString(),
false,
true, fd.get());
1000 for (
const auto &cd : cl)
1003 if (cd->getLanguage()==SrcLangExt::VHDL)
1011 else if (sliceOpt && cd->compoundType() != ct)
1022 if (cd->isVisibleInHierarchy())
1034 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1038 if (cd->isLinkable())
1049 .setSingleLine(
true)
1050 .setAutolinkSupport(
false));
1051 ol.
endIndexItem(cd->getReference(),cd->getOutputFileBase());
1052 if (cd->isReference())
1055 ol.
docify(
" [external]");
1060 if (cd->getLanguage()!=SrcLangExt::VHDL)
1067 ftv->
addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),
false,
false,cd.get(),escapedName);
1084 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1087 visitedClasses.insert(cd.get());
1089 else if (hasChildren)
1092 visitedClasses.insert(cd.get());
1131 for (
const auto &cd : cl)
1133 if (sliceOpt && cd->compoundType() != ct)
1139 if (cd->isVisibleInHierarchy())
1141 if (!cd->subClasses().empty())
1171 bool addToIndex = lne==
nullptr || lne->
visible();
1277 bool addToIndex = lne==
nullptr || lne->
visible();
1382 bool addToIndex = lne==
nullptr || lne->
visible();
1484 for (
const auto &fd: *fn)
1487 bool doc = fd->visibleInIndex(src);
1557 .setSingleLine(
true)
1558 .setLinkFromIndex(
true));
1589 if (dir->hasDocumentation())
1614 bool addToIndex = lne==
nullptr || lne->
visible();
1647 std::unordered_map<std::string,size_t> pathMap;
1648 std::vector<FilesInDir> outputFiles;
1653 for (
const auto &fd : *fn)
1656 if (path.
empty()) path=
"[external]";
1657 auto it = pathMap.
find(path.
str());
1658 if (it!=pathMap.end())
1660 outputFiles.at(it->second).files.push_back(fd.get());
1664 pathMap.emplace(path.
str(),outputFiles.size());
1665 outputFiles.emplace_back(path);
1666 outputFiles.back().files.push_back(fd.get());
1672 std::stable_sort(outputFiles.begin(),
1674 [](
const auto &fp1,
const auto &fp2) { return dstricmp_sort(fp1.path,fp2.path)<0; });
1676 for (
auto &fp : outputFiles)
1681 for (
const auto &fp : outputFiles)
1683 for (
const auto &fd : fp.files)
1693 for (
const auto &fd : *fn)
1736 if (nd->isLinkableInProject()) count++;
1747 if (cd->isLinkableInProject()) count++;
1758template<
class ListType>
1762 for (
const auto &cdi : cl)
1788 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1827 if (lde->kind()==LayoutDocEntry::MemberDef)
1835 for (
const auto &md : *ml)
1838 if (md->visibleInIndex())
1853 if (lde->kind()==LayoutDocEntry::MemberDecl)
1861 for (
const auto &md : *ml)
1864 if (md->visibleInIndex())
1878 bool rootOnly,
bool addToIndex);
1881 bool rootOnly,
bool addToIndex)
1888 bool hasChildren = hasNestedNamespace ||
1908 bool isDir = hasChildren || visibleMembers>0;
1909 if (isLinkable || isDir)
1918 if (addToIndex && isDir)
1932 if (addToIndex && isDir)
1941 bool rootOnly,
bool addToIndex)
1943 for (
const auto &nd : nsLinkedMap)
1945 if (nd->isVisibleInHierarchy())
1953 bool rootOnly,
bool addToIndex)
1955 for (
const auto &nd : nsLinkedMap)
1957 if (nd->isVisibleInHierarchy())
2046 for (
const auto &nd : nsLinkedMap)
2055 for (
const auto &nd : nsLinkedMap)
2070 bool addToIndex = lne==
nullptr || lne->
visible();
2090 if (nd->isLinkableInProject())
2099 if (nd->getLanguage()==SrcLangExt::VHDL)
2109 bool hasBrief = !nd->briefDescription().empty();
2117 nd->briefDescription(
true),
2119 .setSingleLine(
true)
2120 .setLinkFromIndex(
true));
2169 if (sliceOpt && cd->compoundType() != ct)
2173 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2175 if (!cd->isEmbeddedInOuterScope())
2197 if (cd->getLanguage()==SrcLangExt::VHDL &&
2210 if (sliceOpt && cd->compoundType() != ct)
2216 if (cd->isEmbeddedInOuterScope())
2222 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2225 if (cd->getLanguage()==SrcLangExt::VHDL)
2233 bool hasBrief = !cd->briefDescription().empty();
2241 cd->briefDescription(
true),
2243 .setSingleLine(
true)
2244 .setLinkFromIndex(
true));
2260 return (c<127 && c>31);
2265 if (startLetter.
empty())
return startLetter;
2266 const char *p = startLetter.
data();
2276 const char hex[]=
"0123456789abcdef";
2279 result+=hex[
static_cast<unsigned char>(c)>>4];
2280 result+=hex[
static_cast<unsigned char>(c)&0xf];
2302 if (sliceOpt && cd->compoundType() != ct)
2307 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2311 std::string letter =
getUTF8CharAt(cd->className().str(),index);
2312 if (!letter.empty())
2320 DString alphaLinks =
"<div class=\"qindex\">";
2322 for (
const auto &letter : indexLettersUsed)
2327 alphaLinks +=
"<a class=\"qindex\" href=\"#letter_" +
2331 alphaLinks +=
"</div>\n";
2334 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2341 if (sliceOpt && cd->compoundType() != ct)
2346 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2348 DString className = cd->className();
2351 if (!letter.empty())
2354 auto it = classesByLetter.find(letter);
2355 if (it!=classesByLetter.end())
2357 it->second.push_back(cd.get());
2361 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2368 for (
auto &[letter,list] : classesByLetter)
2370 std::stable_sort(list.begin(), list.end(),
2371 [](
const auto &c1,
const auto &c2)
2373 DString n1 = c1->className();
2374 DString n2 = c2->className();
2375 return dstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2380 if (!classesByLetter.empty())
2384 for (
const auto &cl : classesByLetter)
2386 DString parity = (counter++%2)==0 ?
"even" :
"odd";
2387 ol.
writeString(
"<dl class=\"classindex " + parity +
"\">\n");
2402 for (
const auto &cd : cl.second)
2421 cd->getOutputFileBase(),cd->anchor(),cname);
2422 if (!namesp.
empty())
2455 bool addToIndex = lne==
nullptr || lne->
visible();
2484 bool addToIndex = lne==
nullptr || lne->
visible();
2513 bool addToIndex = lne==
nullptr || lne->
visible();
2542 bool addToIndex = lne==
nullptr || lne->
visible();
2571 bool addToIndex = lne==
nullptr || lne->
visible();
2633 bool addToIndex = lne==
nullptr || lne->
visible();
2697 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2711 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2714 "annotatedinterfaces",
2725 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2739 LayoutNavEntry::RecordList,LayoutNavEntry::Records,
2753 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2756 "annotatedexceptions",
2778 if (fd && prevFileName!=fd->
name())
2783 prevFileName = fd->
name();
2819 int index =
static_cast<int>(type);
2820 const int numIndices = 4;
2821 ASSERT(index<numIndices);
2827 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2837 bool firstSection=
true;
2838 bool firstItem=
true;
2841 for (
const auto &kv : memberIndexMap)
2845 auto it = memberIndexMap.find(page);
2846 if (it != memberIndexMap.end())
2857 if (mil==
nullptr || mil->empty())
continue;
2858 for (
const auto &md : *mil)
2860 const char *sep =
nullptr;
2861 bool isFunc=!md->isObjCMethod() &&
2862 (md->isFunction() || md->isSlot() || md->isSignal());
2865 if (name.data()+startIndex!=prevName)
2867 if ((prevName.
empty() ||
2868 tolower(name.at(startIndex))!=tolower(prevName.
at(0))) &&
2875 DString title =
"- "+letter+
" -";
2883 else if (!useSections && first)
2892 if ((prevName.
empty() ||
2893 tolower(name.at(startIndex))!=tolower(prevName.
at(0))) &&
2902 if (isFunc) ol.
docify(
"()");
2907 sep =
" : ";
2908 prevName = name.data()+startIndex;
2915 if (index<numIndices)
2918 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2934 bool hideFriendCompounds =
Config_getBool(HIDE_FRIEND_COMPOUNDS);
2944 if (!letter.empty())
2948 if (!(md->
isFriend() && isFriendToHide) &&
2983 (md->
isFriend() && !isFriendToHide))
3000 if (!letter.empty())
3048 if (!letter.empty())
3100 if (!letter.empty())
3135 DString fullName,
bool multiPage)
3139 for (
const auto &[letter,list] : map)
3148 anchor=fullName+extension+
"#index_";
3150 anchor=fullName+
"_"+is+extension+
"#index_";
3158<script type="text/javascript">
3159function updateNavHighlight() {
3160 var currentHash = window.location.hash;
3161 var navItems = document.querySelectorAll('#navrow4 .tablist li');
3163 for (var i = 0; i < navItems.length; i++) {
3164 var item = navItems[i];
3165 var link = item.querySelector('a');
3166 item.classList.remove('current');
3167 if (link && link.getAttribute('href') === currentHash) {
3168 item.classList.add('current');
3173 var target = document.querySelector(currentHash);
3175 target.scrollIntoView();
3179updateNavHighlight();
3180window.addEventListener('hashchange', updateNavHighlight);
3190 DString alphaLinks =
"<div class=\"qindex\">";
3191 for (
const auto &[letter,list] : map)
3200 anchor=fullName+extension+
"#index_";
3202 anchor=fullName+
"_"+is+extension+
"#index_";
3207 alphaLinks +=
"<a class=\"qindex\" href=\"" + anchor +
3211 alphaLinks +=
"</div>\n";
3244 return &cmhlInfo[hl];
3250 if (index.numDocumentedClassMembers(hl)==0)
return;
3256 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3258 bool multiPageIndex=
false;
3261 multiPageIndex=
true;
3271 bool addToIndex = lne==
nullptr || lne->
visible();
3281 for (
const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3299 auto writeQuickLinks = [&,cap_letter=letter]()
3340 if (!disableIndex && !quickLinksAfterSplitbar)
3346 if (quickLinksAfterSplitbar)
3362 if (dynamicMenus || disableIndex)
3368 multiPageIndex ? letter : std::string(),
3369 index.isClassIndexLetterUsed(hl),
3384 bool addToIndex = lne==
nullptr || lne->
visible();
3437 return &fmhlInfo[hl];
3443 if (index.numDocumentedFileMembers(hl)==0)
return;
3449 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3451 bool multiPageIndex=
false;
3454 multiPageIndex=
true;
3463 bool addToIndex = lne==
nullptr || lne->
visible();
3473 for (
const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3491 auto writeQuickLinks = [&,cap_letter=letter]()
3530 if (!disableIndex && !quickLinksAfterSplitbar)
3536 if (quickLinksAfterSplitbar)
3552 if (dynamicMenus || disableIndex)
3558 multiPageIndex ? letter : std::string(),
3559 index.isFileIndexLetterUsed(hl),
3622 return &nmhlInfo[hl];
3631 if (index.numDocumentedNamespaceMembers(hl)==0)
return;
3637 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3639 bool multiPageIndex=
false;
3642 multiPageIndex=
true;
3651 bool addToIndex = lne==
nullptr || lne->
visible();
3661 for (
const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3679 auto writeQuickLinks = [&,cap_letter=letter]()
3718 if (!disableIndex && !quickLinksAfterSplitbar)
3724 if (quickLinksAfterSplitbar)
3742 multiPageIndex ? letter : std::string(),
3743 index.isNamespaceIndexLetterUsed(hl),
3799 return &nmhlInfo[hl];
3808 if (index.numDocumentedModuleMembers(hl)==0)
return;
3814 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3816 bool multiPageIndex=
false;
3819 multiPageIndex=
true;
3828 bool addToIndex = lne==
nullptr || lne->
visible();
3838 for (
const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3856 auto writeQuickLinks = [&,cap_letter=letter]()
3895 if (!disableIndex && !quickLinksAfterSplitbar)
3901 if (quickLinksAfterSplitbar)
3917 if (dynamicMenus || disableIndex)
3923 multiPageIndex ? letter : std::string(),
3924 index.isModuleIndexLetterUsed(hl),
3940 bool addToIndex = lne==
nullptr || lne->
visible();
3969 bool addToIndex = lne==
nullptr || lne->
visible();
3993 DString n=pd->getOutputFileBase();
3994 if (!pd->title().empty())
4028 docPages=indexPages=0;
4031 if (pd->visibleInIndex() && !pd->hasParentPage())
4035 if (pd->documentedPage())
4048 bool addToIndex = lne==
nullptr || lne->
visible();
4049 if (!addToIndex)
return;
4056 DString pageTitle, pageTitleAsHtml;
4059 pageTitle=pd->
name();
4068 hasSubPages,pageTitle,
4070 DString(),hasSubPages,
true,pd,pageTitleAsHtml);
4075 hasSubPages || hasSections,pageTitle,
4077 DString(),hasSubPages,
true,pd,pageTitleAsHtml);
4081 bool doIndent = (hasSections || hasSubPages) && !reuseRoot;
4151 if (!gd->isReference())
4167 if (dd->isLinkableInProject())
4187 bool oldStripCommentsState =
Config_getBool(STRIP_CODE_COMMENTS);
4200 size_t s = legendDocs.
find(
"<center>");
4201 size_t e = legendDocs.
find(
"</center>");
4205 legendDocs = legendDocs.
left(s+8) +
"[!-- SVG 0 --]" + legendDocs.
mid(e);
4235 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->
name());
4248 size_t numSubItems = 0;
4251 if (ml->listType().isDocumentation())
4253 numSubItems += ml->size();
4258 numSubItems += gd->
getFiles().size();
4260 numSubItems += gd->
getDirs().size();
4263 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4272 isDir,
true,
nullptr,titleAsHtml);
4279 false,
false,gd,titleAsHtml);
4291 .setSingleLine(
true)
4292 .setAutolinkSupport(
false));
4298 ol.
docify(
" [external]");
4304 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4312 for (
const auto &md : *ml)
4315 isDir = !enumList.
empty() && md->isEnumerate();
4316 if (md->isVisible() && !md->isAnonymous())
4319 md->qualifiedName(),md->getReference(),
4320 md->getOutputFileBase(),md->anchor(),
false,addToIndex);
4325 for (
const auto &emd : enumList)
4327 if (emd->isVisible())
4330 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4331 emd->anchor(),
false,addToIndex);
4340 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4348 if (cd->isVisible() )
4351 LayoutDocManager::Class,
4359 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex &&
Config_getBool(SHOW_NAMESPACES))
4363 if (nd->isVisible())
4366 nd->displayName(),nd->getReference(),
4371 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4375 if (cd->isVisible())
4378 cd->displayName(),cd->getReference(),
4379 cd->getOutputFileBase(),
DString(),
false,addToIndex);
4383 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4385 for (
const auto &fd : gd->
getFiles())
4387 if (fd->isVisible())
4390 fd->displayName(),fd->getReference(),
4391 fd->getOutputFileBase(),
DString(),
false,fd->isLinkableViaGroup());
4395 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4397 for (
const auto &dd : gd->
getDirs())
4399 if (dd->isVisible())
4402 dd->shortName(),dd->getReference(),
4403 dd->getOutputFileBase(),
DString(),
false,
false);
4407 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4409 for (
const auto &pd : gd->
getPages())
4417 pageTitle=pd->
name();
4422 hasSubPages || hasSections,
4427 hasSubPages || hasSections,
4431 if (hasSections || hasSubPages)
4440 if (hasSections || hasSubPages)
4446 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4507 bool addToIndex = lne==
nullptr || lne->
visible();
4568 FTVHelp* ftv,
bool addToIndex)
4571 bool isDir=visibleMembers>0;
4591 .setSingleLine(
true)
4592 .setAutolinkSupport(
false));
4597 ol.
docify(
" [external]");
4600 if (addToIndex && isDir)
4612 if (addToIndex && isDir)
4656 bool addToIndex = lne==
nullptr || lne->
visible();
4715 for (
const auto &cd : concepts)
4717 if (cd->isLinkableInProject())
4722 cd->getOutputFileBase(),
DString(),
false,cd->partOfGroups().
empty(),cd);
4727 cd->getOutputFileBase(),
DString(),
false,cd->partOfGroups().
empty());
4734 bool rootOnly,
bool addToIndex);
4737 bool rootOnly,
bool addToIndex)
4739 for (
const auto &nd : nsLinkedMap)
4747 bool rootOnly,
bool addToIndex)
4801 if ((cd->getOuterScope()==
nullptr ||
4807 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4812 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4828 bool addToIndex = lne==
nullptr || lne->
visible();
4849 if (cd->isLinkableInProject())
4861 bool hasBrief = !cd->briefDescription().empty();
4869 cd->briefDescription(
true),
4871 .setSingleLine(
true)
4872 .setLinkFromIndex(
true));
4934 if (entry->visible()) count++;
4939 for (
const auto &entry: lne->
children())
4941 if (entry->visible())
4943 ol.
writeString(
"<li><a href=\""+entry->url()+
"\"><span>"+
4970 if (!projectName.
empty())
4972 projPrefix=projectName+
" ";
5024 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
5026 if (!disableIndex && !quickLinksAfterSplitbar)
5032 if (quickLinksAfterSplitbar)
5037 bool headerWritten=
false;
5062 .setSingleLine(
true));
5063 headerWritten =
true;
5068 if (!projectName.
empty())
5073 headerWritten =
true;
5102 .setIndexWords(
true));
5141 msg(
"Generating main page...\n");
5150 if (projPrefix.
empty())
5184 if (index.numDocumentedPages()>0)
5199 if (index.numDocumentedModules()>0)
5205 if (index.numDocumentedGroups()>0)
5211 if (index.numDocumentedDirs()>0)
5217 if (
Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5227 if (index.numDocumentedConcepts()>0)
5233 if (index.numHierarchyInterfaces()>0)
5239 if (index.numHierarchyClasses()>0)
5253 if (index.numHierarchyExceptions()>0)
5259 if (index.numAnnotatedInterfacesPrinted()>0)
5265 if (index.numAnnotatedClassesPrinted()>0)
5275 if (index.numAnnotatedStructsPrinted()>0)
5281 if (index.numAnnotatedRecordsPrinted()>0)
5287 if (index.numAnnotatedExceptionsPrinted()>0)
5302 if (index.numDocumentedModules()>0)
5308 if (index.numDocumentedGroups()>0)
5314 if (index.numDocumentedDirs()>0)
5320 if (index.numDocumentedNamespaces()>0)
5326 if (index.numDocumentedConcepts()>0)
5332 if (index.numAnnotatedInterfacesPrinted()>0)
5338 if (index.numAnnotatedClassesPrinted()>0)
5344 if (index.numAnnotatedStructsPrinted()>0)
5350 if (index.numAnnotatedRecordsPrinted()>0)
5356 if (index.numAnnotatedExceptionsPrinted()>0)
5384 auto isRef = [](
const DString &s)
5386 return s.startsWith(
"@ref") || s.startsWith(
"\\ref");
5390 for (
const auto &lne : entries)
5393 size_t idx =
static_cast<size_t>(kind);
5397 size_t newSize = idx+1;
5399 for (
size_t i=oldSize; i<newSize; i++)
indexWritten.at(i)=
false;
5402 bool addToIndex=lne->
visible();
5403 bool needsClosing=
false;
5408 case LayoutNavEntry::MainPage:
5409 msg(
"Generating index page...\n");
5412 case LayoutNavEntry::Pages:
5413 msg(
"Generating page index...\n");
5416 case LayoutNavEntry::Topics:
5417 msg(
"Generating topic index...\n");
5420 case LayoutNavEntry::Modules:
5422 if (index.numDocumentedModules()>0 && addToIndex)
5430 case LayoutNavEntry::ModuleList:
5431 msg(
"Generating module index...\n");
5434 case LayoutNavEntry::ModuleMembers:
5435 msg(
"Generating module member index...\n");
5438 case LayoutNavEntry::Namespaces:
5443 if (index.numDocumentedNamespaces()>0 && addToIndex)
5451 msg(
"Generating namespace index...\n");
5457 case LayoutNavEntry::NamespaceList:
5462 msg(
"Generating namespace index...\n");
5467 case LayoutNavEntry::NamespaceMembers:
5468 msg(
"Generating namespace member index...\n");
5471 case LayoutNavEntry::Classes:
5472 if (index.numAnnotatedClasses()>0 && addToIndex)
5480 msg(
"Generating annotated compound index...\n");
5484 case LayoutNavEntry::Concepts:
5485 msg(
"Generating concept index...\n");
5488 case LayoutNavEntry::ClassList:
5489 msg(
"Generating annotated compound index...\n");
5492 case LayoutNavEntry::ClassIndex:
5493 msg(
"Generating alphabetical compound index...\n");
5496 case LayoutNavEntry::ClassHierarchy:
5497 msg(
"Generating hierarchical class index...\n");
5501 msg(
"Generating graphical class hierarchy...\n");
5505 case LayoutNavEntry::ClassMembers:
5508 msg(
"Generating member index...\n");
5512 case LayoutNavEntry::Interfaces:
5513 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5520 case LayoutNavEntry::InterfaceList:
5523 msg(
"Generating annotated interface index...\n");
5527 case LayoutNavEntry::InterfaceIndex:
5530 msg(
"Generating alphabetical interface index...\n");
5534 case LayoutNavEntry::InterfaceHierarchy:
5537 msg(
"Generating hierarchical interface index...\n");
5541 msg(
"Generating graphical interface hierarchy...\n");
5546 case LayoutNavEntry::Structs:
5547 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5554 case LayoutNavEntry::StructList:
5557 msg(
"Generating annotated struct index...\n");
5561 case LayoutNavEntry::StructIndex:
5564 msg(
"Generating alphabetical struct index...\n");
5568 case LayoutNavEntry::Records:
5569 if (sliceOpt && index.numAnnotatedRecords()>0 && addToIndex)
5576 case LayoutNavEntry::RecordList:
5579 msg(
"Generating annotated record index...\n");
5583 case LayoutNavEntry::RecordIndex:
5586 msg(
"Generating alphabetical record index...\n");
5590 case LayoutNavEntry::Exceptions:
5591 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5598 case LayoutNavEntry::ExceptionList:
5601 msg(
"Generating annotated exception index...\n");
5605 case LayoutNavEntry::ExceptionIndex:
5608 msg(
"Generating alphabetical exception index...\n");
5612 case LayoutNavEntry::ExceptionHierarchy:
5615 msg(
"Generating hierarchical exception index...\n");
5619 msg(
"Generating graphical exception hierarchy...\n");
5624 case LayoutNavEntry::Files:
5626 if (
Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5634 msg(
"Generating file index...\n");
5639 case LayoutNavEntry::FileList:
5640 msg(
"Generating file index...\n");
5643 case LayoutNavEntry::FileGlobals:
5644 msg(
"Generating file member index...\n");
5647 case LayoutNavEntry::Examples:
5648 msg(
"Generating example index...\n");
5651 case LayoutNavEntry::User:
5656 bool isRelative=url.
at(0)==
'!';
5657 if (!url.
empty() && !isRelative)
5666 case LayoutNavEntry::UserGroup:
5678 bool isRelative=url.
at(0)==
'!';
5696 case LayoutNavEntry::None:
5697 ASSERT(kind != LayoutNavEntry::None);
5700 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup)
5710 case LayoutNavEntry::Modules:
5711 case LayoutNavEntry::Namespaces:
5712 case LayoutNavEntry::Classes:
5713 case LayoutNavEntry::Files:
5714 case LayoutNavEntry::UserGroup:
5736 case LayoutNavEntry::MainPage:
return true;
5737 case LayoutNavEntry::User:
return true;
5738 case LayoutNavEntry::UserGroup:
return true;
5739 case LayoutNavEntry::Pages:
return index.numIndexedPages()>0;
5740 case LayoutNavEntry::Topics:
return index.numDocumentedGroups()>0;
5741 case LayoutNavEntry::Modules:
return index.numDocumentedModules()>0;
5742 case LayoutNavEntry::ModuleList:
return index.numDocumentedModules()>0;
5744 case LayoutNavEntry::Namespaces:
return index.numDocumentedNamespaces()>0 && showNamespaces;
5745 case LayoutNavEntry::NamespaceList:
return index.numDocumentedNamespaces()>0 && showNamespaces;
5747 case LayoutNavEntry::Concepts:
return index.numDocumentedConcepts()>0;
5748 case LayoutNavEntry::Classes:
return index.numAnnotatedClasses()>0;
5749 case LayoutNavEntry::ClassList:
return index.numAnnotatedClasses()>0;
5750 case LayoutNavEntry::ClassIndex:
return index.numAnnotatedClasses()>0;
5751 case LayoutNavEntry::ClassHierarchy:
return index.numHierarchyClasses()>0;
5753 case LayoutNavEntry::Interfaces:
return index.numAnnotatedInterfaces()>0;
5754 case LayoutNavEntry::InterfaceList:
return index.numAnnotatedInterfaces()>0;
5755 case LayoutNavEntry::InterfaceIndex:
return index.numAnnotatedInterfaces()>0;
5756 case LayoutNavEntry::InterfaceHierarchy:
return index.numHierarchyInterfaces()>0;
5757 case LayoutNavEntry::Structs:
return index.numAnnotatedStructs()>0;
5758 case LayoutNavEntry::StructList:
return index.numAnnotatedStructs()>0;
5759 case LayoutNavEntry::StructIndex:
return index.numAnnotatedStructs()>0;
5760 case LayoutNavEntry::Records:
return index.numAnnotatedRecords()>0;
5761 case LayoutNavEntry::RecordList:
return index.numAnnotatedRecords()>0;
5762 case LayoutNavEntry::RecordIndex:
return index.numAnnotatedRecords()>0;
5763 case LayoutNavEntry::Exceptions:
return index.numAnnotatedExceptions()>0;
5764 case LayoutNavEntry::ExceptionList:
return index.numAnnotatedExceptions()>0;
5765 case LayoutNavEntry::ExceptionIndex:
return index.numAnnotatedExceptions()>0;
5766 case LayoutNavEntry::ExceptionHierarchy:
return index.numHierarchyExceptions()>0;
5767 case LayoutNavEntry::Files:
return index.numDocumentedFiles()>0 && showFiles;
5768 case LayoutNavEntry::FileList:
return index.numDocumentedFiles()>0 && showFiles;
5771 case LayoutNavEntry::None:
5772 ASSERT(kind != LayoutNavEntry::None);
5780 std::function<std::size_t(std::size_t)> numDocumented,
5782 const T *(*getInfo)(
size_t hl),
5786 bool firstMember=
true;
5787 for (std::size_t i=0;i<total;i++)
5789 if (numDocumented(i)>0)
5805 bool multiPageIndex=
false;
5808 multiPageIndex=
true;
5810 t <<
",children:[\n";
5811 bool firstLetter=
true;
5812 for (
const auto &[letter,list] : getMemberList(i))
5814 if (!firstLetter) t <<
",\n";
5819 DString fullName = getInfo(i)->fname;
5820 if (!multiPageIndex || firstLetter)
5821 anchor=fullName+extension+
"#index_";
5823 anchor=fullName+
"_"+is+extension+
"#index_";
5842 for (
const auto &entry : root->
children())
5848 bool firstChild =
true;
5849 if (!first) t <<
",";
5850 t <<
"children:[\n";
5851 for (
const auto &entry : root->
children())
5855 if (!firstChild) t <<
",\n";
5858 if (
isURL(url)) url =
"^" + url;
5861 bool hasChildren=
false;
5862 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5864 auto numDoc = [](std::size_t i) {
5867 auto memList = [](std::size_t i) {
5872 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5874 auto numDoc = [](std::size_t i) {
5877 auto memList = [](std::size_t i) {
5882 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5884 auto numDoc = [](std::size_t i) {
5887 auto memList = [](std::size_t i) {
5892 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5894 auto numDoc = [](std::size_t i) {
5897 auto memList = [](std::size_t i) {
5906 if (hasChildren) t <<
"]";
5923 t <<
"var menudata={";
5925 if (hasChildren) t <<
"]";
A abstract class representing of a compound symbol.
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual bool isSimple() const =0
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual bool isImplicitTemplateInstance() const =0
CompoundType
The various compound types.
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e. class/struct/union/...
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
static const DString crawlFileName
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
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)
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.
DString & prepend(const char *s)
size_t find(char c, size_t pos=0) const
DString left(size_t len) const
const std::string & str() const
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
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
virtual DString briefDescription(bool abbreviate=false) const =0
virtual bool isVisible() const =0
virtual DString briefFile() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool hasSections() const =0
virtual DString getDefFileName() const =0
virtual bool isLinkable() 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 briefLine() const =0
virtual bool hasDocumentation() const =0
virtual bool isLinkableInProject() const =0
virtual bool isAnonymous() const =0
virtual DString navigationPathAsString() const =0
virtual DString displayName(bool includeScope=true) const =0
virtual DString qualifiedName() const =0
virtual DString anchor() const =0
virtual DString getReference() const =0
virtual const GroupList & partOfGroups() const =0
virtual Definition * getOuterScope() const =0
virtual DString getSourceFileBase() const =0
virtual bool isReference() const =0
virtual DString getOutputFileBase() const =0
virtual void writePageNavigation(OutputList &) const =0
virtual void writeSummaryLinks(OutputList &) const =0
A model of a directory symbol.
virtual const DString shortName() const =0
virtual const DirList & subDirs() const =0
virtual const FileList & getFiles() const =0
Represents a graphical class hierarchy.
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const DString &path)
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static PageLinkedMap * exampleLinkedMap
static NamespaceDefMutable * globalScope
static IndexList * indexList
static ClassLinkedMap * hiddenClassLinkedMap
static PageLinkedMap * pageLinkedMap
static DString htmlFileExtension
static DirLinkedMap * dirLinkedMap
static GroupLinkedMap * groupLinkedMap
A class that generates a dynamic tree view side panel.
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const DString &nameAsHtml=DString())
void generateTreeViewInline(TextStream &t)
A model of a file symbol.
virtual DString getPath() const =0
virtual DString includeName() const =0
virtual bool generateSourceFile() const =0
virtual bool isDocumentationFile() const =0
A model of a group of symbols.
virtual DString groupTitle() const =0
virtual const DirList & getDirs() const =0
virtual const GroupList & getSubGroups() const =0
virtual const FileList & getFiles() const =0
virtual const MemberLists & getMemberLists() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual bool isASubGroup() const =0
virtual bool isVisibleInHierarchy() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
static DString fixSpaces(const DString &s)
void incrementDocumentedNamespaceMembers(int i, const std::string &letter, const MemberDef *md)
int numAnnotatedInterfacesPrinted() const
void addClassMemberNameToIndex(const MemberDef *md)
std::vector< const MemberDef * > MemberIndexList
void resetDocumentedNamespaceMembers(int i)
int numDocumentedFiles() const
int numAnnotatedRecords() const
int numDocumentedNamespaces() const
int numIndexedPages() const
int numAnnotatedClassesPrinted() const
int numDocumentedGroups() const
void resetDocumentedModuleMembers(int i)
int numDocumentedModules() const
void incrementDocumentedFileMembers(int i, const std::string &letter, const MemberDef *md)
int numAnnotatedStructs() const
int numDocumentedConcepts() const
void addNamespaceMemberNameToIndex(const MemberDef *md)
void resetDocumentedClassMembers(int i)
int numAnnotatedStructsPrinted() const
void incrementDocumentedClassMembers(int i, const std::string &letter, const MemberDef *md)
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
void addFileMemberNameToIndex(const MemberDef *md)
void incrementDocumentedModuleMembers(int i, const std::string &letter, const MemberDef *md)
int numHierarchyInterfaces() const
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
void addModuleMemberNameToIndex(const MemberDef *md)
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
int numDocumentedPages() const
int numHierarchyExceptions() const
int numAnnotatedExceptionsPrinted() const
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
int numAnnotatedExceptions() const
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
void sortMemberIndexLists()
std::map< std::string, MemberIndexList > MemberIndexMap
static Index & instance()
void countDataStructures()
int numHierarchyClasses() const
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
void resetDocumentedFileMembers(int i)
int numDocumentedDirs() const
int numAnnotatedInterfaces() const
std::unique_ptr< Private > p
int numAnnotatedRecordsPrinted() const
int numAnnotatedClasses() const
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
void addIndexFile(const DString &name)
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex=false, bool addToNavIndex=false, const Definition *def=nullptr, const DString &nameAsHtml=DString())
void enable()
enable the indices
void disable()
disable the indices
static LayoutDocManager & instance()
Returns a reference to this singleton.
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
std::unique_ptr< ClassDef > Ptr
const T * find(const std::string &key) const
A model of a class/file/namespace member symbol.
virtual bool isSignal() const =0
virtual bool isFriend() const =0
virtual bool isForeign() const =0
virtual bool isRelated() const =0
virtual bool isSequence() const =0
virtual const ClassDef * getClassDef() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isTypedef() const =0
virtual bool isSlot() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const FileDef * getFileDef() const =0
virtual bool isEvent() const =0
virtual bool isFunction() const =0
virtual bool isDictionary() const =0
virtual const ModuleDef * getModuleDef() const =0
virtual bool isDefine() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0
virtual bool isVariable() const =0
virtual bool isStrong() const =0
virtual DString typeString() const =0
virtual const MemberDef * getEnumScope() const =0
virtual bool isEnumValue() const =0
virtual bool isProperty() const =0
A list of MemberDef objects as shown in documentation sections.
A vector of MemberDef object.
bool empty() const noexcept
iterator begin() noexcept
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual int countVisibleMembers() const =0
virtual bool isPrimaryInterface() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
int numDocumentedModules() const
static ModuleManager & instance()
An abstract interface of a namespace symbol.
virtual ClassLinkedRefMap getRecords() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual ConceptLinkedRefMap getConcepts() const =0
virtual ClassLinkedRefMap getStructs() const =0
virtual ClassLinkedRefMap getExceptions() const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual int countVisibleMembers() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual ClassLinkedRefMap getInterfaces() const =0
Class representing a list of output generators that are written to in parallel.
void writeFooter(const DString &navPath)
void startTitleHead(const DString &fileName)
void parseText(const DString &textStr)
void endTitleHead(const DString &fileName, const DString &name)
void disable(OutputType o)
void startParagraph(const DString &classDef=DString())
void writeObjectLink(const DString &ref, const DString &file, const DString &anchor, const DString &name)
void enable(OutputType o)
void endIndexItem(const DString &ref, const DString &file)
void endTextBlock(bool paraBreak=false)
void docify(const DString &s)
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
void startHeaderSection()
void endIndexSection(IndexSection is)
void writeString(const DString &text)
void endIndexValue(const DString &name, bool b)
void startProjectNumber()
void endSection(const DString &lab, SectionType t)
void startIndexItem(const DString &ref, const DString &file)
void pushGeneratorState()
void startFile(const DString &name, bool isSource, const DString &manName, const DString &title, int hierarchyLevel=0)
void disableAllBut(OutputType o)
void startTextBlock(bool dense=false)
void startPageDoc(const DString &pageTitle)
void startIndexValue(bool b)
void startTextLink(const DString &file, const DString &anchor)
void writeSplitBar(const DString &name, const DString &allMembersFile)
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void startSection(const DString &lab, const DString &title, SectionType t)
void startIndexListItem()
void writeQuickLinks(HighlightedItem hli, const DString &file, bool extraTabs=false)
void startIndexSection(IndexSection is)
A model of a page symbol.
virtual void addSectionsToIndex()=0
virtual bool visibleInIndex() const =0
virtual const PageLinkedRefMap & getSubPages() const =0
virtual bool hasSubPages() const =0
virtual DString title() const =0
class that provide information about a section.
static SectionManager & instance()
returns a reference to the singleton
static constexpr int Subsection
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
virtual DString trCompoundMembers()=0
virtual DString trFileDocumentation()=0
virtual DString trFunctionAndProc()=0
virtual DString trTypedefs()=0
virtual DString trConceptList()=0
virtual DString trTopics()=0
virtual DString trModulesMembers()=0
virtual DString trEnumerations()=0
virtual DString trRecordListDescription()=0
virtual DString trFileMembersDescriptionTotal(FileMemberHighlight::Enum hl)=0
virtual DString trExceptionDocumentation()=0
virtual DString trInterfaceIndex()=0
virtual DString trNamespaceMembers()=0
virtual DString trNamespaceList()=0
virtual DString trRecordDocumentation()=0
virtual DString trExceptionList()=0
virtual DString trCode()=0
virtual DString trClassDocumentation()=0
virtual DString trHierarchicalIndex()=0
virtual DString trExceptionHierarchyDescription()=0
virtual DString trInterfaceList()=0
virtual DString trSequences()=0
virtual DString trFunctions()=0
virtual DString trReferenceManual()=0
virtual DString trInterfaceListDescription()=0
virtual DString trConceptIndex()=0
virtual DString trTopicIndex()=0
virtual DString trGotoTextualHierarchy()=0
virtual DString trExceptionHierarchy()=0
virtual DString trCompoundList()=0
virtual DString trModuleIndex()=0
virtual DString trInterfaceHierarchy()=0
virtual DString trTypeDocumentation()=0
virtual DString trInterfaceDocumentation()=0
virtual DString trStructListDescription()=0
virtual DString trDocumentation(const DString &projName)=0
virtual DString trExamplesDescription()=0
virtual DString trNamespaceDocumentation()=0
virtual DString trFileList()=0
virtual DString trModules()=0
virtual DString trLegendDocs()=0
virtual DString trDefines()=0
virtual DString trRelatedPages()=0
virtual DString trLegendTitle()=0
virtual DString trRelatedSymbols()=0
virtual DString trFileMembers()=0
virtual DString trDirectories()=0
virtual DString trInterfaceHierarchyDescription()=0
virtual DString trStructIndex()=0
virtual DString trExceptionIndex()=0
virtual DString trModuleDocumentation()=0
virtual DString trExceptionListDescription()=0
virtual DString trProperties()=0
virtual DString trRelatedPagesDescription()=0
virtual DString trCompoundIndexFortran()=0
virtual DString trCompoundListDescription()=0
virtual DString trTopicListDescription()=0
virtual DString trModulesIndex()=0
virtual DString trModuleMembersDescriptionTotal(ModuleMemberHighlight::Enum hl)=0
virtual DString trFileListDescription(bool extractAll)=0
virtual DString trClassHierarchyDescription()=0
virtual DString trConceptListDescription(bool extractAll)=0
virtual DString trRecordIndex()=0
virtual DString trSubprograms()=0
virtual DString trAll()=0
virtual DString trTopicDocumentation()=0
virtual DString trGeneratedBy()=0
virtual DString trVariables()=0
virtual DString trConceptDocumentation()=0
virtual DString trEnumerationValues()=0
virtual DString trDirDocumentation()=0
virtual DString trModulesListDescription(bool extractAll)=0
virtual DString trStructList()=0
virtual DString trNamespaceListDescription(bool extractAll)=0
virtual DString trRecordList()=0
virtual DString trCompoundMembersDescriptionTotal(ClassMemberHighlight::Enum hl)=0
virtual DString trClassHierarchy()=0
virtual DString trDirIndex()=0
virtual DString trCompoundIndex()=0
virtual DString trDesignUnitIndex()=0
virtual DString trConstants()=0
virtual DString trStructDocumentation()=0
virtual DString trMainPage()=0
virtual DString trEvents()=0
virtual DString trDictionaries()=0
virtual DString trFileIndex()=0
virtual DString trExamples()=0
virtual DString trNamespaceMembersDescriptionTotal(NamespaceMemberHighlight::Enum hl)=0
virtual DString trGotoGraphicalHierarchy()=0
virtual DString trNamespaceIndex()=0
static DString getProtectionName(int prot)
static VhdlClasses convert(Protection prot)
bool classHasVisibleRoot(const BaseClassList &bcl)
bool classVisibleInIndex(const ClassDef *cd)
bool classHasVisibleChildren(const ClassDef *cd)
std::vector< BaseClassDef > BaseClassList
std::unordered_set< const ClassDef * > ClassDefSet
#define Config_updateBool(name, value)
#define Config_getBool(name)
#define Config_getString(name)
Definition * toDefinition(DefinitionMutable *dm)
DString parseCommentAsText(const Definition *scope, const MemberDef *md, const DString &doc, const DString &fileName, int lineNr)
DString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const DString &doc, const DString &fileName, int lineNr)
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.
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &dn)
constexpr auto JAVASCRIPT_LICENSE_TEXT
static void writePages(PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static DString letterToLabel(const DString &startLetter)
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
#define MAX_ITEMS_BEFORE_QUICK_INDEX
static void startQuickIndexList(OutputList &ol, bool letterTabs=false)
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevFileName)
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
static void writeGraphicalClassHierarchy(OutputList &ol)
static void writeAnnotatedStructIndex(OutputList &ol)
static void startQuickIndexItem(OutputList &ol, const DString &l, bool hl, bool, bool &first)
static void writeAlphabeticalExceptionIndex(OutputList &ol)
static void writeDirIndex(OutputList &ol)
static void writeClassMemberIndex(OutputList &ol)
void writeGraphInfo(OutputList &ol)
static std::vector< bool > indexWritten
static int countConcepts()
static void writeAnnotatedIndex(OutputList &ol)
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
static void writeFileIndex(OutputList &ol)
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
static void endQuickIndexList(OutputList &ol)
static void writeAlphabeticalIndex(OutputList &ol)
static int countClassHierarchy(ClassDef::CompoundType ct)
static void writeAnnotatedInterfaceIndex(OutputList &ol)
static void writePageIndex(OutputList &ol)
void endTitle(OutputList &ol, const DString &fileName, const DString &name)
static void writeNamespaceIndex(OutputList &ol)
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
void renderMemberIndicesAsJs(std::ostream &t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*getInfo)(size_t hl), std::size_t total)
static void writeAnnotatedExceptionIndex(OutputList &ol)
static void writeHierarchicalInterfaceIndex(OutputList &ol)
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
static void countRelatedPages(int &docPages, int &indexPages)
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
void addMembersToIndex(T *def, LayoutDocManager::LayoutPart part, const DString &name, const DString &anchor, bool addToIndex=true, bool preventSeparateIndex=false, const ConceptLinkedRefMap *concepts=nullptr)
static void writeTopicIndex(OutputList &ol)
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
static void writeModuleMemberIndex(OutputList &ol)
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
static const FmhlInfo * getFmhlInfo(size_t hl)
constexpr auto alphaSepar
static void writeGraphicalExceptionHierarchy(OutputList &ol)
static const MmhlInfo * getMmhlInfo(size_t hl)
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevClassName)
static void countFiles(int &htmlFiles, int &files)
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
static void writeExampleIndex(OutputList &ol)
static void writeAnnotatedRecordIndex(OutputList &ol)
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
static void endQuickIndexItem(OutputList &ol)
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
static const NmhlInfo * getNmhlInfo(size_t hl)
static void writeAlphabeticalRecordIndex(OutputList &ol)
const ClassDef * get_pointer(const Ptr &p)
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevModuleName)
static void writeAlphabeticalStructIndex(OutputList &ol)
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static const CmhlInfo * getCmhlInfo(size_t hl)
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
std::set< std::string > UsedIndexLetters
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevNamespaceName)
void writeIndexHierarchy(OutputList &ol)
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, DString fullName, bool multiPage)
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
static bool dirHasVisibleChildren(const DirDef *dd)
static int countNamespaces()
static void endIndexHierarchy(OutputList &ol, int level)
const int maxItemsBeforeQuickIndex
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
static void writeConceptIndex(OutputList &ol)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &navPath)
static void writeModuleIndex(OutputList &ol)
static void MemberIndexMap_add(Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
static void writeIndex(OutputList &ol)
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
static void startIndexHierarchy(OutputList &ol, int level)
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
static void writeHierarchicalExceptionIndex(OutputList &ol)
static void writeNamespaceMemberIndex(OutputList &ol)
static void writeHierarchicalIndex(OutputList &ol)
static void writeMenuData()
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, DString fullName, bool multiPage)
static void writeFileMemberIndex(OutputList &ol)
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
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)
@ isNamespaceDocumentation
Translator * theTranslator
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
#define warn(file, line, fmt,...)
std::ofstream openOutputStream(const DString &name, bool append=false)
bool namespaceHasNestedNamespace(const NamespaceDef *nd)
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
NamespaceDef * getResolvedNamespace(const DString &name)
bool namespaceHasNestedConcept(const NamespaceDef *nd)
Portable versions of functions that are platform dependent.
const LayoutNavEntry::Kind fallbackKind
AnnotatedIndexContext(int numAnno, int numPrint, LayoutNavEntry::Kind lk, LayoutNavEntry::Kind fk, const DString &title, const DString &intro, ClassDef::CompoundType ct, const DString &fn, HighlightedItem hi)
const DString listDefaultTitleText
const DString fileBaseName
const ClassDef::CompoundType compoundType
const HighlightedItem hiItem
const LayoutNavEntry::Kind listKind
const DString listDefaultIntroText
Helper class representing a class member in the navigation menu.
CmhlInfo(const char *fn, const DString &t)
Helper class to pass options when calling OutputList::generateDoc().
Helper class representing a file member in the navigation menu.
FmhlInfo(const char *fn, const DString &t)
std::array< MemberIndexMap, ModuleMemberHighlight::Total > moduleIndexLetterUsed
std::array< MemberIndexMap, ClassMemberHighlight::Total > classIndexLetterUsed
int annotatedRecordsPrinted
int annotatedExceptionsPrinted
int annotatedStructsPrinted
std::array< int, FileMemberHighlight::Total > documentedFileMembers
std::array< MemberIndexMap, FileMemberHighlight::Total > fileIndexLetterUsed
std::array< int, ModuleMemberHighlight::Total > documentedModuleMembers
int annotatedInterfacesPrinted
std::array< int, NamespaceMemberHighlight::Total > documentedNamespaceMembers
std::array< int, ClassMemberHighlight::Total > documentedClassMembers
std::array< MemberIndexMap, NamespaceMemberHighlight::Total > namespaceIndexLetterUsed
int annotatedClassesPrinted
Represents of a member declaration list with configurable title and subtitle.
Represents of a member definition list with configurable title.
Base class for the layout of a navigation item at the top of the HTML pages.
const LayoutNavEntryList & children() const
LayoutNavEntry * find(LayoutNavEntry::Kind k, const DString &file=DString()) const
DString titleAsHtml() const
Helper class representing a module member in the navigation menu.
MmhlInfo(const char *fn, const DString &t)
Helper class representing a namespace member in the navigation menu.
NmhlInfo(const char *fn, const DString &t)
bool isTypeAClassFriend(const DString &type)
std::string convertUTF8ToUpper(const std::string &input)
Converts the input string into a upper case version, also taking into account non-ASCII characters th...
std::string convertUTF8ToLower(const std::string &input)
Converts the input string into a lower case version, also taking into account non-ASCII characters th...
std::string getUTF8CharAt(const std::string &input, size_t pos)
Returns the UTF8 character found at byte position pos in the input string.
Various UTF8 related helper functions.
bool isURL(const DString &url)
Checks whether the given url starts with a supported protocol.
DString filterTitle(const DString &title)
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
DString convertToJSString(const DString &s, bool keepEntities, bool singleQuotes)
DString convertToId(const DString &s)
DString convertToHtml(const DString &s, bool keepEntities)
void addHtmlExtensionIfMissing(DString &fName)
void extractNamespaceName(const DString &scopeName, DString &className, DString &namespaceName, bool allowEmptyClass)
int getPrefixIndex(const DString &name)
DString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
DString getDotImageExtension()
DString stripFromPath(const DString &path)
A bunch of utility functions.