diff options
| author | 2015-08-27 17:01:59 +0200 | |
|---|---|---|
| committer | 2015-08-27 17:01:59 +0200 | |
| commit | 41b9202ef9102cb94e5b3fdcf8ce760509abaa49 (patch) | |
| tree | 177a21853ec3f272d6a52b3968ee1a7eaa1ca107 /diceparser.cpp | |
| parent | 372e9cc02d36f40a70faa5e45ce648cdd8b98850 (diff) | |
| parent | 0e4d08bf25a81ac68635f526f17ae5e82152cb10 (diff) | |
| download | OneRoll-41b9202ef9102cb94e5b3fdcf8ce760509abaa49.tar.gz OneRoll-41b9202ef9102cb94e5b3fdcf8ce760509abaa49.zip | |
Merge branch 'doneWork'
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 23 |
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(); |