aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/parenthesesnode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-11-28 00:36:15 +0100
committerRenaud G <renaud@rolisteam.org>2016-11-28 00:36:15 +0100
commit13e297604b00615d47352538e3c82ea1ac700d4c (patch)
tree567efe03594d261831897f03a7821c4c6eeac59b /node/parenthesesnode.cpp
parentcdd1716bd1aa8d9bbd0137aa98ff24867b6b3a0e (diff)
downloadOneRoll-13e297604b00615d47352538e3c82ea1ac700d4c.tar.gz
OneRoll-13e297604b00615d47352538e3c82ea1ac700d4c.zip
-Add API for copying a branch of execution node.
-Allow to use if node several times.
Diffstat (limited to 'node/parenthesesnode.cpp')
-rw-r--r--node/parenthesesnode.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/node/parenthesesnode.cpp b/node/parenthesesnode.cpp
index 7eefaba..2383226 100644
--- a/node/parenthesesnode.cpp
+++ b/node/parenthesesnode.cpp
@@ -66,3 +66,17 @@ qint64 ParenthesesNode::getPriority() const
qint64 priority=3;
return priority;
}
+ExecutionNode* ParenthesesNode::getCopy() const
+{
+ ParenthesesNode* node = new ParenthesesNode();
+ if(NULL!=m_internalNode)
+ {
+ node->setInternelNode(m_internalNode->getCopy());
+ }
+ if(NULL!=m_nextNode)
+ {
+ node->setNextNode(m_nextNode->getCopy());
+ }
+ return node;
+
+}