Doxygen
dirdef.cpp
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2020 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #include <algorithm>
17 
18 #include "dirdef.h"
19 #include "md5.h"
20 #include "filename.h"
21 #include "doxygen.h"
22 #include "util.h"
23 #include "outputlist.h"
24 #include "language.h"
25 #include "message.h"
26 #include "dot.h"
27 #include "dotdirdeps.h"
28 #include "layout.h"
29 #include "config.h"
30 #include "docparser.h"
31 #include "definitionimpl.h"
32 #include "filedef.h"
33 
34 
35 //----------------------------------------------------------------------
36 
37 class DirDefImpl : public DefinitionMixin<DirDef>
38 {
39  public:
40  DirDefImpl(const QCString &path);
41  virtual ~DirDefImpl();
42 
43  virtual DefType definitionType() const { return TypeDir; }
44  virtual CodeSymbolType codeSymbolType() const { return CodeSymbolType::Default; }
45  virtual QCString getOutputFileBase() const;
46  virtual QCString anchor() const { return QCString(); }
47  virtual bool isLinkableInProject() const;
48  virtual bool isLinkable() const;
49  virtual QCString displayName(bool=TRUE) const { return m_dispName; }
50  virtual const QCString shortName() const { return m_shortName; }
51  virtual void addSubDir(DirDef *subdir);
52  virtual const FileList &getFiles() const { return m_fileList; }
53  virtual void addFile(const FileDef *fd);
54  virtual const DirList &subDirs() const { return m_subdirs; }
55  virtual bool hasSubdirs() const { return !m_subdirs.empty(); }
56  virtual int level() const { return m_level; }
57  virtual DirDef *parent() const { return m_parent; }
58  virtual int dirCount() const { return m_dirCount; }
59  virtual const UsedDirLinkedMap &usedDirs() const { return m_usedDirs; }
60  virtual bool isParentOf(const DirDef *dir) const;
61  virtual bool depGraphIsTrivial() const;
62  virtual QCString shortTitle() const;
63  virtual bool hasDetailedDescription() const;
64  virtual void writeDocumentation(OutputList &ol);
65  virtual void writeTagFile(TextStream &t);
66  virtual void setDiskName(const QCString &name) { m_diskName = name; }
67  virtual void sort();
68  virtual void setParent(DirDef *parent);
69  virtual void setDirCount(int count);
70  virtual void setLevel();
71  virtual void addUsesDependency(const DirDef *usedDir,const FileDef *srcFd,
72  const FileDef *dstFd,bool srcDirect, bool dstDirect);
73  virtual void computeDependencies();
74 
75  public:
76  static DirDef *mergeDirectoryInTree(const QCString &path);
77 
78  private:
79 
80  void writeDetailedDescription(OutputList &ol,const QCString &title);
83  void writeSubDirList(OutputList &ol);
84  void writeFileList(OutputList &ol);
87 
88  static DirDef *createNewDir(const QCString &path);
89  static bool matchPath(const QCString &path,const StringVector &l);
90 
95  FileList m_fileList; // list of files in the group
96  int m_dirCount = -1;
97  int m_level;
100 };
101 
103 {
104  return new DirDefImpl(path);
105 }
106 
107 
108 //----------------------------------------------------------------------
109 // method implementation
110 
111 DirDefImpl::DirDefImpl(const QCString &path) : DefinitionMixin(path,1,1,path)
112 {
113  bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
114  // get display name (stripping the paths mentioned in STRIP_FROM_PATH)
115  // get short name (last part of path)
116  m_shortName = path;
117  m_diskName = path;
118  if (m_shortName.at(m_shortName.length()-1)=='/')
119  { // strip trailing /
120  m_shortName = m_shortName.left(m_shortName.length()-1);
121  }
122  int pi=m_shortName.findRev('/');
123  if (pi!=-1)
124  { // remove everything till the last /
125  m_shortName = m_shortName.mid(pi+1);
126  }
127  setLocalName(m_shortName);
128  m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
129  if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)=='/')
130  { // strip trailing /
131  m_dispName = m_dispName.left(m_dispName.length()-1);
132  }
133 
134  m_level=-1;
135  m_parent=0;
136 }
137 
139 {
140 }
141 
143 {
144  return !isReference();
145 }
146 
148 {
149  return isReference() || isLinkableInProject();
150 }
151 
153 {
154  m_subdirs.push_back(subdir);
155  subdir->setOuterScope(this);
156  subdir->setParent(this);
157 }
158 
160 {
161  m_parent=p;
162 }
163 
164 void DirDefImpl::setDirCount(int count)
165 {
166  m_dirCount=count;
167 }
168 
170 {
171  m_fileList.push_back(fd);
172  const_cast<FileDef*>(fd)->setDirDef(this);
173 }
174 
176 {
177  std::sort(m_subdirs.begin(), m_subdirs.end(), compareDirDefs);
178  std::sort(m_fileList.begin(), m_fileList.end(), compareFileDefs);
179 }
180 
181 static QCString encodeDirName(const QCString &anchor)
182 {
183  // convert to md5 hash
184  uchar md5_sig[16];
185  char sigStr[33];
186  MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
187  MD5SigToString(md5_sig,sigStr);
188  return sigStr;
189 
190  // old algorithm
191 // QCString result;
192 
193 // int l = anchor.length(),i;
194 // for (i=0;i<l;i++)
195 // {
196 // char c = anchor.at(i);
197 // if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9'))
198 // {
199 // result+=c;
200 // }
201 // else
202 // {
203 // static char hexStr[]="0123456789ABCDEF";
204 // char escChar[]={ '_', 0, 0, 0 };
205 // escChar[1]=hexStr[c>>4];
206 // escChar[2]=hexStr[c&0xf];
207 // result+=escChar;
208 // }
209 // }
210 // return result;
211 }
212 
214 {
215  //printf("DirDefImpl::getOutputFileBase() %s->dir_%s\n",
216  // qPrint(m_diskName),qPrint(encodeDirName(m_diskName)));
217  return "dir_"+encodeDirName(m_diskName);
218 }
219 
221 {
222  if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) ||
223  !documentation().isEmpty())
224  {
225  ol.pushGeneratorState();
227  ol.writeRuler();
228  ol.popGeneratorState();
229  ol.pushGeneratorState();
231  ol.writeAnchor(QCString(),"details");
232  ol.popGeneratorState();
233  ol.startGroupHeader();
234  ol.parseText(title);
235  ol.endGroupHeader();
236 
237  // repeat brief description
238  if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
239  {
241  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
242  }
243  // separator between brief and details
244  if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
245  !documentation().isEmpty())
246  {
247  ol.pushGeneratorState();
250  // ol.newParagraph(); // FIXME:PARA
251  ol.enableAll();
254  ol.writeString("\n\n");
255  ol.popGeneratorState();
256  }
257 
258  // write documentation
259  if (!documentation().isEmpty())
260  {
261  ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
262  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
263  }
264  }
265 }
266 
268 {
269  if (hasBriefDescription())
270  {
271  std::unique_ptr<IDocParser> parser { createDocParser() };
272  std::unique_ptr<DocRoot> rootNode { validatingParseDoc(
273  *parser.get(), briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE,
274  QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
275  if (rootNode && !rootNode->isEmpty())
276  {
277  ol.startParagraph();
278  ol.pushGeneratorState();
280  ol.writeString(" - ");
281  ol.popGeneratorState();
282  ol.writeDoc(rootNode.get(),this,0);
283  ol.pushGeneratorState();
285  ol.writeString(" \n");
287 
288  if (Config_getBool(REPEAT_BRIEF) ||
289  !documentation().isEmpty()
290  )
291  {
293  ol.startTextLink(QCString(),"details");
295  ol.endTextLink();
296  }
297  ol.popGeneratorState();
298 
299  ol.endParagraph();
300  }
301  }
302  ol.writeSynopsis();
303 }
304 
306 {
307  // write graph dependency graph
308  if (Config_getBool(DIRECTORY_GRAPH) && Config_getBool(HAVE_DOT))
309  {
310  DotDirDeps dirDep(this);
311  if (!dirDep.isTrivial())
312  {
313  msg("Generating dependency graph for directory %s\n",qPrint(displayName()));
315  //ol.startParagraph();
316  ol.startDirDepGraph();
318  ol.endDirDepGraph(dirDep);
319  //ol.endParagraph();
320  ol.enableAll();
321  }
322  }
323 }
324 
326 {
327  int numSubdirs = 0;
328  for(const auto dd : m_subdirs)
329  {
330  if (dd->hasDocumentation() || !dd->getFiles().empty())
331  {
332  numSubdirs++;
333  }
334  }
335 
336  // write subdir list
337  if (numSubdirs>0)
338  {
339  ol.startMemberHeader("subdirs");
341  ol.endMemberHeader();
342  ol.startMemberList();
343  for(const auto dd : m_subdirs)
344  {
345  if (dd->hasDocumentation() || dd->getFiles().empty())
346  {
348  ol.startMemberItem(dd->anchor(),0);
350  ol.insertMemberAlign();
351  ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
352  ol.endMemberItem();
353  if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
354  {
355  ol.startMemberDescription(dd->getOutputFileBase());
356  ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
357  FALSE, // indexWords
358  FALSE, // isExample
359  QCString(), // exampleName
360  TRUE, // single line
361  TRUE, // link from index
362  Config_getBool(MARKDOWN_SUPPORT)
363  );
365  }
366  ol.endMemberDeclaration(dd->anchor(),QCString());
367  }
368  }
369 
370  ol.endMemberList();
371  }
372 }
373 
375 {
376  int numFiles = 0;
377  for (const auto &fd : m_fileList)
378  {
379  if (fd->hasDocumentation())
380  {
381  numFiles++;
382  }
383  }
384 
385  // write file list
386  if (numFiles>0)
387  {
388  ol.startMemberHeader("files");
390  ol.endMemberHeader();
391  ol.startMemberList();
392  for (const auto &fd : m_fileList)
393  {
394  if (fd->hasDocumentation())
395  {
397  ol.startMemberItem(fd->anchor(),0);
399  ol.insertMemberAlign();
400  if (fd->isLinkable())
401  {
402  ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
403  }
404  else
405  {
406  ol.startBold();
407  ol.docify(fd->name());
408  ol.endBold();
409  }
410  if (fd->generateSourceFile())
411  {
412  ol.pushGeneratorState();
414  ol.docify(" ");
415  ol.startTextLink(fd->includeName(),QCString());
416  ol.docify("[");
418  ol.docify("]");
419  ol.endTextLink();
420  ol.popGeneratorState();
421  }
422  ol.endMemberItem();
423  if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
424  {
425  ol.startMemberDescription(fd->getOutputFileBase());
426  ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
427  FALSE, // indexWords
428  FALSE, // isExample
429  QCString(), // exampleName
430  TRUE, // single line
431  TRUE, // link from index
432  Config_getBool(MARKDOWN_SUPPORT)
433  );
435  }
436  ol.endMemberDeclaration(fd->anchor(),QCString());
437  }
438  }
439  ol.endMemberList();
440  }
441 }
442 
444 {
445  ol.startMemberSections();
446 }
447 
449 {
450  ol.endMemberSections();
451 }
452 
454 {
456 }
457 
459 {
460  static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
461  return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
462 }
463 
465 {
466  tagFile << " <compound kind=\"dir\">\n";
467  tagFile << " <name>" << convertToXML(displayName()) << "</name>\n";
468  tagFile << " <path>" << convertToXML(name()) << "</path>\n";
469  tagFile << " <filename>" << addHtmlExtensionIfMissing(getOutputFileBase()) << "</filename>\n";
470  for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Directory))
471  {
472  switch (lde->kind())
473  {
475  {
476  if (m_subdirs.size()>0)
477  {
478  for(const auto dd : m_subdirs)
479  {
480  tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>\n";
481  }
482  }
483  }
484  break;
486  {
487  for (const auto &fd : m_fileList)
488  {
489  tagFile << " <file>" << convertToXML(fd->name()) << "</file>\n";
490  }
491  }
492  break;
493  default:
494  break;
495  }
496  }
497  writeDocAnchorsToTagFile(tagFile);
498  tagFile << " </compound>\n";
499 }
500 
502 {
503  static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
504  ol.pushGeneratorState();
505 
507  startFile(ol,getOutputFileBase(),name(),title,HLI_Files,!generateTreeView);
508 
509  if (!generateTreeView)
510  {
511  // write navigation path
513  ol.endQuickIndices();
514  }
515 
517  ol.pushGeneratorState();
519  ol.parseText(shortTitle());
520  ol.enableAll();
522  ol.parseText(title);
523  ol.popGeneratorState();
524  endTitle(ol,getOutputFileBase(),title);
525  ol.startContents();
526 
527  //---------------------------------------- start flexible part -------------------------------
528 
529  SrcLangExt lang = getLanguage();
530  for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Directory))
531  {
532  switch (lde->kind())
533  {
536  break;
539  break;
542  break;
544  writeSubDirList(ol);
545  break;
547  writeFileList(ol);
548  break;
551  break;
553  {
554  const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
555  writeDetailedDescription(ol,ls->title(lang));
556  }
557  break;
601  err("Internal inconsistency: member %d should not be part of "
602  "LayoutDocManager::Directory entry list\n",lde->kind());
603  break;
604  }
605  }
606 
607  //---------------------------------------- end flexible part -------------------------------
608 
609  ol.endContents();
610 
611  endFileWithNavPath(this,ol);
612 
613  ol.popGeneratorState();
614 }
615 
617 {
618  if (m_level==-1) // level not set before
619  {
620  DirDef *p = parent();
621  if (p)
622  {
623  p->setLevel();
624  m_level = p->level()+1;
625  }
626  else
627  {
628  m_level = 0;
629  }
630  }
631 }
632 
633 /** Add as "uses" dependency between \a this dir and \a dir,
634  * that was caused by a dependency on file \a fd.
635  * srcDirect and dstDirect indicate if it is a direct dependencies (true) or if
636  * the dependencies was indirect (e.g. a parent dir that has a child dir that has the dependencies)
637  */
638 void DirDefImpl::addUsesDependency(const DirDef *dir,const FileDef *srcFd,
639  const FileDef *dstFd,bool srcDirect, bool dstDirect)
640 {
641  if (this==dir) return; // do not add self-dependencies
642  //static int count=0;
643  //printf(" %d add dependency %s->%s due to %s->%s\n",
644  // count++,qPrint(shortName()),
645  // qPrint(dir->shortName()),
646  // qPrint(srcFd->name()),
647  // qPrint(dstFd->name()));
648 
649  // levels match => add direct dependency
650  bool added=FALSE;
651  UsedDir *usedDir = m_usedDirs.find(dir->getOutputFileBase());
652  if (usedDir) // dir dependency already present
653  {
654  const FilePair *usedPair = usedDir->findFilePair(FilePair::key(srcFd,dstFd));
655  if (usedPair==0) // new file dependency
656  {
657  //printf(" => new file\n");
658  usedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
659  added=TRUE;
660  }
661  else
662  {
663  // dir & file dependency already added
664  }
665  }
666  else // new directory dependency
667  {
668  //printf(" => new file\n");
669  auto newUsedDir = std::make_unique<UsedDir>(dir);
670  newUsedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
671  usedDir = m_usedDirs.add(dir->getOutputFileBase(),std::move(newUsedDir));
672  added=TRUE;
673  }
674  if (added)
675  {
676  if (dir->parent())
677  {
678  // add relation to parent of used dir
679  addUsesDependency(dir->parent(),
680  srcFd,
681  dstFd,
682  srcDirect,
683  false); // indirect dependency on dest dir
684  }
685  if (parent())
686  {
687  // add relation for the parent of this dir as well
688  parent()->addUsesDependency(dir,
689  srcFd,
690  dstFd,
691  false, // indirect dependency from source dir
692  dstDirect);
693  }
694  }
695 }
696 
697 /** Computes the dependencies between directories
698  */
700 {
701  for (const auto &fd : m_fileList)
702  {
703  //printf(" File %s\n",qPrint(fd->name()));
704  //printf("** dir=%s file=%s\n",qPrint(shortName()),qPrint(fd->name()));
705  for (const auto &ii : fd->includeFileList())
706  {
707  //printf(" > %s\n",qPrint(ii->includeName));
708  //printf(" #include %s\n",qPrint(ii->includeName));
709  if (ii.fileDef && ii.fileDef->isLinkable()) // linkable file
710  {
711  DirDef *usedDir = ii.fileDef->getDirDef();
712  if (usedDir)
713  {
714  // add dependency: thisDir->usedDir
715  //static int count=0;
716  //printf(" %d: add dependency %s->%s\n",count++,qPrint(name()),qPrint(usedDir->name()));
717  addUsesDependency(usedDir,fd,ii.fileDef,true,true);
718  }
719  }
720  }
721  }
722 
723  std::sort(m_usedDirs.begin(),m_usedDirs.end(),
724  [](const auto &u1,const auto &u2)
725  { return qstricmp(u1->dir()->getOutputFileBase(),u2->dir()->getOutputFileBase())<0; });
726 
727  for (const auto& usedDirectory : m_usedDirs)
728  {
729  usedDirectory->sort();
730  }
731 }
732 
733 bool DirDefImpl::isParentOf(const DirDef *dir) const
734 {
735  if (dir->parent()==this) // this is a parent of dir
736  return TRUE;
737  else if (dir->parent()) // repeat for the parent of dir
738  return isParentOf(dir->parent());
739  else
740  return FALSE;
741 }
742 
744 {
745  return m_usedDirs.empty();
746 }
747 
748 
749 //----------------------------------------------------------------------
750 
752  m_dir(dir)
753 {
754 }
755 
757 {
758 }
759 
760 void UsedDir::addFileDep(const FileDef *srcFd,const FileDef *dstFd, bool srcDirect, bool dstDirect)
761 {
762  m_filePairs.add(FilePair::key(srcFd,dstFd),std::make_unique<FilePair>(srcFd,dstFd));
763  m_hasDirectDeps = m_hasDirectDeps || (srcDirect && dstDirect);
764  m_hasDirectSrcDeps = m_hasDirectSrcDeps || srcDirect;
765  m_hasDirectDstDeps = m_hasDirectDstDeps || dstDirect;
766 }
767 
769 {
770  std::sort(m_filePairs.begin(),
771  m_filePairs.end(),
772  [](const auto &left,const auto &right)
773  {
774  int orderHi = qstricmp(left->source()->name(),right->source()->name());
775  if (orderHi!=0) return orderHi<0;
776  int orderLo = qstricmp(left->destination()->name(),right->destination()->name());
777  return orderLo<0;
778  });
779 }
780 
782 {
783  return m_filePairs.find(name);
784 }
785 
787 {
788  ASSERT(path!=0);
789  DirDef *dir = Doxygen::dirLinkedMap->find(path);
790  if (dir==0) // new dir
791  {
792  dir = Doxygen::dirLinkedMap->add(path,
793  std::unique_ptr<DirDef>(
794  createDirDef(path)));
795  //printf("Adding new dir %s\n",path);
796  //printf("createNewDir %s short=%s\n",path,qPrint(dir->shortName()));
797  }
798  return dir;
799 }
800 
801 bool DirDefImpl::matchPath(const QCString &path,const StringVector &l)
802 {
803  for (const auto &s : l)
804  {
805  std::string prefix = s.substr(0,path.length());
806  if (qstricmp(prefix.c_str(),path)==0) // case insensitive compare
807  {
808  return TRUE;
809  }
810  }
811  return FALSE;
812 }
813 
814 /*! strip part of \a path if it matches
815  * one of the paths in the Config_getList(STRIP_FROM_PATH) list
816  */
818 {
819  //printf("DirDefImpl::mergeDirectoryInTree(%s)\n",qPrint(path));
820  int p=0,i=0;
821  DirDef *dir=0;
822  while ((i=path.find('/',p))!=-1)
823  {
824  QCString part=path.left(i+1);
825  if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//"))
826  {
827  dir=createNewDir(part);
828  }
829  p=i+1;
830  }
831  return dir;
832 }
833 
834 //----------------------------------------------------------------------
835 
836 QCString FilePair::key(const FileDef *srcFd,const FileDef *dstFd)
837 {
838  return srcFd->getOutputFileBase()+";"+dstFd->getOutputFileBase();
839 }
840 
841 //----------------------------------------------------------------------
842 
843 static void writePartialDirPath(OutputList &ol,const DirDef *root,const DirDef *target)
844 {
845  if (target->parent()!=root)
846  {
847  writePartialDirPath(ol,root,target->parent());
848  ol.writeString("&#160;/&#160;");
849  }
850  ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),QCString(),target->shortName());
851 }
852 
853 static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef *fd)
854 {
855  if (fd->getDirDef() && fd->getDirDef()!=root)
856  {
857  writePartialDirPath(ol,root,fd->getDirDef());
858  ol.writeString("&#160;/&#160;");
859  }
860  if (fd->isLinkable())
861  {
863  }
864  else
865  {
866  ol.startBold();
867  ol.docify(fd->name());
868  ol.endBold();
869  }
870 }
871 
873 {
874  static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
875  ol.pushGeneratorState();
877 
879  (m_src->shortName()+" &rarr; "+m_dst->dir()->shortName()));
881  (m_src->displayName()+" -> "+m_dst->dir()->shortName()));
883  title,HLI_None,!generateTreeView,m_src->getOutputFileBase());
884 
885  if (!generateTreeView)
886  {
887  // write navigation path
889  ol.endQuickIndices();
890  }
891  ol.startContents();
892 
893  ol.writeString("<h3>"+shortTitle+"</h3>");
894  ol.writeString("<table class=\"dirtab\">");
895  ol.writeString("<tr class=\"dirtab\">");
896  ol.writeString("<th class=\"dirtab\">");
898  ol.writeString("</th>");
899  ol.writeString("<th class=\"dirtab\">");
901  ol.writeString("</th>");
902  ol.writeString("</tr>");
903 
904  for (const auto &fp : m_dst->filePairs())
905  {
906  ol.writeString("<tr class=\"dirtab\">");
907  ol.writeString("<td class=\"dirtab\">");
908  writePartialFilePath(ol,m_src,fp->source());
909  ol.writeString("</td>");
910  ol.writeString("<td class=\"dirtab\">");
911  writePartialFilePath(ol,m_dst->dir(),fp->destination());
912  ol.writeString("</td>");
913  ol.writeString("</tr>");
914  }
915  ol.writeString("</table>");
916 
917  ol.endContents();
918 
920 
921  ol.popGeneratorState();
922 }
923 
924 //----------------------------------------------------------------------
925 // external functions
926 
927 /** In order to create stable, but unique directory names,
928  * we compute the common part of the path shared by all directories.
929  */
931 {
932  QCString path;
933  auto it = Doxygen::dirLinkedMap->begin();
934  if (!Doxygen::dirLinkedMap->empty()) // we have at least one dir
935  {
936  // start will full path of first dir
937  path=(*it)->name();
938  int i=path.findRev('/',(int)path.length()-2);
939  path=path.left(i+1);
940  bool done=FALSE;
941  if (i==-1)
942  {
943  path="";
944  }
945  else
946  {
947  while (!done)
948  {
949  uint l = path.length();
950  size_t count=0;
951  for (const auto &dir : *Doxygen::dirLinkedMap)
952  {
953  QCString dirName = dir->name();
954  if (dirName.length()>path.length())
955  {
956  if (dirName.left(l)!=path) // dirName does not start with path
957  {
958  i=path.findRev('/',(int)l-2);
959  if (i==-1) // no unique prefix -> stop
960  {
961  path="";
962  done=TRUE;
963  }
964  else // restart with shorter path
965  {
966  path=path.left(i+1);
967  break;
968  }
969  }
970  }
971  else // dir is shorter than path -> take path of dir as new start
972  {
973  path=dir->name();
974  l=path.length();
975  i=path.findRev('/',(int)l-2);
976  if (i==-1) // no unique prefix -> stop
977  {
978  path="";
979  done=TRUE;
980  }
981  else // restart with shorter path
982  {
983  path=path.left(i+1);
984  }
985  break;
986  }
987  count++;
988  }
989  if (count==Doxygen::dirLinkedMap->size())
990  // path matches for all directories -> found the common prefix
991  {
992  done=TRUE;
993  }
994  }
995  }
996  }
997  for (const auto &dir : *Doxygen::dirLinkedMap)
998  {
999  QCString diskName = dir->name().right(dir->name().length()-path.length());
1000  dir->setDiskName(diskName);
1001  //printf("set disk name: %s -> %s\n",qPrint(dir->name()),qPrint(diskName));
1002  }
1003 }
1004 
1006 {
1007  // for each input file
1008  for (const auto &fn : *Doxygen::inputNameLinkedMap)
1009  {
1010  for (const auto &fd : *fn)
1011  {
1012  if (fd->getReference().isEmpty())
1013  {
1014  DirDef *dir;
1015  if ((dir=Doxygen::dirLinkedMap->find(fd->getPath()))==0) // new directory
1016  {
1017  dir = DirDefImpl::mergeDirectoryInTree(fd->getPath());
1018  }
1019  if (dir && !fd->isDocumentationFile()) dir->addFile(fd.get());
1020  }
1021  else
1022  {
1023  // do something for file imported via tag files.
1024  }
1025  }
1026  }
1027 
1028  // compute relations between directories => introduce container dirs.
1029  for (const auto &dir : *Doxygen::dirLinkedMap)
1030  {
1031  QCString name = dir->name();
1032  int i=name.findRev('/',(int)name.length()-2);
1033  if (i>0)
1034  {
1035  DirDef *parent = Doxygen::dirLinkedMap->find(name.left(i+1));
1036  //if (parent==0) parent=root;
1037  if (parent)
1038  {
1039  parent->addSubDir(dir.get());
1040  //printf("DirDefImpl::addSubdir(): Adding subdir\n%s to\n%s\n",
1041  // qPrint(dir->displayName()), qPrint(parent->displayName()));
1042  }
1043  }
1044  }
1045 
1046  // sort the directory contents
1047  for (const auto &dir : *Doxygen::dirLinkedMap)
1048  {
1049  dir->sort();
1050  }
1051 
1052  // short the directories themselves
1053  std::sort(Doxygen::dirLinkedMap->begin(),
1055  [](const auto &d1,const auto &d2)
1056  {
1057  QCString s1 = d1->shortName(), s2 = d2->shortName();
1058  int i = qstricmp(s1,s2);
1059  if (i==0) // if sort name are equal, sort on full path
1060  {
1061  QCString n1 = d1->name(), n2 = d2->name();
1062  int n = qstricmp(n1,n2);
1063  return n < 0;
1064  }
1065  return i < 0;
1066  });
1067 
1068  // set the directory count identifier
1069  int dirCount=0;
1070  for (const auto &dir : *Doxygen::dirLinkedMap)
1071  {
1072  dir->setDirCount(dirCount++);
1073  }
1074 
1076 }
1077 
1079 {
1080  // compute nesting level for each directory
1081  for (const auto &dir : *Doxygen::dirLinkedMap)
1082  {
1083  dir->setLevel();
1084  }
1085 
1086  // compute uses dependencies between directories
1087  for (const auto &dir : *Doxygen::dirLinkedMap)
1088  {
1089  //printf("computeDependencies for %s: #dirs=%d\n",qPrint(dir->name()),Doxygen::directories.count());
1090  dir->computeDependencies();
1091  }
1092 }
1093 
1095 {
1096  for (const auto &dir : *Doxygen::dirLinkedMap)
1097  {
1098  ol.pushGeneratorState();
1099  if (!dir->hasDocumentation())
1100  {
1102  }
1103  dir->writeDocumentation(ol);
1104  ol.popGeneratorState();
1105  }
1106  if (Config_getBool(DIRECTORY_GRAPH))
1107  {
1108  for (const auto &dr : Doxygen::dirRelations)
1109  {
1110  dr->writeDocumentation(ol);
1111  }
1112  }
1113 }
1114 
1115 bool compareDirDefs(const DirDef *item1, const DirDef *item2)
1116 {
1117  return qstricmp(item1->shortName(),item2->shortName()) < 0;
1118 }
1119 
1120 // --- Cast functions
1121 
1123 {
1124  if (d==0) return 0;
1125  if (d && typeid(*d)==typeid(DirDefImpl))
1126  {
1127  return static_cast<DirDef*>(d);
1128  }
1129  else
1130  {
1131  return 0;
1132  }
1133 }
1134 
1135 const DirDef *toDirDef(const Definition *d)
1136 {
1137  if (d==0) return 0;
1138  if (d && typeid(*d)==typeid(DirDefImpl))
1139  {
1140  return static_cast<const DirDef*>(d);
1141  }
1142  else
1143  {
1144  return 0;
1145  }
1146 }
1147 
DefinitionMixin< DirDef >::briefFile
virtual QCString briefFile() const
Definition: definitionimpl.h:171
LayoutDocEntry::GroupPageDocs
@ GroupPageDocs
Definition: layout.h:65
OutputList::endDirDepGraph
void endDirDepGraph(DotDirDeps &g)
Definition: outputlist.h:401
StringVector
std::vector< std::string > StringVector
Definition: containers.h:32
OutputList::disableAllBut
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:76
DefinitionMixin< DirDef >::isReference
virtual bool isReference() const
Definition: definitionimpl.h:183
OutputList::startMemberDescription
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition: outputlist.h:306
startTitle
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition: index.cpp:219
FilePair::key
static QCString key(const FileDef *srcFd, const FileDef *dstFd)
Definition: dirdef.cpp:836
DirDefImpl::isParentOf
virtual bool isParentOf(const DirDef *dir) const
Definition: dirdef.cpp:733
outputlist.h
DirDefImpl::writeFileList
void writeFileList(OutputList &ol)
Definition: dirdef.cpp:374
OutputList::endGroupHeader
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:171
UsedDir::~UsedDir
virtual ~UsedDir()
Definition: dirdef.cpp:756
OutputList::startMemberList
void startMemberList()
Definition: outputlist.h:197
DirDefImpl::codeSymbolType
virtual CodeSymbolType codeSymbolType() const
Definition: dirdef.cpp:57
LayoutDocEntry::NamespaceNestedNamespaces
@ NamespaceNestedNamespaces
Definition: layout.h:52
LayoutDocManager::Directory
@ Directory
Definition: layout.h:203
Translator::trDirDepGraph
virtual QCString trDirDepGraph(const QCString &name)=0
endTitle
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition: index.cpp:228
DirDefImpl::m_level
int m_level
Definition: dirdef.cpp:110
OutputList::endMemberDeclaration
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition: outputlist.h:312
DirDefImpl::hasSubdirs
virtual bool hasSubdirs() const
Definition: dirdef.cpp:68
DotDirDeps
Representation of an directory dependency graph
Definition: dotdirdeps.h:25
LayoutDocEntry::GroupConcepts
@ GroupConcepts
Definition: layout.h:63
UsedDir::m_filePairs
FilePairLinkedMap m_filePairs
Definition: dirdef.h:100
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
writePartialDirPath
static void writePartialDirPath(OutputList &ol, const DirDef *root, const DirDef *target)
Definition: dirdef.cpp:843
DirDefImpl::writeBriefDescription
void writeBriefDescription(OutputList &ol)
Definition: dirdef.cpp:267
LayoutDocEntry::GroupFiles
@ GroupFiles
Definition: layout.h:64
LayoutDocEntry::NamespaceInlineClasses
@ NamespaceInlineClasses
Definition: layout.h:54
LayoutDocEntry::MemberDef
@ MemberDef
Definition: layout.h:38
LayoutDocEntry::FileClasses
@ FileClasses
Definition: layout.h:57
DirList
A list of directories.
Definition: dirdef.h:181
OutputList::docify
void docify(const QCString &s)
Definition: outputlist.h:137
UsedDir::addFileDep
void addFileDep(const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Take up dependency between files.
Definition: dirdef.cpp:760
LayoutDocEntry::ConceptDefinition
@ ConceptDefinition
Definition: layout.h:49
UsedDir::m_hasDirectDstDeps
bool m_hasDirectDstDeps
Definition: dirdef.h:104
DefinitionMixin< DirDef >::writeDocAnchorsToTagFile
virtual void writeDocAnchorsToTagFile(TextStream &fs) const
Definition: definitionimpl.h:268
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
writePartialFilePath
static void writePartialFilePath(OutputList &ol, const DirDef *root, const FileDef *fd)
Definition: dirdef.cpp:853
encodeDirName
static QCString encodeDirName(const QCString &anchor)
Definition: dirdef.cpp:181
OutputList::endMemberDescription
void endMemberDescription()
Definition: outputlist.h:308
DirDef::addFile
virtual void addFile(const FileDef *fd)=0
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
DirDef
A model of a directory symbol.
Definition: dirdef.h:110
DefinitionMixin< DirDef >::docFile
virtual QCString docFile() const
Definition: definitionimpl.h:164
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
DirDefImpl::getOutputFileBase
virtual QCString getOutputFileBase() const
Definition: dirdef.cpp:213
DirDefImpl::usedDirs
virtual const UsedDirLinkedMap & usedDirs() const
Definition: dirdef.cpp:72
OutputList::startBold
void startBold()
Definition: outputlist.h:302
DirDefImpl::m_usedDirs
UsedDirLinkedMap m_usedDirs
Definition: dirdef.cpp:112
DirDefImpl::anchor
virtual QCString anchor() const
Definition: dirdef.cpp:59
OutputList::startMemberSections
void startMemberSections()
Definition: outputlist.h:177
OutputList::writeString
void writeString(const QCString &text)
Definition: outputlist.h:111
LinkedMap::empty
bool empty() const
Definition: linkedmap.h:222
Translator::trDirReference
virtual QCString trDirReference(const QCString &dirName)=0
OutputList::insertMemberAlign
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:233
dotdirdeps.h
LayoutDocEntry::ClassInheritanceGraph
@ ClassInheritanceGraph
Definition: layout.h:44
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
LayoutDocEntry::MemberDeclStart
@ MemberDeclStart
Definition: layout.h:37
LinkedMap::add
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
Definition: linkedmap.h:103
DirDefImpl::DirDefImpl
DirDefImpl(const QCString &path)
Definition: dirdef.cpp:111
LayoutDocEntry::NamespaceClasses
@ NamespaceClasses
Definition: layout.h:53
definitionimpl.h
LayoutDocEntry::GroupClasses
@ GroupClasses
Definition: layout.h:63
DefinitionMixin< DirDef >::getLanguage
virtual SrcLangExt getLanguage() const
Definition: definitionimpl.h:189
err
void err(const char *fmt,...)
Definition: message.cpp:203
FileDef::isLinkable
virtual bool isLinkable() const =0
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DefinitionMixin< DirDef >::name
virtual QCString name() const
Definition: definitionimpl.h:155
Doxygen::dirLinkedMap
static DirLinkedMap * dirLinkedMap
Definition: doxygen.h:109
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
LayoutDocEntry::ClassIncludes
@ ClassIncludes
Definition: layout.h:43
LayoutDocEntry::FileNamespaces
@ FileNamespaces
Definition: layout.h:57
Definition::pathFragment
virtual QCString pathFragment() const =0
LayoutDocEntry::FileConcepts
@ FileConcepts
Definition: layout.h:57
filename.h
DefinitionMixin< DirDef >::briefLine
virtual int briefLine() const
Definition: definitionimpl.h:167
compareDirDefs
bool compareDirDefs(const DirDef *item1, const DirDef *item2)
Definition: dirdef.cpp:1115
endFileWithNavPath
void endFileWithNavPath(const Definition *d, OutputList &ol)
Definition: index.cpp:274
LayoutDocEntry::MemberDefEnd
@ MemberDefEnd
Definition: layout.h:38
LayoutDocEntry::DirSubDirs
@ DirSubDirs
Definition: layout.h:68
DirDefImpl::m_parent
DirDef * m_parent
Definition: dirdef.cpp:111
DefinitionMixin< DirDef >::hasBriefDescription
virtual bool hasBriefDescription() const
Definition: definitionimpl.h:199
LinkedMap::begin
iterator begin()
Definition: linkedmap.h:214
OutputList::writeDoc
void writeDoc(DocRoot *root, const Definition *ctx, const MemberDef *md, int id=0)
Definition: outputlist.cpp:169
UsedDir::UsedDir
UsedDir(const DirDef *dir)
Definition: dirdef.cpp:751
DirDef::level
virtual int level() const =0
UsedDir
Usage information of a directory.
Definition: dirdef.h:63
DefinitionMutable::writeNavigationPath
virtual void writeNavigationPath(OutputList &ol) const =0
DirDefImpl::writeDocumentation
virtual void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:501
begin
DirIterator begin(DirIterator it) noexcept
Definition: dir.cpp:123
LayoutDocEntry::NamespaceNestedConstantGroups
@ NamespaceNestedConstantGroups
Definition: layout.h:52
LayoutDocEntry::GroupInlineClasses
@ GroupInlineClasses
Definition: layout.h:63
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
HLI_Files
@ HLI_Files
Definition: index.h:159
OutputGenerator::RTF
@ RTF
Definition: outputgen.h:333
DirRelation::getOutputFileBase
QCString getOutputFileBase() const
Definition: dirdef.h:167
DirDefImpl::writeDetailedDescription
void writeDetailedDescription(OutputList &ol, const QCString &title)
Definition: dirdef.cpp:220
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
LayoutDocEntry::ClassCollaborationGraph
@ ClassCollaborationGraph
Definition: layout.h:45
uint
unsigned uint
Definition: qcstring.h:40
DirDefImpl::displayName
virtual QCString displayName(bool=TRUE) const
Definition: dirdef.cpp:62
DirDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
LayoutDocEntry::FileStructs
@ FileStructs
Definition: layout.h:57
OutputList::endQuickIndices
void endQuickIndices()
Definition: outputlist.h:349
dot.h
addHtmlExtensionIfMissing
QCString addHtmlExtensionIfMissing(const QCString &fName)
Definition: util.cpp:5275
LayoutDocEntry::FileIncludes
@ FileIncludes
Definition: layout.h:58
DirDef::shortName
virtual const QCString shortName() const =0
OutputGenerator::Latex
@ Latex
Definition: outputgen.h:333
DirDefImpl::setParent
virtual void setParent(DirDef *parent)
Definition: dirdef.cpp:159
DefinitionMixin< DirDef >::briefDescription
virtual QCString briefDescription(bool abbreviate=FALSE) const
Definition: definitionimpl.h:165
DirDefImpl::writeDirectoryGraph
void writeDirectoryGraph(OutputList &ol)
Definition: dirdef.cpp:305
DirDefImpl::writeTagFile
virtual void writeTagFile(TextStream &t)
Definition: dirdef.cpp:464
DirDefImpl::m_dirCount
int m_dirCount
Definition: dirdef.cpp:109
OutputList::startMemberItem
void startMemberItem(const QCString &anchor, int i1, const QCString &id=QCString())
Definition: outputlist.h:209
OutputList::disable
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:100
uchar
unsigned char uchar
Definition: qcstring.h:38
DirDef::addUsesDependency
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)=0
OutputList::startMemberHeader
void startMemberHeader(const QCString &anchor, int typ=2)
Definition: outputlist.h:185
QCString::left
QCString left(size_t len) const
Definition: qcstring.h:212
DirRelation::m_src
const DirDef * m_src
Definition: dirdef.h:171
message.h
FileDef::name
virtual QCString name() const =0
DirDefImpl::endMemberDeclarations
void endMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:448
LayoutDocEntrySection
Definition: layout.h:84
LayoutDocEntry::MemberDeclEnd
@ MemberDeclEnd
Definition: layout.h:37
Translator::trCode
virtual QCString trCode()=0
OutputList::writeAnchor
void writeAnchor(const QCString &fileName, const QCString &name)
Definition: outputlist.h:239
Translator::trMore
virtual QCString trMore()=0
DirDefImpl::m_fileList
FileList m_fileList
Definition: dirdef.cpp:108
FileList
Definition: filedef.h:205
OutputList::endContents
void endContents()
Definition: outputlist.h:363
createDirDef
DirDef * createDirDef(const QCString &path)
Definition: dirdef.cpp:102
UsedDir::m_hasDirectDeps
bool m_hasDirectDeps
Definition: dirdef.h:102
Translator::trDirRelation
virtual QCString trDirRelation(const QCString &name)=0
LayoutDocEntry::MemberDefStart
@ MemberDefStart
Definition: layout.h:38
DirDefImpl::isLinkable
virtual bool isLinkable() const
Definition: dirdef.cpp:147
qstricmp
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:433
LayoutDocEntry::DirFiles
@ DirFiles
Definition: layout.h:68
theTranslator
Translator * theTranslator
Definition: language.cpp:156
DirDefImpl
Definition: dirdef.cpp:37
DirDefImpl::~DirDefImpl
virtual ~DirDefImpl()
Definition: dirdef.cpp:138
toDirDef
DirDef * toDirDef(Definition *d)
Definition: dirdef.cpp:1122
doxygen.h
LayoutDocEntry::NamespaceExceptions
@ NamespaceExceptions
Definition: layout.h:53
OutputList::writeRuler
void writeRuler()
Definition: outputlist.h:237
DirDefImpl::createNewDir
static DirDef * createNewDir(const QCString &path)
Definition: dirdef.cpp:786
LayoutDocEntry::FileConstantGroups
@ FileConstantGroups
Definition: layout.h:57
language.h
DirRelation::m_dst
UsedDir * m_dst
Definition: dirdef.h:172
validatingParseDoc
DocRoot * validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
Definition: docparser.cpp:7495
DefinitionMutable::setOuterScope
virtual void setOuterScope(Definition *d)=0
LayoutDocEntry::GroupGraph
@ GroupGraph
Definition: layout.h:65
DotDirDeps::isTrivial
bool isTrivial() const
Definition: dotdirdeps.cpp:441
LayoutDocEntry::NamespaceStructs
@ NamespaceStructs
Definition: layout.h:53
OutputList::endParagraph
void endParagraph()
Definition: outputlist.h:109
startFile
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName)
Definition: index.cpp:235
DirDefImpl::depGraphIsTrivial
virtual bool depGraphIsTrivial() const
Definition: dirdef.cpp:743
docparser.h
TRUE
#define TRUE
Definition: qcstring.h:36
DirDefImpl::subDirs
virtual const DirList & subDirs() const
Definition: dirdef.cpp:67
Definition::TypeDir
@ TypeDir
Definition: definition.h:94
OutputList::endMemberList
void endMemberList()
Definition: outputlist.h:199
DirDefImpl::isLinkableInProject
virtual bool isLinkableInProject() const
Definition: dirdef.cpp:142
LayoutDocEntry::GroupNestedGroups
@ GroupNestedGroups
Definition: layout.h:64
filedef.h
DirDefImpl::m_subdirs
DirList m_subdirs
Definition: dirdef.cpp:104
OutputList::endMemberItem
void endMemberItem()
Definition: outputlist.h:211
DirDefImpl::sort
virtual void sort()
Definition: dirdef.cpp:175
OutputGenerator::Html
@ Html
Definition: outputgen.h:333
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
Doxygen::dirRelations
static DirRelationLinkedMap dirRelations
Definition: doxygen.h:110
OutputList::enableAll
void enableAll()
Definition: outputlist.cpp:84
Definition::DefType
DefType
Definition: definition.h:85
generateDirDocs
void generateDirDocs(OutputList &ol)
Definition: dirdef.cpp:1094
UsedDir::filePairs
const FilePairLinkedMap & filePairs() const
Definition: dirdef.h:78
DirDef::addSubDir
virtual void addSubDir(DirDef *subdir)=0
DirDefImpl::mergeDirectoryInTree
static DirDef * mergeDirectoryInTree(const QCString &path)
Definition: dirdef.cpp:817
DefinitionMixin< DirDef >::docLine
virtual int docLine() const
Definition: definitionimpl.h:163
OutputList::startContents
void startContents()
Definition: outputlist.h:361
OutputList::startGroupHeader
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:169
dirdef.h
OutputList::endMemberSections
void endMemberSections()
Definition: outputlist.h:179
OutputList::popGeneratorState
void popGeneratorState()
Definition: outputlist.cpp:134
OutputList::startTextLink
void startTextLink(const QCString &file, const QCString &anchor)
Definition: outputlist.h:152
LinkedMap::end
iterator end()
Definition: linkedmap.h:215
DirDefImpl::shortTitle
virtual QCString shortTitle() const
Definition: dirdef.cpp:453
FilePair
Class representing a pair of FileDef objects
Definition: dirdef.h:41
Definition::getReference
virtual QCString getReference() const =0
DirDef::UsedDirLinkedMap
Definition: dirdef.h:115
DefinitionMixin< DirDef >::documentation
virtual QCString documentation() const
Definition: definitionimpl.h:162
compareFileDefs
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition: filedef.cpp:1771
Translator::trIncludesFileIn
virtual QCString trIncludesFileIn(const QCString &name)=0
OutputList::endMemberHeader
void endMemberHeader()
Definition: outputlist.h:187
DirDefImpl::m_shortName
QCString m_shortName
Definition: dirdef.cpp:106
DirDefImpl::definitionType
virtual DefType definitionType() const
Definition: dirdef.cpp:56
LayoutDocEntry::ClassAllMembersLink
@ ClassAllMembersLink
Definition: layout.h:45
DirDefImpl::parent
virtual DirDef * parent() const
Definition: dirdef.cpp:70
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
LayoutDocEntry::GroupDirs
@ GroupDirs
Definition: layout.h:64
layout.h
DirDefImpl::startMemberDeclarations
void startMemberDeclarations(OutputList &ol)
Definition: dirdef.cpp:443
Translator::trFile
virtual QCString trFile(bool first_capital, bool singular)=0
DirDefImpl::matchPath
static bool matchPath(const QCString &path, const StringVector &l)
Definition: dirdef.cpp:801
LayoutDocEntry::DetailedDesc
@ DetailedDesc
Definition: layout.h:39
msg
void msg(const char *fmt,...)
Definition: message.cpp:53
UsedDir::dir
const DirDef * dir() const
Definition: dirdef.h:79
LayoutDocManager::instance
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition: layout.cpp:1574
LayoutDocEntry::FileInterfaces
@ FileInterfaces
Definition: layout.h:57
OutputList::writeSynopsis
void writeSynopsis()
Definition: outputlist.h:337
OutputList::parseText
void parseText(const QCString &textStr)
Definition: outputlist.cpp:179
UsedDir::findFilePair
FilePair * findFilePair(const QCString &name)
Definition: dirdef.cpp:781
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
DirDefImpl::m_diskName
QCString m_diskName
Definition: dirdef.cpp:107
LayoutDocEntry::MemberGroups
@ MemberGroups
Definition: layout.h:36
DirDefImpl::setLevel
virtual void setLevel()
Definition: dirdef.cpp:616
LayoutDocEntry::ClassInlineClasses
@ ClassInlineClasses
Definition: layout.h:43
DirDefImpl::shortName
virtual const QCString shortName() const
Definition: dirdef.cpp:63
DirDefImpl::addFile
virtual void addFile(const FileDef *fd)
Definition: dirdef.cpp:169
OutputList::generateDoc
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
Definition: outputlist.cpp:142
DirDefImpl::computeDependencies
virtual void computeDependencies()
Computes the dependencies between directories
Definition: dirdef.cpp:699
DirRelation::writeDocumentation
void writeDocumentation(OutputList &ol)
Definition: dirdef.cpp:872
DirDef::setLevel
virtual void setLevel()=0
config.h
ASSERT
#define ASSERT(x)
Definition: qcstring.h:44
OutputList::pushGeneratorState
void pushGeneratorState()
Definition: outputlist.cpp:126
DirDefImpl::m_dispName
QCString m_dispName
Definition: dirdef.cpp:105
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Definition: qcstring.h:153
Translator::trFileIn
virtual QCString trFileIn(const QCString &name)=0
convertToXML
QCString convertToXML(const QCString &s, bool keepEntities)
Definition: util.cpp:3948
FileDef
A model of a file symbol.
Definition: filedef.h:73
DirDefImpl::hasDetailedDescription
virtual bool hasDetailedDescription() const
Definition: dirdef.cpp:458
UsedDir::m_hasDirectSrcDeps
bool m_hasDirectSrcDeps
Definition: dirdef.h:103
LayoutDocEntry::BriefDesc
@ BriefDesc
Definition: layout.h:39
DirDefImpl::level
virtual int level() const
Definition: dirdef.cpp:69
LayoutDocEntry::NamespaceConcepts
@ NamespaceConcepts
Definition: layout.h:53
computeCommonDirPrefix
static void computeCommonDirPrefix()
In order to create stable, but unique directory names, we compute the common part of the path shared ...
Definition: dirdef.cpp:930
stripFromPath
static QCString stripFromPath(const QCString &path, const StringVector &l)
Definition: util.cpp:292
LayoutDocEntry::DirGraph
@ DirGraph
Definition: layout.h:68
DefinitionMixin< DirDef >::writeNavigationPath
virtual void writeNavigationPath(OutputList &ol) const
Definition: definitionimpl.h:258
DirDefImpl::getFiles
virtual const FileList & getFiles() const
Definition: dirdef.cpp:65
CodeSymbolType::Default
@ Default
LayoutDocEntry::FileIncludeGraph
@ FileIncludeGraph
Definition: layout.h:58
DirDefImpl::setDirCount
virtual void setDirCount(int count)
Definition: dirdef.cpp:164
LayoutDocEntry::FileIncludedByGraph
@ FileIncludedByGraph
Definition: layout.h:59
OutputList::writeObjectLink
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition: outputlist.h:141
DirDef::displayName
virtual QCString displayName(bool=TRUE) const =0
LayoutDocEntry::ClassUsedFiles
@ ClassUsedFiles
Definition: layout.h:46
LayoutDocEntry::FileSourceLink
@ FileSourceLink
Definition: layout.h:59
OutputList::startMemberDeclaration
void startMemberDeclaration()
Definition: outputlist.h:310
DirDef::setParent
virtual void setParent(DirDef *parent)=0
FileDef::getDirDef
virtual DirDef * getDirDef() const =0
DirDef::parent
virtual DirDef * parent() const =0
LayoutDocEntry::ClassNestedClasses
@ ClassNestedClasses
Definition: layout.h:44
UsedDir::sort
void sort()
Definition: dirdef.cpp:768
FileDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
util.h
A bunch of utility functions.
OutputList::startDirDepGraph
void startDirDepGraph()
Definition: outputlist.h:399
buildDirectories
void buildDirectories()
Definition: dirdef.cpp:1005
HLI_None
@ HLI_None
Definition: index.h:142
LayoutDocEntry::FileExceptions
@ FileExceptions
Definition: layout.h:57
OutputList::enable
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:108
Translator::trDir
virtual QCString trDir(bool first_capital, bool singular)=0
CodeSymbolType
CodeSymbolType
Definition: types.h:204
LayoutDocEntry::NamespaceInterfaces
@ NamespaceInterfaces
Definition: layout.h:53
LayoutDocEntry::FileInlineClasses
@ FileInlineClasses
Definition: layout.h:60
LayoutDocEntry::GroupNamespaces
@ GroupNamespaces
Definition: layout.h:63
DirDefImpl::addSubDir
virtual void addSubDir(DirDef *subdir)
Definition: dirdef.cpp:152
DirDefImpl::writeSubDirList
void writeSubDirList(OutputList &ol)
Definition: dirdef.cpp:325
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
DirDefImpl::dirCount
virtual int dirCount() const
Definition: dirdef.cpp:71
OutputList::endTextLink
void endTextLink()
Definition: outputlist.h:154
computeDirDependencies
void computeDirDependencies()
Definition: dirdef.cpp:1078
DirDefImpl::setDiskName
virtual void setDiskName(const QCString &name)
Definition: dirdef.cpp:79
LayoutDocEntry::MemberDecl
@ MemberDecl
Definition: layout.h:37
OutputList::startParagraph
void startParagraph(const QCString &classDef=QCString())
Definition: outputlist.h:107
DefinitionMixin
Definition: definitionimpl.h:142
LayoutDocEntry::AuthorSection
@ AuthorSection
Definition: layout.h:40
LayoutDocEntrySection::title
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1661
createDocParser
std::unique_ptr< IDocParser > createDocParser()
Definition: docparser.cpp:179
Config_getList
#define Config_getList(name)
Definition: config.h:37
DirDefImpl::addUsesDependency
virtual void addUsesDependency(const DirDef *usedDir, const FileDef *srcFd, const FileDef *dstFd, bool srcDirect, bool dstDirect)
Add as "uses" dependency between this dir and dir, that was caused by a dependency on file fd.
Definition: dirdef.cpp:638
FALSE
#define FALSE
Definition: qcstring.h:33
OutputList::endBold
void endBold()
Definition: outputlist.h:304
OutputGenerator::Man
@ Man
Definition: outputgen.h:333
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108