diff options
| author | 2020-03-28 01:08:11 +0000 | |
|---|---|---|
| committer | 2020-03-28 01:08:11 +0000 | |
| commit | 944072519b4e7bc31e93024ece61b1079f7427a5 (patch) | |
| tree | 522475f7c4d5dade1c0b3482ab35d3f625b99ebe /node/ifnode.h | |
| parent | 932d863c2a2c9b08d8ce1f4e1041e5795daedc6d (diff) | |
| parent | 088b2fa45dc2c763187109ec7d77f9eb096e498e (diff) | |
| download | OneRoll-944072519b4e7bc31e93024ece61b1079f7427a5.tar.gz OneRoll-944072519b4e7bc31e93024ece61b1079f7427a5.zip | |
Merge branch 'repeat2' into 'master'
All new features
See merge request kde/rolisteam-diceparser!4
Diffstat (limited to 'node/ifnode.h')
| -rw-r--r-- | node/ifnode.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/node/ifnode.h b/node/ifnode.h index 55a6051..f0046f0 100644 --- a/node/ifnode.h +++ b/node/ifnode.h @@ -20,10 +20,11 @@ #ifndef IFNODE_H #define IFNODE_H +#include "diceparserhelper.h" #include "executionnode.h" #include "result/diceresult.h" -#include "validator.h" -#include <QDebug> + +class ValidatorList; class PartialDiceRollNode : public ExecutionNode { public: @@ -46,16 +47,6 @@ class IfNode : public ExecutionNode { public: /** - * @brief The ConditionType enum - */ - enum ConditionType - { - OnEach, - OneOfThem, - AllOfThem, - OnScalar - }; - /** * @brief IfNode */ IfNode(); @@ -71,7 +62,7 @@ public: /** * @brief setValidator */ - virtual void setValidator(Validator*); + virtual void setValidatorList(ValidatorList*); /** * @brief setInstructionTrue */ @@ -105,20 +96,20 @@ public: * @brief getConditionType * @return */ - ConditionType getConditionType() const; + Dice::ConditionType getConditionType() const; /** * @brief setConditionType * @param conditionType */ - void setConditionType(const IfNode::ConditionType& conditionType); + void setConditionType(const Dice::ConditionType& conditionType); protected: ExecutionNode* getLeafNode(ExecutionNode* node); protected: - Validator* m_validator; - ConditionType m_conditionType; + ValidatorList* m_validatorList= nullptr; + Dice::ConditionType m_conditionType; ExecutionNode* m_true; ExecutionNode* m_false; |