Doxygen
Loading...
Searching...
No Matches
DotClassGraph Class Reference

Representation of a class inheritance or dependency graph. More...

#include <src/dotclassgraph.h>

+ Inheritance diagram for DotClassGraph:
+ Collaboration diagram for DotClassGraph:

Public Member Functions

 DotClassGraph (const ClassDef *cd, GraphType t)
 
 ~DotClassGraph () override
 
bool isTrivial () const
 
bool isTooBig () const
 
int numNodes () const
 
QCString writeGraph (TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
 
void writeXML (TextStream &t)
 
void writeDocbook (TextStream &t)
 
void writeDEF (TextStream &t)
 
- Public Member Functions inherited from DotGraph
 DotGraph ()
 
virtual ~DotGraph ()=default
 

Protected Member Functions

QCString getBaseName () const override
 
QCString getMapLabel () const override
 
void computeTheGraph () override
 
QCString getImgAltText () const override
 
- Protected Member Functions inherited from DotGraph
int getNextNodeNumber ()
 returns the node number.
 
int getNextEdgeNumber ()
 returns the edge number.
 
QCString writeGraph (TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
 
virtual QCString absMapName () const
 
QCString absBaseName () const
 
QCString absDotName () const
 
QCString imgName () const
 
QCString absImgName () const
 
QCString relImgName () const
 

Private Member Functions

void buildGraph (const ClassDef *cd, DotNode *n, bool base, int distance)
 
bool determineVisibleNodes (DotNode *rootNode, int maxNodes, bool includeParents)
 
void determineTruncatedNodes (DotNodeDeque &queue, bool includeParents)
 
void addClass (const ClassDef *cd, DotNode *n, EdgeInfo::Colors color, const QCString &label, const QCString &usedName, const QCString &templSpec, bool base, int distance)
 

Private Attributes

DotNodem_startNode
 
DotNodeMap m_usedNodes
 
GraphType m_graphType
 
QCString m_collabFileName
 
QCString m_inheritFileName
 
bool m_lrRank
 

Additional Inherited Members

- Static Protected Member Functions inherited from DotGraph
static void writeGraphHeader (TextStream &t, const QCString &title=QCString())
 
static void writeGraphFooter (TextStream &t)
 
static void computeGraph (DotNode *root, GraphType gt, GraphOutputFormat format, const QCString &rank, bool renderParents, bool backArrows, const QCString &title, QCString &graphStr)
 
- Protected Attributes inherited from DotGraph
GraphOutputFormat m_graphFormat = GraphOutputFormat::BITMAP
 
EmbeddedOutputFormat m_textFormat = EmbeddedOutputFormat::Html
 
Dir m_dir
 
QCString m_fileName
 
QCString m_relPath
 
bool m_generateImageMap = false
 
int m_graphId = 0
 
QCString m_absPath
 
QCString m_baseName
 
QCString 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 class inheritance or dependency graph.

Definition at line 28 of file dotclassgraph.h.

Constructor & Destructor Documentation

◆ DotClassGraph()

DotClassGraph::DotClassGraph ( const ClassDef * cd,
GraphType t )

Definition at line 313 of file dotclassgraph.cpp.

314{
315 //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",qPrint(cd->displayName()));
316 m_graphType = t;
317 QCString tmp_url="";
318 if (cd->isLinkable() && !cd->isHidden())
319 {
320 tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
321 if (!cd->anchor().isEmpty())
322 {
323 tmp_url+="#"+cd->anchor();
324 }
325 }
326 QCString className = cd->displayName();
327 QCString tooltip = cd->briefDescriptionAsTooltip();
328 m_startNode = new DotNode(this,
329 className,
330 tooltip,
331 tmp_url,
332 TRUE, // is a root node
333 cd
334 );
335 m_startNode->setDistance(0);
336 m_usedNodes.emplace(className.str(),m_startNode);
337
340
342 DotNodeDeque openNodeQueue;
343 openNodeQueue.push_back(m_startNode);
345
348}
virtual QCString inheritanceGraphFileName() const =0
returns the file name to use for the inheritance graph
virtual QCString collaborationGraphFileName() const =0
returns the file name to use for the collaboration graph
virtual bool isLinkable() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual bool isHidden() const =0
virtual QCString getReference() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual QCString getOutputFileBase() const =0
DotNodeMap m_usedNodes
DotNode * m_startNode
GraphType m_graphType
bool determineVisibleNodes(DotNode *rootNode, int maxNodes, bool includeParents)
QCString m_inheritFileName
void determineTruncatedNodes(DotNodeDeque &queue, bool includeParents)
void buildGraph(const ClassDef *cd, DotNode *n, bool base, int distance)
QCString m_collabFileName
friend class DotNode
Definition dotgraph.h:36
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:537
#define Config_getInt(name)
Definition config.h:34
@ Inheritance
Definition dotgraph.h:31
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References Definition::anchor(), Definition::briefDescriptionAsTooltip(), buildGraph(), ClassDef::collaborationGraphFileName(), Config_getInt, determineTruncatedNodes(), determineVisibleNodes(), Definition::displayName(), DotGraph::DotNode, FALSE, Definition::getOutputFileBase(), Definition::getReference(), Inheritance, ClassDef::inheritanceGraphFileName(), QCString::isEmpty(), Definition::isHidden(), Definition::isLinkable(), m_collabFileName, m_graphType, m_inheritFileName, m_lrRank, m_startNode, m_usedNodes, QCString::str(), and TRUE.

◆ ~DotClassGraph()

DotClassGraph::~DotClassGraph ( )
override

Definition at line 374 of file dotclassgraph.cpp.

375{
377}
static void deleteNodes(DotNode *node)
Definition dotnode.cpp:380

References DotNode::deleteNodes(), and m_startNode.

Member Function Documentation

◆ addClass()

void DotClassGraph::addClass ( const ClassDef * cd,
DotNode * n,
EdgeInfo::Colors color,
const QCString & label,
const QCString & usedName,
const QCString & templSpec,
bool base,
int distance )
private

Definition at line 26 of file dotclassgraph.cpp.

28{
29 if (Config_getBool(HIDE_UNDOC_CLASSES) && !cd->isLinkable()) return;
30
32 QCString className;
33 QCString fullName;
34 if (cd->isAnonymous())
35 {
36 className="anonymous:";
37 className+=label;
38 fullName = className;
39 }
40 else if (!usedName.isEmpty()) // name is a typedef
41 {
42 className=usedName;
43 fullName = className;
44 }
45 else if (!templSpec.isEmpty()) // name has a template part
46 {
47 className=insertTemplateSpecifierInScope(cd->displayName(),templSpec);
48 fullName =insertTemplateSpecifierInScope(cd->name(),templSpec);
49 }
50 else // just a normal name
51 {
52 className=cd->displayName();
53 fullName = cd->name();
54 }
55 //printf("DotClassGraph::addClass(class='%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
56 // qPrint(className),qPrint(n->label()),prot,label,distance,usedName,templSpec,base);
57 auto it = m_usedNodes.find(fullName.str());
58 if (it!=m_usedNodes.end()) // class already inserted
59 {
60 DotNode *bn = it->second;
61 if (base)
62 {
63 n->addChild(bn,color,edgeStyle,label);
64 bn->addParent(n);
65 }
66 else
67 {
68 bn->addChild(n,color,edgeStyle,label);
69 n->addParent(bn);
70 }
71 bn->setDistance(distance);
72 //printf(" add exiting node %s of %s\n",qPrint(bn->label()),qPrint(n->label()));
73 }
74 else // new class
75 {
76 QCString displayName=className;
77 if (Config_getBool(HIDE_SCOPE_NAMES)) displayName=stripScope(displayName);
78 QCString tmp_url;
79 if (cd->isLinkable() && !cd->isHidden())
80 {
81 tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
82 if (!cd->anchor().isEmpty())
83 {
84 tmp_url+="#"+cd->anchor();
85 }
86 }
87 QCString tooltip = cd->briefDescriptionAsTooltip();
88 DotNode *bn = new DotNode(this,
89 displayName,
90 tooltip,
91 tmp_url,
92 FALSE, // rootNode
93 cd
94 );
95 if (base)
96 {
97 n->addChild(bn,color,edgeStyle,label);
98 bn->addParent(n);
99 }
100 else
101 {
102 bn->addChild(n,color,edgeStyle,label);
103 n->addParent(bn);
104 }
105 bn->setDistance(distance);
106 m_usedNodes.emplace(fullName.str(),bn);
107 //printf(" add new child node '%s' to %s hidden=%d url=%s\n",
108 // qPrint(className),qPrint(n->label()),cd->isHidden(),qPrint(tmp_url));
109
110 buildGraph(cd,bn,base,distance+1);
111 }
112}
virtual bool isAnonymous() const =0
virtual const QCString & name() const =0
void setDistance(int distance)
Definition dotnode.cpp:366
void addParent(DotNode *n)
Definition dotnode.cpp:331
void addChild(DotNode *n, EdgeInfo::Colors edgeColor=EdgeInfo::Purple, EdgeInfo::Styles edgeStyle=EdgeInfo::Solid, const QCString &edgeLab=QCString(), const QCString &edgeURL=QCString(), int edgeLabCol=-1)
Definition dotnode.cpp:314
@ Solid
Definition dotnode.h:36
@ Dashed
Definition dotnode.h:36
@ Orange2
Definition dotnode.h:35
@ Orange
Definition dotnode.h:35
#define Config_getBool(name)
Definition config.h:33
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition util.cpp:4100
QCString stripScope(const QCString &name)
Definition util.cpp:4133

References DotNode::addChild(), DotNode::addParent(), Definition::anchor(), Definition::briefDescriptionAsTooltip(), buildGraph(), Config_getBool, EdgeInfo::Dashed, Definition::displayName(), DotGraph::DotNode, FALSE, Definition::getOutputFileBase(), Definition::getReference(), insertTemplateSpecifierInScope(), Definition::isAnonymous(), QCString::isEmpty(), Definition::isHidden(), Definition::isLinkable(), m_usedNodes, Definition::name(), EdgeInfo::Orange, EdgeInfo::Orange2, DotNode::setDistance(), EdgeInfo::Solid, QCString::str(), and stripScope().

Referenced by buildGraph().

◆ buildGraph()

void DotClassGraph::buildGraph ( const ClassDef * cd,
DotNode * n,
bool base,
int distance )
private

Definition at line 249 of file dotclassgraph.cpp.

250{
251 //printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
252 // qPrint(cd->name()),distance,base);
253 // ---- Add inheritance relations
254
256 {
257 for (const auto &bcd : base ? cd->baseClasses() : cd->subClasses())
258 {
259 //printf("-------- inheritance relation %s->%s templ='%s'\n",
260 // qPrint(cd->name()),qPrint(bcd->classDef->name()),qPrint(bcd->templSpecifiers));
261 addClass(bcd.classDef,n,EdgeInfo::protectionToColor(bcd.prot),QCString(),bcd.usedName,bcd.templSpecifiers,base,distance);
262 }
263 }
265 {
266 // ---- Add usage relations
267
268 const UsesClassList &list = base ? cd->usedImplementationClasses() :
270 for (const auto &ucd : list)
271 {
272 //printf("addClass: %s templSpec=%s\n",qPrint(ucd.classDef->name()),qPrint(ucd.templSpecifiers));
273 addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),QCString(),
274 ucd.templSpecifiers,base,distance);
275 }
276 }
277 if (Config_getBool(TEMPLATE_RELATIONS) && base)
278 {
279 for (const auto &ccd : cd->templateTypeConstraints())
280 {
281 //printf("addClass: %s\n",qPrint(ccd.classDef->name()));
282 addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),QCString(),
283 QCString(),TRUE,distance);
284 }
285 }
286
287 // ---- Add template instantiation relations
288
289 if (Config_getBool(TEMPLATE_RELATIONS))
290 {
291 if (base) // template relations for base classes
292 {
293 const ClassDef *templMaster=cd->templateMaster();
294 if (templMaster)
295 {
296 for (const auto &ti : templMaster->getTemplateInstances())
297 if (ti.classDef==cd)
298 {
299 addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),TRUE,distance);
300 }
301 }
302 }
303 else // template relations for super classes
304 {
305 for (const auto &ti : cd->getTemplateInstances())
306 {
307 addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),FALSE,distance);
308 }
309 }
310 }
311}
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual const TemplateInstanceList & getTemplateInstances() const =0
Returns a sorted dictionary with all template instances found for this template class.
virtual const UsesClassList & usedImplementationClasses() const =0
virtual const ConstraintClassList & templateTypeConstraints() const =0
virtual const UsesClassList & usedByImplementationClasses() const =0
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
void addClass(const ClassDef *cd, DotNode *n, EdgeInfo::Colors color, const QCString &label, const QCString &usedName, const QCString &templSpec, bool base, int distance)
static constexpr Colors protectionToColor(Protection prot)
Definition dotnode.h:44
@ Purple
Definition dotnode.h:35
static QCString joinLabels(const StringSet &ss)
@ Collaboration
Definition dotgraph.h:31

