aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-08-27 17:01:59 +0200
committerRenaud G <renaud@rolisteam.org>2015-08-27 17:01:59 +0200
commit41b9202ef9102cb94e5b3fdcf8ce760509abaa49 (patch)
tree177a21853ec3f272d6a52b3968ee1a7eaa1ca107 /diceparser.cpp
parent372e9cc02d36f40a70faa5e45ce648cdd8b98850 (diff)
parent0e4d08bf25a81ac68635f526f17ae5e82152cb10 (diff)
downloadOneRoll-41b9202ef9102cb94e5b3fdcf8ce760509abaa49.tar.gz
OneRoll-41b9202ef9102cb94e5b3fdcf8ce760509abaa49.zip
Merge branch 'doneWork'
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index 3831400..8c910a2 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -393,6 +393,29 @@ QString DiceParser::getStringResult()
}
return str;
}
+QStringList DiceParser::getAllStringResult(bool& hasAlias)
+{
+ ExecutionNode* next = getLeafNode();
+ Result* result=next->getResult();
+ QStringList stringListResult;
+
+ while(NULL!=result)
+ {
+ if(result->hasResultOfType(Result::STRING))
+ {
+ StringResult* stringResult = dynamic_cast<StringResult*>(result);
+ if(NULL!=stringResult)
+ {
+ stringListResult << stringResult->getText();
+ hasAlias = stringResult->hasHighLight();
+ }
+ }
+ result = result->getPrevious();
+ }
+
+ return stringListResult;
+}
+
void DiceParser::getLastDiceResult(ExportedDiceResult& diceValues)
{
ExecutionNode* next = getLeafNode();