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 
27 /** Representation of a class inheritance or dependency graph */
28 class DotClassGraph : public DotGraph
29 {
30 public:
31  DotClassGraph(const ClassDef *cd,GraphType t);
33  bool isTrivial() const;
34  bool isTooBig() const;
35  int numNodes() const;
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 
63  bool m_lrRank;
64 };
65 
66 using DotClassGraphPtr = std::shared_ptr<DotClassGraph>;
67 
68 #endif
DotClassGraphPtr
std::shared_ptr< DotClassGraph > DotClassGraphPtr
Definition: dotclassgraph.h:66
dotnode.h
DotClassGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
Definition: dotclassgraph.cpp:447
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DotClassGraph::~DotClassGraph
~DotClassGraph()
Definition: dotclassgraph.cpp:375
DotNode
A node in a dot graph
Definition: dotnode.h:56
DotClassGraph::m_inheritFileName
QCString m_inheritFileName
Definition: dotclassgraph.h:62
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
DotClassGraph::computeTheGraph
virtual void computeTheGraph()
Definition: dotclassgraph.cpp:397
DotClassGraph::buildGraph
void buildGraph(const ClassDef *cd, DotNode *n, bool base, int distance)
Definition: dotclassgraph.cpp:250
GraphType
GraphType
Definition: dotgraph.h:29
DotClassGraph::getImgAltText
virtual QCString getImgAltText() const
Definition: dotclassgraph.cpp:430
TRUE
#define TRUE
Definition: qcstring.h:36
DotClassGraph::m_lrRank
bool m_lrRank
Definition: dotclassgraph.h:63
DotClassGraph::m_collabFileName
QCString m_collabFileName
Definition: dotclassgraph.h:61
DotNodeMap
Definition: dotnode.h:133
DotClassGraph::m_startNode
DotNode * m_startNode
Definition: dotclassgraph.h:58
DotClassGraph::m_graphType
GraphType m_graphType
Definition: dotclassgraph.h:60
DotClassGraph::addClass
void addClass(const ClassDef *cd, DotNode *n, int prot, const QCString &label, const QCString &usedName, const QCString &templSpec, bool base, int distance)
Definition: dotclassgraph.cpp:26
dotgraph.h
DotClassGraph
Representation of a class inheritance or dependency graph
Definition: dotclassgraph.h:28
DotClassGraph::getBaseName
virtual QCString getBaseName() const
Definition: dotclassgraph.cpp:380
DotClassGraph::writeDEF
void writeDEF(TextStream &t)
Definition: dotclassgraph.cpp:478
DotClassGraph::writeXML
void writeXML(TextStream &t)
Definition: dotclassgraph.cpp:462
DotNodeDeque
Definition: dotnode.h:137
DotClassGraph::m_usedNodes
DotNodeMap m_usedNodes
Definition: dotclassgraph.h:59
classdef.h
DotClassGraph::writeDocbook
void writeDocbook(TextStream &t)
Definition: dotclassgraph.cpp:470
DotClassGraph::isTrivial
bool isTrivial() const
Definition: dotclassgraph.cpp:351
DotClassGraph::getMapLabel
virtual QCString getMapLabel() const
Definition: dotclassgraph.cpp:411
DotClassGraph::determineVisibleNodes
bool determineVisibleNodes(DotNode *rootNode, int maxNodes, bool includeParents)
Definition: dotclassgraph.cpp:145
EmbeddedOutputFormat
EmbeddedOutputFormat
Definition: dotgraph.h:28
GraphOutputFormat
GraphOutputFormat
Definition: dotgraph.h:27
DotClassGraph::determineTruncatedNodes
void determineTruncatedNodes(DotNodeDeque &queue, bool includeParents)
Definition: dotclassgraph.cpp:114
DotGraph
A dot graph
Definition: dotgraph.h:32
DotClassGraph::numNodes
int numNodes() const
Definition: dotclassgraph.cpp:364
DotClassGraph::isTooBig
bool isTooBig() const
Definition: dotclassgraph.cpp:359
DotClassGraph::DotClassGraph
DotClassGraph(const ClassDef *cd, GraphType t)
Definition: dotclassgraph.cpp:314
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108