dirdef.cpp
Go to the documentation of this file.
1 #include "md5.h"
2 
3 #include "dirdef.h"
4 #include "filename.h"
5 #include "doxygen.h"
6 #include "util.h"
7 #include "outputlist.h"
8 #include "language.h"
9 #include "message.h"
10 #include "dot.h"
11 #include "layout.h"
12 #include "ftextstream.h"
13 #include "config.h"
14 #include "docparser.h"
15 
16 //----------------------------------------------------------------------
17 // method implementation
18 
19 static int g_dirCount=0;
20 
21 DirDef::DirDef(const char *path) : 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 }
51 
53 {
54  delete m_fileList;
55  delete m_usedDirs;
56 }
57 
59 {
60  return !isReference();
61 }
62 
63 bool DirDef::isLinkable() const
64 {
65  return isReference() || isLinkableInProject();
66 }
67 
69 {
70  m_subdirs.inSort(subdir);
71  subdir->setOuterScope(this);
72  subdir->m_parent=this;
73 }
74 
76 {
77  m_fileList->inSort(fd);
78  fd->setDirDef(this);
79 }
80 
82 {
83  // convert to md5 hash
84  uchar md5_sig[16];
85  QCString sigStr(33);
86  MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
87  MD5SigToString(md5_sig,sigStr.rawData(),33);
88  return sigStr;
89 
90  // old algorithm
91 // QCString result;
92 
93 // int l = anchor.length(),i;
94 // for (i=0;i<l;i++)
95 // {
96 // char c = anchor.at(i);
97 // if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9'))
98 // {
99 // result+=c;
100 // }
101 // else
102 // {
103 // static char hexStr[]="0123456789ABCDEF";
104 // char escChar[]={ '_', 0, 0, 0 };
105 // escChar[1]=hexStr[c>>4];
106 // escChar[2]=hexStr[c&0xf];
107 // result+=escChar;
108 // }
109 // }
110 // return result;
111 }
112 
114 {
115  //printf("DirDef::getOutputFileBase() %s->dir_%s\n",
116  // m_diskName.data(),encodeDirName(m_diskName).data());
117  return "dir_"+encodeDirName(m_diskName);
118 }
119 
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 }
164 
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 }
197 
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 }
217 
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 }
256 
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 }
315 
317 {
318  ol.startMemberSections();
319 }
320 
322 {
323  ol.endMemberSections();
324 }
325 
327 {
329 }
330 
332 {
333  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
334  return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
335 }
336 
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 }
383 
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 }
491 
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 }
508 
509 /** Add as "uses" dependency between \a this dir and \a dir,
510  * that was caused by a dependency on file \a fd.
511  */
513  FileDef *dstFd,bool inherited)
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 }
563 
564 /** Computes the dependencies between directories
565  */
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 }
602 
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 }
612 
614 {
615  return m_usedDirs->count()==0;
616 }
617 
618 //----------------------------------------------------------------------
619 
621 {
622  int orderHi = qstricmp(left->source()->name(),right->source()->name());
623  int orderLo = qstricmp(left->destination()->name(),right->destination()->name());
624  return orderHi==0 ? orderLo : orderHi;
625 }
626 
627 //----------------------------------------------------------------------
628 
629 UsedDir::UsedDir(DirDef *dir,bool inherited) :
630  m_dir(dir), m_filePairs(7), m_inherited(inherited)
631 {
633 }
634 
636 {
637 }
638 
639 
641 {
643  new FilePair(srcFd,dstFd));
644 }
645 
647 {
648  QCString n=name;
649  return n.isEmpty() ? 0 : m_filePairs.find(n);
650 }
651 
652 DirDef *DirDef::createNewDir(const char *path)
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 }
665 
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 }
680 
681 /*! strip part of \a path if it matches
682  * one of the paths in the Config_getList("STRIP_FROM_PATH") list
683  */
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 }
700 
701 //----------------------------------------------------------------------
702 
703 static void writePartialDirPath(OutputList &ol,const DirDef *root,const DirDef *target)
704 {
705  if (target->parent()!=root)
706  {
707  writePartialDirPath(ol,root,target->parent());
708  ol.writeString("&#160;/&#160;");
709  }
710  ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),0,target->shortName());
711 }
712 
713 static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef *fd)
714 {
715  if (fd->getDirDef() && fd->getDirDef()!=root)
716  {
717  writePartialDirPath(ol,root,fd->getDirDef());
718  ol.writeString("&#160;/&#160;");
719  }
720  if (fd->isLinkable())
721  {
722  ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
723  }
724  else
725  {
726  ol.startBold();
727  ol.docify(fd->name());
728  ol.endBold();
729  }
730 }
731 
733 {
734  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
735  ol.pushGeneratorState();
737 
739  m_src->shortName()+" &rarr; "+
740  m_dst->dir()->shortName());
742  m_src->displayName()+" -> "+
743  m_dst->dir()->shortName());
744  startFile(ol,getOutputFileBase(),getOutputFileBase(),
745  title,HLI_None,!generateTreeView,m_src->getOutputFileBase());
746 
747  if (!generateTreeView)
748  {
749  // write navigation path
750  m_src->writeNavigationPath(ol);
751  ol.endQuickIndices();
752  }
753  ol.startContents();
754 
755  ol.writeString("<h3>"+shortTitle+"</h3>");
756  ol.writeString("<table class=\"dirtab\">");
757  ol.writeString("<tr class=\"dirtab\">");
758  ol.writeString("<th class=\"dirtab\">");
759  ol.parseText(theTranslator->trFileIn(m_src->pathFragment()));
760  ol.writeString("</th>");
761  ol.writeString("<th class=\"dirtab\">");
762  ol.parseText(theTranslator->trIncludesFileIn(m_dst->dir()->pathFragment()));
763  ol.writeString("</th>");
764  ol.writeString("</tr>");
765 
766  SDict<FilePair>::Iterator fpi(m_dst->filePairs());
767  FilePair *fp;
768  for (fpi.toFirst();(fp=fpi.current());++fpi)
769  {
770  ol.writeString("<tr class=\"dirtab\">");
771  ol.writeString("<td class=\"dirtab\">");
772  writePartialFilePath(ol,m_src,fp->source());
773  ol.writeString("</td>");
774  ol.writeString("<td class=\"dirtab\">");
775  writePartialFilePath(ol,m_dst->dir(),fp->destination());
776  ol.writeString("</td>");
777  ol.writeString("</tr>");
778  }
779  ol.writeString("</table>");
780 
781  ol.endContents();
782 
783  endFileWithNavPath(m_src,ol);
784 
785  ol.popGeneratorState();
786 }
787 
788 //----------------------------------------------------------------------
789 // external functions
790 
791 /** In order to create stable, but unique directory names,
792  * we compute the common part of the path shared by all directories.
793  */
795 {
796  QCString path;
797  DirDef *dir;
799  if (Doxygen::directories->count()>0) // we have at least one dir
800  {
801  // start will full path of first dir
802  sdi.toFirst();
803  dir=sdi.current();
804  path=dir->name();
805  int i=path.findRev('/',path.length()-2);
806  path=path.left(i+1);
807  bool done=FALSE;
808  if (i==-1)
809  {
810  path="";
811  }
812  else
813  {
814  while (!done)
815  {
816  int l = path.length();
817  int count=0;
818  for (sdi.toFirst();(dir=sdi.current());++sdi)
819  {
820  QCString dirName = dir->name();
821  if (dirName.length()>path.length())
822  {
823  if (qstrncmp(dirName,path,l)!=0) // dirName does not start with path
824  {
825  int i=path.findRev('/',l-2);
826  if (i==-1) // no unique prefix -> stop
827  {
828  path="";
829  done=TRUE;
830  }
831  else // restart with shorter path
832  {
833  path=path.left(i+1);
834  break;
835  }
836  }
837  }
838  else // dir is shorter than path -> take path of dir as new start
839  {
840  path=dir->name();
841  l=path.length();
842  int i=path.findRev('/',l-2);
843  if (i==-1) // no unique prefix -> stop
844  {
845  path="";
846  done=TRUE;
847  }
848  else // restart with shorter path
849  {
850  path=path.left(i+1);
851  }
852  break;
853  }
854  count++;
855  }
856  if (count==Doxygen::directories->count())
857  // path matches for all directories -> found the common prefix
858  {
859  done=TRUE;
860  }
861  }
862  }
863  }
864  for (sdi.toFirst();(dir=sdi.current());++sdi)
865  {
866  QCString diskName = dir->name().right(dir->name().length()-path.length());
867  dir->setDiskName(diskName);
868  //printf("set disk name: %s -> %s\n",dir->name().data(),diskName.data());
869  }
870 }
871 
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 }
923 
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 }
941 
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 }
960 
static QCString name
Definition: declinfo.cpp:673
QCString convertToXML(const char *s)
Definition: util.cpp:5717
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
bool isParentOf(DirDef *dir) const
Definition: dirdef.cpp:603
void writeRuler()
Definition: outputlist.h:240
void addFile(FileDef *fd)
Definition: dirdef.cpp:75
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
int m_dirCount
Definition: dirdef.h:103
Q_EXPORT int qstrncmp(const char *str1, const char *str2, uint len)
Definition: qcstring.h:101
char * rawData() const
Definition: qcstring.h:216
static SDict< DirRelation > dirRelations
Definition: doxygen.h:140
QCString docFile() const
bool isTrivial() const
Definition: dot.cpp:4120
virtual ~DirDef()
Definition: dirdef.cpp:52
void addSubDir(DirDef *subdir)
Definition: dirdef.cpp:68
void endMemberItem()
Definition: outputlist.h:220
void endFileWithNavPath(Definition *d, OutputList &ol)
Definition: index.cpp:282
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:178
void computeDependencies()
Definition: dirdef.cpp:566
virtual QCString trFile(bool first_capital, bool singular)=0
virtual QCString getReference() const
bool isLinkable() const
Definition: filedef.h:117
void inSort(const char *key, const T *d)
Definition: sortdict.h:197
const QCString & shortName() const
Definition: dirdef.h:57
void writeDirectoryGraph(OutputList &ol)
Definition: dirdef.cpp:198
bool isEmpty() const
Definition: qcstring.h:189
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
void msg(const char *fmt,...)
Definition: message.cpp:107
int level() const
Definition: dirdef.h:63
uint length() const
Definition: qcstring.h:195
virtual QCString trDirRelation(const char *name)=0
void buildDirectories()
Definition: dirdef.cpp:872
bool generateSourceFile() const
Definition: filedef.cpp:1396
void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:384
DirList m_subdirs
Definition: dirdef.h:98
static QCString htmlFileExtension
Definition: doxygen.h:130
void writeString(const char *text)
Definition: outputlist.h:119
static bool matchPath(const QCString &path, QStrList &l)
Definition: dirdef.cpp:666
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
type * first()
Definition: qinternallist.h:87
QCString anchor() const
Definition: dirdef.h:53
virtual QCString trDirReference(const char *dirName)=0
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
char & at(uint i) const
Definition: qcstring.h:326
void startParagraph()
Definition: outputlist.h:115
virtual bool hasDocumentation() const
void writeNavigationPath(OutputList &ol) const
virtual void setOuterScope(Definition *d)
const bool FALSE
Definition: qglobal.h:370
static FileNameList * inputNameList
Definition: doxygen.h:109
static LayoutDocManager & instance()
Definition: layout.cpp:1359
virtual QCString trDirDepGraph(const char *name)=0
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
static void writePartialFilePath(OutputList &ol, const DirDef *root, const FileDef *fd)
Definition: dirdef.cpp:713
const FileDef * source() const
Definition: dirdef.h:114
#define Config_getList(val)
Definition: config.cpp:662
void startMemberSections()
Definition: outputlist.h:186
QCString left(uint len) const
Definition: qcstring.cpp:213
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
FileList * m_fileList
Definition: dirdef.h:102
int briefLine() const
virtual bool isReference() const
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
string dir
DirDef * getDirDef() const
Definition: filedef.h:121
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
void startMemberList()
Definition: outputlist.h:206
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:732
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1440
void endMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:321
unsigned char uchar
Definition: nybbler.cc:11
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
int compareValues(const FilePair *item1, const FilePair *item2) const
Definition: dirdef.cpp:620
QCString m_shortName
Definition: dirdef.h:100
QCString displayName(bool=TRUE) const
Definition: dirdef.h:56
void writeDocAnchorsToTagFile(FTextStream &)
Definition: definition.cpp:520
void setAutoDelete(bool val)
Definition: sortdict.h:222
void writeFileList(OutputList &ol)
Definition: dirdef.cpp:257
bool hasDetailedDescription() const
Definition: dirdef.cpp:331
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
FilePairDict m_filePairs
Definition: dirdef.h:144
void computeDirDependencies()
Definition: dirdef.cpp:924
void popGeneratorState()
Definition: outputlist.cpp:121
void endMemberHeader()
Definition: outputlist.h:196
Definition: sortdict.h:73
void endBold()
Definition: outputlist.h:306
virtual ~UsedDir()
Definition: dirdef.cpp:635
uint count() const
Definition: qlist.h:66
QAsciiDict< Entry > fn
void endParagraph()
Definition: outputlist.h:117
const QCString & name() const
Definition: definition.h:114
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
QDict< UsedDir > * m_usedDirs
Definition: dirdef.h:106
void inSort(const type *d)
Definition: qlist.h:71
static DirDef * createNewDir(const char *path)
Definition: dirdef.cpp:652
void pushGeneratorState()
Definition: outputlist.cpp:111
void startMemberDeclaration()
Definition: outputlist.h:312
QCString name() const
Definition: filedef.cpp:1193
void generateDirDocs(OutputList &ol)
Definition: dirdef.cpp:942
void MD5Buffer(const unsigned char *buf, unsigned int len, unsigned char sig[16])
Definition: md5.c:275
QCString right(uint len) const
Definition: qcstring.cpp:231
QList< IncludeInfo > * includeFileList() const
Definition: filedef.h:124
DirDef(const char *path)
Definition: dirdef.cpp:21
SrcLangExt getLanguage() const
std::void_t< T > n
static DirSDict * directories
Definition: doxygen.h:139
static DirDef * mergeDirectoryInTree(const QCString &path)
Definition: dirdef.cpp:684
static QCString encodeDirName(const QCString &anchor)
Definition: dirdef.cpp:81
void setLocalName(const QCString name)
const FileDef * destination() const
Definition: dirdef.h:115
p
Definition: test.py:223
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
A bunch of utility functions.
const char * data() const
Definition: qcstring.h:207
Definition: dirdef.h:44
type * current() const
Definition: qlist.h:146
static void writePartialDirPath(OutputList &ol, const DirDef *root, const DirDef *target)
Definition: dirdef.cpp:703
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
bool depGraphIsTrivial() const
Definition: dirdef.cpp:613
virtual QCString trCode()=0
void startBold()
Definition: outputlist.h:304
type * next()
Definition: qinternallist.h:89
bool isLinkableInProject() const
Definition: dirdef.cpp:58
void startMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:316
UsedDir(DirDef *dir, bool inherited)
Definition: dirdef.cpp:629
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
virtual QCString trFileIn(const char *name)=0
virtual QCString trMore()=0
virtual QCString briefDescription(bool abbreviate=FALSE) const
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:176
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
void endQuickIndices()
Definition: outputlist.h:352
QCString getOutputFileBase() const
Definition: filedef.h:83
void endContents()
Definition: outputlist.h:366
virtual QCString trIncludesFileIn(const char *name)=0
void writeSubDirList(OutputList &ol)
Definition: dirdef.cpp:218
void setDiskName(const QCString &name)
Definition: dirdef.h:78
FileDef * fileDef
Definition: filedef.h:49
void writeTagFile(FTextStream &t)
Definition: dirdef.cpp:337
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
void startDirDepGraph()
Definition: outputlist.h:394
void startTitle(OutputList &ol, const char *fileName, Definition *def)
Definition: index.cpp:228
void addUsesDependency(DirDef *usedDir, FileDef *srcFd, FileDef *dstFd, bool inherited)
Definition: dirdef.cpp:512
void MD5SigToString(unsigned char signature[16], char *str, int len)
Definition: md5.c:285
static int g_dirCount
Definition: dirdef.cpp:19
FilePair * findFilePair(const char *name)
Definition: dirdef.cpp:646
static void computeCommonDirPrefix()
Definition: dirdef.cpp:794
QCString getPath() const
Definition: filedef.h:110
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
void writeAnchor(const char *fileName, const char *name)
Definition: outputlist.h:242
void setLevel()
Definition: dirdef.cpp:492
void endMemberDescription()
Definition: outputlist.h:310
DirDef * m_parent
Definition: dirdef.h:105
Translator * theTranslator
Definition: language.cpp:157
virtual QCString trDir(bool first_capital, bool singular)=0
void endDirDepGraph(const DotDirDeps &g)
Definition: outputlist.h:396
bool isDocumentationFile() const
Definition: filedef.cpp:1728
void endTitle(OutputList &ol, const char *fileName, const char *name)
Definition: index.cpp:237
void endMemberSections()
Definition: outputlist.h:188
bool isEmpty() const
Definition: docparser.h:1409
friend class Iterator
Definition: sortdict.h:289
float pi
Definition: units.py:11
const DirDef * dir() const
Definition: dirdef.h:139
int m_level
Definition: dirdef.h:104
QCString includeName() const
Definition: filedef.cpp:1784
void setDirDef(DirDef *dd)
Definition: filedef.h:164
DirDef * parent() const
Definition: dirdef.h:64
int docLine() const
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
QCString m_diskName
Definition: dirdef.h:101
T * find(const char *key)
Definition: sortdict.h:232
virtual QCString documentation() const
bool isLinkable() const
Definition: dirdef.cpp:63
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
void endTextLink()
Definition: outputlist.h:161
static QCString * s
Definition: config.cpp:1042
def parent(G, child, parent_type)
Definition: graph.py:67
const bool TRUE
Definition: qglobal.h:371
void endMemberList()
Definition: outputlist.h:208
QTextStream & endl(QTextStream &s)
void addFileDep(FileDef *srcFd, FileDef *dstFd)
Definition: dirdef.cpp:640
void startContents()
Definition: outputlist.h:364
#define ASSERT(x)
Definition: qglobal.h:590
type * toFirst()
Definition: qlist.h:135