Doxygen
Loading...
Searching...
No Matches
DirDefImpl Class Reference
+ Inheritance diagram for DirDefImpl:
+ Collaboration diagram for DirDefImpl:

Public Member Functions

 DirDefImpl (const QCString &path)
 
 ~DirDefImpl () override
 
DefType definitionType () const override
 
CodeSymbolType codeSymbolType () const override
 
QCString getOutputFileBase () const override
 
QCString anchor () const override
 
bool isLinkableInProject () const override
 
bool isLinkable () const override
 
QCString displayName (bool=TRUE) const override
 
const QCString shortName () const override
 
void addSubDir (DirDef *subdir) override
 
const FileListgetFiles () const override
 
void addFile (FileDef *fd) override
 
const DirListsubDirs () const override
 
bool hasSubdirs () const override
 
int level () const override
 
DirDefparent () const override
 
int dirIndex () const override
 
const UsedDirLinkedMapusedDirs () const override
 
bool isParentOf (const DirDef *dir) const override
 
bool depGraphIsTrivial () const override
 
QCString shortTitle () const override
 
bool hasDetailedDescription () const override
 
void writeDocumentation (OutputList &ol) override
 
void writeTagFile (TextStream &t) override
 
void setDiskName (const QCString &name) override
 
void sort () override
 
void setParent (DirDef *parent) override
 
void setDirIndex (int index) override
 
void setLevel () 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 computeDependencies () override
 Computes the dependencies between directories.
 
bool hasDirectoryGraph () const override
 
void overrideDirectoryGraph (bool e) override
 
- Public Member Functions inherited from DefinitionMixin< DirDef >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
 
 DefinitionMixin (const DefinitionMixin &other)
 
 DefinitionMixin (DefinitionMixin &&)=delete
 
DefinitionMixinoperator= (const DefinitionMixin &other)
 
DefinitionMixinoperator= (DefinitionMixin &&)=delete
 
 ~DefinitionMixin () override=default
 
bool isAlias () const override
 
const QCStringname () const override
 
bool isAnonymous () const override
 
const QCStringlocalName () const override
 
QCString qualifiedName () const override
 
QCString symbolName () const override
 
QCString getSourceFileBase () const override
 
QCString getSourceAnchor () const override
 
QCString documentation () const override
 
int docLine () const override
 
QCString docFile () const override
 
QCString briefDescription (bool abbreviate=FALSE) const override
 
QCString briefDescriptionAsTooltip () const override
 
int briefLine () const override
 
QCString inbodyDocumentation () const override
 
QCString inbodyFile () const override
 
int inbodyLine () const override
 
QCString briefFile () const override
 
QCString getDefFileName () const override
 
QCString getDefFileExtension () const override
 
int getDefLine () const override
 
int getDefColumn () const override
 
bool hasDocumentation () const override
 
bool hasUserDocumentation () const override
 
bool isVisibleInProject () const override
 
bool isVisible () const override
 
bool isHidden () const override
 
bool isArtificial () const override
 
bool isExported () const override
 
QCString getReference () const override
 
bool isReference () const override
 
QCString externalReference (const QCString &relPath) const override
 
int getStartDefLine () const override
 
int getStartBodyLine () const override
 
int getEndBodyLine () const override
 
const FileDefgetBodyDef () const override
 
SrcLangExt getLanguage () const override
 
const GroupListpartOfGroups () const override
 
bool isLinkableViaGroup () const override
 
const RefItemVectorxrefListItems () const override
 
const DefinitionfindInnerCompound (const QCString &name) const override
 
DefinitiongetOuterScope () const override
 
const MemberVectorgetReferencesMembers () const override
 
const MemberVectorgetReferencedByMembers () const override
 
bool hasSections () const override
 
bool hasSources () const override
 
bool hasBriefDescription () const override
 
QCString id () const override
 
const SectionRefsgetSectionRefs () const override
 
void setName (const QCString &name) override
 
void setId (const QCString &name) override
 
void setDefFile (const QCString &df, int defLine, int defColumn) override
 
