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 316 of file dotclassgraph.cpp.

317{
318 //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",qPrint(cd->displayName()));
319 m_graphType = t;
320 QCString tmp_url="";
321 if (cd->isLinkable() && !cd->isHidden())
322 {
323 tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
324 if (!cd->anchor().isEmpty())
325 {
326 tmp_url+="#"+cd->anchor();
327 }
328 }
329 QCString className = cd->displayName();
330 QCString tooltip = cd->briefDescriptionAsTooltip();
331 m_startNode = new DotNode(this,
332 className,
333 tooltip,
334 tmp_url,
335 TRUE, // is a root node
336 cd
337 );
338 m_startNode->setDistance(0);
339 m_usedNodes.emplace(className.str(),m_startNode);
340
343
345 DotNodeDeque openNodeQueue;
346 openNodeQueue.push_back(m_startNode);
348
351}
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 377 of file dotclassgraph.cpp.

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

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:391
void addParent(DotNode *n)
Definition dotnode.cpp:356
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:339
@ 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:4246
QCString stripScope(const QCString &name)
Definition util.cpp:4279

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 252 of file dotclassgraph.cpp.

253{
254 //printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
255 // qPrint(cd->name()),distance,base);
256 // ---- Add inheritance relations
257
259 {
260 for (const auto &bcd : base ? cd->baseClasses() : cd->subClasses())
261 {
262 //printf("-------- inheritance relation %s->%s templ='%s'\n",
263 // qPrint(cd->name()),qPrint(bcd->classDef->name()),qPrint(bcd->templSpecifiers));
264 addClass(bcd.classDef,n,EdgeInfo::protectionToColor(bcd.prot),QCString(),bcd.usedName,bcd.templSpecifiers,base,distance);
265 }
266 }
268 {
269 // ---- Add usage relations
270
271 const UsesClassList &list = base ? cd->usedImplementationClasses() :
273 for (const auto &ucd : list)
274 {
275 //printf("addClass: %s templSpec=%s\n",qPrint(ucd.classDef->name()),qPrint(ucd.templSpecifiers));
276 addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),QCString(),
277 ucd.templSpecifiers,base,distance);
278 }
279 }
280 if (Config_getBool(TEMPLATE_RELATIONS) && base)
281 {
282 for (const auto &ccd : cd->templateTypeConstraints())
283 {
284 //printf("addClass: %s\n",qPrint(ccd.classDef->name()));
285 addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),QCString(),
286 QCString(),TRUE,distance);
287 }
288 }
289
290 // ---- Add template instantiation relations
291
292 if (Config_getBool(TEMPLATE_RELATIONS))
293 {
294 if (base) // template relations for base classes
295 {
296 const ClassDef *templMaster=cd->templateMaster();
297 if (templMaster)
298 {
299 for (const auto &ti : templMaster->getTemplateInstances())
300 if (ti.classDef==cd)
301 {
302 addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),TRUE,distance);
303 }
304 }
305 }
306 else // template relations for super classes
307 {
308 for (const auto &ti : cd->getTemplateInstances())
309 {
310 addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),FALSE,distance);
311 }
312 }
313 }
314}
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 399 of file dotclassgraph.cpp.

400{
405 m_lrRank ? "LR" : "",
407 TRUE,
408 m_startNode->label(),
410 );
411}
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:122
bool isVisible() const
Definition dotnode.h:105
@ Unknown
Definition dotnode.h:77
const DotNodeRefVector & parents() const
Definition dotnode.h:124
const DotNodeRefVector & children() const
Definition dotnode.h:123
TruncState isTruncated() const
Definition dotnode.h:106

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:107
void markAsVisible(bool b=TRUE)
Definition dotnode.h:121
QCString label() const
Definition dotnode.h:103
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 382 of file dotclassgraph.cpp.

383{
384 switch (m_graphType)
385 {
387 return m_collabFileName;
388 break;
390 return m_inheritFileName;
391 break;
392 default:
393 ASSERT(0);
394 break;
395 }
396 return "";
397}
#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 432 of file dotclassgraph.cpp.

433{
434 switch (m_graphType)
435 {
437 return "Collaboration graph";
438 break;
440 return "Inheritance graph";
441 break;
442 default:
443 ASSERT(0);
444 break;
445 }
446 return "";
447}

References ASSERT, Collaboration, Inheritance, and m_graphType.

◆ getMapLabel()

QCString DotClassGraph::getMapLabel ( ) const
overrideprotectedvirtual

Implements DotGraph.

Definition at line 413 of file dotclassgraph.cpp.

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

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

◆ isTooBig()

bool DotClassGraph::isTooBig ( ) const

Definition at line 361 of file dotclassgraph.cpp.

362{
363 return numNodes()>=Config_getInt(DOT_GRAPH_MAX_NODES);
364}
int numNodes() const

References Config_getInt, and numNodes().

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

◆ isTrivial()

bool DotClassGraph::isTrivial ( ) const

Definition at line 353 of file dotclassgraph.cpp.

354{
356 return m_startNode->children().empty() && m_startNode->parents().empty();
357 else
358 return !Config_getBool(UML_LOOK) && m_startNode->children().empty();
359}

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 366 of file dotclassgraph.cpp.

367{
368 size_t numNodes = 0;
369 numNodes+= m_startNode->children().size();
371 {
372 numNodes+= m_startNode->parents().size();
373 }
374 return static_cast<int>(numNodes);
375}

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 480 of file dotclassgraph.cpp.

481{
482 for (const auto &[name,node] : m_usedNodes)
483 {
484 node->writeDEF(t);
485 }
486}

References m_usedNodes.

Referenced by generateDEFForClass().

◆ writeDocbook()

void DotClassGraph::writeDocbook ( TextStream & t)

Definition at line 472 of file dotclassgraph.cpp.

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

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 449 of file dotclassgraph.cpp.

458{
459 return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
460}
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 464 of file dotclassgraph.cpp.

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

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: