doxygen
dotcallgraph.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 DOTCALLGRAPH_H
17 #define DOTCALLGRAPH_H
18 
19 #include <memory>
20 
21 #include "dotnode.h"
22 #include "dotgraph.h"
23 #include "memberdef.h"
24 
26 class DotCallGraph : public DotGraph
27 {
28  public:
29  DotCallGraph(const MemberDef *md,bool inverse);
30  ~DotCallGraph();
31  bool isTrivial() const;
32  bool isTooBig() const;
33  int numNodes() const;
34  QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
35  const QCString &path,const QCString &fileName,
36  const QCString &relPath,bool writeImageMap=TRUE,
37  int graphId=-1);
38  static bool isTrivial(const MemberDef *md,bool inverse);
39 
40  protected:
41  virtual QCString getBaseName() const;
42  virtual QCString getMapLabel() const;
43  virtual void computeTheGraph();
44 
45  private:
46  void buildGraph(DotNode *n,const MemberDef *md,int distance);
47  void determineVisibleNodes(DotNodeDeque &queue, int &maxNodes);
48  void determineTruncatedNodes(DotNodeDeque &queue);
49  DotNode *m_startNode;
50  DotNodeMap m_usedNodes;
51  bool m_inverse;
52  QCString m_diskName;
53  const Definition * m_scope;
54 };
55 
56 using DotCallGraphPtr = std::shared_ptr<DotCallGraph>;
57 
58 #endif
Definition: dotnode.h:138
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
A node in a dot graph.
Definition: dotnode.h:56
Text streaming class that buffers data.
Definition: textstream.h:33
Definition: dotnode.h:134
Representation of an call graph.
Definition: dotcallgraph.h:26
A dot graph.
Definition: dotgraph.h:32
This is an alternative implementation of QCString.
Definition: qcstring.h:108