aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/parenthesesnode.cpp
blob: f62680e9bbf89470a3e32b0598daf53ee49433ed (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
37
38
#ifndef PARENTHESESNODE_H
#define PARENTHESESNODE_H

#include "executionnode.h"
#include "parenthesesnode.h"

ParenthesesNode::ParenthesesNode()
{

}
void ParenthesesNode::setInternelNode(ExecutionNode* node)
{
    m_internalNode = node;
}
void ParenthesesNode::run(ExecutionNode* /*previous*/)
{
    qDebug() << "ParenthesesNode node";
    if(NULL!=m_internalNode)
    {
        m_internalNode->run(this);
        ExecutionNode* temp=m_internalNode;
       while(NULL!=temp->getNextNode())
       {
            temp=temp->getNextNode();
       }
       m_result = temp->getResult();
    }


    if(NULL!=m_nextNode)
    {
        m_nextNode->run(this);
    }
}
QString ParenthesesNode::toString() const
{
    return "ParenthesesNode";
}