20
20
#include " config.h"
21
21
#include " util.h"
22
22
23
- #define HIDE_SCOPE_NAMES Config_getBool (HIDE_SCOPE_NAMES)
24
- #define MAX_DOT_GRAPH_DEPTH Config_getInt (MAX_DOT_GRAPH_DEPTH)
25
- #define UML_LOOK Config_getBool (UML_LOOK)
26
- #define TEMPLATE_RELATIONS Config_getBool (TEMPLATE_RELATIONS)
27
- #define DOT_GRAPH_MAX_NODES Config_getInt (DOT_GRAPH_MAX_NODES)
28
-
29
23
void DotClassGraph::addClass (const ClassDef *cd,DotNode *n,int prot,
30
24
const char *label,const char *usedName,const char *templSpec,bool base,int distance)
31
25
{
@@ -71,7 +65,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
71
65
else // new class
72
66
{
73
67
QCString displayName=className;
74
- if (HIDE_SCOPE_NAMES) displayName=stripScope (displayName);
68
+ if (Config_getBool ( HIDE_SCOPE_NAMES) ) displayName=stripScope (displayName);
75
69
QCString tmp_url;
76
70
if (cd->isLinkable () && !cd->isHidden ())
77
71
{
@@ -162,7 +156,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
162
156
{
163
157
DotNode *n = childQueue.take (0 );
164
158
int distance = n->distance ();
165
- if (!n->isVisible () && distance<=MAX_DOT_GRAPH_DEPTH) // not yet processed
159
+ if (!n->isVisible () && distance<=Config_getInt ( MAX_DOT_GRAPH_DEPTH) ) // not yet processed
166
160
{
167
161
if (distance>0 )
168
162
{
@@ -191,7 +185,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
191
185
if (includeParents && parentQueue.count ()>0 )
192
186
{
193
187
DotNode *n = parentQueue.take (0 );
194
- if ((!n->isVisible () || firstNode) && n->distance ()<=MAX_DOT_GRAPH_DEPTH) // not yet processed
188
+ if ((!n->isVisible () || firstNode) && n->distance ()<=Config_getInt ( MAX_DOT_GRAPH_DEPTH) ) // not yet processed
195
189
{
196
190
firstNode=FALSE ;
197
191
int distance = n->distance ();
@@ -220,7 +214,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
220
214
}
221
215
}
222
216
}
223
- if (UML_LOOK) return FALSE ; // UML graph are always top to bottom
217
+ if (Config_getBool ( UML_LOOK) ) return FALSE ; // UML graph are always top to bottom
224
218
int maxWidth=0 ;
225
219
int maxHeight=(int )QMAX (childTreeWidth.size (),parentTreeWidth.size ());
226
220
uint i;
@@ -293,7 +287,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
293
287
}
294
288
}
295
289
}
296
- if (TEMPLATE_RELATIONS && base)
290
+ if (Config_getBool ( TEMPLATE_RELATIONS) && base)
297
291
{
298
292
ConstraintClassDict *dict = cd->templateTypeConstraints ();
299
293
if (dict)
@@ -311,7 +305,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
311
305
312
306
// ---- Add template instantiation relations
313
307
314
- if (TEMPLATE_RELATIONS)
308
+ if (Config_getBool ( TEMPLATE_RELATIONS) )
315
309
{
316
310
if (base) // template relations for base classes
317
311
{
@@ -376,7 +370,7 @@ DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
376
370
buildGraph (cd,m_startNode,TRUE ,1 );
377
371
if (t==Inheritance) buildGraph (cd,m_startNode,FALSE ,1 );
378
372
379
- m_lrRank = determineVisibleNodes (m_startNode,DOT_GRAPH_MAX_NODES,t==Inheritance);
373
+ m_lrRank = determineVisibleNodes (m_startNode,Config_getInt ( DOT_GRAPH_MAX_NODES) ,t==Inheritance);
380
374
QList<DotNode> openNodeQueue;
381
375
openNodeQueue.append (m_startNode);
382
376
determineTruncatedNodes (openNodeQueue,t==Inheritance);
@@ -390,12 +384,12 @@ bool DotClassGraph::isTrivial() const
390
384
if (m_graphType==Inheritance)
391
385
return m_startNode->children ()==0 && m_startNode->parents ()==0 ;
392
386
else
393
- return !UML_LOOK && m_startNode->children ()==0 ;
387
+ return !Config_getBool ( UML_LOOK) && m_startNode->children ()==0 ;
394
388
}
395
389
396
390
bool DotClassGraph::isTooBig () const
397
391
{
398
- return numNodes ()>=DOT_GRAPH_MAX_NODES;
392
+ return numNodes ()>=Config_getInt ( DOT_GRAPH_MAX_NODES) ;
399
393
}
400
394
401
395
int DotClassGraph::numNodes () const
0 commit comments