void setDocumentation (const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
 
void setBriefDescription (const QCString &brief, const QCString &briefFile, int briefLine) override
 
void setInbodyDocumentation (const QCString &doc, const QCString &docFile, int docLine) override
 
void setReference (const QCString &r) override
 
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
 
void setBodySegment (int defLine, int bls, int ble) override
 
void setBodyDef (const FileDef *fd) override
 
void addSourceReferencedBy (MemberDef *md, const QCString &sourceRefName) override
 
void addSourceReferences (MemberDef *md, const QCString &sourceRefName) override
 
void setRefItems (const RefItemVector &sli) override
 
void mergeRefItems (Definition *def) override
 
void mergeReferences (const Definition *other) override
 
void mergeReferencedBy (const Definition *other) override
 
void addInnerCompound (Definition *def) override
 
void setOuterScope (Definition *def) override
 
void setHidden (bool b) override
 
void setArtificial (bool b) override
 
void setExported (bool b) override
 
void setLanguage (SrcLangExt lang) override
 
void writeSourceDef (OutputList &ol) const override
 
void writeInlineCode (OutputList &ol, const QCString &scopeName) const override
 
bool hasSourceRefs () const override
 
bool hasSourceReffedBy () const override
 
void writeSourceRefs (OutputList &ol, const QCString &scopeName) const override
 
void writeSourceReffedBy (OutputList &ol, const QCString &scopeName) const override
 
void makePartOfGroup (GroupDef *gd) override
 
void writeNavigationPath (OutputList &ol) const override
 
QCString navigationPathAsString () const override
 
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
 
void writeSummaryLinks (OutputList &ol) const override
 
QCString pathFragment () const override
 
void writeDocAnchorsToTagFile (TextStream &fs) const override
 
void setLocalName (const QCString &name) override
 
void writeToc (OutputList &ol, const LocalToc &lt) const override
 
void computeTooltip () override
 
void _setSymbolName (const QCString &name) override
 
QCString _symbolName () const override
 
- Public Member Functions inherited from DirDef
- Public Member Functions inherited from DefinitionMutable
- Public Member Functions inherited from Definition

Static Public Member Functions

static DirDefmergeDirectoryInTree (const QCString &path)
 

Private Member Functions

void writeDetailedDescription (OutputList &ol, const QCString &title)
 
void writeBriefDescription (OutputList &ol)
 
void writeDirectoryGraph (OutputList &ol)
 
void writeSubDirList (OutputList &ol)
 
void writeFileList (OutputList &ol)
 
void startMemberDeclarations (OutputList &ol)
 
void endMemberDeclarations (OutputList &ol)
 

Static Private Member Functions

static DirDefcreateNewDir (const QCString &path)
 
static bool matchPath (const QCString &path, const StringVector &l)
 

Private Attributes

DirList m_subdirs
 
QCString m_dispName
 
QCString m_shortName
 
QCString m_diskName
 
FileList m_fileList
 
int m_dirIndex = -1
 
int m_level
 
DirDefm_parent
 
UsedDirLinkedMap m_usedDirs
 
bool m_hasDirectoryGraph = false
 

Additional Inherited Members

- Public Types inherited from Definition
enum  DefType {
  TypeClass = 0 , TypeFile = 1 , TypeNamespace = 2 , TypeModule = 3 ,
  TypeMember = 4 , TypeGroup = 5 , TypePackage = 6 , TypePage = 7 ,
  TypeDir = 8 , TypeConcept = 9
}
 

Detailed Description

Definition at line 37 of file dirdef.cpp.

Constructor & Destructor Documentation

◆ DirDefImpl()

DirDefImpl::DirDefImpl ( const QCString & path)

Definition at line 116 of file dirdef.cpp.

116 : DefinitionMixin(path,1,1,path)
117{
118 bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
119 // get display name (stripping the paths mentioned in STRIP_FROM_PATH)
120 // get short name (last part of path)
121 m_shortName = path;
122 m_diskName = path;
123 if (m_shortName.at(m_shortName.length()-1)=='/')
124 { // strip trailing /
125 m_shortName = m_shortName.left(m_shortName.length()-1);
126 }
127 int pi=m_shortName.findRev('/');
128 if (pi!=-1)
129 { // remove everything till the last /
130 m_shortName = m_shortName.mid(pi+1);
131 }
133 m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
134 if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)=='/')
135 { // strip trailing /
136 m_dispName = m_dispName.left(m_dispName.length()-1);
137 }
138
139 m_level=-1;
140 m_parent=nullptr;
141 m_hasDirectoryGraph=Config_getBool(DIRECTORY_GRAPH);
142
143}
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
DirDef * m_parent
Definition dirdef.cpp:102
QCString m_diskName
Definition dirdef.cpp:98
QCString m_shortName
Definition dirdef.cpp:97
QCString m_dispName
Definition dirdef.cpp:96
int m_level
Definition dirdef.cpp:101
bool m_hasDirectoryGraph
Definition dirdef.cpp:104
#define Config_getBool(name)
Definition config.h:33
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:309

References Config_getBool, DefinitionMixin< DirDef >::DefinitionMixin(), m_diskName, m_dispName, m_hasDirectoryGraph, m_level, m_parent, m_shortName, DefinitionMixin< DirDef >::setLocalName(), and stripFromPath().

◆ ~DirDefImpl()

DirDefImpl::~DirDefImpl ( )
override

Definition at line 145 of file dirdef.cpp.

146{
147}

Member Function Documentation

◆ addFile()

void DirDefImpl::addFile ( FileDef * fd)
overridevirtual

Implements DirDef.

Definition at line 176 of file dirdef.cpp.

177{
178 m_fileList.push_back(fd);
179 fd->setDirDef(this);
180}
FileList m_fileList
Definition dirdef.cpp:99
virtual void setDirDef(DirDef *dd)=0

References m_fileList, and FileDef::setDirDef().

◆ addSubDir()

void DirDefImpl::addSubDir ( DirDef * subdir)
overridevirtual

Implements DirDef.

Definition at line 159 of file dirdef.cpp.

160{
161 m_subdirs.push_back(subdir);
162 subdir->setOuterScope(this);
163 subdir->setParent(this);
164}
virtual void setOuterScope(Definition *d)=0
virtual void setParent(DirDef *parent)=0
DirList m_subdirs
Definition dirdef.cpp:95

References m_subdirs, DefinitionMutable::setOuterScope(), and DirDef::setParent().

◆ addUsesDependency()

void DirDefImpl::addUsesDependency ( const DirDef * dir,
const FileDef * srcFd,
const FileDef * dstFd,
bool srcDirect,
bool dstDirect )
overridevirtual

Add as "uses" dependency between this dir and dir, that was caused by a dependency on file fd.

srcDirect and dstDirect indicate if it is a direct dependencies (true) or if the dependencies was indirect (e.g. a parent dir that has a child dir that has the dependencies)

Implements DirDef.

Definition at line 683 of file dirdef.cpp.

