73 const FileDef *dstFd,
bool srcDirect,
bool dstDirect)
override;
194 MD5Buffer(anchor.
data(),
static_cast<unsigned int>(anchor.
length()),md5_sig);
195 MD5SigToString(md5_sig,sigStr);
292 ol.
writeDoc(ast.get(),
this,
nullptr);
341 if (dd->hasDocumentation() || !dd->getFiles().empty())
357 if (dd->hasDocumentation() || !dd->getFiles().empty())
364 ol.
writeString(
"<span class=\"iconfclosed\"></span>");
373 if (!dd->briefDescription().isEmpty() &&
Config_getBool(BRIEF_MEMBER_DESC))
400 bool genSourceFile=
false;
405 else if (genSourceFile)
430 bool genSrc = fd->generateSourceFile();
446 if (fd->isLinkable())
453 ol.
docify(fd->displayName());
457 if (!fd->briefDescription().isEmpty() &&
Config_getBool(BRIEF_MEMBER_DESC))
500 tagFile <<
" <compound kind=\"dir\">\n";
505 tagFile <<
" <filename>" << fn <<
"</filename>\n";
510 case LayoutDocEntry::DirSubDirs:
516 tagFile <<
" <dir>" <<
convertToXML(dd->displayName()) <<
"</dir>\n";
521 case LayoutDocEntry::DirFiles:
525 tagFile <<
" <file>" <<
convertToXML(fd->name()) <<
"</file>\n";
534 tagFile <<
" </compound>\n";
546 if (!generateTreeView)
571 case LayoutDocEntry::BriefDesc:
574 case LayoutDocEntry::DirGraph:
577 case LayoutDocEntry::MemberDeclStart:
580 case LayoutDocEntry::DirSubDirs:
583 case LayoutDocEntry::DirFiles:
586 case LayoutDocEntry::MemberDeclEnd:
589 case LayoutDocEntry::DetailedDesc:
598 case LayoutDocEntry::ClassIncludes:
599 case LayoutDocEntry::ClassInlineClasses:
600 case LayoutDocEntry::ClassInheritanceGraph:
601 case LayoutDocEntry::ClassNestedClasses:
602 case LayoutDocEntry::ClassCollaborationGraph:
603 case LayoutDocEntry::ClassAllMembersLink:
604 case LayoutDocEntry::ClassUsedFiles:
605 case LayoutDocEntry::NamespaceNestedNamespaces:
606 case LayoutDocEntry::NamespaceNestedConstantGroups:
607 case LayoutDocEntry::NamespaceClasses:
608 case LayoutDocEntry::NamespaceConcepts:
609 case LayoutDocEntry::NamespaceInterfaces:
610 case LayoutDocEntry::NamespaceStructs:
611 case LayoutDocEntry::NamespaceExceptions:
612 case LayoutDocEntry::NamespaceInlineClasses:
613 case LayoutDocEntry::ConceptDefinition:
614 case LayoutDocEntry::FileClasses:
615 case LayoutDocEntry::FileConcepts:
616 case LayoutDocEntry::FileInterfaces:
617 case LayoutDocEntry::FileStructs:
618 case LayoutDocEntry::FileExceptions:
619 case LayoutDocEntry::FileNamespaces:
620 case LayoutDocEntry::FileConstantGroups:
621 case LayoutDocEntry::FileIncludes:
622 case LayoutDocEntry::FileIncludeGraph:
623 case LayoutDocEntry::FileIncludedByGraph:
624 case LayoutDocEntry::FileSourceLink:
625 case LayoutDocEntry::FileInlineClasses:
626 case LayoutDocEntry::GroupClasses:
627 case LayoutDocEntry::GroupConcepts:
628 case LayoutDocEntry::GroupModules:
629 case LayoutDocEntry::GroupInlineClasses:
630 case LayoutDocEntry::GroupNamespaces:
631 case LayoutDocEntry::GroupDirs:
632 case LayoutDocEntry::GroupNestedGroups:
633 case LayoutDocEntry::GroupFiles:
634 case LayoutDocEntry::GroupGraph:
635 case LayoutDocEntry::GroupPageDocs:
636 case LayoutDocEntry::ModuleExports:
637 case LayoutDocEntry::ModuleClasses:
638 case LayoutDocEntry::ModuleConcepts:
639 case LayoutDocEntry::ModuleUsedFiles:
640 case LayoutDocEntry::AuthorSection:
641 case LayoutDocEntry::MemberGroups:
642 case LayoutDocEntry::MemberDecl:
643 case LayoutDocEntry::MemberDef:
644 case LayoutDocEntry::MemberDefStart:
645 case LayoutDocEntry::MemberDefEnd:
646 err(
"Internal inconsistency: member '%s' should not be part of "
647 "LayoutDocManager::Directory entry list\n",
qPrint(lde->entryToString()));
684 const FileDef *dstFd,
bool srcDirect,
bool dstDirect)
686 if (
this==dir)
return;
687 AUTO_TRACE(
"add dependency {}->{} due to {}->{}",
699 if (usedPair==
nullptr)
702 usedDir->
addFileDep(srcFd,dstFd, srcDirect, dstDirect);
713 auto newUsedDir = std::make_unique<UsedDir>(dir);
714 newUsedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
749 for (
const auto &ii : fd->includeFileList())
752 if (ii.fileDef && ii.fileDef->isLinkable())
754 DirDef *usedDir = ii.fileDef->getDirDef();
766 [](
const auto &u1,
const auto &u2)
767 { return qstricmp_sort(u1->dir()->getOutputFileBase(),u2->dir()->getOutputFileBase())<0; });
771 usedDirectory->sort();
809 [](
const auto &left,
const auto &right)
811 int orderHi = qstricmp_sort(left->source()->name(),right->source()->name());
812 if (orderHi!=0) return orderHi<0;
813 int orderLo = qstricmp_sort(left->destination()->name(),right->destination()->name());
831 std::unique_ptr<DirDef>(
840 for (
const auto &s : l)
859 while ((i=path.
find(
'/',p))!=-1)
892 if (target->
parent()!=root)
926 (
m_src->shortName()+
" → "+
m_dst->dir()->shortName()));
928 (
m_src->displayName()+
" -> "+
m_dst->dir()->shortName()));
933 if (!generateTreeView)
936 m_src->writeNavigationPath(ol);
952 for (
const auto &fp :
m_dst->filePairs())
998 int l =
static_cast<int>(path.
length());
1006 if (dirName.
left(l)!=path)
1008 i = l>=2 ? path.
findRev(
'/',l-2) : -1;
1016 path=path.
left(i+1);
1024 l=
static_cast<int>(path.
length());
1033 path=path.
left(i+1);
1050 dir->setDiskName(diskName);
1061 for (
const auto &fd : *fn)
1063 if (fd->getReference().isEmpty())
1070 if (dir && !fd->isDocumentationFile()) dir->
addFile(fd.get());
1090 parent->addSubDir(dir.get());
1091 AUTO_TRACE_ADD(
"DirDefImpl::addSubdir(): Adding subdir {} to {}",
1092 dir->displayName(),
parent->displayName());
1106 [](
const auto &d1,
const auto &d2)
1108 QCString s1 = d1->shortName(), s2 = d2->shortName();
1112 QCString n1 = d1->name(), n2 = d2->name();
1123 dir->setDirIndex(dirIndex++);
1142 dir->computeDependencies();
1152 if (!dir->hasDocumentation())
1156 dir->writeDocumentation(ol);
1163 dr->writeDocumentation(ol);
1177 if (d==
nullptr)
return nullptr;
1180 return static_cast<DirDef*
>(d);
1190 if (d==
nullptr)
return nullptr;
1193 return static_cast<const DirDef*
>(d);
The common base class of all entity definitions found in the sources.
virtual bool isLinkable() const =0
virtual QCString getReference() const =0
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
bool isReference() const override
const QCString & name() const override
void writeNavigationPath(OutputList &ol) const override
bool hasBriefDescription() const override
QCString docFile() const override
QCString briefFile() const override
QCString briefDescription(bool abbreviate=FALSE) const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
void setLocalName(const QCString &name) override
int docLine() const override
int briefLine() const override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
SrcLangExt getLanguage() const override
virtual void setOuterScope(Definition *d)=0
A model of a directory symbol.
virtual int level() const =0
virtual void setLevel()=0
virtual void addFile(FileDef *fd)=0
virtual DirDef * parent() const =0
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)=0
virtual void setParent(DirDef *parent)=0
virtual const QCString shortName() const =0
void writeDocumentation(OutputList &ol) override
void writeSubDirList(OutputList &ol)
static DirDef * createNewDir(const QCString &path)
static bool matchPath(const QCString &path, const StringVector &l)
bool hasSubdirs() const override
void writeTagFile(TextStream &t) override
const FileList & getFiles() const override
const QCString shortName() const override
bool isLinkable() const override
const UsedDirLinkedMap & usedDirs() const override
void addSubDir(DirDef *subdir) override
bool hasDetailedDescription() const override
DirDef * parent() const override
void startMemberDeclarations(OutputList &ol)
int level() const override
bool isLinkableInProject() const override
void writeDetailedDescription(OutputList &ol, const QCString &title)
DefType definitionType() const override
bool isParentOf(const DirDef *dir) const override
QCString getOutputFileBase() const override
int dirIndex() const override
QCString anchor() const override
CodeSymbolType codeSymbolType() const override
void addFile(FileDef *fd) override
bool depGraphIsTrivial() const override
void overrideDirectoryGraph(bool e) override
void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect) override
Add as "uses" dependency between this dir and dir, that was caused by a dependency on file fd.
void writeDirectoryGraph(OutputList &ol)
const DirList & subDirs() const override
UsedDirLinkedMap m_usedDirs
void setDiskName(const QCString &name) override
static DirDef * mergeDirectoryInTree(const QCString &path)
void writeFileList(OutputList &ol)
QCString shortTitle() const override
DirDefImpl(const QCString &path)
void setDirIndex(int index) override
void endMemberDeclarations(OutputList &ol)
void writeBriefDescription(OutputList &ol)
void computeDependencies() override
Computes the dependencies between directories.
QCString displayName(bool=TRUE) const override
void setParent(DirDef *parent) override
bool hasDirectoryGraph() const override
void writeDocumentation(OutputList &ol)
QCString getOutputFileBase() const
Representation of an directory dependency graph.
static FileNameLinkedMap * inputNameLinkedMap
static DirLinkedMap * dirLinkedMap
static DirRelationLinkedMap dirRelations
A model of a file symbol.
virtual void setDirDef(DirDef *dd)=0
virtual DirDef * getDirDef() const =0
Class representing a pair of FileDef objects.
static QCString key(const FileDef *srcFd, const FileDef *dstFd)
static LayoutDocManager & instance()
Returns a reference to this singleton.
Class representing a list of output generators that are written to in parallel.
void writeString(const QCString &text)
void startGroupHeader(int extraLevels=0)
void startMemberDeclaration()
void disable(OutputType o)
void endDirDepGraph(DotDirDeps &g)
void enable(OutputType o)
void endMemberDescription()
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
void docify(const QCString &s)
void startParagraph(const QCString &classDef=QCString())
void startMemberSections()
void endMemberItem(OutputGenerator::MemberItemType type)
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
void disableAllBut(OutputType o)
void writeAnchor(const QCString &fileName, const QCString &name)
void endGroupHeader(int extraLevels=0)
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
void parseText(const QCString &textStr)
void startTextLink(const QCString &file, const QCString &anchor)
void startMemberHeader(const QCString &anchor, int typ=2)
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString right(size_t len) const
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
Text streaming class that buffers data.
Usage information of a directory.
FilePairLinkedMap m_filePairs
void addFileDep(const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Take up dependency between files.
const DirDef * dir() const
UsedDir(const DirDef *dir)
FilePair * findFilePair(const QCString &name)
#define Config_getList(name)
#define Config_getBool(name)
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
std::vector< std::string > StringVector
DirIterator begin(DirIterator it) noexcept
DirIterator end(const DirIterator &) noexcept
DirDef * createDirDef(const QCString &path)
static void writePartialFilePath(OutputList &ol, const DirDef *root, const FileDef *fd)
bool compareDirDefs(const DirDef *item1, const DirDef *item2)
static void writePartialDirPath(OutputList &ol, const DirDef *root, const DirDef *target)
static QCString encodeDirName(const QCString &anchor)
void computeDirDependencies()
DirDef * toDirDef(Definition *d)
static void computeCommonDirPrefix()
In order to create stable, but unique directory names, we compute the common part of the path shared ...
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.
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
static void writeTagFile()
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
void endFileWithNavPath(OutputList &ol, const Definition *d)
Translator * theTranslator
void msg(const char *fmt,...)
int qstricmp_sort(const char *str1, const char *str2)
const char * qPrint(const char *s)
QCString title(SrcLangExt lang) const
SrcLangExt
Language as given by extension.
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
static QCString stripFromPath(const QCString &p, const StringVector &l)
QCString convertToXML(const QCString &s, bool keepEntities)
QCString removeLongPathMarker(QCString path)
void addHtmlExtensionIfMissing(QCString &fName)
A bunch of utility functions.