Doxygen
Loading...
Searching...
No Matches
dotclassgraph.h
Go to the documentation of this file.
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
25class TextStream;
26
27/** Representation of a class inheritance or dependency graph */
28class DotClassGraph : public DotGraph
29{
30 public:
31 DotClassGraph(const ClassDef *cd,GraphType t);
32 ~DotClassGraph() override;
34
35 bool isTrivial() const;
36 bool isTooBig() const;
37 int numNodes() const;
38 QCString writeGraph(TextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
39 const QCString &path, const QCString &fileName, const QCString &relPath,
40 bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1);
41
42 void writeXML(TextStream &t);
43 void writeDocbook(TextStream &t);
44 void writeDEF(TextStream &t);
45
46 protected:
47 QCString getBaseName() const override;
48 QCString getMapLabel() const override;
49 void computeTheGraph() override;
50 QCString getImgAltText() const override;
51
52 private:
53 void buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance);
54 bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents);
55 void determineTruncatedNodes(DotNodeDeque &queue,bool includeParents);
56 void addClass(const ClassDef *cd,DotNode *n,EdgeInfo::Colors color,const QCString &label,
57 const QCString &usedName,const QCString &templSpec,
58 bool base,int distance);
59
61 DotNodeMap m_usedNodes;
66};
67
68using DotClassGraphPtr = std::shared_ptr<DotClassGraph>;
69
70#endif
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)
DotNodeMap m_usedNodes
void writeDocbook(TextStream &t)
void writeXML(TextStream &t)
QCString getBaseName() const override
bool isTooBig() const
DotClassGraph(const ClassDef *cd, GraphType t)
DotNode * m_startNode
GraphType m_graphType
bool determineVisibleNodes(DotNode *rootNode, int maxNodes, bool includeParents)
QCString m_inheritFileName
QCString getMapLabel() const override
~DotClassGraph() override
bool isTrivial() const
void computeTheGraph() override
void determineTruncatedNodes(DotNodeDeque &queue, bool includeParents)
int numNodes() const
void addClass(const ClassDef *cd, DotNode *n, EdgeInfo::Colors color, const QCString &label, const QCString &usedName, const QCString &templSpec, bool base, int distance)
void writeDEF(TextStream &t)
void buildGraph(const ClassDef *cd, DotNode *n, bool base, int distance)
QCString getImgAltText() const override
QCString m_collabFileName
DotGraph()
Definition dotgraph.h:38
friend class DotNode
Definition dotgraph.h:36
Text streaming class that buffers data.
Definition textstream.h:36
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
std::shared_ptr< DotClassGraph > DotClassGraphPtr
GraphType
Definition dotgraph.h:31
EmbeddedOutputFormat
Definition dotgraph.h:30
GraphOutputFormat
Definition dotgraph.h:29
#define TRUE
Definition qcstring.h:37