References addClass(), ClassDef::baseClasses(), Collaboration, Config_getBool, DotGraph::DotNode, FALSE, ClassDef::getTemplateInstances(), Inheritance, joinLabels(), m_graphType, EdgeInfo::Orange, EdgeInfo::Orange2, EdgeInfo::protectionToColor(), EdgeInfo::Purple, ClassDef::subClasses(), ClassDef::templateMaster(), ClassDef::templateTypeConstraints(), TRUE, ClassDef::usedByImplementationClasses(), and ClassDef::usedImplementationClasses().

Referenced by addClass(), and DotClassGraph().

◆ computeTheGraph()

void DotClassGraph::computeTheGraph ( )
overrideprotectedvirtual

Implements DotGraph.

Definition at line 396 of file dotclassgraph.cpp.

397{
402 m_lrRank ? "LR" : "",
404 TRUE,
405 m_startNode->label(),
407 );
408}
static void computeGraph(DotNode *root, GraphType gt, GraphOutputFormat format, const QCString &rank, bool renderParents, bool backArrows, const QCString &title, QCString &graphStr)
Definition dotgraph.cpp:306
GraphOutputFormat m_graphFormat
Definition dotgraph.h:85
QCString m_theGraph
Definition dotgraph.h:95

References DotGraph::computeGraph(), Inheritance, DotGraph::m_graphFormat, m_graphType, m_lrRank, m_startNode, DotGraph::m_theGraph, and TRUE.

