From 8087429c108c4f6bef5f792ce256b8d5b8b69101 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 11 Jul 2020 00:45:44 +0200 Subject: Rework exporting --- include/diceparser.h | 64 +++------------------------------------------------- 1 file changed, 3 insertions(+), 61 deletions(-) (limited to 'include/diceparser.h') diff --git a/include/diceparser.h b/include/diceparser.h index eb4dee4..4d5555e 100644 --- a/include/diceparser.h +++ b/include/diceparser.h @@ -89,61 +89,10 @@ public: QList* aliases() const; void cleanAliases(); void insertAlias(DiceAlias*, int); - /** - * @brief getErrorList - * @return - */ - QMap errorMap() const; - /** - * @brief setPathToHelp set the path to the documentation, this path must be adatped to the lang of application etc… - * @param l the path. - */ - void setPathToHelp(QString l); - /** - * @brief allFirstResultAsString - * @return - */ + QString convertAlias(const QString& cmd) const; + QStringList allFirstResultAsString(bool& hasAlias); - /** - * @brief getAllDiceResult - * @param hasAlias - * @return - */ QStringList getAllDiceResult(bool& hasAlias); - /** - * @brief hasSeparator allows to know if the current command has separator. - * @return true when the command has separator, false otherwise. - */ - bool hasSeparator() const; -// beginning of strange code ||||||| parent of af8b69b... change the way diceparser is giving its result. - /** - * @brief getErrorList - * @return - */ - QMap getErrorMap(); - /** - * @brief setPathToHelp set the path to the documentation, this path must be adatped to the lang of application etc… - * @param l the path. - */ - void setPathToHelp(QString l); - /** - * @brief getAllStringResult - * @return - */ - QStringList getAllStringResult(bool& hasAlias); - /** - * @brief getAllDiceResult - * @param hasAlias - * @return - */ - QStringList getAllDiceResult(bool& hasAlias); - /** - * @brief hasSeparator allows to know if the current command has separator. - * @return true when the command has separator, false otherwise. - */ - bool hasSeparator() const; -// END of strange code - QString convertAlias(const QString& cmd) const; // Accessors int startNodeCount() const; @@ -156,12 +105,11 @@ public: QString comment() const; QString humanReadableWarning() const; QString humanReadableError() const; - QJsonObject exportResult() const; + QString resultAsJSon() const; // QStringList stringResult() const; // QStringList allDiceResult(bool& hasAlias) const; // void lastDiceResult(QList& diceValues, bool& homogeneous) const; - // QList sumOfDiceResult() const; // setters void setPathToHelp(QString l); @@ -169,12 +117,6 @@ public: void setComment(const QString& comment); private: - /** - * @brief hasResultOfType - * @param notthelast - * @return - */ - bool hasResultOfType(Dice::RESULT_TYPE, ExecutionNode* node, QVariant& value, bool notthelast= false); bool readBlocInstruction(QString& str, ExecutionNode*& resultnode); private: -- cgit v1.2.3-70-g09d2