My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
DirDef Class Reference

#include <dirdef.h>

Inheritance diagram for DirDef:
Definition DefinitionIntf

Public Member Functions

 DirDef (const char *path)
 
virtual ~DirDef ()
 
DefType definitionType () const
 
QCString getOutputFileBase () const
 
QCString anchor () const
 
bool isLinkableInProject () const
 
bool isLinkable () const
 
QCString displayName (bool=TRUE) const
 
const QCString & shortName () const
 
void addSubDir (DirDef *subdir)
 
FileListgetFiles () const
 
void addFile (FileDef *fd)
 
const DirListsubDirs () const
 
bool isCluster () const
 
int level () const
 
DirDefparent () const
 
int dirCount () const
 
const QDict< UsedDir > * usedDirs () const
 
bool isParentOf (DirDef *dir) const
 
bool depGraphIsTrivial () const
 
QCString shortTitle () const
 
bool hasDetailedDescription () const
 
void writeDocumentation (OutputList &ol)
 
void writeTagFile (FTextStream &t)
 
void setDiskName (const QCString &name)
 
void sort ()
 
- Public Member Functions inherited from Definition
 Definition (const char *defFileName, int defLine, int defColumn, const char *name, const char *b=0, const char *d=0, bool isSymbol=TRUE)
 
virtual ~Definition ()
 
const QCString & name () const
 
QCString localName () const
 
virtual QCString qualifiedName () const
 
QCString symbolName () const
 
virtual QCString getSourceFileBase () const
 
virtual QCString getSourceAnchor () const
 
virtual QCString documentation () const
 
int docLine () const
 
QCString docFile () const
 
virtual QCString briefDescription (bool abbreviate=FALSE) const
 
QCString briefDescriptionAsTooltip () const
 
int briefLine () const
 
QCString inbodyDocumentation () const
 
QCString inbodyFile () const
 
int inbodyLine () const
 
QCString briefFile () const
 
QCString getDefFileName () const
 
QCString getDefFileExtension () const
 
int getDefLine () const
 
int getDefColumn () const
 
virtual bool hasDocumentation () const
 
virtual bool hasUserDocumentation () const
 
virtual bool isVisibleInProject () const
 
virtual bool isVisible () const
 
bool isHidden () const
 
bool isArtificial () const
 
virtual QCString getReference () const
 
virtual bool isReference () const
 
QCString externalReference (const QCString &relPath) const
 
int getStartBodyLine () const
 
int getEndBodyLine () const
 
FileDefgetBodyDef () const
 
SrcLangExt getLanguage () const
 
GroupListpartOfGroups () const
 
bool isLinkableViaGroup () const
 
QList< ListItemInfo > * xrefListItems () const
 
virtual DefinitionfindInnerCompound (const char *name)
 
virtual DefinitiongetOuterScope () const
 
MemberSDictgetReferencesMembers () const
 
MemberSDictgetReferencedByMembers () const
 
bool hasSections () const
 
bool hasSources () const
 
bool hasBriefDescription () const
 
QCString id () const
 
virtual void setName (const char *name)
 
void setId (const char *name)
 