685{
686 if (this==dir) return; // do not add self-dependencies
687 AUTO_TRACE("add dependency {}->{} due to {}->{}",
688 qPrint(shortName()),
689 qPrint(dir->shortName()),
690 qPrint(srcFd->name()),
691 qPrint(dstFd->name()));
692
693 // levels match => add direct dependency
694 bool added=FALSE;
695 UsedDir *usedDir = m_usedDirs.find(dir->getOutputFileBase());
696 if (usedDir) // dir dependency already present
697 {
698 const FilePair *usedPair = usedDir->findFilePair(FilePair::key(srcFd,dstFd));
699 if (usedPair==nullptr) // new file dependency
700 {
701 AUTO_TRACE_ADD("{} => {} new file dependency",srcFd->name(),dstFd->name());
702 usedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
703 added=TRUE;
704 }
705 else
706 {
707 // dir & file dependency already added
708 }
709 }
710 else // new directory dependency
711 {
712 AUTO_TRACE_ADD("{} => {} new file dependency",srcFd->name(),dstFd->name());
713 auto newUsedDir = std::make_unique<UsedDir>(dir);
714 newUsedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
715 m_usedDirs.add(dir->getOutputFileBase(),std::move(newUsedDir));
716 added=TRUE;
717 }
718 if (added)
719 {
720 if (dir->parent())
721 {
722 // add relation to parent of used dir
724 srcFd,
725 dstFd,
726 srcDirect,
727 false); // indirect dependency on dest dir
728 }
729 if (parent())
730 {
731 // add relation for the parent of this dir as well
733 srcFd,
734 dstFd,
735 false, // indirect dependency from source dir
736 dstDirect);
737 }
738 }
739}
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
virtual DirDef * parent() const =0
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)=0
virtual const QCString shortName() const =0
const QCString shortName() const override
Definition dirdef.cpp:51
DirDef * parent() const override
Definition dirdef.cpp:58
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.
Definition dirdef.cpp:683
UsedDirLinkedMap m_usedDirs
Definition dirdef.cpp:103
static QCString key(const FileDef *srcFd, const FileDef *dstFd)
Definition dirdef.cpp:883
void addFileDep(const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Take up dependency between files.
Definition dirdef.cpp:797
FilePair * findFilePair(const QCString &name)
Definition dirdef.cpp:818
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:47
#define AUTO_TRACE(...)
Definition docnode.cpp:46
const char * qPrint(const char *s)
Definition qcstring.h:672
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References UsedDir::addFileDep(), DirDef::addUsesDependency(), addUsesDependency(), AUTO_TRACE, AUTO_TRACE_ADD, FALSE, UsedDir::findFilePair(), Definition::getOutputFileBase(), FilePair::key(), m_usedDirs, Definition::name(), DirDef::parent(), parent(), qPrint(), DirDef::shortName(), shortName(), and TRUE.

Referenced by addUsesDependency(), and computeDependencies().

◆ anchor()

QCString DirDefImpl::anchor ( ) const
inlineoverridevirtual

Returns the anchor within a page where this item can be found

Implements Definition.

Definition at line 47 of file dirdef.cpp.

47{ return QCString(); }

◆ codeSymbolType()

CodeSymbolType DirDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 45 of file dirdef.cpp.

References Default.

◆ computeDependencies()

void DirDefImpl::computeDependencies ( )
overridevirtual

Computes the dependencies between directories.

Implements DirDef.

Definition at line 743 of file dirdef.cpp.

744{
745 AUTO_TRACE();
746 for (const auto &fd : m_fileList)
747 {
748 AUTO_TRACE_ADD("dir={} file={}",shortName(),fd->name());
749 for (const auto &ii : fd->includeFileList())
750 {
751 AUTO_TRACE_ADD("#include {}",ii.includeName);
752 if (ii.fileDef && ii.fileDef->isLinkable()) // linkable file
753 {
754 DirDef *usedDir = ii.fileDef->getDirDef();
755 if (usedDir)
756 {
757 // add dependency: thisDir->usedDir
758 AUTO_TRACE_ADD("add dependency {}->{}",name(),usedDir->name());
759 addUsesDependency(usedDir,fd,ii.fileDef,true,true);
760 }
761 }
762 }
763 }
764
765 std::stable_sort(m_usedDirs.begin(),m_usedDirs.end(),
766 [](const auto &u1,const auto &u2)
767 { return qstricmp_sort(u1->dir()->getOutputFileBase(),u2->dir()->getOutputFileBase())<0; });
768
769 for (const auto& usedDirectory : m_usedDirs)
770 {
771 usedDirectory->sort();
772 }
773}
const QCString & name() const override

References addUsesDependency(), AUTO_TRACE, AUTO_TRACE_ADD, m_fileList, m_usedDirs, Definition::name(), DefinitionMixin< DirDef >::name(), and shortName().

◆ createNewDir()

DirDef * DirDefImpl::createNewDir ( const QCString & path)
staticprivate

Definition at line 823 of file dirdef.cpp.

824{
825 AUTO_TRACE();
826 ASSERT(path!=nullptr);
827 DirDef *dir = Doxygen::dirLinkedMap->find(path);
828 if (dir==nullptr) // new dir
829 {
830 dir = Doxygen::dirLinkedMap->add(path,
831 std::unique_ptr<DirDef>(
832 createDirDef(path)));
833 AUTO_TRACE_ADD("Adding new dir {} shortName {}",path,dir->shortName());
834 }
835 return dir;
836}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
Definition linkedmap.h:90
const T * find(const std::string &key) const
Find an object given the key.
Definition linkedmap.h:47
DirDef * createDirDef(const QCString &path)
Definition dirdef.cpp:107
#define ASSERT(x)
Definition qcstring.h:39

References ASSERT, AUTO_TRACE, AUTO_TRACE_ADD, createDirDef(), Doxygen::dirLinkedMap, and DirDef::shortName().

Referenced by mergeDirectoryInTree().

◆ definitionType()

DefType DirDefImpl::definitionType ( ) const
inlineoverridevirtual

Use this for dynamic inspection of the type of the derived class

Implements Definition.

Definition at line 44 of file dirdef.cpp.

44{ return TypeDir; }

References definitionType(), and Definition::TypeDir.

Referenced by definitionType().

◆ depGraphIsTrivial()

bool DirDefImpl::depGraphIsTrivial ( ) const
overridevirtual

Implements DirDef.

Definition at line 785 of file dirdef.cpp.

786{
787 return m_usedDirs.empty() && m_parent==nullptr;
788}

References m_parent, and m_usedDirs.

◆ dirIndex()

int DirDefImpl::dirIndex ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 59 of file dirdef.cpp.

59{ return m_dirIndex; }
int m_dirIndex
Definition dirdef.cpp:100

References m_dirIndex.

◆ displayName()

QCString DirDefImpl::displayName ( bool includeScope = TRUE) const
inlineoverridevirtual

Returns the name of the definition as it appears in the output

Implements Definition.

Definition at line 50 of file dirdef.cpp.

50{ return m_dispName; }

References m_dispName, and TRUE.

Referenced by writeDirectoryGraph(), and writeTagFile().

◆ endMemberDeclarations()

void DirDefImpl::endMemberDeclarations ( OutputList & ol)
private

Definition at line 482 of file dirdef.cpp.

483{
485}
void endMemberSections()
Definition outputlist.h:464

References OutputList::endMemberSections().

Referenced by writeDocumentation().

◆ getFiles()

const FileList & DirDefImpl::getFiles ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 53 of file dirdef.cpp.

53{ return m_fileList; }

References m_fileList.

◆ getOutputFileBase()

QCString DirDefImpl::getOutputFileBase ( ) const
overridevirtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Implements Definition.

Definition at line 222 of file dirdef.cpp.

223{
224 QCString dir = "dir_"+encodeDirName(m_diskName);
225 AUTO_TRACE("diskName={} result={}",m_diskName,dir);
226 return dir;
227}
static QCString encodeDirName(const QCString &anchor)
Definition dirdef.cpp:188

References AUTO_TRACE, encodeDirName(), and m_diskName.

Referenced by writeDocumentation(), and writeTagFile().

◆ hasDetailedDescription()

bool DirDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements DirDef.

Definition at line 492 of file dirdef.cpp.

493{
494 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
495 return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
496}
QCString briefDescription(bool abbreviate=FALSE) const override
QCString documentation() const override
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150

References DefinitionMixin< DirDef >::briefDescription(), Config_getBool, DefinitionMixin< DirDef >::documentation(), and QCString::isEmpty().

◆ hasDirectoryGraph()

bool DirDefImpl::hasDirectoryGraph ( ) const
overridevirtual

Implements DirDef.

Definition at line 876 of file dirdef.cpp.

877{
878 return m_hasDirectoryGraph;
879}

References m_hasDirectoryGraph.

◆ hasSubdirs()

bool DirDefImpl::hasSubdirs ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 56 of file dirdef.cpp.

56{ return !m_subdirs.empty(); }

References m_subdirs.

◆ isLinkable()

bool DirDefImpl::isLinkable ( ) const
overridevirtual

Returns TRUE iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Implements Definition.

Definition at line 154 of file dirdef.cpp.

155{
156 return isReference() || isLinkableInProject();
157}
bool isReference() const override
bool isLinkableInProject() const override
Definition dirdef.cpp:149

References isLinkableInProject(), and DefinitionMixin< DirDef >::isReference().

◆ isLinkableInProject()

bool DirDefImpl::isLinkableInProject ( ) const
overridevirtual

Returns TRUE iff it is possible to link to this item within this project.

Implements Definition.

Definition at line 149 of file dirdef.cpp.

150{
151 return !isReference();
152}

References DefinitionMixin< DirDef >::isReference().

Referenced by isLinkable().

◆ isParentOf()

bool DirDefImpl::isParentOf ( const DirDef * dir) const
overridevirtual

Implements DirDef.

Definition at line 775 of file dirdef.cpp.

776{
777 if (dir->parent()==this) // this is a parent of dir
778 return TRUE;
779 else if (dir->parent()) // repeat for the parent of dir
780 return isParentOf(dir->parent());
781 else
782 return FALSE;
783}
bool isParentOf(const DirDef *dir) const override
Definition dirdef.cpp:775

References FALSE, isParentOf(), DirDef::parent(), and TRUE.

Referenced by isParentOf().

◆ level()

int DirDefImpl::level ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 57 of file dirdef.cpp.

57{ return m_level; }

References m_level.

◆ matchPath()

bool DirDefImpl::matchPath ( const QCString & path,
const StringVector & l )
staticprivate

Definition at line 838 of file dirdef.cpp.

839{
840 for (const auto &s : l)
841 {
842 std::string prefix = s.substr(0,path.length());
843 if (qstricmp_sort(prefix.c_str(),path)==0) // case insensitive compare
844 {
845 return TRUE;
846 }
847 }
848 return FALSE;
849}
constexpr auto prefix
Definition anchor.cpp:44
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86

References FALSE, QCString::length(), prefix, qstricmp_sort(), and TRUE.

Referenced by mergeDirectoryInTree().

◆ mergeDirectoryInTree()

DirDef * DirDefImpl::mergeDirectoryInTree ( const QCString & path)
static

strip part of path if it matches one of the paths in the Config_getList(STRIP_FROM_PATH) list

Definition at line 854 of file dirdef.cpp.

855{
856 AUTO_TRACE("path={}",path);
857 int p=0,i=0;
858 DirDef *dir=nullptr;
859 while ((i=path.find('/',p))!=-1)
860 {
861 QCString part=path.left(i+1);
862 if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//" && part!="//?/"))
863 {
865 }
866 p=i+1;
867 }
868 return dir;
869}
static DirDef * createNewDir(const QCString &path)
Definition dirdef.cpp:823
static bool matchPath(const QCString &path, const StringVector &l)
Definition dirdef.cpp:838
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
QCString left(size_t len) const
Definition qcstring.h:214
#define Config_getList(name)
Definition config.h:38
QCString removeLongPathMarker(QCString path)
Definition util.cpp:298

References AUTO_TRACE, Config_getList, createNewDir(), QCString::find(), QCString::left(), matchPath(), and removeLongPathMarker().

Referenced by buildDirectories().

◆ overrideDirectoryGraph()

void DirDefImpl::overrideDirectoryGraph ( bool e)
overridevirtual

Implements DirDef.

Definition at line 871 of file dirdef.cpp.

872{
874}

References m_hasDirectoryGraph.

◆ parent()

DirDef * DirDefImpl::parent ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 58 of file dirdef.cpp.

58{ return m_parent; }

References m_parent.

Referenced by addUsesDependency(), and setLevel().

◆ setDirIndex()

void DirDefImpl::setDirIndex ( int index)
overridevirtual

Implements DirDef.

Definition at line 171 of file dirdef.cpp.

172{
173 m_dirIndex=index;
174}

References m_dirIndex.

◆ setDiskName()

void DirDefImpl::setDiskName ( const QCString & name)
inlineoverridevirtual

Implements DirDef.

Definition at line 67 of file dirdef.cpp.

67{ m_diskName = name; }

References m_diskName, and DefinitionMixin< DirDef >::name().

◆ setLevel()

void DirDefImpl::setLevel ( )
overridevirtual

Implements DirDef.

Definition at line 661 of file dirdef.cpp.

662{
663 if (m_level==-1) // level not set before
664 {
665 DirDef *p = parent();
666 if (p)
667 {
668 p->setLevel();
669 m_level = p->level()+1;
670 }
671 else
672 {
673 m_level = 0;
674 }
675 }
676}
virtual int level() const =0
virtual void setLevel()=0

References DirDef::level(), m_level, parent(), and DirDef::setLevel().

◆ setParent()

void DirDefImpl::setParent ( DirDef * parent)
overridevirtual

Implements DirDef.

Definition at line 166 of file dirdef.cpp.

167{
168 m_parent=p;
169}

References m_parent.

◆ shortName()

const QCString DirDefImpl::shortName ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 51 of file dirdef.cpp.

51{ return m_shortName; }

References m_shortName.

Referenced by addUsesDependency(), computeDependencies(), and writeDirectoryGraph().

◆ shortTitle()

QCString DirDefImpl::shortTitle ( ) const
overridevirtual

Implements DirDef.

Definition at line 487 of file dirdef.cpp.

488{
490}
virtual QCString trDirReference(const QCString &dirName)=0
Translator * theTranslator
Definition language.cpp:71

References m_shortName, and theTranslator.

Referenced by writeDocumentation().

◆ sort()

void DirDefImpl::sort ( )
overridevirtual

Implements DirDef.

Definition at line 182 of file dirdef.cpp.

183{
184 std::stable_sort(m_subdirs.begin(), m_subdirs.end(), compareDirDefs);
185 std::stable_sort(m_fileList.begin(), m_fileList.end(), compareFileDefs);
186}
bool compareDirDefs(const DirDef *item1, const DirDef *item2)
Definition dirdef.cpp:1168
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition filedef.cpp:1887

References compareDirDefs(), compareFileDefs(), m_fileList, and m_subdirs.

◆ startMemberDeclarations()

void DirDefImpl::startMemberDeclarations ( OutputList & ol)
private

Definition at line 477 of file dirdef.cpp.

478{
480}
void startMemberSections()
Definition outputlist.h:462

References OutputList::startMemberSections().

Referenced by writeDocumentation().

◆ subDirs()

const DirList & DirDefImpl::subDirs ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 55 of file dirdef.cpp.

55{ return m_subdirs; }

References m_subdirs.

◆ usedDirs()

const UsedDirLinkedMap & DirDefImpl::usedDirs ( ) const
inlineoverridevirtual

Implements DirDef.

Definition at line 60 of file dirdef.cpp.

60{ return m_usedDirs; }

References m_usedDirs.

◆ writeBriefDescription()

void DirDefImpl::writeBriefDescription ( OutputList & ol)
private

Definition at line 276 of file dirdef.cpp.

277{
278 AUTO_TRACE();
280 {
281 auto parser { createDocParser() };
282 auto ast { validatingParseDoc(
283 *parser.get(), briefFile(),briefLine(),this,nullptr,briefDescription(),TRUE,FALSE,
284 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
285 if (!ast->isEmpty())
286 {
287 ol.startParagraph();
290 ol.writeString(" - ");
292 ol.writeDoc(ast.get(),this,nullptr);
295 ol.writeString(" \n");
297
298 if (Config_getBool(REPEAT_BRIEF) ||
299 !documentation().isEmpty()
300 )
301 {
303 ol.startTextLink(QCString(),"details");
305 ol.endTextLink();
306 }
308
309 ol.endParagraph();
310 }
311 }
312 ol.writeSynopsis();
313}
virtual QCString briefFile() const =0
bool hasBriefDescription() const override
int briefLine() const override
void writeString(const QCString &text)
Definition outputlist.h:412
void disable(OutputType o)
void enable(OutputType o)
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endParagraph()
Definition outputlist.h:410
void endTextLink()
Definition outputlist.h:445
void writeSynopsis()
Definition outputlist.h:593
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void parseText(const QCString &textStr)
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
virtual QCString trMore()=0
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:54
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)

References AUTO_TRACE, DefinitionMixin< DirDef >::briefDescription(), DefinitionMixin< DirDef >::briefFile(), DefinitionMixin< DirDef >::briefLine(), Config_getBool, createDocParser(), OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< DirDef >::documentation(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTextLink(), FALSE, DefinitionMixin< DirDef >::hasBriefDescription(), Html, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startParagraph(), OutputList::startTextLink(), theTranslator, TRUE, validatingParseDoc(), OutputList::writeDoc(), OutputList::writeString(), and OutputList::writeSynopsis().

Referenced by writeDocumentation().

◆ writeDetailedDescription()

void DirDefImpl::writeDetailedDescription ( OutputList & ol,
const QCString & title )
private

Definition at line 229 of file dirdef.cpp.

230{
231 AUTO_TRACE();
232 if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) ||
233 !documentation().isEmpty())
234 {
237 ol.writeRuler();
241 ol.writeAnchor(QCString(),"details");
243 ol.startGroupHeader();
244 ol.parseText(title);
245 ol.endGroupHeader();
246
247 // repeat brief description
248 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
249 {
251 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
252 }
253 // separator between brief and details
254 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
255 !documentation().isEmpty())
256 {
260 ol.enableAll();
263 ol.writeString("\n\n");
265 }
266
267 // write documentation
268 if (!documentation().isEmpty())
269 {
270 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
271 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
272 }
273 }
274}
QCString docFile() const override
QCString briefFile() const override
int docLine() const override
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void writeRuler()
Definition outputlist.h:522
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 writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
void enableAll()

References AUTO_TRACE, DefinitionMixin< DirDef >::briefDescription(), DefinitionMixin< DirDef >::briefFile(), DefinitionMixin< DirDef >::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< DirDef >::docFile(), DefinitionMixin< DirDef >::docLine(), DefinitionMixin< DirDef >::documentation(), OutputList::enable(), OutputList::enableAll(), OutputList::endGroupHeader(), FALSE, OutputList::generateDoc(), Html, Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startGroupHeader(), TRUE, OutputList::writeAnchor(), OutputList::writeRuler(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeDirectoryGraph()

void DirDefImpl::writeDirectoryGraph ( OutputList & ol)
private

Definition at line 315 of file dirdef.cpp.

316{
317 // write graph dependency graph
318 if (Config_getBool(HAVE_DOT) && m_hasDirectoryGraph /*&& Config_getBool(DIRECTORY_GRAPH)*/)
319 {
320 DotDirDeps dirDep(this);
321 if (!dirDep.isTrivial())
322 {
323 msg("Generating dependency graph for directory %s\n",qPrint(displayName()));
325 //ol.startParagraph();
326 ol.startDirDepGraph();
328 ol.endDirDepGraph(dirDep);
329 //ol.endParagraph();
330 ol.enableAll();
331 }
332 }
333}
QCString displayName(bool=TRUE) const override
Definition dirdef.cpp:50
void endDirDepGraph(DotDirDeps &g)
Definition outputlist.h:661
void startDirDepGraph()
Definition outputlist.h:659
virtual QCString trDirDepGraph(const QCString &name)=0
void msg(const char *fmt,...)
Definition message.cpp:98

References Config_getBool, OutputList::disable(), displayName(), OutputList::enableAll(), OutputList::endDirDepGraph(), DotDirDeps::isTrivial(), m_hasDirectoryGraph, Man, msg(), OutputList::parseText(), qPrint(), shortName(), OutputList::startDirDepGraph(), and theTranslator.

Referenced by writeDocumentation().

◆ writeDocumentation()

void DirDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements DirDef.

Definition at line 537 of file dirdef.cpp.

538{
539 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
541
542 QCString title=theTranslator->trDirReference(m_dispName);
543 AUTO_TRACE("title={}",title);
544 startFile(ol,getOutputFileBase(),name(),title,HighlightedItem::Files,!generateTreeView);
545
546 if (!generateTreeView)
547 {
548 // write navigation path
550 ol.endQuickIndices();
551 }
552
556 ol.parseText(shortTitle());
557 ol.enableAll();
559 ol.parseText(title);
561 endTitle(ol,getOutputFileBase(),title);
562 ol.startContents();
563
564 //---------------------------------------- start flexible part -------------------------------
565
566 SrcLangExt lang = getLanguage();
567 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Directory))
568 {
569 switch (lde->kind())
570 {
571 case LayoutDocEntry::BriefDesc:
573 break;
574 case LayoutDocEntry::DirGraph:
576 break;
577 case LayoutDocEntry::MemberDeclStart:
579 break;
580 case LayoutDocEntry::DirSubDirs:
581 writeSubDirList(ol);
582 break;
583 case LayoutDocEntry::DirFiles:
584 writeFileList(ol);
585 break;
586 case LayoutDocEntry::MemberDeclEnd:
588 break;
589 case LayoutDocEntry::DetailedDesc:
590 {
591 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
592 if (ls)
593 {
594 writeDetailedDescription(ol,ls->title(lang));
595 }
596 }
597 break;
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()));
648 break;
649 }
650 }
651
652 //---------------------------------------- end flexible part -------------------------------
653
654 ol.endContents();
655
656 endFileWithNavPath(ol,this);
657
659}
void writeNavigationPath(OutputList &ol) const override
SrcLangExt getLanguage() const override
void writeSubDirList(OutputList &ol)
Definition dirdef.cpp:335
void startMemberDeclarations(OutputList &ol)
Definition dirdef.cpp:477
void writeDetailedDescription(OutputList &ol, const QCString &title)
Definition dirdef.cpp:229
QCString getOutputFileBase() const override
Definition dirdef.cpp:222
void writeDirectoryGraph(OutputList &ol)
Definition dirdef.cpp:315
void writeFileList(OutputList &ol)
Definition dirdef.cpp:394
QCString shortTitle() const override
Definition dirdef.cpp:487
void endMemberDeclarations(OutputList &ol)
Definition dirdef.cpp:482
void writeBriefDescription(OutputList &ol)
Definition dirdef.cpp:276
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1423
void endContents()
Definition outputlist.h:619
void endQuickIndices()
Definition outputlist.h:605
void startContents()
Definition outputlist.h:617
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:395
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
#define err(fmt,...)
Definition message.h:84
QCString title(SrcLangExt lang) const
Definition layout.cpp:1526
SrcLangExt
Language as given by extension.
Definition types.h:42

