From f9d748791c1d7e3d2dc4f51bec4f86a6732083e4 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 23 Apr 2015 10:52:16 +0200 Subject: improvement of the lib --- diceparser.cpp | 12 ++++++++++-- diceparser.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/diceparser.cpp b/diceparser.cpp index f2a7ea5..a2015d8 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -915,12 +915,20 @@ bool DiceParser::readOperand(QString& str,ExecutionNode* & node) } return false; } -void DiceParser::displayDotTree() +void DiceParser::writeDownDotTree(QString filepath) { QString str("digraph ExecutionTree {\n"); m_start->generateDotTree(str); str.append("}"); - qDebug()<< str; + + /*QFile file(filepath); + if(file.open(QIODevice::WriteOnly)) + { + QTextStream in(&file); + in << str; + }*/ + + //qDebug()<< str; } diff --git a/diceparser.h b/diceparser.h index 3f80acb..249a630 100644 --- a/diceparser.h +++ b/diceparser.h @@ -121,7 +121,7 @@ public: /** * @brief displayDotTree */ - void displayDotTree(); + void writeDownDotTree(QString filepath); /** * @brief getLastIntegerResult * @return -- cgit v1.2.3-70-g09d2