diff options
| author | 2015-08-28 00:05:06 +0200 | |
|---|---|---|
| committer | 2015-08-28 00:05:06 +0200 | |
| commit | 3a8b315ab8a448a443cce277f3f26a1996403e06 (patch) | |
| tree | 4e5e5d2509a7eb160a3fc286e89b595079fd871b /diceparser.cpp | |
| parent | f8a6f0f2717ebc4e0125501147a8a3d79a621ad5 (diff) | |
| parent | 41b9202ef9102cb94e5b3fdcf8ce760509abaa49 (diff) | |
| download | OneRoll-3a8b315ab8a448a443cce277f3f26a1996403e06.tar.gz OneRoll-3a8b315ab8a448a443cce277f3f26a1996403e06.zip | |
Merge branch 'master' of github.com:obiwankennedy/DiceParser
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(); |