浏览该文件的文档.
72 const FileDef *dstFd,
bool srcDirect,
bool dstDirect);
118 if (m_shortName.at(m_shortName.length()-1)==
'/')
120 m_shortName = m_shortName.
left(m_shortName.length()-1);
122 int pi=m_shortName.
findRev(
'/');
125 m_shortName = m_shortName.mid(pi+1);
127 setLocalName(m_shortName);
128 m_dispName = fullPathNames ?
stripFromPath(path) : m_shortName;
129 if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)==
'/')
131 m_dispName = m_dispName.left(m_dispName.length()-1);
172 const_cast<FileDef*
>(fd)->setDirDef(
this);
186 MD5Buffer((
const unsigned char *)anchor.
data(),anchor.
length(),md5_sig);
187 MD5SigToString(md5_sig,sigStr);
275 if (rootNode && !rootNode->isEmpty())
330 if (dd->hasDocumentation() || !dd->getFiles().empty())
345 if (dd->hasDocumentation() || dd->getFiles().empty())
353 if (!dd->briefDescription().isEmpty() &&
Config_getBool(BRIEF_MEMBER_DESC))
379 if (fd->hasDocumentation())
394 if (fd->hasDocumentation())
400 if (fd->isLinkable())
410 if (fd->generateSourceFile())
423 if (!fd->briefDescription().isEmpty() &&
Config_getBool(BRIEF_MEMBER_DESC))
466 tagFile <<
" <compound kind=\"dir\">\n";
480 tagFile <<
" <dir>" <<
convertToXML(dd->displayName()) <<
"</dir>\n";
489 tagFile <<
" <file>" <<
convertToXML(fd->name()) <<
"</file>\n";
498 tagFile <<
" </compound>\n";
509 if (!generateTreeView)
601 err(
"Internal inconsistency: member %d should not be part of "
602 "LayoutDocManager::Directory entry list\n",lde->kind());
639 const FileDef *dstFd,
bool srcDirect,
bool dstDirect)
641 if (
this==dir)
return;
658 usedDir->
addFileDep(srcFd,dstFd, srcDirect, dstDirect);
669 auto newUsedDir = std::make_unique<UsedDir>(dir);
670 newUsedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
705 for (
const auto &ii : fd->includeFileList())
709 if (ii.fileDef && ii.fileDef->isLinkable())
711 DirDef *usedDir = ii.fileDef->getDirDef();
724 [](
const auto &u1,
const auto &u2)
725 { return qstricmp(u1->dir()->getOutputFileBase(),u2->dir()->getOutputFileBase())<0; });
729 usedDirectory->sort();
772 [](
const auto &left,
const auto &right)
774 int orderHi = qstricmp(left->source()->name(),right->source()->name());
775 if (orderHi!=0) return orderHi<0;
776 int orderLo = qstricmp(left->destination()->name(),right->destination()->name());
793 std::unique_ptr<DirDef>(
803 for (
const auto &s : l)
805 std::string prefix = s.substr(0,path.
length());
806 if (
qstricmp(prefix.c_str(),path)==0)
822 while ((i=path.
find(
'/',p))!=-1)
845 if (target->
parent()!=root)
885 if (!generateTreeView)
956 if (dirName.
left(l)!=path)
1000 dir->setDiskName(diskName);
1010 for (
const auto &fd : *fn)
1012 if (fd->getReference().isEmpty())
1019 if (dir && !fd->isDocumentationFile()) dir->
addFile(fd.get());
1055 [](
const auto &d1,
const auto &d2)
1057 QCString s1 = d1->shortName(), s2 = d2->shortName();
1061 QCString n1 = d1->name(), n2 = d2->name();
1072 dir->setDirCount(dirCount++);
1090 dir->computeDependencies();
1099 if (!dir->hasDocumentation())
1103 dir->writeDocumentation(ol);
1110 dr->writeDocumentation(ol);
1127 return static_cast<DirDef*
>(d);
1140 return static_cast<const DirDef*
>(d);
virtual QCString briefFile() const
void endDirDepGraph(DotDirDeps &g)
std::vector< std::string > StringVector
void disableAllBut(OutputGenerator::OutputType o)
virtual bool isReference() const
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
static QCString key(const FileDef *srcFd, const FileDef *dstFd)
virtual bool isParentOf(const DirDef *dir) const
void writeFileList(OutputList &ol)
void endGroupHeader(int extraLevels=0)
virtual CodeSymbolType codeSymbolType() const
@ NamespaceNestedNamespaces
virtual QCString trDirDepGraph(const QCString &name)=0
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
virtual bool hasSubdirs() const
Representation of an directory dependency graph
FilePairLinkedMap m_filePairs
The common base class of all entity definitions found in the sources.
static void writePartialDirPath(OutputList &ol, const DirDef *root, const DirDef *target)
void writeBriefDescription(OutputList &ol)
void docify(const QCString &s)
void addFileDep(const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Take up dependency between files.
virtual void writeDocAnchorsToTagFile(TextStream &fs) const
uint length() const
Returns the length of the string, not counting the 0-terminator.
static void writePartialFilePath(OutputList &ol, const DirDef *root, const FileDef *fd)
static QCString encodeDirName(const QCString &anchor)
void endMemberDescription()
virtual void addFile(const FileDef *fd)=0
int findRev(char c, int index=-1, bool cs=TRUE) const
A model of a directory symbol.
virtual QCString docFile() const
bool isEmpty() const
Returns TRUE iff the string is empty
virtual QCString getOutputFileBase() const
virtual const UsedDirLinkedMap & usedDirs() const
UsedDirLinkedMap m_usedDirs
virtual QCString anchor() const
void startMemberSections()
void writeString(const QCString &text)
virtual QCString trDirReference(const QCString &dirName)=0
void insertMemberAlign(bool templ=FALSE)
SrcLangExt
Language as given by extension
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
DirDefImpl(const QCString &path)
virtual SrcLangExt getLanguage() const
void err(const char *fmt,...)
virtual bool isLinkable() const =0
Text streaming class that buffers data.
virtual QCString name() const
static DirLinkedMap * dirLinkedMap
int find(char c, int index=0, bool cs=TRUE) const
virtual QCString pathFragment() const =0
virtual int briefLine() const
bool compareDirDefs(const DirDef *item1, const DirDef *item2)
void endFileWithNavPath(const Definition *d, OutputList &ol)
virtual bool hasBriefDescription() const
void writeDoc(DocRoot *root, const Definition *ctx, const MemberDef *md, int id=0)
UsedDir(const DirDef *dir)
virtual int level() const =0
Usage information of a directory.
virtual void writeNavigationPath(OutputList &ol) const =0
virtual void writeDocumentation(OutputList &ol)
DirIterator begin(DirIterator it) noexcept
@ NamespaceNestedConstantGroups
DirIterator end(const DirIterator &) noexcept
QCString getOutputFileBase() const
void writeDetailedDescription(OutputList &ol, const QCString &title)
static FileNameLinkedMap * inputNameLinkedMap
@ ClassCollaborationGraph
virtual QCString displayName(bool=TRUE) const
virtual QCString getOutputFileBase() const =0
Class representing a list of output generators that are written to in parallel.
QCString addHtmlExtensionIfMissing(const QCString &fName)
virtual const QCString shortName() const =0
virtual void setParent(DirDef *parent)
virtual QCString briefDescription(bool abbreviate=FALSE) const
void writeDirectoryGraph(OutputList &ol)
virtual void writeTagFile(TextStream &t)
void startMemberItem(const QCString &anchor, int i1, const QCString &id=QCString())
void disable(OutputGenerator::OutputType o)
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)=0
void startMemberHeader(const QCString &anchor, int typ=2)
QCString left(size_t len) const
virtual QCString name() const =0
void endMemberDeclarations(OutputList &ol)
virtual QCString trCode()=0
void writeAnchor(const QCString &fileName, const QCString &name)
virtual QCString trMore()=0
DirDef * createDirDef(const QCString &path)
virtual QCString trDirRelation(const QCString &name)=0
virtual bool isLinkable() const
int qstricmp(const char *str1, const char *str2)
Translator * theTranslator
DirDef * toDirDef(Definition *d)
static DirDef * createNewDir(const QCString &path)
DocRoot * 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)
virtual void setOuterScope(Definition *d)=0
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName)
virtual bool depGraphIsTrivial() const
virtual const DirList & subDirs() const
virtual bool isLinkableInProject() const
const T * find(const std::string &key) const
Find an object given the key.
static DirRelationLinkedMap dirRelations
void generateDirDocs(OutputList &ol)
const FilePairLinkedMap & filePairs() const
virtual void addSubDir(DirDef *subdir)=0
static DirDef * mergeDirectoryInTree(const QCString &path)
virtual int docLine() const
void startGroupHeader(int extraLevels=0)
void startTextLink(const QCString &file, const QCString &anchor)
virtual QCString shortTitle() const
Class representing a pair of FileDef objects
virtual QCString getReference() const =0
virtual QCString documentation() const
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
virtual QCString trIncludesFileIn(const QCString &name)=0
virtual DefType definitionType() const
virtual DirDef * parent() const
#define Config_getBool(name)
void startMemberDeclarations(OutputList &ol)
virtual QCString trFile(bool first_capital, bool singular)=0
static bool matchPath(const QCString &path, const StringVector &l)
void msg(const char *fmt,...)
const DirDef * dir() const
static LayoutDocManager & instance()
Returns a reference to this singleton.
void parseText(const QCString &textStr)
FilePair * findFilePair(const QCString &name)
const char * qPrint(const char *s)
virtual const QCString shortName() const
virtual void addFile(const FileDef *fd)
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)
virtual void computeDependencies()
Computes the dependencies between directories
void writeDocumentation(OutputList &ol)
virtual void setLevel()=0
void pushGeneratorState()
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
virtual QCString trFileIn(const QCString &name)=0
QCString convertToXML(const QCString &s, bool keepEntities)
A model of a file symbol.
virtual bool hasDetailedDescription() const
virtual int level() const
static void computeCommonDirPrefix()
In order to create stable, but unique directory names, we compute the common part of the path shared ...
static QCString stripFromPath(const QCString &path, const StringVector &l)
virtual void writeNavigationPath(OutputList &ol) const
virtual const FileList & getFiles() const
virtual void setDirCount(int count)
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
virtual QCString displayName(bool=TRUE) const =0
void startMemberDeclaration()
virtual void setParent(DirDef *parent)=0
virtual DirDef * getDirDef() const =0
virtual DirDef * parent() const =0
virtual QCString getOutputFileBase() const =0
A bunch of utility functions.
void enable(OutputGenerator::OutputType o)
virtual QCString trDir(bool first_capital, bool singular)=0
virtual void addSubDir(DirDef *subdir)
void writeSubDirList(OutputList &ol)
QCString right(size_t len) const
virtual int dirCount() const
void computeDirDependencies()
virtual void setDiskName(const QCString &name)
void startParagraph(const QCString &classDef=QCString())
QCString title(SrcLangExt lang) const
std::unique_ptr< IDocParser > createDocParser()
#define Config_getList(name)
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Add as "uses" dependency between this dir and dir, that was caused by a dependency on file fd.
This is an alternative implementation of QCString.