Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
dotgfxhierarchytable.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 DOTGFXHIERARCHYTABLE_H
17
#define DOTGFXHIERARCHYTABLE_H
18
19
#include <memory>
20
#include <string>
21
#include <unordered_map>
22
#include <vector>
23
24
#include "
classdef.h
"
25
#include "
dotgraph.h
"
26
#include "
dotnode.h
"
27
28
class
ClassLinkedMap
;
29
30
/** Represents a graphical class hierarchy */
31
class
DotGfxHierarchyTable
:
public
DotGraph
32
{
33
public
:
34
DotGfxHierarchyTable
(
const
QCString
&
prefix
=
""
,
ClassDef::CompoundType
ct=
ClassDef::Class
);
35
~DotGfxHierarchyTable
()
override
=
default
;
36
NON_COPYABLE
(
DotGfxHierarchyTable
)
37
38
void
createGraph
(
DotNode
*rootNode,
TextStream
&t,
const
QCString
&path,
39
const
QCString
&fileName,
int
id
);
40
void
writeGraph
(
TextStream
&t,
const
QCString
&path,
const
QCString
&fileName);
41
const
std::vector<DotNode*>
subGraphs
()
const
{
return
m_rootSubgraphs
; }
42
43
protected
:
44
QCString
getBaseName
()
const override
;
45
QCString
getMapLabel
()
const override
;
46
void
computeTheGraph
()
override
;
47
48
private
:
49
void
addHierarchy
(
DotNode
*n,
const
ClassDef
*cd,
ClassDefSet
&visited);
50
void
addClassList
(
const
ClassLinkedMap
&cl,
ClassDefSet
&visited);
51
52
using
DotNodeMap
= std::unordered_multimap< std::string, std::unique_ptr<DotNode> >;
53
int
m_graphId
;
54
QCString
m_prefix
;
55
ClassDef::CompoundType
m_classType
;
56
std::vector<DotNode*>
m_rootNodes
;
57
DotNodeMap
m_usedNodes
;
58
std::vector<DotNode*>
m_rootSubgraphs
;
59
DotNode
*
m_rootSubgraphNode
;
60
};
61
62
using
DotGfxHierarchyTablePtr
= std::shared_ptr<DotGfxHierarchyTable>;
63
64
#endif
prefix
constexpr auto prefix
Definition
anchor.cpp:44
ClassDef
A abstract class representing of a compound symbol.
Definition
classdef.h:104
ClassDef::CompoundType
CompoundType
The various compound types.
Definition
classdef.h:109
ClassDef::Class
@ Class
Definition
classdef.h:109
ClassLinkedMap
Definition
classlist.h:27
DotGfxHierarchyTable::m_rootSubgraphs
std::vector< DotNode * > m_rootSubgraphs
Definition
dotgfxhierarchytable.h:58
DotGfxHierarchyTable::getMapLabel
QCString getMapLabel() const override
Definition
dotgfxhierarchytable.cpp:60
DotGfxHierarchyTable::addClassList
void addClassList(const ClassLinkedMap &cl, ClassDefSet &visited)
Definition
dotgfxhierarchytable.cpp:179
DotGfxHierarchyTable::DotGfxHierarchyTable
DotGfxHierarchyTable(const QCString &prefix="", ClassDef::CompoundType ct=ClassDef::Class)
Definition
dotgfxhierarchytable.cpp:226
DotGfxHierarchyTable::~DotGfxHierarchyTable
~DotGfxHierarchyTable() override=default
DotGfxHierarchyTable::addHierarchy
void addHierarchy(DotNode *n, const ClassDef *cd, ClassDefSet &visited)
Definition
dotgfxhierarchytable.cpp:105
DotGfxHierarchyTable::writeGraph
void writeGraph(TextStream &t, const QCString &path, const QCString &fileName)
Definition
dotgfxhierarchytable.cpp:75
DotGfxHierarchyTable::m_graphId
int m_graphId
Definition
dotgfxhierarchytable.h:53
DotGfxHierarchyTable::subGraphs
const std::vector< DotNode * > subGraphs() const
Definition
dotgfxhierarchytable.h:41
DotGfxHierarchyTable::m_usedNodes
DotNodeMap m_usedNodes
Definition
dotgfxhierarchytable.h:57
DotGfxHierarchyTable::computeTheGraph
void computeTheGraph() override
Definition
dotgfxhierarchytable.cpp:37
DotGfxHierarchyTable::createGraph
void createGraph(DotNode *rootNode, TextStream &t, const QCString &path, const QCString &fileName, int id)
Definition
dotgfxhierarchytable.cpp:65
DotGfxHierarchyTable::m_rootSubgraphNode
DotNode * m_rootSubgraphNode
Definition
dotgfxhierarchytable.h:59
DotGfxHierarchyTable::DotNodeMap
std::unordered_multimap< std::string, std::unique_ptr< DotNode > > DotNodeMap
Definition
dotgfxhierarchytable.h:52
DotGfxHierarchyTable::m_prefix
QCString m_prefix
Definition
dotgfxhierarchytable.h:54
DotGfxHierarchyTable::m_classType
ClassDef::CompoundType m_classType
Definition
dotgfxhierarchytable.h:55
DotGfxHierarchyTable::getBaseName
QCString getBaseName() const override
Definition
dotgfxhierarchytable.cpp:27
DotGfxHierarchyTable::m_rootNodes
std::vector< DotNode * > m_rootNodes
Definition
dotgfxhierarchytable.h:56
DotGraph::DotGraph
DotGraph()
Definition
dotgraph.h:38
DotGraph::DotNode
friend class DotNode
Definition
dotgraph.h:36
DotNode
A node in a dot graph.
Definition
dotnode.h:68
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
TextStream
Text streaming class that buffers data.
Definition
textstream.h:36
classdef.h
ClassDefSet
std::unordered_set< const ClassDef * > ClassDefSet
Definition
classdef.h:95
NON_COPYABLE
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition
construct.h:37
DotGfxHierarchyTablePtr
std::shared_ptr< DotGfxHierarchyTable > DotGfxHierarchyTablePtr
Definition
dotgfxhierarchytable.h:62
dotgraph.h
dotnode.h
src
dotgfxhierarchytable.h
Generated by
1.17.0