aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/variablenode.h
blob: 5306ddb2e21a77c490492c0192a3dca130e4a4c2 (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
#ifndef VARIABLENODE_H
#define VARIABLENODE_H

#include "node/executionnode.h"

/**
 * @brief The VariableNode class is an ExecutionNode. It is dedicated to retrive
 *  variable value from other starting node.
 */
class VariableNode : public ExecutionNode
{
public:
    VariableNode();
    void run(ExecutionNode* previous) override;
    virtual QString toString(bool withLabel) const override;
    virtual qint64 getPriority() const override;
    /**
     * @brief getCopy
     * @return
     */
    virtual ExecutionNode* getCopy() const override;
    quint64 getIndex() const;
    void setIndex(quint64 index);

    std::vector<ExecutionNode*>* getData() const;
    void setData(std::vector<ExecutionNode*>* data);

private:
    quint64 m_index;
    std::vector<ExecutionNode*>* m_data= nullptr;
};

#endif // VARIABLENODE_H