◆ determineTruncatedNodes()

void DotClassGraph::determineTruncatedNodes ( DotNodeDeque & queue,
bool includeParents )
private

Definition at line 114 of file dotclassgraph.cpp.

115{
116 while (!queue.empty())
117 {
118 DotNode *n = queue.front();
119 queue.pop_front();
120 if (n->isVisible() && n->isTruncated()==DotNode::Unknown)
121 {
122 bool truncated = FALSE;
123 for (const auto &dn : n->children())
124 {
125 if (!dn->isVisible())
126 truncated = TRUE;
127 else
128 queue.push_back(dn);
129 }
130 if (includeParents)
131 {
132 for (const auto &dn : n->parents())
133 {
134 if (!dn->isVisible())
135 truncated = TRUE;
136 else
137 queue.push_back(dn);
138 }
139 }
140 n->markAsTruncated(truncated);
141 }
142 }
143}
DotNode & markAsTruncated(bool b=TRUE)
Definition dotnode.h:121
bool isVisible() const
Definition dotnode.h:104
@ Unknown
Definition dotnode.h:76
const DotNodeRefVector & parents() const
Definition dotnode.h:123
const DotNodeRefVector & children() const
Definition dotnode.h:122
TruncState isTruncated() const
Definition dotnode.h:105

