]> ruin.nu Git - popboot.git/blob - node.cpp
initial execution of the plan
[popboot.git] / node.cpp
1 #include "node.h"
2 using namespace std;
3
4 Node::Node(Action action){
5         _action = action;
6 }
7
8 Action Node::action(){
9         return _action;
10 }
11
12
13 void Node::addChild(Node* node){
14         _children.push_back(node);
15 }
16
17
18 void Node::execute(){
19         _action.execute();
20         
21         for(vector<Node*>::iterator child = _children.begin(); child != _children.end(); ++child){
22                 (*child)->execute();
23         }
24 }