Doxygen
dotdirdeps.cpp
浏览该文件的文档.
1 /******************************************************************************
2 *
3 * Copyright (C) 1997-2019 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 "dotdirdeps.h"
17 #include "util.h"
18 #include "doxygen.h"
19 #include "config.h"
20 #include "image.h"
21 
22 #include <algorithm>
23 #include <iterator>
24 #include <utility>
25 #include <cstdint>
26 #include <math.h>
27 #include <cassert>
28 #include <map>
29 #include <memory>
30 #include <string>
31 #include <vector>
32 
33 using DirDefMap = std::map<std::string,const DirDef *>;
34 
35 /** Properties are used to format the directories in the graph distinctively. */
37 {
38  bool isIncomplete = false; //!< true if not all successors of a cluster are drawn
39  bool isOrphaned = false; //!< true if parent is not drawn
40  bool isTruncated = false; //!< true has successors, none is drawn
41  bool isOriginal = false; //!< true if is the directory for which the graph is drawn
42  bool isPeripheral = false; //!< true if no successor of parent of original directory
43 };
44 
45 /** Builder helper to create instances of the DotDirProperty struct */
47 {
48  public:
49  DotDirPropertyBuilder &makeIncomplete(bool b=true) { m_property.isIncomplete=b; return *this; }
50  DotDirPropertyBuilder &makeOrphaned (bool b=true) { m_property.isOrphaned =b; return *this; }
51  DotDirPropertyBuilder &makeTruncated (bool b=true) { m_property.isTruncated =b; return *this; }
52  DotDirPropertyBuilder &makeOriginal (bool b=true) { m_property.isOriginal =b; return *this; }
53  DotDirPropertyBuilder &makePeripheral(bool b=true) { m_property.isPeripheral=b; return *this; }
54  operator DotDirProperty() { return std::move(m_property); }
55  private:
57 };
58 
59 /** Elements consist of (1) directory relation and (2) whether it is pointing only to inherited dependees. */
60 typedef std::vector< std::pair< std::unique_ptr<DirRelation>, bool> > DirRelations;
61 
62 /** Returns a DOT color name according to the directory depth. */
63 static QCString getDirectoryBackgroundColor(int depthIndex)
64 {
65  static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
66  static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
67  static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
68  assert(depthIndex>=0 && depthIndex<=Config_getInt(DIR_GRAPH_MAX_DEPTH));
69  float fraction = (float)depthIndex/(float)Config_getInt(DIR_GRAPH_MAX_DEPTH);
70  const char hex[] = "0123456789abcdef";
71  int range = 0x40; // range from darkest color to lightest color
72  int luma = 0xef-(int)(fraction*range); // interpolation
73  double r,g,b;
74  ColoredImage::hsl2rgb(hue/360.0,sat/255.0,
75  pow(luma/255.0,gamma/100.0),&r,&g,&b);
76  int red = (int)(r*255.0);
77  int green = (int)(g*255.0);
78  int blue = (int)(b*255.0);
79  assert(red>=0 && red<=255);
80  assert(green>=0 && green<=255);
81  assert(blue>=0 && blue<=255);
82  char colStr[8];
83  colStr[0]='#';
84  colStr[1]=hex[red>>4];
85  colStr[2]=hex[red&0xf];
86  colStr[3]=hex[green>>4];
87  colStr[4]=hex[green&0xf];
88  colStr[5]=hex[blue>>4];
89  colStr[6]=hex[blue&0xf];
90  colStr[7]=0;
91  //printf("i=%d max=%d fraction=%f luma=%d %02x %02x %02x -> color=%s\n",
92  // depthIndex,Config_getInt(DIR_GRAPH_MAX_DEPTH),fraction,luma,red,green,blue,colStr);
93  return colStr;
94 }
95 
96 /** Returns a DOT color name according to the directory properties. */
97 static const char* getDirectoryBorderColor(const DotDirProperty &property)
98 {
99  if (property.isTruncated && property.isOrphaned)
100  {
101  return "red";
102  }
103  else if (property.isTruncated)
104  {
105  return "red";
106  }
107  else if (property.isOrphaned)
108  {
109  return "grey50";
110  }
111  else
112  {
113  return "grey25";
114  }
115 }
116 
117 /** Returns a DOT node style according to the directory properties. */
118 static std::string getDirectoryBorderStyle(const DotDirProperty &property)
119 {
120  std::string style;
121  if (!property.isPeripheral)
122  {
123  style += "filled,";
124  }
125  if (property.isOriginal)
126  {
127  style += "bold,";
128  }
129  if (property.isIncomplete)
130  {
131  style += "dashed,";
132  }
133  else if (property.isTruncated && property.isOrphaned)
134  {
135  style += "dashed,";
136  }
137  return style;
138 }
139 
140 /**
141  * Puts DOT code for drawing directory to stream and adds it to the list.
142  * @param[in,out] t stream to which the DOT code is written to
143  * @param[in] directory will be mapped to a node in DOT code
144  * @param[in] property are evaluated for formatting
145  * @param[in,out] directoriesInGraph lists the directories which have been written to the output stream
146  * @param[in] startLevel current level to calculate relative distances from to determine the background color
147  */
148 static void drawDirectory(TextStream &t, const DirDef *const directory, const DotDirProperty &property,
149  DirDefMap &directoriesInGraph,int startLevel)
150 {
151  t << " " << directory->getOutputFileBase() << " ["
152  "shape=box, "
153  "label=\"" << directory->shortName() << "\", "
154  "style=\"" << getDirectoryBorderStyle(property) << "\", "
155  "fillcolor=\"" << getDirectoryBackgroundColor(directory->level()-startLevel) << "\", "
156  "color=\"" << getDirectoryBorderColor(property) << "\", "
157  "URL=\"" << addHtmlExtensionIfMissing(directory->getOutputFileBase()) << "\""
158  "];\n";
159  directoriesInGraph.insert(std::make_pair(directory->getOutputFileBase().str(), directory));
160 }
161 
162 /** Checks, if the directory is a the maximum drawn directory level. */
163 static bool isAtMaxDepth(const DirDef *const directory, const int startLevel)
164 {
165  return (directory->level() - startLevel) >= Config_getInt(DIR_GRAPH_MAX_DEPTH);
166 }
167 
168 /**
169  * Writes DOT code for opening a cluster subgraph to stream.
170  *
171  * Ancestor clusters directly get a label. Other clusters get a plain text node with a label instead.
172  * This is because the plain text node can be used to draw dependency relationships.
173  */
174 static void drawClusterOpening(TextStream &outputStream, const DirDef *const directory,
175  const DotDirProperty &directoryProperty, DirDefMap &directoriesInGraph, const bool isAncestor,int startLevel)
176 {
177  outputStream << " subgraph cluster" << directory->getOutputFileBase() << " {\n"
178  " graph [ "
179  "bgcolor=\"" << getDirectoryBackgroundColor(directory->level()-startLevel) << "\", "
180  "pencolor=\"" << getDirectoryBorderColor(directoryProperty) << "\", "
181  "style=\"" << getDirectoryBorderStyle(directoryProperty) << "\", "
182  "label=\"";
183  if (isAncestor)
184  {
185  outputStream << directory->shortName();
186  }
187  outputStream << "\", "
188  "fontname=\"" << Config_getString(DOT_FONTNAME) << "\", "
189  "fontsize=\"" << Config_getInt(DOT_FONTSIZE) << "\", "
190  "URL=\"" << addHtmlExtensionIfMissing(directory->getOutputFileBase()) << "\""
191  "]\n";
192  if (!isAncestor)
193  {
194  outputStream << " " << directory->getOutputFileBase() << " [shape=plaintext, "
195  "label=\"" << directory->shortName() << "\""
196  "];\n";
197  directoriesInGraph.insert(std::make_pair(directory->getOutputFileBase().str(), directory));
198  }
199 }
200 
202 {
203  t << " }\n";
204 }
205 
206 /**
207  * Assembles a list of the directory relations and whether or not they result from "inheritance".
208  * @param dependencies Array to add the dependencies to.
209  * @param srcDir is the source of the dependency.
210  * @param isLeaf true, if no children are drawn for this directory.
211  */
212 static void addDependencies(DirRelations &dependencies,const DirDef *const srcDir, bool isLeaf)
213 {
214  for (const auto &usedDirectory : srcDir->usedDirs())
215  {
216  const auto dstDir = usedDirectory->dir();
217  if (!dstDir->isParentOf(srcDir) && (isLeaf || usedDirectory->hasDirectSrcDeps()))
218  {
219  QCString relationName;
220  relationName.sprintf("dir_%06d_%06d", srcDir->dirCount(), dstDir->dirCount());
221  bool directRelation = isLeaf ? usedDirectory->hasDirectDstDeps() : usedDirectory->hasDirectDeps();
222  auto &&dependency = std::make_unique<DirRelation>(relationName, srcDir, usedDirectory.get());
223  auto &&pair = std::make_pair(std::move(dependency),directRelation);
224  dependencies.emplace_back(std::move(pair));
225  }
226  }
227 }
228 
229 /** Recursively draws directory tree. */
230 static void drawTree(DirRelations &dependencies, TextStream &t, const DirDef *const directory,
231  int startLevel, DirDefMap &directoriesInGraph, const bool isTreeRoot)
232 {
233  if (!directory->hasSubdirs())
234  {
235  const DotDirProperty directoryProperty = DotDirPropertyBuilder().makeOriginal(isTreeRoot);
236  drawDirectory(t, directory, directoryProperty, directoriesInGraph,startLevel);
237  addDependencies(dependencies, directory, true);
238  }
239  else
240  {
241  if (isAtMaxDepth(directory, startLevel)) // maximum nesting level reached
242  {
243  const DotDirProperty directoryProperty = DotDirPropertyBuilder().makeOriginal(isTreeRoot);
244  drawDirectory(t, directory, directoryProperty, directoriesInGraph,startLevel);
245  addDependencies(dependencies, directory, true);
246  }
247  else // start a new nesting level
248  {
249  // open cluster
250  {
251  const DotDirProperty directoryProperty = DotDirPropertyBuilder().makeOriginal(isTreeRoot);
252  drawClusterOpening(t, directory, directoryProperty, directoriesInGraph, false, startLevel);
253  addDependencies(dependencies, directory, false);
254  }
255 
256  // process all sub directories
257  for (const auto subDirectory : directory->subDirs())
258  {
259  drawTree(dependencies, t, subDirectory, startLevel, directoriesInGraph, false);
260  }
261 
262  // close cluster
263  {
265  }
266  }
267  }
268 }
269 
270 /**
271  * Write DOT code for directory dependency graph.
272  *
273  * Code is generated for a directory. Successors (sub-directories) of this directory are recursively drawn.
274  * Recursion is limited by `DIR_GRAPH_MAX_DEPTH`. The dependencies of those directories
275  * are drawn.
276  *
277  * If a dependee is not part of directory tree above, then the dependency is drawn to the first parent of the
278  * dependee, whose parent is an ancestor (sub-directory) of the original directory.
279  *
280  * @param t stream where the DOT code is written to
281  * @param dd directory for which the graph is generated for
282  * @param linkRelations if true, hyperlinks to the list of file dependencies are added
283  */
284 void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
285 {
286  DirDefMap dirsInGraph;
287 
288  dirsInGraph.insert(std::make_pair(dd->getOutputFileBase().str(),dd));
289 
290  std::vector<const DirDef *> usedDirsNotDrawn, usedDirsDrawn;
291  for (const auto& usedDir : dd->usedDirs())
292  {
293  usedDirsNotDrawn.push_back(usedDir->dir());
294  }
295 
296  auto moveDrawnDirs = [&usedDirsDrawn,&usedDirsNotDrawn](const std::vector<const DirDef *>::iterator &newEnd)
297  {
298  // usedDirsNotDrawn is split into two segments: [begin()....newEnd-1] and [newEnd....end()]
299  // where the second segment starting at newEnd has been drawn, so append this segment to the usedDirsDrawn list and
300  // remove it from the usedDirsNotDrawn list.
301  std::move(newEnd, std::end(usedDirsNotDrawn), std::back_inserter(usedDirsDrawn));
302  usedDirsNotDrawn.erase(newEnd, usedDirsNotDrawn.end());
303  };
304 
305  // if dd has a parent draw it as the outer layer
306  const auto parent = dd->parent();
307  if (parent)
308  {
309  const DotDirProperty parentDirProperty = DotDirPropertyBuilder().
310  makeIncomplete().
311  makeOrphaned(parent->parent()!=nullptr);
312  drawClusterOpening(t, parent, parentDirProperty, dirsInGraph, true, parent->level());
313 
314  {
315  // draw all directories which have `dd->parent()` as parent and `dd` as dependent
316  const auto newEnd = std::stable_partition(usedDirsNotDrawn.begin(), usedDirsNotDrawn.end(),
317  [&](const DirDef *const usedDir)
318  {
319  if (dd!=usedDir && dd->parent()==usedDir->parent()) // usedDir and dd share the same parent
320  {
321  const DotDirProperty usedDirProperty = DotDirPropertyBuilder().makeTruncated(usedDir->hasSubdirs());
322  drawDirectory(t, usedDir, usedDirProperty, dirsInGraph, parent->level());
323  return false; // part of the drawn partition
324  }
325  return true; // part of the not-drawn partition
326  });
327  moveDrawnDirs(newEnd);
328  }
329  }
330 
331  // draw the directory tree with dd as root
332  DirRelations dependencies;
333  drawTree(dependencies, t, dd, dd->level(), dirsInGraph, true);
334 
335  if (parent)
336  {
338  }
339 
340  // add nodes for other used directories (i.e. outside of the cluster of directories directly connected to dd)
341  {
342  const auto newEnd = std::stable_partition(usedDirsNotDrawn.begin(), usedDirsNotDrawn.end(),
343  [&](const DirDef *const usedDir) // for each used dir (=directly used or a parent of a directly used dir)
344  {
345  const DirDef *dir=dd;
346  while (dir)
347  {
348  if (dir!=usedDir && dir->parent()==usedDir->parent()) // include if both have the same parent (or no parent)
349  {
350  const DotDirProperty usedDirProperty = DotDirPropertyBuilder().
351  makeOrphaned(usedDir->parent()!=nullptr).
352  makeTruncated(usedDir->hasSubdirs()).
353  makePeripheral();
354  drawDirectory(t, usedDir, usedDirProperty, dirsInGraph, dir->level());
355  return false; // part of the drawn partition
356  }
357  dir=dir->parent();
358  }
359  return true; // part of the not-drawn partition
360  });
361  moveDrawnDirs(newEnd);
362  }
363 
364  // add relations between all selected directories
365  {
366  for (const auto &relationPair : dependencies)
367  {
368  const auto &relation = relationPair.first;
369  const bool directRelation = relationPair.second;
370  const auto udir = relation->destination();
371  const auto usedDir = udir->dir();
372  const bool destIsSibling = std::find(std::begin(usedDirsDrawn), std::end(usedDirsDrawn), usedDir) != std::end(usedDirsDrawn);
373  const bool destIsDrawn = dirsInGraph.find(usedDir->getOutputFileBase().str())!=dirsInGraph.end(); // only point to nodes that are in the graph
374  const bool atMaxDepth = isAtMaxDepth(usedDir, dd->level());
375 
376  if (destIsSibling || (destIsDrawn && (directRelation || atMaxDepth)))
377  {
378  const auto relationName = relation->getOutputFileBase();
379  const auto dir = relation->source();
380  Doxygen::dirRelations.add(relationName,
381  std::make_unique<DirRelation>(
382  relationName,dir,udir));
383  size_t nrefs = udir->filePairs().size();
384  t << " " << dir->getOutputFileBase() << "->"
385  << usedDir->getOutputFileBase();
386  t << " [headlabel=\"" << (uint)nrefs << "\", labeldistance=1.5";
387  if (linkRelations)
388  {
389  t << " headhref=\"" << addHtmlExtensionIfMissing(relationName) << "\"";
390  }
391  t << "];\n";
392  }
393  }
394  }
395 }
396 
397 DotDirDeps::DotDirDeps(const DirDef *dir) : m_dir(dir)
398 {
399 }
400 
402 {
403 }
404 
406 {
407  return m_dir->getOutputFileBase()+"_dep";
408 
409 }
410 
412 {
413  // compute md5 checksum of the graph were are about to generate
414  TextStream md5stream;
415  writeGraphHeader(md5stream, m_dir->displayName());
416  md5stream << " compound=true\n";
418  writeGraphFooter(md5stream);
419  m_theGraph = md5stream.str();
420 }
421 
423 {
425 }
426 
428 {
429  return convertToXML(m_dir->displayName());
430 }
431 
433  const QCString &path, const QCString &fileName, const QCString &relPath, bool generateImageMap,
434  int graphId, bool linkRelations)
435 {
436  m_linkRelations = linkRelations;
437  m_urlOnly = TRUE;
438  return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
439 }
440 
442 {
443  return m_dir->depGraphIsTrivial();
444 }
DotGraph::m_urlOnly
bool m_urlOnly
Definition: dotgraph.h:94
ColoredImage::hsl2rgb
static void hsl2rgb(double h, double s, double l, double *pRed, double *pGreen, double *pBlue)
Definition: image.cpp:412
DotDirDeps::m_linkRelations
bool m_linkRelations
Definition: dotdirdeps.h:63
DotDirProperty::isIncomplete
bool isIncomplete
true if not all successors of a cluster are drawn
Definition: dotdirdeps.cpp:38
DotDirDeps::DotDirDeps
DotDirDeps(const DirDef *dir)
Definition: dotdirdeps.cpp:397
DirRelations
std::vector< std::pair< std::unique_ptr< DirRelation >, bool > > DirRelations
Elements consist of (1) directory relation and (2) whether it is pointing only to inherited dependees...
Definition: dotdirdeps.cpp:60
DotGraph::m_theGraph
QCString m_theGraph
Definition: dotgraph.h:89
DotDirDeps::~DotDirDeps
~DotDirDeps()
Definition: dotdirdeps.cpp:401
DirDef::dirCount
virtual int dirCount() const =0
DirDef::usedDirs
virtual const UsedDirLinkedMap & usedDirs() const =0
DotDirProperty::isOrphaned
bool isOrphaned
true if parent is not drawn
Definition: dotdirdeps.cpp:39
DirDef
A model of a directory symbol.
Definition: dirdef.h:110
dotdirdeps.h
DotDirDeps::getMapLabel
virtual QCString getMapLabel() const
Definition: dotdirdeps.cpp:422
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
DotGraph::writeGraphFooter
static void writeGraphFooter(TextStream &t)
Definition: dotgraph.cpp:300
DotDirProperty::isTruncated
bool isTruncated
true has successors, none is drawn
Definition: dotdirdeps.cpp:40
QCString::str
std::string str() const
Definition: qcstring.h:442
DotDirProperty::isPeripheral
bool isPeripheral
true if no successor of parent of original directory
Definition: dotdirdeps.cpp:42
drawClusterOpening
static void drawClusterOpening(TextStream &outputStream, const DirDef *const directory, const DotDirProperty &directoryProperty, DirDefMap &directoriesInGraph, const bool isAncestor, int startLevel)
Writes DOT code for opening a cluster subgraph to stream.
Definition: dotdirdeps.cpp:174
DirDef::hasSubdirs
virtual bool hasSubdirs() const =0
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DotGraph::writeGraphHeader
static void writeGraphHeader(TextStream &t, const QCString &title=QCString())
Definition: dotgraph.cpp:268
DotDirDeps::writeGraph
QCString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE)
Definition: dotdirdeps.cpp:432
DotDirDeps::getImgAltText
virtual QCString getImgAltText() const
Definition: dotdirdeps.cpp:427
DirDef::level
virtual int level() const =0
begin
DirIterator begin(DirIterator it) noexcept
Definition: dir.cpp:123
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
DirRelation::getOutputFileBase
QCString getOutputFileBase() const
Definition: dirdef.h:167
getDirectoryBackgroundColor
static QCString getDirectoryBackgroundColor(int depthIndex)
Returns a DOT color name according to the directory depth.
Definition: dotdirdeps.cpp:63
uint
unsigned uint
Definition: qcstring.h:40
DotDirProperty
Properties are used to format the directories in the graph distinctively.
Definition: dotdirdeps.cpp:36
DirDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
addHtmlExtensionIfMissing
QCString addHtmlExtensionIfMissing(const QCString &fName)
Definition: util.cpp:5275
DirDef::shortName
virtual const QCString shortName() const =0
Config_getInt
#define Config_getInt(name)
Definition: config.h:34
QCString::insert
QCString & insert(size_t index, const QCString &s)
Definition: qcstring.h:274
doxygen.h
DotDirDeps::getBaseName
virtual QCString getBaseName() const
Definition: dotdirdeps.cpp:405
DotDirDeps::isTrivial
bool isTrivial() const
Definition: dotdirdeps.cpp:441
image.h
drawTree
static void drawTree(DirRelations &dependencies, TextStream &t, const DirDef *const directory, int startLevel, DirDefMap &directoriesInGraph, const bool isTreeRoot)
Recursively draws directory tree.
Definition: dotdirdeps.cpp:230
DotDirPropertyBuilder::makeTruncated
DotDirPropertyBuilder & makeTruncated(bool b=true)
Definition: dotdirdeps.cpp:51
TRUE
#define TRUE
Definition: qcstring.h:36
DirDefMap
std::map< std::string, const DirDef * > DirDefMap
Definition: dotdirdeps.cpp:33
DotDirPropertyBuilder
Builder helper to create instances of the DotDirProperty struct
Definition: dotdirdeps.cpp:46
getDirectoryBorderStyle
static std::string getDirectoryBorderStyle(const DotDirProperty &property)
Returns a DOT node style according to the directory properties.
Definition: dotdirdeps.cpp:118
TextStream::str
std::string str() const
Return the contents of the buffer as a std::string object
Definition: textstream.h:208
drawDirectory
static void drawDirectory(TextStream &t, const DirDef *const directory, const DotDirProperty &property, DirDefMap &directoriesInGraph, int startLevel)
Puts DOT code for drawing directory to stream and adds it to the list.
Definition: dotdirdeps.cpp:148
Doxygen::dirRelations
static DirRelationLinkedMap dirRelations
Definition: doxygen.h:110
DotGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Definition: dotgraph.cpp:111
drawClusterClosing
static void drawClusterClosing(TextStream &t)
Definition: dotdirdeps.cpp:201
writeDotDirDepGraph
void writeDotDirDepGraph(TextStream &t, const DirDef *dd, bool linkRelations)
Write DOT code for directory dependency graph.
Definition: dotdirdeps.cpp:284
DotDirPropertyBuilder::makePeripheral
DotDirPropertyBuilder & makePeripheral(bool b=true)
Definition: dotdirdeps.cpp:53
DotDirPropertyBuilder::m_property
DotDirProperty m_property
Definition: dotdirdeps.cpp:56
DotDirPropertyBuilder::makeIncomplete
DotDirPropertyBuilder & makeIncomplete(bool b=true)
Definition: dotdirdeps.cpp:49
escapeCharsInString
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:3442
hex
static const char * hex
Definition: htmldocvisitor.cpp:65
DotDirDeps::m_dir
const DirDef * m_dir
Definition: dotdirdeps.h:61
DirDef::depGraphIsTrivial
virtual bool depGraphIsTrivial() const =0
Config_getString
#define Config_getString(name)
Definition: config.h:32
getDirectoryBorderColor
static const char * getDirectoryBorderColor(const DotDirProperty &property)
Returns a DOT color name according to the directory properties.
Definition: dotdirdeps.cpp:97
DotDirProperty::isOriginal
bool isOriginal
true if is the directory for which the graph is drawn
Definition: dotdirdeps.cpp:41
config.h
isAtMaxDepth
static bool isAtMaxDepth(const DirDef *const directory, const int startLevel)
Checks, if the directory is a the maximum drawn directory level.
Definition: dotdirdeps.cpp:163
convertToXML
QCString convertToXML(const QCString &s, bool keepEntities)
Definition: util.cpp:3948
addDependencies
static void addDependencies(DirRelations &dependencies, const DirDef *const srcDir, bool isLeaf)
Assembles a list of the directory relations and whether or not they result from "inheritance".
Definition: dotdirdeps.cpp:212
EmbeddedOutputFormat
EmbeddedOutputFormat
Definition: dotgraph.h:28
GraphOutputFormat
GraphOutputFormat
Definition: dotgraph.h:27
DotDirPropertyBuilder::makeOrphaned
DotDirPropertyBuilder & makeOrphaned(bool b=true)
Definition: dotdirdeps.cpp:50
DirDef::displayName
virtual QCString displayName(bool=TRUE) const =0
DotDirPropertyBuilder::makeOriginal
DotDirPropertyBuilder & makeOriginal(bool b=true)
Definition: dotdirdeps.cpp:52
DirDef::subDirs
virtual const DirList & subDirs() const =0
DirDef::parent
virtual DirDef * parent() const =0
util.h
A bunch of utility functions.
DotDirDeps::computeTheGraph
virtual void computeTheGraph()
Definition: dotdirdeps.cpp:411
QCString::sprintf
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:24
DotGraph::m_baseName
QCString m_baseName
Definition: dotgraph.h:88
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108