Doxygen
Loading...
Searching...
No Matches
DotLegendGraph Class Referencefinal

Representation of a legend explaining the meaning of boxes, arrows, and colors. More...

#include <src/dotlegendgraph.h>

Inheritance diagram for DotLegendGraph:
Collaboration diagram for DotLegendGraph:

Public Member Functions

void writeGraph (const DString &path)
Public Member Functions inherited from DotGraph
 DotGraph ()
virtual ~DotGraph ()=default

Private Member Functions

DString getBaseName () const override
void computeTheGraph () override
DString getMapLabel () const override

Additional Inherited Members

Protected Member Functions inherited from DotGraph
int getNextNodeNumber ()
 returns the node number.
int getNextEdgeNumber ()
 returns the edge number.
DString writeGraph (TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
virtual DString absMapName () const
virtual DString getImgAltText () const
DString absBaseName () const
DString absDotName () const
DString imgName () const
DString absImgName () const
DString relImgName () const
Static Protected Member Functions inherited from DotGraph
static void writeGraphHeader (TextStream &t, const DString &title=DString())
static void writeGraphFooter (TextStream &t)
static void computeGraph (DotNode *root, GraphType gt, GraphOutputFormat format, const DString &rank, bool renderParents, bool backArrows, const DString &title, DString &graphStr)
Protected Attributes inherited from DotGraph
GraphOutputFormat m_graphFormat = GraphOutputFormat::BITMAP
EmbeddedOutputFormat m_textFormat = EmbeddedOutputFormat::Html
Dir m_dir
DString m_fileName
DString m_relPath
bool m_generateImageMap = false
int m_graphId = 0
DString m_absPath
DString m_baseName
DString m_theGraph
bool m_regenerate = false
bool m_doNotAddImageToIndex = false
bool m_noDivTag = false
bool m_zoomable = true
bool m_urlOnly = false

Detailed Description

Representation of a legend explaining the meaning of boxes, arrows, and colors.

Definition at line 23 of file dotlegendgraph.h.

Member Function Documentation

◆ computeTheGraph()

void DotLegendGraph::computeTheGraph ( )
overrideprivatevirtual

Implements DotGraph.

Definition at line 46 of file dotlegendgraph.cpp.

47{
48 TextStream md5stream;
50
51 DotNode{this,"Inherited", "", "", true}.setNodeId(9).writeBox(md5stream, GraphType::CallGraph, GraphOutputFormat::BITMAP, false);
52 md5stream << " Node10 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n";
53 DotNode{this,"PublicBase", "", DotNode::placeholderUrl}.setNodeId(10).markHasDocumentation().writeBox(md5stream, GraphType::CallGraph, GraphOutputFormat::BITMAP, false);
54 md5stream << " Node11 -> Node10 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n";
55 DotNode{this,"Truncated", "", DotNode::placeholderUrl}.setNodeId(11).markAsTruncated().markHasDocumentation().writeBox(md5stream, GraphType::CallGraph, GraphOutputFormat::BITMAP, true);
56 md5stream << " Node13 -> Node9 [dir=\"back\",color=\"darkgreen\",style=\"solid\" tooltip=\" \"];\n";
57 md5stream << " Node13 [label=\"ProtectedBase\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n";
58 md5stream << " Node14 -> Node9 [dir=\"back\",color=\"firebrick4\",style=\"solid\" tooltip=\" \"];\n";
59 md5stream << " Node14 [label=\"PrivateBase\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n";
60 md5stream << " Node15 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n";
61 DotNode{this,"Undocumented", "", ""}.setNodeId(15).writeBox(md5stream, GraphType::CallGraph, GraphOutputFormat::BITMAP, false);
62 md5stream << " Node16 -> Node9 [dir=\"back\",color=\"steelblue1\",style=\"solid\" tooltip=\" \"];\n";
63 md5stream << " Node16 [label=\"Templ\\< int \\>\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n";
64 md5stream << " Node17 -> Node16 [dir=\"back\",color=\"orange\",style=\"dashed\",label=\"< int >\",fontcolor=\"grey\" tooltip=\" \"];\n";
65 md5stream << " Node17 [label=\"Templ\\< T \\>\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n";
66 md5stream << " Node18 -> Node9 [dir=\"back\",color=\"darkorchid3\",style=\"dashed\",label=\"m_usedClass\",fontcolor=\"grey\" tooltip=\" \"];\n";
67 md5stream << " Node18 [label=\"Used\",color=\"gray40\",fillcolor=\"white\",style=\"filled\" tooltip=\" \"];\n";
68 writeGraphFooter(md5stream);
69 m_theGraph = md5stream.str();
70}
DString m_theGraph
Definition dotgraph.h:95
static void writeGraphFooter(TextStream &t)
Definition dotgraph.cpp:294
static void writeGraphHeader(TextStream &t, const DString &title=DString())
Definition dotgraph.cpp:269
friend class DotNode
Definition dotgraph.h:36
static constexpr auto placeholderUrl
Definition dotnode.h:70
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:232
virtual DString trLegendTitle()=0
@ CallGraph
Definition dotgraph.h:31
Translator * theTranslator
Definition language.cpp:71

References BITMAP, CallGraph, DotGraph::DotNode, DotGraph::m_theGraph, DotNode::placeholderUrl, TextStream::str(), theTranslator, Translator::trLegendTitle(), DotGraph::writeGraphFooter(), and DotGraph::writeGraphHeader().

◆ getBaseName()

DString DotLegendGraph::getBaseName ( ) const
overrideprivatevirtual

Implements DotGraph.

Definition at line 41 of file dotlegendgraph.cpp.

42{
43 return "graph_legend";
44}

◆ getMapLabel()

DString DotLegendGraph::getMapLabel ( ) const
overrideprivatevirtual

Implements DotGraph.

Definition at line 72 of file dotlegendgraph.cpp.

73{
74 return "";
75}

◆ writeGraph()

void DotLegendGraph::writeGraph ( const DString & path)

Definition at line 28 of file dotlegendgraph.cpp.

29{
30 TextStream ts;
32
33 if (getDotImageExtension()=="svg")
34 {
36 createFilePatcher(absBaseName()+Config_getString(HTML_FILE_EXTENSION))->
37 addSVGObject("graph_legend", absImgName(),DString());
38 }
39}
DString()=default
DString absImgName() const
Definition dotgraph.h:81
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
Definition dotgraph.cpp:114
DString absBaseName() const
Definition dotgraph.h:78
static DotManager * instance()
Definition dot.cpp:79
#define Config_getString(name)
Definition config.h:32
DString getDotImageExtension()
Definition util.cpp:4966

References DotGraph::absBaseName(), DotGraph::absImgName(), BITMAP, Config_getString, DString::DString(), getDotImageExtension(), Html, DotManager::instance(), and DotGraph::writeGraph().


The documentation for this class was generated from the following files: