doxygen
dotincldepgraph.h
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 #ifndef DOTINCLDEPGRAPH_H
17 #define DOTINCLDEPGRAPH_H
18 
19 #include <memory>
20 
21 #include "qcstring.h"
22 #include "filedef.h"
23 
24 #include "dotnode.h"
25 #include "dotgraph.h"
26 
27 class TextStream;
28 
30 class DotInclDepGraph : public DotGraph
31 {
32  public:
33  DotInclDepGraph(const FileDef *fd,bool inverse);
34  ~DotInclDepGraph();
35  QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
36  const QCString &path,const QCString &fileName,const QCString &relPath,
37  bool writeImageMap=TRUE,int graphId=-1);
38  bool isTrivial() const;
39  bool isTooBig() const;
40  int numNodes() const;
41  void writeXML(TextStream &t);
42  void writeDocbook(TextStream &t);
43 
44  protected:
45  virtual QCString getBaseName() const;
46  virtual QCString getMapLabel() const;
47  virtual void computeTheGraph();
48 
49  private:
50  QCString diskName() const;
51  void buildGraph(DotNode *n,const FileDef *fd,int distance);
52  void determineVisibleNodes(DotNodeDeque &queue,int &maxNodes);
53  void determineTruncatedNodes(DotNodeDeque &queue);
54 
55  DotNode *m_startNode;
56  DotNodeMap m_usedNodes;
57  QCString m_inclDepFileName;
58  QCString m_inclByDepFileName;
59  bool m_inverse;
60 };
61 
62 using DotInclDepGraphPtr = std::shared_ptr<DotInclDepGraph>;
63 
64 #endif
Definition: dotnode.h:137
A node in a dot graph.
Definition: dotnode.h:56
Text streaming class that buffers data.
Definition: textstream.h:34
A model of a file symbol.
Definition: filedef.h:73
Definition: dotnode.h:133
A dot graph.
Definition: dotgraph.h:32
Representation of an include dependency graph.
Definition: dotincldepgraph.h:30
This is an alternative implementation of QCString.
Definition: qcstring.h:108