References DotNode::children(), DotGraph::DotNode, FALSE, DotNode::isTruncated(), DotNode::isVisible(), DotNode::markAsTruncated(), DotNode::parents(), TRUE, and DotNode::Unknown.

Referenced by DotClassGraph().

◆ determineVisibleNodes()

bool DotClassGraph::determineVisibleNodes ( DotNode * rootNode,
int maxNodes,
bool includeParents )
private

Definition at line 145 of file dotclassgraph.cpp.

147{
148 DotNodeDeque childQueue;
149 DotNodeDeque parentQueue;
150 std::vector<size_t> childTreeWidth;
151 std::vector<size_t> parentTreeWidth;
152 childQueue.push_back(rootNode);
153 if (includeParents) parentQueue.push_back(rootNode);
154 bool firstNode=TRUE; // flag to force reprocessing rootNode in the parent loop
155 // despite being marked visible in the child loop
156 while ((!childQueue.empty() || !parentQueue.empty()) && maxNodes>0)
157 {
158 if (!childQueue.empty())
159 {
160 DotNode *n = childQueue.front();
161 childQueue.pop_front();
162 size_t distance = n->distance();
163 if (!n->isVisible() && distance<=static_cast<size_t>(Config_getInt(MAX_DOT_GRAPH_DEPTH))) // not yet processed
164 {
165 if (distance>0)
166 {
167 size_t oldSize=childTreeWidth.size();
168 if (distance>oldSize)
169 {
170 childTreeWidth.resize(std::max(childTreeWidth.size(),distance));
171 for (size_t i=oldSize;i<distance;i++) childTreeWidth[i]=0;
172 }
173 childTreeWidth[distance-1]+=n->label().length();
174 }
175 n->markAsVisible();
176 maxNodes--;
177 // add direct children
178 for (const auto &dn : n->children())
179 {
180 childQueue.push_back(dn);
181 }
182 }
183 }
184 if (includeParents && !parentQueue.empty())
185 {
186 DotNode *n = parentQueue.front();
187 parentQueue.pop_front();
188 if ((!n->isVisible() || firstNode) && n->distance()<=Config_getInt(MAX_DOT_GRAPH_DEPTH)) // not yet processed
189 {
190 firstNode=FALSE;
191 size_t distance = n->distance();
192 if (distance>0)
193 {
194 size_t oldSize = parentTreeWidth.size();
195 if (distance>oldSize)
196 {
197 parentTreeWidth.resize(std::max(parentTreeWidth.size(),distance));
198 for (size_t i=oldSize;i<distance;i++) parentTreeWidth[i]=0;
199 }
200 parentTreeWidth[distance-1]+=n->label().length();
201 }
202 n->markAsVisible();
203 maxNodes--;
204 // add direct parents
205 for (const auto &dn : n->parents())
206 {
207 parentQueue.push_back(dn);
208 }
209 }
210 }
211 }
212 if (Config_getBool(UML_LOOK)) return FALSE; // UML graph are always top to bottom
213 size_t maxWidth=0;
214 size_t maxHeight=std::max(childTreeWidth.size(),parentTreeWidth.size());
215 for (size_t i=0;i<childTreeWidth.size();i++)
216 {
217 if (childTreeWidth.at(i)>maxWidth) maxWidth=childTreeWidth.at(i);
218 }
219 for (size_t i=0;i<parentTreeWidth.size();i++)
220 {
221 if (parentTreeWidth.at(i)>maxWidth) maxWidth=parentTreeWidth.at(i);
222 }
223 //printf("max tree width=%d, max tree height=%d\n",maxWidth,maxHeight);
224 return maxWidth>80 && maxHeight<12; // used metric to decide to render the tree
225 // from left to right instead of top to bottom,
226 // with the idea to render very wide trees in
227 // left to right order.
228}
int distance() const
Definition dotnode.h:106
void markAsVisible(bool b=TRUE)
Definition dotnode.h:120
QCString label() const
Definition dotnode.h:102
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153

