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 final : 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;
39 const DString &path, const DString &fileName, const DString &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 DString getBaseName() const override;
48 DString getMapLabel() const override;
49 void computeTheGraph() override;
50 DString 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 DString &label,
57 const DString &usedName,const DString &templSpec,
58 bool base,int distance);
59
66};
67
68using DotClassGraphPtr = std::shared_ptr<DotClassGraph>;
69
70#endif
A abstract class representing of a compound symbol.
Definition classdef.h:104
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:89
DotNodeMap m_usedNodes
void writeDocbook(TextStream &t)
void writeXML(TextStream &t)
bool isTooBig() const
DotClassGraph(const ClassDef *cd, GraphType t)
DotNode * m_startNode
GraphType m_graphType
bool determineVisibleNodes(DotNode *rootNode, int maxNodes, bool includeParents)
DString getBaseName() const override
bool isTrivial() const
void computeTheGraph() override
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool TBRank=true, bool imageMap=true, int graphId=-1)
void determineTruncatedNodes(DotNodeDeque &queue, bool includeParents)
int numNodes() const
DString m_inheritFileName
DString getImgAltText() const override
void writeDEF(TextStream &t)
void addClass(const ClassDef *cd, DotNode *n, EdgeInfo::Colors color, const DString &label, const DString &usedName, const DString &templSpec, bool base, int distance)
void buildGraph(const ClassDef *cd, DotNode *n, bool base, int distance)
DString getMapLabel() const override
DString 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