From cbca2bdcd77ce0ab6b907cf2d4bab65340a57f00 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 23 Jul 2018 16:12:13 +0200 Subject: Combined lrRank and rank parameters for computeMd5Signature --- src/dot.cpp | 29 +++++++++++------------------ src/dot.h | 8 ++++---- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/dot.cpp b/src/dot.cpp index 3bed539..7b29569 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3071,26 +3071,21 @@ DotClassGraph::~DotClassGraph() QCString computeMd5Signature(DotNode *root, DotNode::GraphType gt, GraphOutputFormat format, - bool lrRank, + const QCString &rank, // either "LR", "RL", or "" bool renderParents, bool backArrows, const QCString &title, - QCString &graphStr, - const char *rank + QCString &graphStr ) { //printf("computeMd5Signature\n"); QGString buf; FTextStream md5stream(&buf); writeGraphHeader(md5stream,title); - if (rank) + if (!rank.isEmpty()) { md5stream << " rankdir=\"" << rank << "\";" << endl; } - else if (lrRank) - { - md5stream << " rankdir=\"LR\";" << endl; - } root->clearWriteFlag(); root->write(md5stream, gt, @@ -3138,18 +3133,17 @@ static bool updateDotGraph(DotNode *root, DotNode::GraphType gt, const QCString &baseName, GraphOutputFormat format, - bool lrRank, + const QCString &rank, bool renderParents, bool backArrows, - const QCString &title=QCString(), - const char *rank = NULL + const QCString &title=QCString() ) { QCString theGraph; // TODO: write graph to theGraph, then compute md5 checksum QCString md5 = computeMd5Signature( - root,gt,format,lrRank,renderParents, - backArrows,title,theGraph, rank); + root,gt,format,rank,renderParents, + backArrows,title,theGraph); QFile f(baseName+".dot"); if (f.open(IO_WriteOnly)) { @@ -3209,7 +3203,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, m_graphType, absBaseName, graphFormat, - m_lrRank, + m_lrRank ? "LR" : "", m_graphType==DotNode::Inheritance, TRUE, m_startNode->label() @@ -3569,7 +3563,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, DotNode::Dependency, absBaseName, graphFormat, - FALSE, // lrRank + "", // lrRank FALSE, // renderParents m_inverse, // backArrows m_startNode->label() @@ -3887,11 +3881,10 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma DotNode::CallGraph, absBaseName, graphFormat, - TRUE, // lrRank + m_inverse ? "RL" : "LR", // lrRank FALSE, // renderParents m_inverse, // backArrows - m_startNode->label(), - (m_inverse ? "RL" : "LR") + m_startNode->label() ) || !checkDeliverables(graphFormat==GOF_BITMAP ? absImgName : usePDFLatex ? absPdfName : absEpsName, diff --git a/src/dot.h b/src/dot.h index 37832af..3a70d8b 100644 --- a/src/dot.h +++ b/src/dot.h @@ -133,12 +133,12 @@ class DotNode friend QCString computeMd5Signature( DotNode *root, GraphType gt, - GraphOutputFormat f, - bool lrRank, bool renderParents, + GraphOutputFormat f, + const QCString &rank, + bool renderParents, bool backArrows, const QCString &title, - QCString &graphStr, - const char *rank + QCString &graphStr ); }; -- cgit v0.12