References DotNode::children(), Config_getBool, Config_getInt, DotNode::distance(), DotGraph::DotNode, FALSE, DotNode::isVisible(), DotNode::label(), QCString::length(), DotNode::markAsVisible(), DotNode::parents(), and TRUE.

Referenced by DotClassGraph().

◆ getBaseName()

QCString DotClassGraph::getBaseName ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 379 of file dotclassgraph.cpp.

380{
381 switch (m_graphType)
382 {
384 return m_collabFileName;
385 break;
387 return m_inheritFileName;
388 break;
389 default:
390 ASSERT(0);
391 break;
392 }
393 return "";
394}
#define ASSERT(x)
Definition qcstring.h:39

References ASSERT, Collaboration, Inheritance, m_collabFileName, m_graphType, and m_inheritFileName.

◆ getImgAltText()

QCString DotClassGraph::getImgAltText ( ) const
overrideprotectedvirtual

Reimplemented from DotGraph.

Definition at line 429 of file dotclassgraph.cpp.

430{
431 switch (m_graphType)
432 {
434 return "Collaboration graph";
435 break;
437 return "Inheritance graph";
438 break;
439 default:
440 ASSERT(0);
441 break;
442 }
443 return "";
444}

References ASSERT, Collaboration, Inheritance, and m_graphType.

◆ getMapLabel()

QCString DotClassGraph::getMapLabel ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 410 of file dotclassgraph.cpp.

411{
412 QCString mapName;
413 switch (m_graphType)
414 {
416 mapName="coll_map";
417 break;
419 mapName="inherit_map";
420 break;
421 default:
422 ASSERT(0);
423 break;
424 }
425
426 return escapeCharsInString(m_startNode->label(),FALSE)+"_"+escapeCharsInString(mapName,FALSE);
427}
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3684

