aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libparser/node/forloopnode.h
blob: a9acf2052b1108dead0bd4559fb5813ce4e4bb62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FORLOOPNODE_H
#define FORLOOPNODE_H

#include "executionnode.h"
#include "result/diceresult.h"
#include <memory>

class MockNode : public ExecutionNode
{
public:
    MockNode();
    void run(ExecutionNode* node);
    void setResult(Result* result);
    QString toString(bool withLabel) const;
    qint64 getPriority() const;
    ExecutionNode* getCopy() const;
};

class ForLoopNode : public ExecutionNode
{
public:
    ForLoopNode();
    void run(ExecutionNode* previous);

    void setInternal(ExecutionNode* internal);

    QString toString(bool withLabel) const;
    qint64 getPriority() const;
    ExecutionNode* getCopy() const;

private:
    std::unique_ptr<ExecutionNode> m_internal;
    DiceResult* m_diceResult;
};

#endif // FORLOOPNODE_H