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 "dotgraph.h"
22#include "dotnode.h"
23#include "dstring.h"
24
25class ClassDef;
26class TextStream;
27
28/** Representation of a class inheritance or dependency graph */
29class DotClassGraph final : public DotGraph
30{
31 public:
32 DotClassGraph(const ClassDef *cd,GraphType t);
33 ~DotClassGraph() override;
35
36 bool isTrivial() const;
37 bool isTooBig() const;
38 int numNodes() const;
40 const DString &path, const DString &fileName, const DString &relPath,
41 bool TBRank=true,bool imageMap=true,int graphId=-1);
42
43 void writeXML(TextStream &t);
44 void writeDocbook(TextStream &t);
45 void writeDEF(TextStream &t);
46
47 protected:
48 DString getBaseName() const override;
49 DString getMapLabel() const override;
50 void computeTheGraph() override;
51 DString getImgAltText() const override;
52
53 private:
54 void buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance);
55 bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents);
56 void determineTruncatedNodes(DotNodeDeque &queue,bool includeParents);
57 void addClass(const ClassDef *cd,DotNode *n,EdgeInfo::Colors color,const DString &label,
58 const DString &usedName,const DString &templSpec,
59 bool base,int distance);
60
67};
68
69using DotClassGraphPtr = std::shared_ptr<DotClassGraph>;
70
71#endif
A abstract class representing of a compound symbol.
Definition classdef.h:100
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
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
~DotClassGraph() 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