diff options
| author | 2017-10-21 18:54:07 +0200 | |
|---|---|---|
| committer | 2017-10-21 18:54:07 +0200 | |
| commit | ca574161aac7f5e49fb239e20b0d2c1d3dfd148d (patch) | |
| tree | 13c0d11a06c283c86212dbd0120670cbe19b14f1 /diceparser.h | |
| parent | fb56a030f6bc70ad775a71f3ccadd27563654e97 (diff) | |
| download | OneRoll-ca574161aac7f5e49fb239e20b0d2c1d3dfd148d.tar.gz OneRoll-ca574161aac7f5e49fb239e20b0d2c1d3dfd148d.zip | |
-better indentation.
-update to C++11 standard
-New way to store result in list.
Diffstat (limited to 'diceparser.h')
| -rw-r--r-- | diceparser.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/diceparser.h b/diceparser.h index 5073142..cd031bb 100644 --- a/diceparser.h +++ b/diceparser.h @@ -102,8 +102,11 @@ public: * @return bool every thing is fine or not */ bool parseLine(QString str); - - + /** + * @brief getStartNodeCount + * @return + */ + int getStartNodeCount() const; /** * @brief Start running the execution tree * @@ -126,20 +129,20 @@ public: */ void writeDownDotTree(QString filepath); /** - * @brief getLastIntegerResult + * @brief getLastIntegerResults * @return */ - qreal getLastIntegerResult(); + QList<qreal> getLastIntegerResults(); /** * @brief getSumOfDiceResult * @return */ - qreal getSumOfDiceResult(); + QList<qreal> getSumOfDiceResult(); /** * @brief getLastDiceResult * @return */ - void getLastDiceResult(ExportedDiceResult& diceValues,bool& homogeneous); + void getLastDiceResult(QList<ExportedDiceResult>& diceValues,bool& homogeneous); /** * @brief hasIntegerResultNotInFirst * @return @@ -164,7 +167,7 @@ public: * @brief getStringResult * @return */ - QString getStringResult(); + QStringList getStringResult(); /** * @brief humanReadableError * @return @@ -307,14 +310,14 @@ private: * @brief getLeafNode * @return */ - ExecutionNode* getLeafNode(); + ExecutionNode* getLeafNode(ExecutionNode* node); /** * @brief hasResultOfType * @param notthelast * @return */ - bool hasResultOfType(Result::RESULT_TYPE,bool notthelast = false); + bool hasResultOfType(Result::RESULT_TYPE, ExecutionNode* node, bool notthelast = false); private: @@ -328,7 +331,8 @@ private: QMap<ExecutionNode::DICE_ERROR_CODE,QString> m_warningMap; - ExecutionNode* m_start; + ExecutionNode* m_start = nullptr; + QList<ExecutionNode*> m_startNodes; ExecutionNode* m_current; QString m_command; ParsingToolBox* m_parsingToolbox; |