aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
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();