virtual void setDocumentation (const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
 
virtual void setBriefDescription (const char *b, const char *briefFile, int briefLine)
 
virtual void setInbodyDocumentation (const char *d, const char *docFile, int docLine)
 
void setReference (const char *r)
 
void addSectionsToDefinition (QList< SectionInfo > *anchorList)
 
void setBodySegment (int bls, int ble)
 
void setBodyDef (FileDef *fd)
 
void addSourceReferencedBy (MemberDef *d)
 
void addSourceReferences (MemberDef *d)
 
void setRefItems (const QList< ListItemInfo > *sli)
 
void mergeRefItems (Definition *d)
 
virtual void addInnerCompound (Definition *d)
 
virtual void setOuterScope (Definition *d)
 
virtual void setHidden (bool b)
 
void setArtificial (bool b)
 
void setLanguage (SrcLangExt lang)
 
void writeSourceDef (OutputList &ol, const char *scopeName)
 
void writeInlineCode (OutputList &ol, const char *scopeName)
 
void writeSourceRefs (OutputList &ol, const char *scopeName)
 
void writeSourceReffedBy (OutputList &ol, const char *scopeName)
 
void makePartOfGroup (GroupDef *gd)
 
void writeNavigationPath (OutputList &ol) const
 
QCString navigationPathAsString () const
 
virtual void writeQuickMemberLinks (OutputList &, MemberDef *) const
 
virtual void writeSummaryLinks (OutputList &)
 
QCString pathFragment () const
 
void writeDocAnchorsToTagFile (FTextStream &)
 
void setLocalName (const QCString name)
 
void addSectionsToIndex ()
 
void writeToc (OutputList &ol)
 
void setCookie (Cookie *cookie)
 
Cookiecookie () const
 
- Public Member Functions inherited from DefinitionIntf
 DefinitionIntf ()
 
virtual ~DefinitionIntf ()
 

Static Public Member Functions

static DirDefmergeDirectoryInTree (const QCString &path)
 

Public Attributes

bool visited
 

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)
 
void setLevel ()
 
void addUsesDependency (DirDef *usedDir, FileDef *srcFd, FileDef *dstFd, bool inherited)
 
void computeDependencies ()
 

Static Private Member Functions

static DirDefcreateNewDir (const char *path)
 
static bool matchPath (const QCString &path, QStrList &l)
 

Private Attributes

DirList m_subdirs
 
QCString m_dispName
 
QCString m_shortName
 
QCString m_diskName
 
FileListm_fileList
 
int m_dirCount
 
int m_level
 
DirDefm_parent
 
QDict< UsedDir > * m_usedDirs
 

Friends

void computeDirDependencies ()
 

Additional Inherited Members

- Public Types inherited from DefinitionIntf
enum  DefType {
  TypeClass = 0, TypeFile = 1, TypeNamespace = 2, TypeMember = 3,
  TypeGroup = 4, TypePackage = 5, TypePage = 6, TypeDir = 7,
  TypeSymbolList = 8
}
 
- Protected Member Functions inherited from Definition
 Definition (const Definition &d)
 

Detailed Description

A model of a directory symbol.

Definition at line 44 of file dirdef.h.

Constructor & Destructor Documentation

DirDef::DirDef ( const char *  path)

Definition at line 21 of file dirdef.cpp.

References Config_getBool, g_dirCount, m_dirCount, m_diskName, m_dispName, m_fileList, m_level, m_parent, m_shortName, m_usedDirs, Definition::setLocalName(), and stripFromPath().

Referenced by createNewDir().

: Definition(path,1,1,path), visited(FALSE)
{
bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
// get display name (stipping the paths mentioned in STRIP_FROM_PATH)
// get short name (last part of path)
m_shortName = path;
m_diskName = path;
if (m_shortName.at(m_shortName.length()-1)=='/')
{ // strip trailing /
m_shortName = m_shortName.left(m_shortName.length()-1);
}
int pi=m_shortName.findRev('/');
if (pi!=-1)
{ // remove everything till the last /
m_shortName = m_shortName.mid(pi+1);
}
m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)=='/')
{ // strip trailing /
m_dispName = m_dispName.left(m_dispName.length()-1);
}
m_usedDirs = new QDict<UsedDir>(257);
m_usedDirs->setAutoDelete(TRUE);
m_level=-1;
}
DirDef::~DirDef ( )
virtual

Definition at line 52 of file dirdef.cpp.

References m_fileList, and m_usedDirs.

{
delete m_fileList;
delete m_usedDirs;
}

Member Function Documentation

void DirDef::addFile ( FileDef fd)

Definition at line 75 of file dirdef.cpp.

References m_fileList, and FileDef::setDirDef().

Referenced by buildDirectories().

{
m_fileList->append(fd);
fd->setDirDef(this);
}
void DirDef::addSubDir ( DirDef subdir)

Definition at line 68 of file dirdef.cpp.

References m_parent, m_subdirs, and Definition::setOuterScope().

Referenced by buildDirectories().

{
m_subdirs.append(subdir);
subdir->setOuterScope(this);
subdir->m_parent=this;
}
void DirDef::addUsesDependency ( DirDef dir,
FileDef srcFd,
FileDef dstFd,
bool  inherited 
)
private

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

Definition at line 542 of file dirdef.cpp.

References UsedDir::addFileDep(), addUsesDependency(), UsedDir::findFilePair(), getOutputFileBase(), FileDef::getOutputFileBase(), m_usedDirs, and parent().

Referenced by addUsesDependency(), and computeDependencies().

{
if (this==dir) return; // do not add self-dependencies
//static int count=0;
//printf(" %d add dependency %s->%s due to %s->%s\n",
// count++,shortName().data(),
// dir->shortName().data(),
// srcFd->name().data(),
// dstFd->name().data());
// levels match => add direct dependency
bool added=FALSE;
UsedDir *usedDir = m_usedDirs->find(dir->getOutputFileBase());
if (usedDir) // dir dependency already present
{
FilePair *usedPair = usedDir->findFilePair(
if (usedPair==0) // new file dependency
{
//printf(" => new file\n");
usedDir->addFileDep(srcFd,dstFd);
added=TRUE;
}
else
{
// dir & file dependency already added
}
}
else // new directory dependency
{
//printf(" => new file\n");
usedDir = new UsedDir(dir,inherited);
usedDir->addFileDep(srcFd,dstFd);
m_usedDirs->insert(dir->getOutputFileBase(),usedDir);
added=TRUE;
}
if (added)
{
if (dir->parent())
{
// add relation to parent of used dir
addUsesDependency(dir->parent(),srcFd,dstFd,inherited);
}
if (parent())
{
// add relation for the parent of this dir as well
parent()->addUsesDependency(dir,srcFd,dstFd,TRUE);
}
}
}
QCString DirDef::anchor ( ) const
inlinevirtual

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

Implements Definition.

Definition at line 53 of file dirdef.h.

{ return QCString(); }
void DirDef::computeDependencies ( )
private

Computes the dependencies between directories

Definition at line 596 of file dirdef.cpp.

References addUsesDependency(), IncludeInfo::fileDef, FileDef::getDirDef(), FileDef::includeFileList(), FileDef::isLinkable(), m_fileList, m_usedDirs, and UsedDir::sort().

Referenced by computeDirDependencies().

{
if (fl)
{
QListIterator<FileDef> fli(*fl);
FileDef *fd;
for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd
{
//printf(" File %s\n",fd->name().data());
//printf("** dir=%s file=%s\n",shortName().data(),fd->name().data());
QList<IncludeInfo> *ifl = fd->includeFileList();
if (ifl)
{
QListIterator<IncludeInfo> ifli(*ifl);
for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file
{
//printf(" > %s\n",ii->includeName.data());
//printf(" #include %s\n",ii->includeName.data());
if (ii->fileDef && ii->fileDef->isLinkable()) // linkable file
{
DirDef *usedDir = ii->fileDef->getDirDef();
if (usedDir)
{
// add dependency: thisDir->usedDir
//static int count=0;
//printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data());
addUsesDependency(usedDir,fd,ii->fileDef,FALSE);
}
}
}
}
}
}
{
QDictIterator<UsedDir> udi(*m_usedDirs);
UsedDir *udir;
for (udi.toFirst();(udir=udi.current());++udi)
{
udir->sort();
}
}
}
DirDef * DirDef::createNewDir ( const char *  path)
staticprivate

Definition at line 697 of file dirdef.cpp.

References SDict< T >::append(), DirDef(), Doxygen::directories, and SDict< T >::find().

Referenced by mergeDirectoryInTree().

{
ASSERT(path!=0);
if (dir==0) // new dir
{
//printf("Adding new dir %s\n",path);
dir = new DirDef(path);
//printf("createNewDir %s short=%s\n",path,dir->shortName().data());
}
return dir;
}
DefType DirDef::definitionType ( ) const
inlinevirtual

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

Implements DefinitionIntf.

Definition at line 51 of file dirdef.h.

References DefinitionIntf::TypeDir.

{ return TypeDir; }
bool DirDef::depGraphIsTrivial ( ) const

Definition at line 652 of file dirdef.cpp.

References m_usedDirs.

Referenced by DotDirDeps::isTrivial().

{
return m_usedDirs->count()==0;
}
int DirDef::dirCount ( ) const
inline

Definition at line 65 of file dirdef.h.

References m_dirCount.

Referenced by writeDotDirDepGraph().

{ return m_dirCount; }
QCString DirDef::displayName ( bool  includeScope = TRUE) const
inlinevirtual

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

Implements Definition.

Definition at line 56 of file dirdef.h.

References m_dispName.

Referenced by addListReferences(), generateDocbookForDir(), generateXMLForDir(), writeDirectoryGraph(), DirRelation::writeDocumentation(), writeDotDirDepGraph(), DotDirDeps::writeGraph(), writeInnerDirs(), GroupDef::writeTagFile(), and writeTagFile().

{ return m_dispName; }
void DirDef::endMemberDeclarations ( OutputList ol)
private

Definition at line 351 of file dirdef.cpp.

References OutputList::endMemberSections().

Referenced by writeDocumentation().

FileList* DirDef::getFiles ( ) const
inline
QCString DirDef::getOutputFileBase ( ) const
virtual

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

Implements Definition.

Definition at line 119 of file dirdef.cpp.

References encodeDirName(), and m_diskName.

Referenced by addListReferences(), addUsesDependency(), DirContext::Private::dirGraph(), RTFGenerator::endIndexSection(), LatexGenerator::endIndexSection(), generateDocbookForDir(), generateXMLForDir(), GroupDef::writeDirs(), writeDirTreeNode(), writeDocumentation(), DirRelation::writeDocumentation(), writeDotDirDepGraph(), DotDirDeps::writeGraph(), writeInnerDirs(), writePartialDirPath(), writeSubDirList(), and writeTagFile().

{
//printf("DirDef::getOutputFileBase() %s->dir_%s\n",
// m_diskName.data(),encodeDirName(m_diskName).data());
return "dir_"+encodeDirName(m_diskName);
}
bool DirDef::hasDetailedDescription ( ) const

Definition at line 361 of file dirdef.cpp.

References Definition::briefDescription(), Config_getBool, and Definition::documentation().

Referenced by DirContext::Private::hasDetails().

{
static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
bool DirDef::isCluster ( ) const
inline

Definition at line 62 of file dirdef.h.

References m_subdirs.

Referenced by writeDotDirDepGraph().

{ return m_subdirs.count()>0; }
bool DirDef::isLinkable ( ) const
virtual

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 63 of file dirdef.cpp.

References isLinkableInProject(), and Definition::isReference().

Referenced by resolveLink().

{
}
bool DirDef::isLinkableInProject ( ) const
virtual

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

Implements Definition.

Definition at line 58 of file dirdef.cpp.

References Definition::isReference().

Referenced by countDirs(), RTFGenerator::endIndexSection(), LatexGenerator::endIndexSection(), isLinkable(), RTFGenerator::startIndexSection(), LatexGenerator::startIndexSection(), and GroupDef::writeTagFile().

{
return !isReference();
}
bool DirDef::isParentOf ( DirDef dir) const

Definition at line 642 of file dirdef.cpp.

References parent().

Referenced by writeDotDirDepGraph().

{
if (dir->parent()==this) // this is a parent of dir
return TRUE;
else if (dir->parent()) // repeat for the parent of dir
return isParentOf(dir->parent());
else
return FALSE;
}
int DirDef::level ( ) const
inline

Definition at line 63 of file dirdef.h.

References m_level.

Referenced by setLevel().

{ return m_level; }
bool DirDef::matchPath ( const QCString &  path,
QStrList &  l 
)
staticprivate

Definition at line 711 of file dirdef.cpp.

Referenced by mergeDirectoryInTree().

{
const char *s=l.first();
while (s)
{
QCString prefix = s;
if (qstricmp(prefix.left(path.length()),path)==0) // case insensitive compare
{
return TRUE;
}
s = l.next();
}
return FALSE;
}
DirDef * DirDef::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 729 of file dirdef.cpp.

References Config_getList, createNewDir(), and matchPath().

Referenced by buildDirectories().

{
//printf("DirDef::mergeDirectoryInTree(%s)\n",path.data());
int p=0,i=0;
DirDef *dir=0;
while ((i=path.find('/',p))!=-1)
{
QCString part=path.left(i+1);
if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//"))
{
dir=createNewDir(part);
}
p=i+1;
}
return dir;
}
DirDef* DirDef::parent ( ) const
inline

Definition at line 64 of file dirdef.h.

References m_parent.

Referenced by addUsesDependency(), isParentOf(), setLevel(), writeDotDirDepGraph(), and writePartialDirPath().

{ return m_parent; }
void DirDef::setDiskName ( const QCString &  name)
inline

Definition at line 78 of file dirdef.h.

References m_diskName, and Definition::name().

Referenced by computeCommonDirPrefix().

void DirDef::setLevel ( )
private

Definition at line 522 of file dirdef.cpp.

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

Referenced by computeDirDependencies(), and setLevel().

{
if (m_level==-1) // level not set before
{
DirDef *p = parent();
if (p)
{
p->setLevel();
m_level = p->level()+1;
}
else
{
m_level = 0;
}
}
}
const QCString& DirDef::shortName ( ) const
inline
QCString DirDef::shortTitle ( ) const
void DirDef::sort ( )

Definition at line 81 of file dirdef.cpp.

References m_fileList, and m_subdirs.

Referenced by buildDirectories().

{
m_subdirs.sort();
m_fileList->sort();
}
void DirDef::startMemberDeclarations ( OutputList ol)
private

Definition at line 346 of file dirdef.cpp.

References OutputList::startMemberSections().

Referenced by writeDocumentation().

const DirList& DirDef::subDirs ( ) const
inline
const QDict<UsedDir>* DirDef::usedDirs ( ) const
inline

Definition at line 66 of file dirdef.h.

References m_usedDirs.

Referenced by writeDotDirDepGraph().

{ return m_usedDirs; }
void DirDef::writeBriefDescription ( OutputList ol)
private
void DirDef::writeDetailedDescription ( OutputList ol,
const QCString &  title 
)
private

Definition at line 126 of file dirdef.cpp.

References Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Definition::docFile(), Definition::docLine(), Definition::documentation(), OutputList::enable(), OutputList::enableAll(), OutputList::endGroupHeader(), OutputList::generateDoc(), OutputGenerator::Html, OutputGenerator::Latex, OutputGenerator::Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputGenerator::RTF, OutputList::startGroupHeader(), OutputList::writeAnchor(), OutputList::writeRuler(), and OutputList::writeString().

Referenced by writeDocumentation().

{
if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) ||
!documentation().isEmpty())
{
ol.writeRuler();
ol.writeAnchor(0,"details");
ol.parseText(title);
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
// separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
// ol.newParagraph(); // FIXME:PARA
ol.enableAll();
ol.writeString("\n\n");
}
// write documentation
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
}
}
}
void DirDef::writeDirectoryGraph ( OutputList ol)
private

Definition at line 204 of file dirdef.cpp.

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

Referenced by writeDocumentation().

{
// write graph dependency graph
if (Config_getBool(DIRECTORY_GRAPH) && Config_getBool(HAVE_DOT))
{
DotDirDeps dirDep(this);
if (!dirDep.isTrivial())
{
msg("Generating dependency graph for directory %s\n",displayName().data());
//ol.startParagraph();
ol.endDirDepGraph(dirDep);
//ol.endParagraph();
ol.enableAll();
}
}
}
void DirDef::writeDocumentation ( OutputList ol)

Definition at line 414 of file dirdef.cpp.

References LayoutDocEntry::AuthorSection, LayoutDocEntry::BriefDesc, LayoutDocEntry::ClassAllMembersLink, LayoutDocEntry::ClassCollaborationGraph, LayoutDocEntry::ClassIncludes, LayoutDocEntry::ClassInheritanceGraph, LayoutDocEntry::ClassInlineClasses, LayoutDocEntry::ClassNestedClasses, LayoutDocEntry::ClassUsedFiles, Config_getBool, LayoutDocEntry::DetailedDesc, LayoutDocManager::Directory, LayoutDocEntry::DirFiles, LayoutDocEntry::DirGraph, LayoutDocEntry::DirSubDirs, OutputList::disable(), OutputList::disableAllBut(), OutputList::enableAll(), OutputList::endContents(), endFileWithNavPath(), endMemberDeclarations(), OutputList::endQuickIndices(), endTitle(), err(), LayoutDocEntry::FileClasses, LayoutDocEntry::FileConstantGroups, LayoutDocEntry::FileIncludedByGraph, LayoutDocEntry::FileIncludeGraph, LayoutDocEntry::FileIncludes, LayoutDocEntry::FileInlineClasses, LayoutDocEntry::FileNamespaces, LayoutDocEntry::FileSourceLink, Definition::getLanguage(), getOutputFileBase(), LayoutDocEntry::GroupClasses, LayoutDocEntry::GroupDirs, LayoutDocEntry::GroupFiles, LayoutDocEntry::GroupGraph, LayoutDocEntry::GroupInlineClasses, LayoutDocEntry::GroupNamespaces, LayoutDocEntry::GroupNestedGroups, LayoutDocEntry::GroupPageDocs, HLI_Files, OutputGenerator::Html, LayoutDocManager::instance(), LayoutDocEntry::kind(), m_dispName, LayoutDocEntry::MemberDecl, LayoutDocEntry::MemberDeclEnd, LayoutDocEntry::MemberDeclStart, LayoutDocEntry::MemberDef, LayoutDocEntry::MemberDefEnd, LayoutDocEntry::MemberDefStart, LayoutDocEntry::MemberGroups, Definition::name(), LayoutDocEntry::NamespaceClasses, LayoutDocEntry::NamespaceInlineClasses, LayoutDocEntry::NamespaceNestedConstantGroups, LayoutDocEntry::NamespaceNestedNamespaces, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), shortTitle(), OutputList::startContents(), startFile(), startMemberDeclarations(), startTitle(), theTranslator, LayoutDocEntrySection::title(), Translator::trDirReference(), writeBriefDescription(), writeDetailedDescription(), writeDirectoryGraph(), writeFileList(), Definition::writeNavigationPath(), and writeSubDirList().

Referenced by generateDirDocs().

{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
startFile(ol,getOutputFileBase(),name(),title,HLI_Files,!generateTreeView);
if (!generateTreeView)
{
// write navigation path
}
ol.enableAll();
ol.parseText(title);
//---------------------------------------- start flexible part -------------------------------
QListIterator<LayoutDocEntry> eli(
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
break;
break;
break;
break;
break;
break;
{
}
break;
err("Internal inconsistency: member %d should not be part of "
"LayoutDocManager::Directory entry list\n",lde->kind());
break;
}
}
//---------------------------------------- end flexible part -------------------------------
}
void DirDef::writeFileList ( OutputList ol)
private

Definition at line 274 of file dirdef.cpp.

References Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disableAllBut(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), OutputList::endTextLink(), OutputList::generateDoc(), FileDef::generateSourceFile(), FileDef::getOutputFileBase(), Definition::getReference(), Definition::hasDocumentation(), OutputGenerator::Html, FileDef::includeName(), OutputList::insertMemberAlign(), FileDef::isLinkable(), m_fileList, FileDef::name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startBold(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), OutputList::startTextLink(), theTranslator, Translator::trCode(), Translator::trFile(), and OutputList::writeObjectLink().

Referenced by writeDocumentation().

{
int numFiles = 0;
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (it.toFirst();(fd=it.current());++it)
{
if (fd->hasDocumentation())
{
numFiles++;
}
}
// write file list
if (numFiles>0)
{
ol.startMemberHeader("files");
ol.parseText(theTranslator->trFile(TRUE,FALSE));
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
if (fd->hasDocumentation())
{
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
if (fd->isLinkable())
{
}
else
{
ol.startBold();
ol.docify(fd->name());
ol.endBold();
}
if (fd->generateSourceFile())
{
ol.docify(" ");
ol.docify("[");
ol.docify("]");
}
if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
FALSE, // indexWords
FALSE, // isExample
0, // exampleName
TRUE, // single line
TRUE // link from index
);
}
}
}
}
}
void DirDef::writeSubDirList ( OutputList ol)
private

Definition at line 224 of file dirdef.cpp.

References Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), OutputList::generateDoc(), getFiles(), getOutputFileBase(), Definition::getReference(), Definition::hasDocumentation(), OutputList::insertMemberAlign(), m_subdirs, OutputList::parseText(), shortName(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), theTranslator, Translator::trDir(), and OutputList::writeObjectLink().

Referenced by writeDocumentation().

{
int numSubdirs = 0;
QListIterator<DirDef> it(m_subdirs);
DirDef *dd;
for (it.toFirst();(dd=it.current());++it)
{
if (dd->hasDocumentation() || dd->getFiles()->count()>0)
{
numSubdirs++;
}
}
// write subdir list
if (numSubdirs>0)
{
ol.startMemberHeader("subdirs");
ol.parseText(theTranslator->trDir(TRUE,FALSE));
for (it.toFirst();(dd=it.current());++it)
{
if (dd->hasDocumentation() || dd->getFiles()->count()==0)
{
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
FALSE, // indexWords
FALSE, // isExample
0, // exampleName
TRUE, // single line
TRUE // link from index
);
}
}
}
}
}
void DirDef::writeTagFile ( FTextStream t)

Definition at line 367 of file dirdef.cpp.

References convertToXML(), LayoutDocManager::Directory, LayoutDocEntry::DirFiles, LayoutDocEntry::DirSubDirs, displayName(), endl(), getOutputFileBase(), Doxygen::htmlFileExtension, LayoutDocManager::instance(), LayoutDocEntry::kind(), m_fileList, m_subdirs, FileDef::name(), Definition::name(), and Definition::writeDocAnchorsToTagFile().

{
tagFile << " <compound kind=\"dir\">" << endl;
tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
QListIterator<LayoutDocEntry> eli(
for (eli.toFirst();(lde=eli.current());++eli)
{
switch (lde->kind())
{
{
if (m_subdirs.count()>0)
{
DirDef *dd;
QListIterator<DirDef> it(m_subdirs);
for (;(dd=it.current());++it)
{
tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
}
}
}
break;
{
if (m_fileList->count()>0)
{
QListIterator<FileDef> it(*m_fileList);
FileDef *fd;
for (;(fd=it.current());++it)
{
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
}
}
break;
default:
break;
}
}
tagFile << " </compound>" << endl;
}

Friends And Related Function Documentation

void computeDirDependencies ( )
friend

Definition at line 973 of file dirdef.cpp.

{
DirDef *dir;
// compute nesting level for each directory
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
dir->setLevel();
}
// compute uses dependencies between directories
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
//printf("computeDependencies for %s: #dirs=%d\n",dir->name().data(),Doxygen::directories.count());
}
}

Member Data Documentation

int DirDef::m_dirCount
private

Definition at line 104 of file dirdef.h.

Referenced by dirCount(), and DirDef().

QCString DirDef::m_diskName
private

Definition at line 102 of file dirdef.h.

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

QCString DirDef::m_dispName
private

Definition at line 100 of file dirdef.h.

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

FileList* DirDef::m_fileList
private
int DirDef::m_level
private

Definition at line 105 of file dirdef.h.

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

DirDef* DirDef::m_parent
private

Definition at line 106 of file dirdef.h.

Referenced by addSubDir(), DirDef(), and parent().

QCString DirDef::m_shortName
private

Definition at line 101 of file dirdef.h.

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

DirList DirDef::m_subdirs
private

Definition at line 99 of file dirdef.h.

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

QDict<UsedDir>* DirDef::m_usedDirs
private
bool DirDef::visited

Definition at line 77 of file dirdef.h.

Referenced by countDirs().


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