]> ruin.nu Git - popboot.git/blob - node.h
removing unsatisfiable soft conditions
[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                 void satisfyCondition(std::string effect);
21
22         protected:
23                 Action _action;
24                 std::vector<Node*> _children;
25                 Preconditions _preconditions;
26                 bool _executed;
27                 Literals _effects;
28 };
29
30 class StartNode :public Node {
31         public:
32                 StartNode(const Literals& init);
33 };
34
35 class EndNode :public Node {
36         public:
37                 EndNode(const Literals& goal);
38 };
39
40 #endif