References AUTO_TRACE, Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::enableAll(), OutputList::endContents(), endFileWithNavPath(), endMemberDeclarations(), OutputList::endQuickIndices(), endTitle(), err, Files, DefinitionMixin< DirDef >::getLanguage(), getOutputFileBase(), Html, LayoutDocManager::instance(), m_dispName, DefinitionMixin< DirDef >::name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), qPrint(), shortTitle(), OutputList::startContents(), startFile(), startMemberDeclarations(), startTitle(), theTranslator, LayoutDocEntrySection::title(), writeBriefDescription(), writeDetailedDescription(), writeDirectoryGraph(), writeFileList(), DefinitionMixin< DirDef >::writeNavigationPath(), and writeSubDirList().

◆ writeFileList()

void DirDefImpl::writeFileList ( OutputList & ol)
private

Definition at line 394 of file dirdef.cpp.

395{
396 AUTO_TRACE();
397 int numFiles = 0;
398 for (const auto &fd : m_fileList)
399 {
400 bool genSourceFile=false;
401 if (fileVisibleInIndex(fd,genSourceFile))
402 {
403 numFiles++;
404 }
405 else if (genSourceFile)
406 {
407 numFiles++;
408 }
409 }
410
411 AUTO_TRACE_ADD("numFiles={}",numFiles);
412 // write file list
413 if (numFiles>0)
414 {
415 ol.startMemberHeader("files");
417 ol.endMemberHeader();
418 ol.startMemberList();
419 for (const auto &fd : m_fileList)
420 {
421 bool src = false;
422 bool doc = fileVisibleInIndex(fd,src);
423 if (doc || src)
424 {
427 {
430 bool genSrc = fd->generateSourceFile();
431 if (genSrc)
432 {
433 ol.startTextLink(fd->includeName(),QCString());
434 }
435 ol.writeString("<span class=\"icondoc\"></span>");
436 if (genSrc)
437 {
438 ol.endTextLink();
439 }
440 ol.enableAll();
444 }
446 if (fd->isLinkable())
447 {
448 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->displayName());
449 }
450 else
451 {
452 ol.startBold();
453 ol.docify(fd->displayName());
454 ol.endBold();
455 }
457 if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
458 {
459 ol.startMemberDescription(fd->getOutputFileBase());
460 ol.generateDoc(briefFile(),briefLine(),fd,nullptr,fd->briefDescription(),
461 FALSE, // indexWords
462 FALSE, // isExample
463 QCString(), // exampleName
464 TRUE, // single line
465 TRUE, // link from index
466 Config_getBool(MARKDOWN_SUPPORT)
467 );
469 }
470 ol.endMemberDeclaration(fd->anchor(),QCString());
471 }
472 }
473 ol.endMemberList();
474 }
475}
void startMemberDeclaration()
Definition outputlist.h:570
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void docify(const QCString &s)
Definition outputlist.h:438
void startMemberList()
Definition outputlist.h:482
void startBold()
Definition outputlist.h:562
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void endMemberList()
Definition outputlist.h:484
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void endBold()
Definition outputlist.h:564
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572
void endMemberHeader()
Definition outputlist.h:472
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
virtual QCString trFile(bool first_capital, bool singular)=0
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6417

References AUTO_TRACE, AUTO_TRACE_ADD, DefinitionMixin< DirDef >::briefFile(), DefinitionMixin< DirDef >::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enableAll(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), OutputList::endTextLink(), FALSE, fileVisibleInIndex(), OutputList::generateDoc(), Html, OutputList::insertMemberAlign(), m_fileList, OutputGenerator::Normal, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startBold(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), OutputList::startTextLink(), theTranslator, TRUE, OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeSubDirList()

void DirDefImpl::writeSubDirList ( OutputList & ol)
private

Definition at line 335 of file dirdef.cpp.

336{
337 AUTO_TRACE();
338 int numSubdirs = 0;
339 for(const auto dd : m_subdirs)
340 {
341 if (dd->hasDocumentation() || !dd->getFiles().empty())
342 {
343 numSubdirs++;
344 }
345 }
346
347 AUTO_TRACE_ADD("numSubdirs={}",numSubdirs);
348 // write subdir list
349 if (numSubdirs>0)
350 {
351 ol.startMemberHeader("subdirs");
353 ol.endMemberHeader();
354 ol.startMemberList();
355 for(const auto dd : m_subdirs)
356 {
357 if (dd->hasDocumentation() || !dd->getFiles().empty())
358 {
361 {
364 ol.writeString("<span class=\"iconfclosed\"></span>");
365 ol.enableAll();
369 }
371 ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
373 if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
374 {
375 ol.startMemberDescription(dd->getOutputFileBase());
376 ol.generateDoc(briefFile(),briefLine(),dd,nullptr,dd->briefDescription(),
377 FALSE, // indexWords
378 FALSE, // isExample
379 QCString(), // exampleName
380 TRUE, // single line
381 TRUE, // link from index
382 Config_getBool(MARKDOWN_SUPPORT)
383 );
385 }
386 ol.endMemberDeclaration(dd->anchor(),QCString());
387 }
388 }
389
390 ol.endMemberList();
391 }
392}
virtual QCString trDir(bool first_capital, bool singular)=0