References ASSERT, Collaboration, escapeCharsInString(), FALSE, Inheritance, m_graphType, and m_startNode.

◆ isTooBig()

bool DotClassGraph::isTooBig ( ) const

Definition at line 358 of file dotclassgraph.cpp.

359{
360 return numNodes()>=Config_getInt(DOT_GRAPH_MAX_NODES);
361}
int numNodes() const

References Config_getInt, and numNodes().

Referenced by ClassDefImpl::writeCollaborationGraph(), and ClassDefImpl::writeInheritanceGraph().

◆ isTrivial()

bool DotClassGraph::isTrivial ( ) const

Definition at line 350 of file dotclassgraph.cpp.

351{
353 return m_startNode->children().empty() && m_startNode->parents().empty();
354 else
355 return !Config_getBool(UML_LOOK) && m_startNode->children().empty();
356}

References Config_getBool, Inheritance, m_graphType, and m_startNode.

Referenced by generateDEFForClass(), PerlModGenerator::generatePerlModForClass(), generateXMLForClass(), ClassDefImpl::writeCollaborationGraph(), and ClassDefImpl::writeInheritanceGraph().

◆ numNodes()

int DotClassGraph::numNodes ( ) const

Definition at line 363 of file dotclassgraph.cpp.

364{
365 size_t numNodes = 0;
366 numNodes+= m_startNode->children().size();
368 {
369 numNodes+= m_startNode->parents().size();
370 }
371 return static_cast<int>(numNodes);
372}

References Inheritance, m_graphType, m_startNode, and numNodes().

Referenced by isTooBig(), numNodes(), ClassDefImpl::writeCollaborationGraph(), and ClassDefImpl::writeInheritanceGraph().

◆ writeDEF()

void DotClassGraph::writeDEF ( TextStream & t)

Definition at line 477 of file dotclassgraph.cpp.

478{
479 for (const auto &[name,node] : m_usedNodes)
480 {
481 node->writeDEF(t);
482 }
483}

References m_usedNodes.

Referenced by generateDEFForClass().

◆ writeDocbook()

void DotClassGraph::writeDocbook ( TextStream & t)

Definition at line 469 of file dotclassgraph.cpp.

470{
471 for (const auto &[name,node] : m_usedNodes)
472 {
473 node->writeDocbook(t,TRUE);
474 }
475}

References m_usedNodes, and TRUE.

◆ writeGraph()

QCString DotClassGraph::writeGraph ( TextStream & t,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
const QCString & path,
const QCString & fileName,
const QCString & relPath,
bool TBRank = TRUE,
bool imageMap = TRUE,
int graphId = -1 )

Definition at line 446 of file dotclassgraph.cpp.

455{
456 return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
457}
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

References DotGraph::writeGraph().

Referenced by DocbookGenerator::endDotGraph(), HtmlGenerator::endDotGraph(), LatexGenerator::endDotGraph(), and RTFGenerator::endDotGraph().

◆ writeXML()

void DotClassGraph::writeXML ( TextStream & t)

Definition at line 461 of file dotclassgraph.cpp.

462{
463 for (const auto &[name,node] : m_usedNodes)
464 {
465 node->writeXML(t,TRUE);
466 }
467}

References m_usedNodes, and TRUE.

Referenced by generateXMLForClass().

Member Data Documentation

◆ m_collabFileName

QCString DotClassGraph::m_collabFileName
private

Definition at line 63 of file dotclassgraph.h.

Referenced by DotClassGraph(), and getBaseName().

◆ m_graphType

GraphType DotClassGraph::m_graphType
private

◆ m_inheritFileName

QCString DotClassGraph::m_inheritFileName
private

Definition at line 64 of file dotclassgraph.h.

Referenced by DotClassGraph(), and getBaseName().

◆ m_lrRank

bool DotClassGraph::m_lrRank
private

Definition at line 65 of file dotclassgraph.h.

Referenced by computeTheGraph(), and DotClassGraph().

◆ m_startNode

DotNode* DotClassGraph::m_startNode
private

◆ m_usedNodes

DotNodeMap DotClassGraph::m_usedNodes
private

Definition at line 61 of file dotclassgraph.h.

Referenced by addClass(), DotClassGraph(), writeDEF(), writeDocbook(), and writeXML().


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