doxygen
dotclassgraph.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 DOTCLASSGRAPH_H
17 #define DOTCLASSGRAPH_H
18 
19 #include <memory>
20 
21 #include "classdef.h"
22 #include "dotnode.h"
23 #include "dotgraph.h"
24 
25 class TextStream;
26 
28 class DotClassGraph : public DotGraph
29 {
30 public:
31  DotClassGraph(const ClassDef *cd,GraphType t);
32  ~DotClassGraph();
33  bool isTrivial() const;
34  bool isTooBig() const;
35  int numNodes() const;
36  QCString writeGraph(TextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
37  const QCString &path, const QCString &fileName, const QCString &relPath,
38  bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1);
39 
40  void writeXML(TextStream &t);
41  void writeDocbook(TextStream &t);
42  void writeDEF(TextStream &t);
43 
44 protected:
45  virtual QCString getBaseName() const;
46  virtual QCString getMapLabel() const;
47  virtual void computeTheGraph();
48  virtual QCString getImgAltText() const;
49 
50 private:
51  void buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance);
52  bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents);
53  void determineTruncatedNodes(DotNodeDeque &queue,bool includeParents);
54  void addClass(const ClassDef *cd,DotNode *n,int prot,const QCString &label,
55  const QCString &usedName,const QCString &templSpec,
56  bool base,int distance);
57 
58  DotNode * m_startNode;
59  DotNodeMap m_usedNodes;
60  GraphType m_graphType;
61  QCString m_collabFileName;
62  QCString m_inheritFileName;
63  bool m_lrRank;
64 };
65 
66 using DotClassGraphPtr = std::shared_ptr<DotClassGraph>;
67 
68 #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
Definition: dotnode.h:133
A dot graph.
Definition: dotgraph.h:32
Representation of a class inheritance or dependency graph.
Definition: dotclassgraph.h:28
This is an alternative implementation of QCString.
Definition: qcstring.h:108
A abstract class representing of a compound symbol.
Definition: classdef.h:103