Classes | Functions
dirdef.h File Reference
#include "sortdict.h"
#include "definition.h"
#include <qlist.h>

Go to the source code of this file.

Classes

class  DirList
 
class  DirDef
 
class  FilePair
 
class  FilePairDict
 
class  UsedDir
 
class  DirRelation
 
class  DirSDict
 

Functions

void buildDirectories ()
 
void generateDirDocs (OutputList &ol)
 
void computeDirDependencies ()
 
void writeDirDependencyGraph (const char *file)
 

Function Documentation

void buildDirectories ( )

Definition at line 872 of file dirdef.cpp.

873 {
874  // for each input file
876  FileName *fn;
877  for (fnli.toFirst();(fn=fnli.current());++fnli)
878  {
879  FileNameIterator fni(*fn);
880  FileDef *fd;
881  for (;(fd=fni.current());++fni)
882  {
883  //printf("buildDirectories %s\n",fd->name().data());
884  if (fd->getReference().isEmpty() && !fd->isDocumentationFile())
885  {
886  DirDef *dir;
887  if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory
888  {
890  }
891  if (dir) dir->addFile(fd);
892  }
893  else
894  {
895  // do something for file imported via tag files.
896  }
897  }
898  }
899 
900  //DirDef *root = new DirDef("root:");
901  // compute relations between directories => introduce container dirs.
902  DirDef *dir;
904  for (sdi.toFirst();(dir=sdi.current());++sdi)
905  {
906  //printf("New dir %s\n",dir->displayName().data());
907  QCString name = dir->name();
908  int i=name.findRev('/',name.length()-2);
909  if (i>0)
910  {
911  DirDef *parent = Doxygen::directories->find(name.left(i+1));
912  //if (parent==0) parent=root;
913  if (parent)
914  {
915  parent->addSubDir(dir);
916  //printf("DirDef::addSubdir(): Adding subdir\n%s to\n%s\n",
917  // dir->displayName().data(), parent->displayName().data());
918  }
919  }
920  }
922 }
static QCString name
Definition: declinfo.cpp:673
void addFile(FileDef *fd)
Definition: dirdef.cpp:75
void addSubDir(DirDef *subdir)
Definition: dirdef.cpp:68
virtual QCString getReference() const
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
static FileNameList * inputNameList
Definition: doxygen.h:109
QCString left(uint len) const
Definition: qcstring.cpp:213
string dir
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QAsciiDict< Entry > fn
const QCString & name() const
Definition: definition.h:114
static DirSDict * directories
Definition: doxygen.h:139
static DirDef * mergeDirectoryInTree(const QCString &path)
Definition: dirdef.cpp:684
Definition: dirdef.h:44
static void computeCommonDirPrefix()
Definition: dirdef.cpp:794
QCString getPath() const
Definition: filedef.h:110
bool isDocumentationFile() const
Definition: filedef.cpp:1728
friend class Iterator
Definition: sortdict.h:289
T * find(const char *key)
Definition: sortdict.h:232
def parent(G, child, parent_type)
Definition: graph.py:67
void computeDirDependencies ( )

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
void generateDirDocs ( OutputList ol)

Definition at line 942 of file dirdef.cpp.

943 {
944  DirDef *dir;
946  for (sdi.toFirst();(dir=sdi.current());++sdi)
947  {
948  dir->writeDocumentation(ol);
949  }
950  if (Config_getBool("DIRECTORY_GRAPH"))
951  {
953  DirRelation *dr;
954  for (rdi.toFirst();(dr=rdi.current());++rdi)
955  {
956  dr->writeDocumentation(ol);
957  }
958  }
959 }
static SDict< DirRelation > dirRelations
Definition: doxygen.h:140
void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:384
string dir
void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:732
Definition: sortdict.h:73
static DirSDict * directories
Definition: doxygen.h:139
Definition: dirdef.h:44
#define Config_getBool(val)
Definition: config.cpp:664
friend class Iterator
Definition: sortdict.h:289
void writeDirDependencyGraph ( const char *  file)