Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
dotlegendgraph.cpp
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
#include <sstream>
17
18
#include "
dotlegendgraph.h
"
19
#include "
util.h
"
20
#include "
config.h
"
21
#include "
doxygen.h
"
22
#include "
dot.h
"
23
#include "
language.h
"
24
#include "
dotfilepatcher.h
"
25
#include "
dotnode.h
"
26
27
void
DotLegendGraph::writeGraph
(
const
QCString
&path)
28
{
29
TextStream
ts;
30
DotGraph::writeGraph
(ts,
GraphOutputFormat::BITMAP
,
EmbeddedOutputFormat::Html
, path,
""
,
""
,
FALSE
, 0);
31
32
if
(
getDotImageExtension
()==
"svg"
)
33
{
34
DotManager::instance
()->
35
createFilePatcher(
absBaseName
()+
Config_getString
(HTML_FILE_EXTENSION))->
36
addSVGObject(
"graph_legend"
,
absImgName
(),
QCString
());
37
}
38
}
39
40
QCString
DotLegendGraph::getBaseName
()
const
41
{
42
return
"graph_legend"
;
43
}
44
45
void
DotLegendGraph::computeTheGraph
()
46
{
47
TextStream
md5stream;
48
writeGraphHeader
(md5stream,
theTranslator
->trLegendTitle());
49
50
DotNode
{
this
,
"Inherited"
,
""
,
""
,
TRUE
}.setNodeId(9).writeBox(md5stream,
GraphType::CallGraph
,
GraphOutputFormat::BITMAP
,
false
);
51
md5stream <<
" Node10 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n"
;
52
DotNode
{
this
,
"PublicBase"
,
""
,
DotNode::placeholderUrl
}.setNodeId(10).markHasDocumentation().writeBox(md5stream,
GraphType::CallGraph
,
GraphOutputFormat::BITMAP
,
false
);
53
md5stream <<
" Node11 -> Node10 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n"
;
54
DotNode
{
this
,
"Truncated"
,
""
,
DotNode::placeholderUrl
}.setNodeId(11).markAsTruncated().markHasDocumentation().writeBox(md5stream,
GraphType::CallGraph
,
GraphOutputFormat::BITMAP
,
true
);
55
md5stream <<
" Node13 -> Node9 [dir=\"back\",color=\"darkgreen\",style=\"solid\" tooltip=\" \"];\n"
;
56
md5stream <<
" Node13 [label=\"ProtectedBase\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n"
;
57
md5stream <<
" Node14 -> Node9 [dir=\"back\",color=\"firebrick4\",style=\"solid\" tooltip=\" \"];\n"
;
58
md5stream <<
" Node14 [label=\"PrivateBase\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n"
;
59
md5stream <<
" Node15 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n"
;
60
DotNode
{
this
,
"Undocumented"
,
""
,
""
}.setNodeId(15).writeBox(md5stream,
GraphType::CallGraph
,
GraphOutputFormat::BITMAP
,
false
);
61
md5stream <<
" Node16 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n"
;
62
md5stream <<
" Node16 [label=\"Templ\\< int \\>\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n"
;
63
md5stream <<
" Node17 -> Node16 [dir=\"back\",color=\"orange\",style=\"dashed\",label=\"< int >\",fontcolor=\"grey\" tooltip=\" \"];\n"
;
64
md5stream <<
" Node17 [label=\"Templ\\< T \\>\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n"
;
65
md5stream <<
" Node18 -> Node9 [dir=\"back\",color=\"darkorchid3\",style=\"dashed\",label=\"m_usedClass\",fontcolor=\"grey\" tooltip=\" \"];\n"
;
66
md5stream <<
" Node18 [label=\"Used\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n"
;
67
writeGraphFooter
(md5stream);
68
m_theGraph
= md5stream.
str
();
69
}
70
71
QCString
DotLegendGraph::getMapLabel
()
const
72
{
73
return
""
;
74
}
75
DotGraph::absBaseName
QCString absBaseName() const
Definition
dotgraph.h:78
DotGraph::absImgName
QCString absImgName() const
Definition
dotgraph.h:81
DotGraph::writeGraphFooter
static void writeGraphFooter(TextStream &t)
Definition
dotgraph.cpp:301
DotGraph::writeGraphHeader
static void writeGraphHeader(TextStream &t, const QCString &title=QCString())
Definition
dotgraph.cpp:276
DotGraph::m_theGraph
QCString m_theGraph
Definition
dotgraph.h:95
DotGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Definition
dotgraph.cpp:115
DotGraph::DotNode
friend class DotNode
Definition
dotgraph.h:36
DotLegendGraph::getMapLabel
QCString getMapLabel() const override
Definition
dotlegendgraph.cpp:71
DotLegendGraph::writeGraph
void writeGraph(const QCString &path)
Definition
dotlegendgraph.cpp:27
DotLegendGraph::getBaseName
QCString getBaseName() const override
Definition
dotlegendgraph.cpp:40
DotLegendGraph::computeTheGraph
void computeTheGraph() override
Definition
dotlegendgraph.cpp:45
DotManager::instance
static DotManager * instance()
Definition
dot.cpp:78
DotNode::placeholderUrl
static constexpr auto placeholderUrl
Definition
dotnode.h:71
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
TextStream
Text streaming class that buffers data.
Definition
textstream.h:36
TextStream::str
std::string str() const
Return the contents of the buffer as a std::string object.
Definition
textstream.h:216
config.h
Config_getString
#define Config_getString(name)
Definition
config.h:32
dot.h
dotfilepatcher.h
GraphType::CallGraph
@ CallGraph
Definition
dotgraph.h:31
EmbeddedOutputFormat::Html
@ Html
Definition
dotgraph.h:30
GraphOutputFormat::BITMAP
@ BITMAP
Definition
dotgraph.h:29
dotlegendgraph.h
dotnode.h
doxygen.h
theTranslator
Translator * theTranslator
Definition
language.cpp:71
language.h
TRUE
#define TRUE
Definition
qcstring.h:37
FALSE
#define FALSE
Definition
qcstring.h:34
getDotImageExtension
QCString getDotImageExtension()
Definition
util.cpp:6289
util.h
A bunch of utility functions.
src
dotlegendgraph.cpp
Generated by
1.17.0