diff options
| author | 2026-03-15 11:42:31 +0100 | |
|---|---|---|
| committer | 2026-03-15 10:57:32 +0000 | |
| commit | 6a91d28cf161e5a121d7bc09453e23455a109cbb (patch) | |
| tree | b69f9c82098dd52863c3d22fc52953eb432bc4c7 /src/libparser/node/ifnode.cpp | |
| parent | ef1e7c6d4244f60094d2c703324f0490320277af (diff) | |
| download | OneRoll-6a91d28cf161e5a121d7bc09453e23455a109cbb.tar.gz OneRoll-6a91d28cf161e5a121d7bc09453e23455a109cbb.zip | |
[tree]: improve tree generation
Diffstat (limited to 'src/libparser/node/ifnode.cpp')
| -rw-r--r-- | src/libparser/node/ifnode.cpp | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/libparser/node/ifnode.cpp b/src/libparser/node/ifnode.cpp index 62821ae..a448ab1 100644 --- a/src/libparser/node/ifnode.cpp +++ b/src/libparser/node/ifnode.cpp @@ -21,7 +21,8 @@ #include "result/diceresult.h" #include "validatorlist.h" -PartialDiceRollNode::PartialDiceRollNode() : m_diceResult(new DiceResult) +PartialDiceRollNode::PartialDiceRollNode() + : ExecutionNode("%1 [label=\"PartialDiceRollNode \"]"), m_diceResult(new DiceResult) { m_result= m_diceResult; } @@ -54,18 +55,6 @@ qint64 PartialDiceRollNode::getPriority() const return priority; } -QString PartialDiceRollNode::toString(bool withLabel) const -{ - if(withLabel) - { - return QString("%1 [label=\"PartialDiceRollNode \"]").arg(m_id); - } - else - { - return m_id; - } -} - DiceResult* getFirstDiceResult(Result* result) { DiceResult* found= nullptr; @@ -81,7 +70,8 @@ DiceResult* getFirstDiceResult(Result* result) return found; } -IfNode::IfNode() : m_conditionType(Dice::AllOfThem), m_true(nullptr), m_false(nullptr) +IfNode::IfNode() + : ExecutionNode("%1 [label=\"IfNode\"]"), m_conditionType(Dice::AllOfThem), m_true(nullptr), m_false(nullptr) { // m_result = new DiceResult(); } @@ -292,18 +282,6 @@ void IfNode::generateDotTree(QString& s) } } -QString IfNode::toString(bool wl) const -{ - if(wl) - { - return QString("%1 [label=\"IfNode\"]").arg(m_id); - } - else - { - return m_id; - } -} - qint64 IfNode::getPriority() const { return 0; |