References AUTO_TRACE, AUTO_TRACE_ADD, DefinitionMixin< DirDef >::briefFile(), DefinitionMixin< DirDef >::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::enableAll(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), FALSE, OutputList::generateDoc(), Html, OutputList::insertMemberAlign(), m_subdirs, OutputGenerator::Normal, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), theTranslator, TRUE, OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeTagFile()

void DirDefImpl::writeTagFile ( TextStream & t)
overridevirtual

Implements DirDef.

Definition at line 498 of file dirdef.cpp.

499{
500 tagFile << " <compound kind=\"dir\">\n";
501 tagFile << " <name>" << convertToXML(displayName()) << "</name>\n";
502 tagFile << " <path>" << convertToXML(stripFromPath(name())) << "</path>\n";
503 QCString fn=getOutputFileBase();
505 tagFile << " <filename>" << fn << "</filename>\n";
506 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Directory))
507 {
508 switch (lde->kind())
509 {
510 case LayoutDocEntry::DirSubDirs:
511 {
512 if (m_subdirs.size()>0)
513 {
514 for(const auto dd : m_subdirs)
515 {
516 tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>\n";
517 }
518 }
519 }
520 break;
521 case LayoutDocEntry::DirFiles:
522 {
523 for (const auto &fd : m_fileList)
524 {
525 tagFile << " <file>" << convertToXML(fd->name()) << "</file>\n";
526 }
527 }
528 break;
529 default:
530 break;
531 }
532 }
534 tagFile << " </compound>\n";
535}
void writeDocAnchorsToTagFile(TextStream &fs) const override
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243

References addHtmlExtensionIfMissing(), convertToXML(), displayName(), getOutputFileBase(), LayoutDocManager::instance(), m_fileList, m_subdirs, DefinitionMixin< DirDef >::name(), stripFromPath(), and DefinitionMixin< DirDef >::writeDocAnchorsToTagFile().

Member Data Documentation

◆ m_dirIndex

int DirDefImpl::m_dirIndex = -1
private

Definition at line 100 of file dirdef.cpp.

Referenced by dirIndex(), and setDirIndex().

◆ m_diskName

QCString DirDefImpl::m_diskName
private

Definition at line 98 of file dirdef.cpp.

Referenced by DirDefImpl(), getOutputFileBase(), and setDiskName().

◆ m_dispName

QCString DirDefImpl::m_dispName
private

Definition at line 96 of file dirdef.cpp.

Referenced by DirDefImpl(), displayName(), and writeDocumentation().

◆ m_fileList

FileList DirDefImpl::m_fileList
private

Definition at line 99 of file dirdef.cpp.

Referenced by addFile(), computeDependencies(), getFiles(), sort(), writeFileList(), and writeTagFile().

◆ m_hasDirectoryGraph

bool DirDefImpl::m_hasDirectoryGraph = false
private

◆ m_level

int DirDefImpl::m_level
private

Definition at line 101 of file dirdef.cpp.

Referenced by DirDefImpl(), level(), and setLevel().

◆ m_parent

DirDef* DirDefImpl::m_parent
private

Definition at line 102 of file dirdef.cpp.

Referenced by depGraphIsTrivial(), DirDefImpl(), parent(), and setParent().

◆ m_shortName

QCString DirDefImpl::m_shortName
private

Definition at line 97 of file dirdef.cpp.

Referenced by DirDefImpl(), shortName(), and shortTitle().

◆ m_subdirs

DirList DirDefImpl::m_subdirs
private

Definition at line 95 of file dirdef.cpp.

Referenced by addSubDir(), hasSubdirs(), sort(), subDirs(), writeSubDirList(), and writeTagFile().

◆ m_usedDirs

UsedDirLinkedMap DirDefImpl::m_usedDirs
private

Definition at line 103 of file dirdef.cpp.

Referenced by addUsesDependency(), computeDependencies(), depGraphIsTrivial(), and usedDirs().


The documentation for this class was generated from the following file: