Exemple #1
0
void DirDef::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;
    }
  }
}
Exemple #2
0
void computeDirDependencies()
{
  DirDef *dir;
  DirSDict::Iterator sdi(*Doxygen::directories);
  // 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());
    dir->computeDependencies();
  }

}
Exemple #3
0
void computeDirDependencies()
{
  DirDef *dir;
  DirSDict::Iterator sdi(*Doxygen::directories);
  // 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());
    dir->computeDependencies();
  }

#if 0
  printf("-------------------------------------------------------------\n");
  // print dependencies (for debugging)
  for (sdi.toFirst();(dir=sdi.current());++sdi)
  {
    if (dir->usedDirs())
    {
      QDictIterator<UsedDir> udi(*dir->usedDirs());
      UsedDir *usedDir;
      for (udi.toFirst();(usedDir=udi.current());++udi)
      {
        printf("%s depends on %s due to ",
            dir->shortName().data(),usedDir->dir()->shortName().data());
        QDictIterator<FileDef> fdi(usedDir->files());
        FileDef *fd;
        for (fdi.toFirst();(fd=fdi.current());++fdi)
        {
          printf("%s ",fd->name().data());
        }
        printf("\n");
      }
    }
  }
  printf("^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^\n");
#endif
}