summaryrefslogtreecommitdiffstats
path: root/src/dotclassgraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotclassgraph.cpp')
-rw-r--r--src/dotclassgraph.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/dotclassgraph.cpp b/src/dotclassgraph.cpp
index e157ec3..4077d5b 100644
--- a/src/dotclassgraph.cpp
+++ b/src/dotclassgraph.cpp
@@ -20,12 +20,6 @@
#include "config.h"
#include "util.h"
-#define HIDE_SCOPE_NAMES Config_getBool(HIDE_SCOPE_NAMES)
-#define MAX_DOT_GRAPH_DEPTH Config_getInt(MAX_DOT_GRAPH_DEPTH)
-#define UML_LOOK Config_getBool(UML_LOOK)
-#define TEMPLATE_RELATIONS Config_getBool(TEMPLATE_RELATIONS)
-#define DOT_GRAPH_MAX_NODES Config_getInt(DOT_GRAPH_MAX_NODES)
-
void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
const char *label,const char *usedName,const char *templSpec,bool base,int distance)
{
@@ -71,7 +65,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
else // new class
{
QCString displayName=className;
- if (HIDE_SCOPE_NAMES) displayName=stripScope(displayName);
+ if (Config_getBool(HIDE_SCOPE_NAMES)) displayName=stripScope(displayName);
QCString tmp_url;
if (cd->isLinkable() && !cd->isHidden())
{
@@ -162,7 +156,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
{
DotNode *n = childQueue.take(0);
int distance = n->distance();
- if (!n->isVisible() && distance<=MAX_DOT_GRAPH_DEPTH) // not yet processed
+ if (!n->isVisible() && distance<=Config_getInt(MAX_DOT_GRAPH_DEPTH)) // not yet processed
{
if (distance>0)
{
@@ -191,7 +185,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
if (includeParents && parentQueue.count()>0)
{
DotNode *n = parentQueue.take(0);
- if ((!n->isVisible() || firstNode) && n->distance()<=MAX_DOT_GRAPH_DEPTH) // not yet processed
+ if ((!n->isVisible() || firstNode) && n->distance()<=Config_getInt(MAX_DOT_GRAPH_DEPTH)) // not yet processed
{
firstNode=FALSE;
int distance = n->distance();
@@ -220,7 +214,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
}
}
}
- if (UML_LOOK) return FALSE; // UML graph are always top to bottom
+ if (Config_getBool(UML_LOOK)) return FALSE; // UML graph are always top to bottom
int maxWidth=0;
int maxHeight=(int)QMAX(childTreeWidth.size(),parentTreeWidth.size());
uint i;
@@ -293,7 +287,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
}
}
}
- if (TEMPLATE_RELATIONS && base)
+ if (Config_getBool(TEMPLATE_RELATIONS) && base)
{
ConstraintClassDict *dict = cd->templateTypeConstraints();
if (dict)
@@ -311,7 +305,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
// ---- Add template instantiation relations
- if (TEMPLATE_RELATIONS)
+ if (Config_getBool(TEMPLATE_RELATIONS))
{
if (base) // template relations for base classes
{
@@ -376,7 +370,7 @@ DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
buildGraph(cd,m_startNode,TRUE,1);
if (t==Inheritance) buildGraph(cd,m_startNode,FALSE,1);
- m_lrRank = determineVisibleNodes(m_startNode,DOT_GRAPH_MAX_NODES,t==Inheritance);
+ m_lrRank = determineVisibleNodes(m_startNode,Config_getInt(DOT_GRAPH_MAX_NODES),t==Inheritance);
QList<DotNode> openNodeQueue;
openNodeQueue.append(m_startNode);
determineTruncatedNodes(openNodeQueue,t==Inheritance);
@@ -390,12 +384,12 @@ bool DotClassGraph::isTrivial() const
if (m_graphType==Inheritance)
return m_startNode->children()==0 && m_startNode->parents()==0;
else
- return !UML_LOOK && m_startNode->children()==0;
+ return !Config_getBool(UML_LOOK) && m_startNode->children()==0;
}
bool DotClassGraph::isTooBig() const
{
- return numNodes()>=DOT_GRAPH_MAX_NODES;
+ return numNodes()>=Config_getInt(DOT_GRAPH_MAX_NODES);
}
int DotClassGraph::numNodes() const