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 QCStringshortName () 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)
 
- 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 QCStringname () 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
 
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)
 
QCString convertNameToFile (const char *name, bool allowDots=FALSE) const
 
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.

21  : Definition(path,1,1,path), visited(FALSE)
22 {
23  bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
24  // get display name (stipping the paths mentioned in STRIP_FROM_PATH)
25  // get short name (last part of path)
26  m_shortName = path;
27  m_diskName = path;
28  if (m_shortName.at(m_shortName.length()-1)=='/')
29  { // strip trailing /
31  }
32  int pi=m_shortName.findRev('/');
33  if (pi!=-1)
34  { // remove everything till the last /
35  m_shortName = m_shortName.mid(pi+1);
36  }
38  m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
39  if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)=='/')
40  { // strip trailing /
42  }
43 
44  m_fileList = new FileList;
45  m_usedDirs = new QDict<UsedDir>(257);
46  m_usedDirs->setAutoDelete(TRUE);
48  m_level=-1;
49  m_parent=0;
50 }
int m_dirCount
Definition: dirdef.h:103
bool visited
Definition: dirdef.h:77
QCString m_dispName
Definition: dirdef.h:99
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
FileList * m_fileList
Definition: dirdef.h:102
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString m_shortName
Definition: dirdef.h:100
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106
void setLocalName(const QCString name)
#define Config_getBool(val)
Definition: config.cpp:664
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
Definition(const char *defFileName, int defLine, int defColumn, const char *name, const char *b=0, const char *d=0, bool isSymbol=TRUE)
Definition: definition.cpp:283
static int g_dirCount
Definition: dirdef.cpp:19
DirDef * m_parent
Definition: dirdef.h:105
float pi
Definition: units.py:11
int m_level
Definition: dirdef.h:104
QCString m_diskName
Definition: dirdef.h:101
const bool TRUE
Definition: qglobal.h:371
DirDef::~DirDef ( )
virtual

Definition at line 52 of file dirdef.cpp.

53 {
54  delete m_fileList;
55  delete m_usedDirs;
56 }
FileList * m_fileList
Definition: dirdef.h:102
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106

Member Function Documentation

void DirDef::addFile ( FileDef fd)

Definition at line 75 of file dirdef.cpp.

76 {
77  m_fileList->inSort(fd);
78  fd->setDirDef(this);
79 }
FileList * m_fileList
Definition: dirdef.h:102
void inSort(const type *d)
Definition: qlist.h:71
void setDirDef(DirDef *dd)
Definition: filedef.h:164
void DirDef::addSubDir ( DirDef subdir)

Definition at line 68 of file dirdef.cpp.

69 {
70  m_subdirs.inSort(subdir);
71  subdir->setOuterScope(this);
72  subdir->m_parent=this;
73 }
DirList m_subdirs
Definition: dirdef.h:98
virtual void setOuterScope(Definition *d)
void inSort(const type *d)
Definition: qlist.h:71
DirDef * m_parent
Definition: dirdef.h:105
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 512 of file dirdef.cpp.

514 {
515  if (this==dir) return; // do not add self-dependencies
516  //static int count=0;
517  //printf(" %d add dependency %s->%s due to %s->%s\n",
518  // count++,shortName().data(),
519  // dir->shortName().data(),
520  // srcFd->name().data(),
521  // dstFd->name().data());
522 
523  // levels match => add direct dependency
524  bool added=FALSE;
525  UsedDir *usedDir = m_usedDirs->find(dir->getOutputFileBase());
526  if (usedDir) // dir dependency already present
527  {
528  FilePair *usedPair = usedDir->findFilePair(
529  srcFd->getOutputFileBase()+dstFd->getOutputFileBase());
530  if (usedPair==0) // new file dependency
531  {
532  //printf(" => new file\n");
533  usedDir->addFileDep(srcFd,dstFd);
534  added=TRUE;
535  }
536  else
537  {
538  // dir & file dependency already added
539  }
540  }
541  else // new directory dependency
542  {
543  //printf(" => new file\n");
544  usedDir = new UsedDir(dir,inherited);
545  usedDir->addFileDep(srcFd,dstFd);
546  m_usedDirs->insert(dir->getOutputFileBase(),usedDir);
547  added=TRUE;
548  }
549  if (added)
550  {
551  if (dir->parent())
552  {
553  // add relation to parent of used dir
554  addUsesDependency(dir->parent(),srcFd,dstFd,inherited);
555  }
556  if (parent())
557  {
558  // add relation for the parent of this dir as well
559  parent()->addUsesDependency(dir,srcFd,dstFd,TRUE);
560  }
561  }
562 }
const bool FALSE
Definition: qglobal.h:370
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106
QCString getOutputFileBase() const
Definition: filedef.h:83
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
void addUsesDependency(DirDef *usedDir, FileDef *srcFd, FileDef *dstFd, bool inherited)
Definition: dirdef.cpp:512
FilePair * findFilePair(const char *name)
Definition: dirdef.cpp:646
DirDef * parent() const
Definition: dirdef.h:64
const bool TRUE
Definition: qglobal.h:371
void addFileDep(FileDef *srcFd, FileDef *dstFd)
Definition: dirdef.cpp:640
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.

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

Computes the dependencies between directories

Definition at line 566 of file dirdef.cpp.

567 {
568  FileList *fl = m_fileList;
569  if (fl)
570  {
571  QListIterator<FileDef> fli(*fl);
572  FileDef *fd;
573  for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd
574  {
575  //printf(" File %s\n",fd->name().data());
576  //printf("** dir=%s file=%s\n",shortName().data(),fd->name().data());
577  QList<IncludeInfo> *ifl = fd->includeFileList();
578  if (ifl)
579  {
580  QListIterator<IncludeInfo> ifli(*ifl);
581  IncludeInfo *ii;
582  for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file
583  {
584  //printf(" > %s\n",ii->includeName.data());
585  //printf(" #include %s\n",ii->includeName.data());
586  if (ii->fileDef && ii->fileDef->isLinkable()) // linkable file
587  {
588  DirDef *usedDir = ii->fileDef->getDirDef();
589  if (usedDir)
590  {
591  // add dependency: thisDir->usedDir
592  //static int count=0;
593  //printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data());
594  addUsesDependency(usedDir,fd,ii->fileDef,FALSE);
595  }
596  }
597  }
598  }
599  }
600  }
601 }
bool isLinkable() const
Definition: filedef.h:117
const bool FALSE
Definition: qglobal.h:370
FileList * m_fileList
Definition: dirdef.h:102
DirDef * getDirDef() const
Definition: filedef.h:121
QList< IncludeInfo > * includeFileList() const
Definition: filedef.h:124
Definition: dirdef.h:44
FileDef * fileDef
Definition: filedef.h:49
void addUsesDependency(DirDef *usedDir, FileDef *srcFd, FileDef *dstFd, bool inherited)
Definition: dirdef.cpp:512
DirDef * DirDef::createNewDir ( const char *  path)
staticprivate

Definition at line 652 of file dirdef.cpp.

653 {
654  ASSERT(path!=0);
656  if (dir==0) // new dir
657  {
658  //printf("Adding new dir %s\n",path);
659  dir = new DirDef(path);
660  //printf("createNewDir %s short=%s\n",path,dir->shortName().data());
661  Doxygen::directories->inSort(path,dir);
662  }
663  return dir;
664 }
void inSort(const char *key, const T *d)
Definition: sortdict.h:197
string dir
DirDef(const char *path)
Definition: dirdef.cpp:21
static DirSDict * directories
Definition: doxygen.h:139
Definition: dirdef.h:44
T * find(const char *key)
Definition: sortdict.h:232
#define ASSERT(x)
Definition: qglobal.h:590
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.

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

Definition at line 613 of file dirdef.cpp.

614 {
615  return m_usedDirs->count()==0;
616 }
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106
int DirDef::dirCount ( ) const
inline

Definition at line 65 of file dirdef.h.

65 { return m_dirCount; }
int m_dirCount
Definition: dirdef.h:103
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.

56 { return m_dispName; }
QCString m_dispName
Definition: dirdef.h:99
void DirDef::endMemberDeclarations ( OutputList ol)
private

Definition at line 321 of file dirdef.cpp.

322 {
323  ol.endMemberSections();
324 }
void endMemberSections()
Definition: outputlist.h:188
FileList* DirDef::getFiles ( ) const
inline

Definition at line 59 of file dirdef.h.

59 { return m_fileList; }
FileList * m_fileList
Definition: dirdef.h:102
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 113 of file dirdef.cpp.

114 {
115  //printf("DirDef::getOutputFileBase() %s->dir_%s\n",
116  // m_diskName.data(),encodeDirName(m_diskName).data());
117  return "dir_"+encodeDirName(m_diskName);
118 }
static QCString encodeDirName(const QCString &anchor)
Definition: dirdef.cpp:81
QCString m_diskName
Definition: dirdef.h:101
bool DirDef::hasDetailedDescription ( ) const

Definition at line 331 of file dirdef.cpp.

332 {
333  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
334  return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
335 }
bool isEmpty() const
Definition: qcstring.h:189
#define Config_getBool(val)
Definition: config.cpp:664
virtual QCString briefDescription(bool abbreviate=FALSE) const
virtual QCString documentation() const
bool DirDef::isCluster ( ) const
inline

Definition at line 62 of file dirdef.h.

62 { return m_subdirs.count()>0; }
DirList m_subdirs
Definition: dirdef.h:98
uint count() const
Definition: qlist.h:66
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.

64 {
65  return isReference() || isLinkableInProject();
66 }
virtual bool isReference() const
bool isLinkableInProject() const
Definition: dirdef.cpp:58
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.

59 {
60  return !isReference();
61 }
virtual bool isReference() const
bool DirDef::isParentOf ( DirDef dir) const

Definition at line 603 of file dirdef.cpp.

604 {
605  if (dir->parent()==this) // this is a parent of dir
606  return TRUE;
607  else if (dir->parent()) // repeat for the parent of dir
608  return isParentOf(dir->parent());
609  else
610  return FALSE;
611 }
bool isParentOf(DirDef *dir) const
Definition: dirdef.cpp:603
const bool FALSE
Definition: qglobal.h:370
DirDef * parent() const
Definition: dirdef.h:64
const bool TRUE
Definition: qglobal.h:371
int DirDef::level ( ) const
inline

Definition at line 63 of file dirdef.h.

63 { return m_level; }
int m_level
Definition: dirdef.h:104
bool DirDef::matchPath ( const QCString path,
QStrList l 
)
staticprivate

Definition at line 666 of file dirdef.cpp.

667 {
668  const char *s=l.first();
669  while (s)
670  {
671  QCString prefix = s;
672  if (qstricmp(prefix.left(path.length()),path)==0) // case insensitive compare
673  {
674  return TRUE;
675  }
676  s = l.next();
677  }
678  return FALSE;
679 }
uint length() const
Definition: qcstring.h:195
type * first()
Definition: qinternallist.h:87
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
type * next()
Definition: qinternallist.h:89
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
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 684 of file dirdef.cpp.

685 {
686  //printf("DirDef::mergeDirectoryInTree(%s)\n",path.data());
687  int p=0,i=0;
688  DirDef *dir=0;
689  while ((i=path.find('/',p))!=-1)
690  {
691  QCString part=path.left(i+1);
692  if (!matchPath(part,Config_getList("STRIP_FROM_PATH")) && (part!="/" && part!="//"))
693  {
694  dir=createNewDir(part);
695  }
696  p=i+1;
697  }
698  return dir;
699 }
static bool matchPath(const QCString &path, QStrList &l)
Definition: dirdef.cpp:666
#define Config_getList(val)
Definition: config.cpp:662
QCString left(uint len) const
Definition: qcstring.cpp:213
string dir
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static DirDef * createNewDir(const char *path)
Definition: dirdef.cpp:652
p
Definition: test.py:223
Definition: dirdef.h:44
DirDef* DirDef::parent ( ) const
inline

Definition at line 64 of file dirdef.h.

64 { return m_parent; }
DirDef * m_parent
Definition: dirdef.h:105
void DirDef::setDiskName ( const QCString name)
inline

Definition at line 78 of file dirdef.h.

78 { m_diskName = name; }
const QCString & name() const
Definition: definition.h:114
QCString m_diskName
Definition: dirdef.h:101
void DirDef::setLevel ( )
private

Definition at line 492 of file dirdef.cpp.

493 {
494  if (m_level==-1) // level not set before
495  {
496  DirDef *p = parent();
497  if (p)
498  {
499  p->setLevel();
500  m_level = p->level()+1;
501  }
502  else
503  {
504  m_level = 0;
505  }
506  }
507 }
int level() const
Definition: dirdef.h:63
p
Definition: test.py:223
Definition: dirdef.h:44
void setLevel()
Definition: dirdef.cpp:492
int m_level
Definition: dirdef.h:104
DirDef * parent() const
Definition: dirdef.h:64
const QCString& DirDef::shortName ( ) const
inline

Definition at line 57 of file dirdef.h.

57 { return m_shortName; }
QCString m_shortName
Definition: dirdef.h:100
QCString DirDef::shortTitle ( ) const

Definition at line 326 of file dirdef.cpp.

327 {
329 }
virtual QCString trDirReference(const char *dirName)=0
QCString m_shortName
Definition: dirdef.h:100
Translator * theTranslator
Definition: language.cpp:157
void DirDef::startMemberDeclarations ( OutputList ol)
private

Definition at line 316 of file dirdef.cpp.

317 {
318  ol.startMemberSections();
319 }
void startMemberSections()
Definition: outputlist.h:186
const DirList& DirDef::subDirs ( ) const
inline

Definition at line 61 of file dirdef.h.

61 { return m_subdirs; }
DirList m_subdirs
Definition: dirdef.h:98
const QDict<UsedDir>* DirDef::usedDirs ( ) const
inline

Definition at line 66 of file dirdef.h.

66 { return m_usedDirs; }
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106
void DirDef::writeBriefDescription ( OutputList ol)
private

Definition at line 165 of file dirdef.cpp.

166 {
167  if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
168  {
169  DocRoot *rootNode = validatingParseDoc(
171  if (rootNode && !rootNode->isEmpty())
172  {
173  ol.startParagraph();
174  ol.writeDoc(rootNode,this,0);
175  ol.pushGeneratorState();
177  ol.writeString(" \n");
179 
180  if (Config_getBool("REPEAT_BRIEF") ||
181  !documentation().isEmpty()
182  )
183  {
185  ol.startTextLink(0,"details");
187  ol.endTextLink();
188  }
189  ol.popGeneratorState();
190 
191  ol.endParagraph();
192  }
193  delete rootNode;
194  }
195  ol.writeSynopsis();
196 }
void writeString(const char *text)
Definition: outputlist.h:119
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
void startParagraph()
Definition: outputlist.h:115
const bool FALSE
Definition: qglobal.h:370
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
int briefLine() const
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void popGeneratorState()
Definition: outputlist.cpp:121
void endParagraph()
Definition: outputlist.h:117
void pushGeneratorState()
Definition: outputlist.cpp:111
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
void writeSynopsis()
Definition: outputlist.h:340
void writeDoc(DocRoot *root, Definition *ctx, MemberDef *md)
Definition: outputlist.cpp:162
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
virtual QCString trMore()=0
virtual QCString briefDescription(bool abbreviate=FALSE) const
Translator * theTranslator
Definition: language.cpp:157
bool isEmpty() const
Definition: docparser.h:1409
virtual QCString documentation() const
void endTextLink()
Definition: outputlist.h:161
const bool TRUE
Definition: qglobal.h:371
void DirDef::writeDetailedDescription ( OutputList ol,
const QCString title 
)
private

Definition at line 120 of file dirdef.cpp.

121 {
122  if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
123  !documentation().isEmpty())
124  {
125  ol.pushGeneratorState();
127  ol.writeRuler();
128  ol.popGeneratorState();
129  ol.pushGeneratorState();
131  ol.writeAnchor(0,"details");
132  ol.popGeneratorState();
133  ol.startGroupHeader();
134  ol.parseText(title);
135  ol.endGroupHeader();
136 
137  // repeat brief description
138  if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
139  {
141  }
142  // separator between brief and details
143  if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
144  !documentation().isEmpty())
145  {
146  ol.pushGeneratorState();
149  // ol.newParagraph(); // FIXME:PARA
150  ol.enableAll();
153  ol.writeString("\n\n");
154  ol.popGeneratorState();
155  }
156 
157  // write documentation
158  if (!documentation().isEmpty())
159  {
160  ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
161  }
162  }
163 }
void writeRuler()
Definition: outputlist.h:240
QCString docFile() const
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:178
void writeString(const char *text)
Definition: outputlist.h:119
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
const bool FALSE
Definition: qglobal.h:370
int briefLine() const
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void popGeneratorState()
Definition: outputlist.cpp:121
void pushGeneratorState()
Definition: outputlist.cpp:111
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
virtual QCString briefDescription(bool abbreviate=FALSE) const
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:176
void enableAll()
Definition: outputlist.cpp:59
void writeAnchor(const char *fileName, const char *name)
Definition: outputlist.h:242
int docLine() const
virtual QCString documentation() const
const bool TRUE
Definition: qglobal.h:371
void DirDef::writeDirectoryGraph ( OutputList ol)
private

Definition at line 198 of file dirdef.cpp.

199 {
200  // write graph dependency graph
201  if (Config_getBool("DIRECTORY_GRAPH") && Config_getBool("HAVE_DOT"))
202  {
203  DotDirDeps dirDep(this);
204  if (!dirDep.isTrivial())
205  {
206  msg("Generating dependency graph for directory %s\n",displayName().data());
208  //ol.startParagraph();
209  ol.startDirDepGraph();
211  ol.endDirDepGraph(dirDep);
212  //ol.endParagraph();
213  ol.enableAll();
214  }
215  }
216 }
const QCString & shortName() const
Definition: dirdef.h:57
void msg(const char *fmt,...)
Definition: message.cpp:107
virtual QCString trDirDepGraph(const char *name)=0
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
QCString displayName(bool=TRUE) const
Definition: dirdef.h:56
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
#define Config_getBool(val)
Definition: config.cpp:664
void startDirDepGraph()
Definition: outputlist.h:394
void enableAll()
Definition: outputlist.cpp:59
Translator * theTranslator
Definition: language.cpp:157
void endDirDepGraph(const DotDirDeps &g)
Definition: outputlist.h:396
void DirDef::writeDocumentation ( OutputList ol)

Definition at line 384 of file dirdef.cpp.

385 {
386  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
387  ol.pushGeneratorState();
388 
390  startFile(ol,getOutputFileBase(),name(),title,HLI_Files,!generateTreeView);
391 
392  if (!generateTreeView)
393  {
394  // write navigation path
396  ol.endQuickIndices();
397  }
398 
400  ol.pushGeneratorState();
402  ol.parseText(shortTitle());
403  ol.enableAll();
405  ol.parseText(title);
406  ol.popGeneratorState();
407  endTitle(ol,getOutputFileBase(),title);
408  ol.startContents();
409 
410  //---------------------------------------- start flexible part -------------------------------
411 
412  SrcLangExt lang = getLanguage();
415  LayoutDocEntry *lde;
416  for (eli.toFirst();(lde=eli.current());++eli)
417  {
418  switch (lde->kind())
419  {
422  break;
425  break;
428  break;
430  writeSubDirList(ol);
431  break;
433  writeFileList(ol);
434  break;
437  break;
439  {
441  writeDetailedDescription(ol,ls->title(lang));
442  }
443  break;
477  err("Internal inconsistency: member %d should not be part of "
478  "LayoutDocManager::Directory entry list\n",lde->kind());
479  break;
480  }
481  }
482 
483  //---------------------------------------- end flexible part -------------------------------
484 
485  ol.endContents();
486 
487  endFileWithNavPath(this,ol);
488 
489  ol.popGeneratorState();
490 }
void endFileWithNavPath(Definition *d, OutputList &ol)
Definition: index.cpp:282
void writeDirectoryGraph(OutputList &ol)
Definition: dirdef.cpp:198
QCString m_dispName
Definition: dirdef.h:99
void startFile(OutputList &ol, const char *name, const char *manName, const char *title, HighlightedItem hli, bool additionalIndices, const char *altSidebarName)
Definition: index.cpp:244
virtual QCString trDirReference(const char *dirName)=0
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
void writeNavigationPath(OutputList &ol) const
static LayoutDocManager & instance()
Definition: layout.cpp:1359
SrcLangExt
Definition: types.h:41
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1440
void endMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:321
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void writeFileList(OutputList &ol)
Definition: dirdef.cpp:257
void popGeneratorState()
Definition: outputlist.cpp:121
const QCString & name() const
Definition: definition.h:114
void pushGeneratorState()
Definition: outputlist.cpp:111
SrcLangExt getLanguage() const
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
#define Config_getBool(val)
Definition: config.cpp:664
void startMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:316
void err(const char *fmt,...)
Definition: message.cpp:226
QCString shortTitle() const
Definition: dirdef.cpp:326
void writeDetailedDescription(OutputList &ol, const QCString &title)
Definition: dirdef.cpp:120
void endQuickIndices()
Definition: outputlist.h:352
void endContents()
Definition: outputlist.h:366
void writeSubDirList(OutputList &ol)
Definition: dirdef.cpp:218
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
void startTitle(OutputList &ol, const char *fileName, Definition *def)
Definition: index.cpp:228
virtual Kind kind() const =0
void enableAll()
Definition: outputlist.cpp:59
void writeBriefDescription(OutputList &ol)
Definition: dirdef.cpp:165
Base class representing a piece of a documentation page.
Definition: layout.h:30
Translator * theTranslator
Definition: language.cpp:157
void endTitle(OutputList &ol, const char *fileName, const char *name)
Definition: index.cpp:237
void startContents()
Definition: outputlist.h:364
void DirDef::writeFileList ( OutputList ol)
private

Definition at line 257 of file dirdef.cpp.

258 {
259  // write file list
260  if (m_fileList->count()>0)
261  {
262  ol.startMemberHeader("files");
264  ol.endMemberHeader();
265  ol.startMemberList();
267  FileDef *fd;
268  for (;(fd=it.current());++it)
269  {
270  if (!fd->hasDocumentation()) continue;
274  ol.insertMemberAlign();
275  if (fd->isLinkable())
276  {
277  ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
278  }
279  else
280  {
281  ol.startBold();
282  ol.docify(fd->name());
283  ol.endBold();
284  }
285  if (fd->generateSourceFile())
286  {
287  ol.pushGeneratorState();
289  ol.docify(" ");
290  ol.startTextLink(fd->includeName(),0);
291  ol.docify("[");
293  ol.docify("]");
294  ol.endTextLink();
295  ol.popGeneratorState();
296  }
297  ol.endMemberItem();
298  if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
299  {
302  FALSE, // indexWords
303  FALSE, // isExample
304  0, // exampleName
305  TRUE, // single line
306  TRUE // link from index
307  );
309  }
310  ol.endMemberDeclaration(0,0);
311  }
312  ol.endMemberList();
313  }
314 }
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
void endMemberItem()
Definition: outputlist.h:220
virtual QCString trFile(bool first_capital, bool singular)=0
virtual QCString getReference() const
bool isLinkable() const
Definition: filedef.h:117
bool isEmpty() const
Definition: qcstring.h:189
bool generateSourceFile() const
Definition: filedef.cpp:1396
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
virtual bool hasDocumentation() const
const bool FALSE
Definition: qglobal.h:370
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
FileList * m_fileList
Definition: dirdef.h:102
int briefLine() const
void startMemberList()
Definition: outputlist.h:206
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void popGeneratorState()
Definition: outputlist.cpp:121
void endMemberHeader()
Definition: outputlist.h:196
void endBold()
Definition: outputlist.h:306
uint count() const
Definition: qlist.h:66
void pushGeneratorState()
Definition: outputlist.cpp:111
void startMemberDeclaration()
Definition: outputlist.h:312
QCString name() const
Definition: filedef.cpp:1193
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
virtual QCString trCode()=0
void startBold()
Definition: outputlist.h:304
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString getOutputFileBase() const
Definition: filedef.h:83
void endMemberDescription()
Definition: outputlist.h:310
Translator * theTranslator
Definition: language.cpp:157
QCString includeName() const
Definition: filedef.cpp:1784
void startMemberHeader(const char *anchor)
Definition: outputlist.h:194
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
void endTextLink()
Definition: outputlist.h:161
const bool TRUE
Definition: qglobal.h:371
void endMemberList()
Definition: outputlist.h:208
void DirDef::writeSubDirList ( OutputList ol)
private

Definition at line 218 of file dirdef.cpp.

219 {
220  // write subdir list
221  if (m_subdirs.count()>0)
222  {
223  ol.startMemberHeader("subdirs");
225  ol.endMemberHeader();
226  ol.startMemberList();
228  DirDef *dd;
229  for (;(dd=it.current());++it)
230  {
231  if (!dd->hasDocumentation()) continue;
235  ol.insertMemberAlign();
237  ol.endMemberItem();
238  if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
239  {
242  FALSE, // indexWords
243  FALSE, // isExample
244  0, // exampleName
245  TRUE, // single line
246  TRUE // link from index
247  );
249  }
250  ol.endMemberDeclaration(0,0);
251  }
252 
253  ol.endMemberList();
254  }
255 }
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
void endMemberItem()
Definition: outputlist.h:220
virtual QCString getReference() const
const QCString & shortName() const
Definition: dirdef.h:57
bool isEmpty() const
Definition: qcstring.h:189
DirList m_subdirs
Definition: dirdef.h:98
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
virtual bool hasDocumentation() const
const bool FALSE
Definition: qglobal.h:370
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
int briefLine() const
void startMemberList()
Definition: outputlist.h:206
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void endMemberHeader()
Definition: outputlist.h:196
uint count() const
Definition: qlist.h:66
void startMemberDeclaration()
Definition: outputlist.h:312
Definition: dirdef.h:44
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
void endMemberDescription()
Definition: outputlist.h:310
Translator * theTranslator
Definition: language.cpp:157
virtual QCString trDir(bool first_capital, bool singular)=0
void startMemberHeader(const char *anchor)
Definition: outputlist.h:194
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
const bool TRUE
Definition: qglobal.h:371
void endMemberList()
Definition: outputlist.h:208
void DirDef::writeTagFile ( FTextStream t)

Definition at line 337 of file dirdef.cpp.

338 {
339  tagFile << " <compound kind=\"dir\">" << endl;
340  tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
341  tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
342  tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
345  LayoutDocEntry *lde;
346  for (eli.toFirst();(lde=eli.current());++eli)
347  {
348  switch (lde->kind())
349  {
351  {
352  if (m_subdirs.count()>0)
353  {
354  DirDef *dd;
356  for (;(dd=it.current());++it)
357  {
358  tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
359  }
360  }
361  }
362  break;
364  {
365  if (m_fileList->count()>0)
366  {
368  FileDef *fd;
369  for (;(fd=it.current());++it)
370  {
371  tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
372  }
373  }
374  }
375  break;
376  default:
377  break;
378  }
379  }
380  writeDocAnchorsToTagFile(tagFile);
381  tagFile << " </compound>" << endl;
382 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
DirList m_subdirs
Definition: dirdef.h:98
static QCString htmlFileExtension
Definition: doxygen.h:130
static LayoutDocManager & instance()
Definition: layout.cpp:1359
FileList * m_fileList
Definition: dirdef.h:102
QCString displayName(bool=TRUE) const
Definition: dirdef.h:56
void writeDocAnchorsToTagFile(FTextStream &)
Definition: definition.cpp:520
uint count() const
Definition: qlist.h:66
const QCString & name() const
Definition: definition.h:114
QCString name() const
Definition: filedef.cpp:1193
Definition: dirdef.h:44
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
virtual Kind kind() const =0
Base class representing a piece of a documentation page.
Definition: layout.h:30
QTextStream & endl(QTextStream &s)

Friends And Related Function Documentation

void computeDirDependencies ( )
friend

Definition at line 924 of file dirdef.cpp.

925 {
926  DirDef *dir;
928  // compute nesting level for each directory
929  for (sdi.toFirst();(dir=sdi.current());++sdi)
930  {
931  dir->setLevel();
932  }
933  // compute uses dependencies between directories
934  for (sdi.toFirst();(dir=sdi.current());++sdi)
935  {
936  //printf("computeDependencies for %s: #dirs=%d\n",dir->name().data(),Doxygen::directories.count());
937  dir->computeDependencies();
938  }
939 
940 }
void computeDependencies()
Definition: dirdef.cpp:566
string dir
static DirSDict * directories
Definition: doxygen.h:139
Definition: dirdef.h:44
void setLevel()
Definition: dirdef.cpp:492
friend class Iterator
Definition: sortdict.h:289

Member Data Documentation

int DirDef::m_dirCount
private

Definition at line 103 of file dirdef.h.

QCString DirDef::m_diskName
private

Definition at line 101 of file dirdef.h.

QCString DirDef::m_dispName
private

Definition at line 99 of file dirdef.h.

FileList* DirDef::m_fileList
private

Definition at line 102 of file dirdef.h.

int DirDef::m_level
private

Definition at line 104 of file dirdef.h.

DirDef* DirDef::m_parent
private

Definition at line 105 of file dirdef.h.

QCString DirDef::m_shortName
private

Definition at line 100 of file dirdef.h.

DirList DirDef::m_subdirs
private

Definition at line 98 of file dirdef.h.

QDict<UsedDir>* DirDef::m_usedDirs
private

Definition at line 106 of file dirdef.h.

bool DirDef::visited

Definition at line 77 of file dirdef.h.


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