]> ruin.nu Git - popboot.git/blob - node.h
small change
[popboot.git] / node.h
1 #ifndef __node_h__
2 #define __node_h__
3
4 #include <vector>
5 #include <utility>
6 #include "action.h"
7
8 class Node {
9
10         public:
11                 Node(const Action& action);
12                 Node();
13                 Node(const Node& node);
14                 virtual ~Node(){}
15                 void addChild(Node* node);
16                 const Action& action() const;
17                 void execute(const Literals& effects);
18                 bool executed() const;
19                 const Literals& effects() const;
20
21         protected:
22                 Action _action;
23                 std::vector<Node*> _children;
24                 Preconditions _preconditions;
25                 bool _executed;
26                 Literals _effects;
27 };
28
29 class StartNode :public Node {
30         public:
31                 StartNode(const Literals& init);
32 };
33
34 class EndNode :public Node {
35         public:
36                 EndNode(const Literals& goal);
37 };
38
39 #endif